var xmlHttp;
var ajaxdestination="";   

function form(){
	xmlHttp=GetXmlHttpObject();
    
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}
	var url="ltd_details.php"
	xmlHttp.onreadystatechange=getstatechange 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function showdetails(ltd,where){
	xmlHttp=GetXmlHttpObject();
    document.getElementById(where).innerHTML ="<img src='loading.gif'>";   
    var d = new Date();

	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request");
		return;
	}
    var url="ltd_details.php";
	url += "?ltd=" + ltd;
    //alert(d.getMilliseconds());
    url += "&refresh="+d.getMilliseconds();
    ajaxdestination=where;  
	xmlHttp.onreadystatechange=getstatechange; 
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function getstatechange() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		//alert(ajaxdestination);
        //document.getElementById(ajaxdestination).style.display = '';  
		document.getElementById(ajaxdestination).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;
}