function getXMLRequester() {
 var xmlHttp = false;
 /*@cc_on @*/
 /*@if (@_jscript_version >= 5)
 try {
  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
 try {
   xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
 } catch (e2) {
   xmlHttp = false;
 }
 }
 @end @*/

 if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
  xmlHttp = new XMLHttpRequest();
 }
 return xmlHttp;
}

function sendRequest( strSource, strData, intType, responseFunction ) {
 if( !strData ) strData = "";
 if( isNaN( intType ) ) intType = 0;
 var xmlHttp = new getXMLRequester( );
 if( !xmlHttp ) return;
 switch( intType ){
  case 1:   strData = "xml=" + strData;
            break;
  case 2:   xmlHttp.open( "POST", strSource, true );
            xmlHttp.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
            xmlHttp.setRequestHeader( 'Content-length', strData.length );
            break;
  case 3:   xmlHttp.open( "HEAD", strSource, true );
            strData = null;
            break;
  default:  xmlHttp.open( "GET", strSource + (strData ? "?" + strData : "" ), true );
            strData = null;
 }
 xmlHttp.onreadystatechange = 
 function () {
  if( xmlHttp.readyState == 4){ 
   if( xmlHttp.status == 200 ){
    eval(responseFunction + '(xmlHttp.responseText);');
   }
  }
 };
 xmlHttp.send( strData );
}

