function getCat(id,level) { 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 }
var url=rootdir+"html/downloads/category/catlist.php";
params = "";
params=params+"id="+id;
params=params+"&level="+level;
params=params+"&sid="+Math.random();
xmlHttp.onreadystatechange = stateChangedCat;
xmlHttp.open("POST",url,true);
//Send the proper header information along with the request
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.setRequestHeader("Content-length", params.length);
xmlHttp.setRequestHeader("Connection", "close");
xmlHttp.send(params);

function stateChangedCat() { 
if (xmlHttp.readyState==1) {
showLoading("Loading Category List..","sm","loadcat","loading_cat");
}
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
newlevel = parseInt(level)+1;
var i = newlevel+1;
if($(i)){$(i).innerHTML="";}
var response = xmlHttp.responseText;
if(response) {
$(newlevel).innerHTML=response;
}
if(!response && id!=-1) {
$("category4").value = id;}
hideLoading("loading_cat");
}}}