function xmlhttpnew() {
	var xmlhttp=false;
	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	// JScript gives us Conditional compilation, we can cope with old IE versions.
	// and security blocked creation of the objects.
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} 
		catch (e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} 
			catch (E) {
				xmlhttp = false;
			}
		}
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		try {
			xmlhttp = new XMLHttpRequest();
		} 
		catch (e) {
			xmlhttp=false;
		}
	}
	if (!xmlhttp && window.createRequest) {
		try {
			xmlhttp = window.createRequest();
		} 
		catch (e) {
			xmlhttp=false;
		}
	}
	return xmlhttp;
}

function jsPopup(url,title, waitfor, refreshAfter) {
	if (!waitfor) {
		waitfor=false;
	}
	else {
		waitfor=true;
	}
	xmlHttp=xmlhttpnew();
	if (!xmlHttp) {
		window.open(url, title?title:'JsPopup', 'menubar=no,location=no,resizable=no,scrollbars=no,status=no,left=5000,top=5000,screenX=1,screenY=1,width=1,height=1');
	}
	else{
		xmlHttp.open('GET', url, !waitfor);
		xmlHttp.send(null);
	}
	if (refreshAfter) {
		location.reload(true);
	}
}

function IMpopup(link,title) {
	window.open(link,title,'menubar=no,location=no,resizable=yes,scrollbars=yes,status=yes,width=400,height=540');
}

// Popup window for the help pages
function IMpopupHelp(link,title) {
	window.open(link,title,'menubar=no,location=no,resizable=yes,scrollbars=yes,status=yes,width=900,height=540');
}


