// JavaScript Document
// JavaScript Document
var xmlHttp

function changepage(pagename)
{ 

xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
	alert ("Browser does not support HTTP Request")
	return
}

document.getElementById('ajaximage').style.display = 'block';
document.getElementById('pagecontent').style.display = 'none';
var url="ajaxpagecontent.php"//the php file name come here
url=url+"?pagename="+pagename;
//alert(url);
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange = ShowRateing;
xmlHttp.send(null)
}



function ShowRateing() 
{ 
//alert(xmlHttp.readyState);	
if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete")
{ 
var results = xmlHttp.responseText;
//var i = xmlHttp.responseText
document.getElementById('ajaximage').style.display = 'none';
document.getElementById('pagecontent').style.display = 'block';
document.getElementById('pagecontent').innerHTML = results;
//document.getElementById('flag1_'+i).value = 1;

} 
} 

function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
}


