var xmlHttp;
function getXmlHttp(url){
	xmlHttp.open('GET',url,true);
	xmlHttp.send(null);
}

function postXmlHttp(url, parameters){
	xmlHttp.open('POST', url, true);
	xmlHttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	xmlHttp.setRequestHeader('Content-length', parameters.length);
	xmlHttp.setRequestHeader('Connection', 'close');
	xmlHttp.send(parameters);
}

function checkxmlHttp(){
	xmlHttp=GetXmlHttpObject();
	if(xmlHttp==null) return false;
	else return true;
}

function GetXmlHttpObject(){
	var xmlHttp=null;
	/*try{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e){
		//Internet Explorer
		try{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e){
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}*/
	if(window.XMLHttpRequest){
	  // code for IE7+, Firefox, Chrome, Opera, Safari
		xmlHttp=new XMLHttpRequest();
	}
	else if (window.ActiveXObject){
	  // code for IE6, IE5
		xmlHttp=new ActiveXObject('Microsoft.XMLHTTP');
	}
	return xmlHttp;
}

function AddSIDtoURL(url){
	return url+'&sid='+Math.random();
}
