var xmlHttp;

////////////////////////////////////////////////////////////////////////////////////
function left_content(series)
{

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 } 
document.getElementById("display_left");
var url="/compare.php";
url=url+"?type="+series;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=leftChanged ;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);



xmlHttp2=GetXmlHttpObject()
document.getElementById("change_menu");
var url="/get_menu.php";
url=url+"?type="+series;
url=url+"&sid="+Math.random();
xmlHttp2.onreadystatechange=menuChanged ;
xmlHttp2.open("GET",url,true);
xmlHttp2.send(null);
} 

function leftChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 	document.getElementById("display_left"). innerHTML=xmlHttp.responseText;
	
 } 
}
function menuChanged() 
{ 
if (xmlHttp2.readyState==4 || xmlHttp2.readyState=="complete")
 { 
 	document.getElementById("change_menu"). innerHTML=xmlHttp2.responseText;
	
 } 
}
  
////////////////////////////////////////////////////////////////////////////////////
function right_content(series)
{

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 } 
document.getElementById("display_right");
var url="/compare.php";
url=url+"?type="+series;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=rightChanged ;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 

function rightChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 	document.getElementById("display_right"). innerHTML=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;
}