var ajaxResponse; //this will be the reponse object
//alert('loaded here');
function ajaxMulti(dataSource,idText,xmlOrText,sync,params,method){
	
	var ajaxreq=false
	if(window.XMLHttpRequest){
		//alert('created xmlhttp');
		ajaxreq= new XMLHttpRequest();
	}else if(window.ActiveXObject){
		//alert('did not create xmlhttp');
		ajaxreq = new ActiveXObject("Microsoft.XMLHTTP");
	}else{
		//alert('total failure');
	}
	if(ajaxreq){
		if(method=="GET"){
			//alert(dataSource);
			ajaxreq.open("GET",dataSource);
		}else{
			ajaxreq.open("POST",dataSource,true);
			ajaxreq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
			ajaxreq.setRequestHeader("Content-length", params.length);
			ajaxreq.setRequestHeader("Connection", "close");
		}
		ajaxreq.onreadystatechange=function(){
			//alert(ajaxreq.readyState);
			if(ajaxreq.readyState ==4 && ajaxreq.status == 200){
				//alert("response test = " + xmlOrText + ajaxreq.responseText);
				if(xmlOrText=='text'||xmlOrText=='json'){
					//alert(ajaxreq.responseText);
					ajaxResponse=ajaxreq.responseText;
				}else if(xmlOrText=='xml'){
					//alert(ajaxreq.responseText);
					ajaxResponse=ajaxreq.responseXML;
				}
				ajaxreq=null;
				ajaxRespObj(ajaxResponse, idText);
			}
		}
		if(method=="GET"){
			ajaxreq.send(null);
		}else{
			ajaxreq.send(params);
		}
	}
}
