
<!-- Ajax class -->
function ajax(out,param,zapros){
	var that=this;
	that.output=out;
	that.xmlHttp=null;
	that.zapros="";
	if (zapros==null){
		that.zapros="GET";
	}else{
		that.zapros=zapros;
	}
	that.send = function(location,params,legth){
		that.xmlHttp=that.GetXmlHttpObject();
		if (that.xmlHttp==null){
		  alert ("Browser does not support HTTP Request");
		  return;
		}
		url=location;
		that.params=params;
		paramm="";
	 	for(i=0;i<legth;i++) {
	 	 	if (i!=0){paramm=paramm;}
  			paramm=paramm+params[i][0]+"="+params[i][1]+"&";
		}
		that.xmlHttp.onreadystatechange = that.stateChanged;
		if (that.zapros=="GET"){
			url=url+"?"+paramm+"q="+Math.random();
			that.xmlHttp.open("GET",url,true);
			that.xmlHttp.send(null);
		}else{
			that.xmlHttp.open("POST", url, true);
			that.xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
			that.xmlHttp.setRequestHeader("Content-length", params.length);
			that.xmlHttp.setRequestHeader("Connection", "close");
			that.xmlHttp.send(paramm);
		}
	}
	that.doo = function(){
		document.getElementById(that.output).innerHTML=that.get;
	}
	that.stateChanged=function(){
			if (that.xmlHttp.readyState==4 || that.xmlHttp.readyState=="complete"){
				that.get=that.xmlHttp.responseText;
				if (that.xmlHttp.responseXML)that.get_xml=that.xmlHttp.responseXML;
				that.doo();
			}	
		}


	that.GetXmlHttpObject=function(){
			that.xmlHttp=that.newXHR();
			return that.xmlHttp;
	}
	that.newXHR=function(){
		if (window.XMLHttpRequest){
			return new XMLHttpRequest();
		} else if (window.ActiveXObject){
			var axo;
			try{
				axo = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e1){
				try{
					axo = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (e2){
				}
			}
		}
		return axo;
	} 
}
<!-- Ajax class -->


function inputstat(el,img){
	ge(el).innerHTML='<img id="status" src="/images/'+img+'" style="float:left;"></img>'
}

function ge(el){
	return document.getElementById(el);
}

function hide(el){
	ge(el).style.display="none";
}

function show(el){
	ge(el).style.display="block";
}

function disp(el){
	return ge(el).style.display;
}