//for linking values and include files
var faq_values = new Array("location","contact","rma","howTo","why","errors","productQ","productA");
var faq_content = new Array("location.asp","contact.asp","rma.asp","howTo.asp","why.asp","errors.asp","productQ.asp","productA.asp");


var xmlHttp;

function getInclude(whichInclude){ 

	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null){
  		alert ("Your browser does not support AJAX!");
  		return;
  	} 
	var url = "/includes/faq/"+whichInclude;
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function stateChanged(){
  			if(xmlHttp.readyState==4)
    				{
    					document.getElementById("details").innerHTML=xmlHttp.responseText;
    				}
  			}
	
function GetXmlHttpObject(){
 var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}





function controlSelect(value){		

		for(i=0;i<faq_values.length;i++){
			if(value==faq_values[i]){  
				getInclude(faq_content[i]);
			}
		}
	
}
	

function resetForm(){
	document.faqForm.firstSelect.value = "location";
	controlSelect("location");
}

/*

If we need to get the selected index values, here is the format:
thisSelect = whichSelect1.options[whichSelect1.selectedIndex].value;
thatSelect = whichSelect2.options[whichSelect2.selectedIndex].value;
lastSelect = whichSelect3.options[whichSelect3.selectedIndex].value;

*/
