
function getHelpPage( call_url ) {
	var httpRequest;

		if (window.XMLHttpRequest) { // Mozilla, Safari, ...
			httpRequest = new XMLHttpRequest();
			if (httpRequest.overrideMimeType) {
				httpRequest.overrideMimeType('text/html');
//				httpRequest.overrideMimeType('text/xml');
//				httpRequest.overrideMimeType('application/x-www-form-urlencoded');
            }
        } 
        else if (window.ActiveXObject) { // IE
            try {
                httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
                } 
                catch (e) {
                           try {
                                httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
                               } 
                             catch (e) {}
                          }
        }

        if (!httpRequest) {
            alert('Giving up : Cannot create an XMLHTTP instance');
            return false;
        }

        httpRequest.onreadystatechange = function() { alertContents(httpRequest); };
        httpRequest.open('POST', call_url, true);
        httpRequest.send(null);
}

function alertContents(httpRequest) {
	// ReadyStates:
	// * 0 (uninitialized)
	// * 1 (loading)
	// * 2 (loaded)
	// * 3 (interactive)
	// * 4 (complete) 
	if (httpRequest.readyState == 4) {
		if (httpRequest.status == 200) {
			httpRequest.onreadystatechange	= null;
			
			var helppage = httpRequest.responseText;
			
			var pageConfigStart = helppage.indexOf('[');
			var pageConfigEnd = helppage.indexOf(']');
			var pageConfig = helppage.substring(pageConfigStart+1,pageConfigEnd);

			helpWindowRef = window.open('','helpwindow',"'"+pageConfig+"'");
//			docRef = helpWindowRef.document.open("text/html","replace");
//			docRef.document.write(helppage);
			helpWindowRef.document.write(helppage);
			helpWindowRef.document.close(); // stop writing - next write = new content
		} else {
			alert('There was a problem with the request.');
		} // status == 200
		
		httpRequest.onreadystatechange	= null;
	} // readyState == 4
} // alertContents

