var xmlHttp

function result(div_field, url)
{ 
	xmlHttp=GetXmlHttpObject()
	
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}

	xmlHttp.onreadystatechange=function() {stateChanged(div_field);};
	
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function stateChanged(div_field) 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById(div_field).innerHTML=xmlHttp.responseText;
	} 
	else
	{
		document.getElementById(div_field).innerHTML=" <img src='http://www.ramadapacific.com/images/rotating_arrow.gif' align='absmiddle'> Retrieving Data, please wait...";
	}
} 

function GetXmlHttpObject()
{ 
	var objXMLHttp=null
	
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp
}



var xmlHttp2

function result2(div_field, url)
{ 
	xmlHttp2=GetXmlHttpObject2()
	
	if (xmlHttp2==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}

	xmlHttp2.onreadystatechange=function() {stateChanged2(div_field);};
	
	xmlHttp2.open("GET",url,true)
	xmlHttp2.send(null)
}

function stateChanged2(div_field) 
{ 
	if (xmlHttp2.readyState==4 || xmlHttp2.readyState=="complete")
	{ 
		document.getElementById(div_field).innerHTML=xmlHttp2.responseText;
	} 
	else
	{
		document.getElementById(div_field).innerHTML=" <img src='http://www.ramadapacific.com/images/rotating_arrow.gif' align='absmiddle'> Retrieving Data, please wait...";
	}
} 

function GetXmlHttpObject2()
{ 
	var objXMLHttp2=null
	
	if (window.XMLHttpRequest)
	{
		objXMLHttp2=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp2=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp2
}

