﻿function onDocumentLoad(){
	call_slides(gl_slide_num);
	start_interval();
	load_users();
}
function get_url(link_url, blank)
	{
		if(blank)var wref = window.open(link_url);		
		else document.location.href = link_url;
	}
	
function initNavButton(button)
{
	var but = document.getElementById('navbut_' + button);
	var but_e = document.getElementById('navbut_' + button + '_e');
	var but_s = document.getElementById('navbut_' + button + '_s');
	try{
		but.onmouseout = null;
		but.onmouseover = null;

		but_e.style.display = "none";
		but_s.style.display = "block";
		but.style.top = "0px";
	}
	catch(e){}
}

function nav_over(button)
{
	var but_e = document.getElementById('navbut_' + button + '_e');
	var but_s = document.getElementById('navbut_' + button + '_s');
	but_e.style.display = "none";
	but_s.style.display = "block";
}

function nav_out(button)
{
	var but_e = document.getElementById('navbut_' + button + '_e');
	var but_s = document.getElementById('navbut_' + button + '_s');
	but_e.style.display = "block";
	but_s.style.display = "none";
}

// ------------  Start of D05 slides -------------------------
var counter="";
var gl_max_slide_num = 5;
var timeout = slides_rate * 1000;

function start_interval(){
	if(counter==""){
		counter=window.setInterval("call_slides(gl_slide_num)",timeout);
		}
}

function stop_interval(){
	if(counter!=""){
		window.clearInterval(counter);
		counter="";
	}
}	

function arrow(type){
	if(type == "next"){
		call_slides(gl_slide_num);
	}
	else{
		if(gl_slide_num == 5) {call_slides(1);gl_slide_num = 2}
		else if(gl_slide_num == 4) {call_slides(5);gl_slide_num = 1}
		else if(gl_slide_num == 3) {call_slides(4);gl_slide_num = 5}
		else if(gl_slide_num == 2) {call_slides(3);gl_slide_num = 4}
		else if(gl_slide_num == 1) {call_slides(2);gl_slide_num = 3}
	}
}



function call_slide(slide_num){
	if(navigator.appVersion.indexOf("MSIE 6")!= "-1")	document.getElementById("d05-1").filters[0].apply();
	if(slide_num == 1){		
		document.getElementById("slide1").style.display = "block";document.getElementById("slide_but1").style.fontWeight = "bold";
		document.getElementById("slide2").style.display = "none";document.getElementById("slide_but2").style.fontWeight = "normal";
		document.getElementById("slide3").style.display = "none";document.getElementById("slide_but3").style.fontWeight = "normal";
		document.getElementById("slide4").style.display = "none";document.getElementById("slide_but4").style.fontWeight = "normal";
		document.getElementById("slide5").style.display = "none";document.getElementById("slide_but5").style.fontWeight = "normal";
	}
	else if(slide_num == 2){
		document.getElementById("slide1").style.display = "none";document.getElementById("slide_but1").style.fontWeight = "normal";
		document.getElementById("slide2").style.display = "block";document.getElementById("slide_but2").style.fontWeight = "bold";
		document.getElementById("slide3").style.display = "none";document.getElementById("slide_but3").style.fontWeight = "normal";
		document.getElementById("slide4").style.display = "none";document.getElementById("slide_but4").style.fontWeight = "normal";
		document.getElementById("slide5").style.display = "none";document.getElementById("slide_but5").style.fontWeight = "normal";
	}
	else if(slide_num == 3){
		document.getElementById("slide1").style.display = "none";document.getElementById("slide_but1").style.fontWeight = "normal";
		document.getElementById("slide2").style.display = "none";document.getElementById("slide_but2").style.fontWeight = "normal";
		document.getElementById("slide3").style.display = "block";document.getElementById("slide_but3").style.fontWeight = "bold";
		document.getElementById("slide4").style.display = "none";document.getElementById("slide_but4").style.fontWeight = "normal";
		document.getElementById("slide5").style.display = "none";document.getElementById("slide_but5").style.fontWeight = "normal";
	}
	else if(slide_num == 4){
		document.getElementById("slide1").style.display = "none";document.getElementById("slide_but1").style.fontWeight = "normal";
		document.getElementById("slide2").style.display = "none";document.getElementById("slide_but2").style.fontWeight = "normal";
		document.getElementById("slide3").style.display = "none";document.getElementById("slide_but3").style.fontWeight = "normal";
		document.getElementById("slide4").style.display = "block";document.getElementById("slide_but4").style.fontWeight = "bold";
		document.getElementById("slide5").style.display = "none";document.getElementById("slide_but5").style.fontWeight = "normal";
	}
	else if(slide_num == 5){
		document.getElementById("slide1").style.display = "none";document.getElementById("slide_but1").style.fontWeight = "normal";
		document.getElementById("slide2").style.display = "none";document.getElementById("slide_but2").style.fontWeight = "normal";
		document.getElementById("slide3").style.display = "none";document.getElementById("slide_but3").style.fontWeight = "normal";
		document.getElementById("slide4").style.display = "none";document.getElementById("slide_but4").style.fontWeight = "normal";
		document.getElementById("slide5").style.display = "block";document.getElementById("slide_but5").style.fontWeight = "bold";
	}
	if(navigator.appVersion.indexOf("MSIE 6")!= "-1")	document.getElementById("d05-1").filters[0].play();
}

function call_slides(slide_num){
	call_slide(slide_num);			
	gl_slide_num = slide_num + 1;
	if(gl_slide_num > gl_max_slide_num) gl_slide_num = 1;			
}
// ------------  End of D05 slides -------------------------