var xmlHttp;

function createXMLHttpRequest(){
    if(window.XMLHttpRequest){ //Mozilla
        xmlHttp = new XMLHttpRequest();
    }else if(window.ActiveXObject) { //IE
    	try{
        	xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
        }catch(e){
        	try {
            	xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
        	}catch(e){}
        }
    }
    if(xmlHttp == null){ 
    	alert("error");
    	return false;
    }
}

function sendAsynchronRequest(url,parameter,callback){
	createXMLHttpRequest();	
	if(parameter == null){
		xmlHttp.onreadystatechange = callback;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}else{
		xmlHttp.onreadystatechange = callback;
		xmlHttp.open("POST",url,true);
		xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
		xmlHttp.send(parameter);
	}
}