function createRequestObject(){
/*Intializing the variable xmlhttp */
var xmlhttp=false; 
/* Try and catch block for creating xmlhttp object according to the browser */

try{
	// xmlhttp built into Microsoft xml parser
	xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");

}catch(e){

	try{
	
		/* The xmlhttp object is built into the Microsoft IE. */
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		
	
	}catch(E){
	
		xmlhttp = false;	
	}
}
	if(!xmlhttp && typeof XMLHttpRequest!='Undefined')
	{
			xmlhttp = new XMLHttpRequest();
	
	}
	return xmlhttp;

}

var http= new createRequestObject();
function displaycontent(pagename,pageno,condition, pagesize,totalpages,flag)
{

var url=pagename+"?PageSize="+ pagesize+"&PageNo="+pageno+"&searchtxt="+condition+"&total="+totalpages+"&flag="+flag;

http.open("GET", url, true);
http.onreadystatechange = useHttpResponse;
http.send(null);
}

function useHttpResponse(){
		if(http.readyState == 4)
		{
			if(http.status == 200)
			{
			//alert(http.responseText);
			document.getElementById("pages").innerHTML=http.responseText;
			}	

		}
}


