var xmlHttp
function ajaxer(url,type){
sload();
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null){alert ("Your browser does not support AJAX!");return;} 
xmlHttp.onreadystatechange=stateChanged(type);
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 
function stateChanged(typ)
{if (typ=="smem"){return f1;}
 if (typ=="mmem"){return f2;}
}
function GetXmlHttpObject(){var xmlHttp=null;
try{xmlHttp=new XMLHttpRequest();}
catch (e){
	try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
    catch (e){
		try{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
		catch(e){
			try{xmlHttp = window.createRequest();}
			catch(e){xmlHttp=null;}
				}
			 }
		  }
return xmlHttp;
}
function f1(){if(xmlHttp.readyState==4){document.getElementById('smenu').innerHTML=xmlHttp.responseText;sagain();hload();}}
function f2(){if(xmlHttp.readyState==4){document.getElementById('mmenu').innerHTML=xmlHttp.responseText;magain();hload();}}
function hload(){document.getElementById('loading').style.visibility='hidden';return;}
function sload(){document.getElementById('loading').style.visibility='visible';return;}