// JavaScript Document
var xmlHttp
var destination

function getAjaxData(d, sv){ 
	xmlHttp=GetXmlHttpObject()
	destination = d;
	document.getElementById(destination).innerHTML = "<p>Retrieving Data...Please Wait</p>";
	if (xmlHttp==null){
		document.getElementById(destination).innerHTML = "<p align='center' style='font-size:10px;color:#999999;'>Error:Browser does not support HTTP Request</p>";
		return;
	} 
	var url=pageLink
	url=url+"?q="+sv
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange = stateChanged
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function stateChanged() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
		document.getElementById(destination).innerHTML = xmlHttp.responseText
	} 
} 
function GetXmlHttpObject(){ 
	var objXMLHttp=null
	if (window.XMLHttpRequest){objXMLHttp=new XMLHttpRequest()}
	else if (window.ActiveXObject){
		try{objXMLHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}catch (e){objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");}
	  }
	return objXMLHttp
}
