var xmlHttp_search = createXmlHttpRequestObject();
var xmlHttp; 
function createXmlHttpRequestObject() 
{ 
// will store the reference to the XMLHttpRequest object 
// if running Internet Explorer 

			if(window.ActiveXObject) 
			{
				try 
				{ 
					xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); 
				} 
				catch (e) 
				{ 
					xmlHttp = false; 
				} 
			} 
			// if running Mozilla or other browsers 
			else 
			{ 
				try 
				{ 
				 	xmlHttp = new XMLHttpRequest(); 
				} 
				catch (e) 
				{ 
					xmlHttp = false; 
				} 
			} 	
			// return the created object or display an error message 
			if (!xmlHttp) 
				alert("Error creating the XMLHttpRequest object."); 
			else 
				return xmlHttp; 
} 

function displayPage( currPage, noOfSet ){
	
	//xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	  {
		  alert ("Your browser does not support AJAX!");
		  return;
	  } 
	// --  Send varabiable to server with  url
	document.getElementById("effect").innerHTML="<img src='images/ajax-loader.gif' style='position:absolute; top:620px; left:875px;' border='0' />";
	
	var url = "fetch_result.php?currPage="+currPage+"&noOfSet="+noOfSet; 
	xmlHttp.open("GET",url,true);
	xmlHttp.onreadystatechange=stateChanged2;
	xmlHttp.send(null);
}

function stateChanged2() 
{ 
	var rsult ;
	if (xmlHttp.readyState==4)
	{ 
  	 	//alert(xmlHttp.responseText);
		document.getElementById("effect").innerHTML=xmlHttp.responseText;
		if(ajx_flg != "" && ajx_flg != undefined)
			setFontSize(ajx_flg);
	}
}


