/*----[Start] Ajax functions ----*/
var xmlHttp;
function loadImage(url)	
{
	//alert("working")
	var tblImage = document.getElementById("tblImage")
	tblImage.innerHTML = loadRecords(url)
}
function loadRecords(url){

	xmlHttp=GetXmlHttpObject();
		
	if (xmlHttp==null){
		  alert ("Browser does not support HTTP Request");
		  return;
	} 

	xmlHttp.onreadystatechange=stateChanged ;
	xmlHttp.open("POST",url,false);
	xmlHttp.send();
	//alert("Load Records");
	//setTimeout('xmlHttp.send(null)',10000)
	if (typeof(xmlHttp.responseText)=="unknown") 
	{
		alert("Records could not be loaded because of Browser problem");
	} 
	else 
	{
		return xmlHttp.responseText;
	}
}

function stateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		return 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;
} 
/*----[End] Ajax functions ----*/
