	var xmlhttp;
	var nextnum;
	var interval;
	var type;
	var time;
	var mySlide2;

	
	
	function LoadTime() {
		// alert("next");
		// time = window.setTimeout("Next();",2000);
		mySlide2 = new Fx.Slide('blocfaqweek', {mode: 'horizontal'});
		interval = window.setInterval("scroll()",15001);
	}
	
	function scroll () {
		// time = window.setTimeout("Next();",2000);
		
		mySlide2.slideOut();
		Next();
		
		// interval = window.setInterval("scroll()",3001);
	}
	
	function slideIn () {		
		mySlide2.slideIn();	
	}
	
	function loadDoc(url,next,nextid)
	{
		url = url + "?next=" + next + "&to=" + nextid;
		xmlhttp=null;
		// code for Mozilla, etc.
		if (window.XMLHttpRequest)
	  	{
	  		xmlhttp=new XMLHttpRequest();
	  	}
		// code for IE
		else if (window.ActiveXObject)
	  	{
	  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	  	}
		if (xmlhttp!=null)
	  	{
	  		xmlhttp.onreadystatechange=state_Change;
	  		xmlhttp.open("GET",url,true);
	  		xmlhttp.send(null);
	  	}
		else
	  	{
	  		alert("Your browser does not support XMLHTTP.");
	  	}
	}
	
	function Next() {
		// alert('Next()');
		var url = "getFaq.asp";
		type = "next";
		mySlide2.slideOut();
		//alert(document.getElementById("current").value + "-" +document.getElementById("FAQ1").value);
		if (document.getElementById("current").value == document.getElementById("FAQ1").value) {
			nextnum = 2;
			nextid = document.getElementById("FAQ2").value			
		}
		if (document.getElementById("current").value == document.getElementById("FAQ2").value) {
			nextnum = 3;
			nextid = document.getElementById("FAQ3").value
		}
		if (document.getElementById("current").value == document.getElementById("FAQ3").value) {
			nextnum = 4;
			nextid = document.getElementById("FAQ4").value
		}
		if (document.getElementById("current").value == document.getElementById("FAQ4").value) {
			nextnum = 5;
			nextid = document.getElementById("FAQ5").value
		}
		if (document.getElementById("current").value == document.getElementById("FAQ5").value) {
			nextnum = 1;
			nextid = document.getElementById("FAQ1").value
		}
		
		loadDoc(url,nextnum,nextid)
				
	}
	
	function Prev() {
		
		var url = "getFaq.asp";
		type = "prev";
		mySlide2.slideOut();
		if (document.getElementById("current").value == document.getElementById("FAQ1").value) {
			nextnum = 5;
			nextid = document.getElementById("FAQ5").value
		}
		if (document.getElementById("current").value == document.getElementById("FAQ2").value) {
			nextnum = 1;
			nextid = document.getElementById("FAQ1").value
		}
		if (document.getElementById("current").value == document.getElementById("FAQ3").value) {
			nextnum = 2;
			nextid = document.getElementById("FAQ2").value
		}
		if (document.getElementById("current").value == document.getElementById("FAQ4").value) {
			nextnum = 3;
			nextid = document.getElementById("FAQ3").value
		}
		if (document.getElementById("current").value == document.getElementById("FAQ5").value) {
			nextnum = 4;
			nextid = document.getElementById("FAQ4").value
		}
		
		loadDoc(url,nextnum,nextid)
		
	}
	
	function gotoFaq(num)
	{		
	
		type = "from"
		nextnum = num;
		mySlide2.slideOut();
		nextid = document.getElementById("FAQ"+num).value;
		var url = "getFaq.asp";
		loadDoc(url,nextnum,nextid)
		
	}
	
	function Pause() 
	{
		// window.clearTimeOut(time);
		if (interval!=null) {
			window.clearInterval(interval);
			interval = null;
			document.getElementById("Pauseke").src = "../../images/home_content/play.gif";
		} else {			
			LoadTime();
			document.getElementById("Pauseke").src = "../../images/home_content/pause.gif";
		} 
	}

	function state_Change()
	{
		// if xmlhttp shows "loaded"
		
		if (xmlhttp.readyState==4)
  		{
	  		// if "OK"
	  		if (xmlhttp.status==200)
	    	{
	    		// alert("XML data OK" +  xmlhttp.responseText);
				
	    		document.getElementById("blocfaqweek").innerHTML =  xmlhttp.responseText;				
				if (type="next") {
					if (nextnum > 1) {
						document.getElementById("selec"+(nextnum-1)).src = "../../images/home_content/square_off.png";
					} else {
						document.getElementById("selec5").src = "../../images/home_content/square_off.png";
					}
					document.getElementById("selec"+(nextnum)).src = "../../images/home_content/square_on.png";
				} else {
					if (type != "from") {
						if (nextnum <= 1) {
							document.getElementById("selec1").src = "../../images/home_content/square_off.png";
						} else {
							document.getElementById("selec"+(nextnum+1)).src = "../../images/home_content/square_off.png";
						}
					} 
					document.getElementById("selec"+(nextnum)).src = "../../images/home_content/square_on.png";
				}
				time = window.setTimeout("slideIn();",900);
				
	    	}
	  		else
	    	{
	    		alert("Problem retrieving XML data:" + xmlhttp.statusText);
	    	}
  		}
		
	}
	
	
	