function myajax(url_str, containerid)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
}
//alert(url_str);
url=url_str
xmlHttp.onreadystatechange=function(){ loadpage(xmlHttp, containerid) }
//alert(containerid);
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
//timeOut
setTimeout('timeout()', 500);
}

// because of retrieving the content of AJAX -> disable click on table
function timeout()
{	
	ShowAjax = 1;	
}

function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
}

function loadpage(xmlHttp, containerid){ 
	if (xmlHttp.readyState == 4 && (xmlHttp.status==200 || window.location.href.indexOf("http")==-1))
	{
		if (containerid != "setpagecount")
		document.getElementById(containerid).innerHTML=xmlHttp.responseText;
		else
			pagecount = xmlHttp.responseText;
	}
}