var xmlHttp;

function opfrm(cat)
{ 
  xmlHttp = GetXmlHttpObject()
  if (xmlHttp == null)
    {
      alert ("il browser non supporta le richieste Http");
      return;
    }
  xmlHttp.onreadystatechange=stateChanged;
  xmlHttp.open("GET",cat,true);
  xmlHttp.send(null);
}    

function stateChanged()
{
  if (xmlHttp.readyState==4  || xmlHttp.readyState=="complete")
    { 
       alert (xmlHttp);
       alert (xmlHttp.readyState);
       alert (xmlHttp.statusText);
       alert (xmlHttp.status);
      //document.getElementById('$row["nome_categoria"]').innerHTML=xmlHttp.responseText;
      document.getElementById("ct").innerHTML=xmlHttp.responseText;
    }
  else
    {
      alert("Problem retrieving data:" + xmlHttp.status);
    }
}

function GetXmlHttpObject()
{
  var xmlHttp = null;
  try
    {
      xmlHttp = new XMLHttpRequest();
    }
  catch (e)
    {
      try
        {
          xmlHttp = new ActiveXObject ("Msxml2.XMLHTTP");
        }
      catch (e)
        {
          xmlHttp = new ActiveXObject ("Microsoft.XMLHTTP");
        }
    }
  return xmlHttp;  
}


function opfrmx( )
  {
    document.getElementById(cat);
    "<iframe src='ifrm.php?cat' id=ifrmcat></ifrm>";
    alert(cat);
    return (true);
   }
   

function opfrmy()
{

document.getElementById(cat);
url = cat;
xmlHttp=null;
if (window.XMLHttpRequest)
  {// code for Firefox, Opera, IE7, etc.
  xmlHttp=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {// code for IE6, IE5
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
if (xmlHttp!=null)
  {
  alert(xmlHttp);
  xmlHttp.onreadystatechange=state_Change;
  xmlHttp.open("POST",url,true);
  xmlHttp.send(null);
  }
else
  {
  alert("Your browser does not support XMLHTTP.");
  }
}

