
var aHTTP = false;
var aParms = ""
var aMethod="POST"
 
function aSetMethod(a){aMethod = a}
function aClearParm(){aParms = ""}
function aAddParm (asName, asValue){aParms += asName + "=" + escape(asValue) + "&"}
	
function aMakeRequest(url) {
		aHTTP = false;
        if (window.XMLHttpRequest) { // Mozilla, Safari, ...
            aHTTP = new XMLHttpRequest();
            if (aHTTP.overrideMimeType) {
                aHTTP.overrideMimeType('text/xml');
            }
        } else if (window.ActiveXObject) { // IE
            try {
                aHTTP = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    aHTTP = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
            }
        }
        if (!aHTTP) {
            alert('There is a problem communicating with the server.  Please try again later.');
            return false;
        }
       
       if(aMethod=="POST"){
			aHTTP.onreadystatechange = function() { p_alertContents(aHTTP); };
	        aHTTP.open('POST', url, true);
	        aHTTP.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		    //alert(aParms)
		    aHTTP.send(aParms);
       }
       else {
			aHTTP.onreadystatechange = function() { p_alertContents(aHTTP); };
			aHTTP.open('GET', url, true);
			aHTTP.send(null);
        }
    }

