var sottoHttp=null;
var richiesta="";
function show_sottomenu(chiamata)
{ 
richiesta=chiamata;
sottoxmlHttp=GetXmlHttpObject();
if (sottoxmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return
 } 
var url="getsottomenu.php";
url=url+"?chiamata="+escape(richiesta);
url=url+"&sid="+Math.random();
sottoxmlHttp.onreadystatechange=stateChangedsmenu; 
sottoxmlHttp.open("GET",url,true);
sottoxmlHttp.send(null);  
}

function stateChangedsmenu() 
{ 
if (sottoxmlHttp.readyState==4 || sottoxmlHttp.readyState=="complete")
 { 
 if(document.getElementById("menu"))
 {
 document.getElementById("menu").innerHTML=sottoxmlHttp.responseText;
 }
 } 
 }

function GetXmlHttpObject()
{
var sottoxmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 sottoxmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  sottoxmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  sottoxmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return sottoxmlHttp;
}
