var req;

function callASPPage_NoReturn(url) {
	req = false;
    // branch for native XMLHttpRequest object
    if(window.XMLHttpRequest) {
    	try {
			req = new XMLHttpRequest();
        } catch(e) {
			req = false;
        }
    // branch for IE/Windows ActiveX version
    } else if(window.ActiveXObject) {
       	try {
        	req = new ActiveXObject("Msxml2.XMLHTTP");
      	} catch(e) {
        	try {
          		req = new ActiveXObject("Microsoft.XMLHTTP");
        	} catch(e) {
          		req = false;
        	}
		}
    }
	
	if(req) {
		req.onreadystatechange = xmlhttpChange;
		req.open("GET", url, true);
		req.send("");
	}
}

function callASPPage_WithReturn(url, functionToCall) 
{
	req = false;
	ajaxSupported = true;
    // branch for native XMLHttpRequest object
    if(window.XMLHttpRequest) {
    	try {
			req = new XMLHttpRequest();
        } catch(e) {
			req = false;
        }
    // branch for IE/Windows ActiveX version
    } else if(window.ActiveXObject) {
       	try {
        	req = new ActiveXObject("Msxml2.XMLHTTP");
      	} catch(e) {
        	try {
          		req = new ActiveXObject("Microsoft.XMLHTTP");
        	} catch(e) {
          		req = false;
        	}
		}
    }
	else
	{
		ajaxSupported = false;
	}
	
	if(req) {
		req.onreadystatechange = functionToCall;
		req.open("GET", url, true);
		req.send("");
	}
	
	return ajaxSupported;
}

function xmlhttpChange()
{

// if xmlhttp shows "loaded"
if (req.readyState==4)
  {
  // if "OK"
  if (req.status==200)
    {
    // ...some code here...
    }
  else
    {
    //alert("Problem retrieving XML data")
    }
  }
}
