var xmlhttp = null;
var fnXMLHttpCallback = null;
function getXMLHttp(){
	if(xmlhttp != null) return xmlhttp;
	if(window.XMLHttpRequest){
		xmlhttp = new XMLHttpRequest();
	} else {
		try { 
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
		} catch (e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
			} catch (e) {
				xmlhttp = false; 
			} 
	    }
	}
	return xmlhttp;
}
function openXMLHttpObject(url,fn){
	if(typeof(fn)=='function') fnXMLHttpCallback = fn; else fnXMLHttpCallback = null;
	getXMLHttp();
	xmlhttp.open("GET", url, (typeof(fn)=='function' ? true : false) );
	// if a function has been sent, add it to readystate change, otherwise add the blank function
	if(typeof(fn)=='function') xmlhttp.onreadystatechange = xmlHttpResponse; else xmlhttp.onreadystatechange = nullFunc;
    xmlhttp.send(null);
	if(typeof(fn)!='function') return jQuery.trim(xmlhttp.responseText);
}
function xmlHttpResponse(){
	if(fnXMLHttpCallback && xmlhttp.readyState == 4) fnXMLHttpCallback(jQuery.trim(xmlhttp.responseText));
}
// blank function to call if no function specified  
function nullFunc () {}
