function HTTPRequest(strHost, strURI, strPost) { 
   var http = false;
   
   try {
      http = new ActiveXObject('Msxml2.XMLHTTP'); 
   } catch (e) {
      try {
         http = new ActiveXObject('Microsoft.XMLHTTP');
      } catch (e2) {
         try {
            http = new XMLHttpRequest();
         } catch (e3) {
            http = false;
         }
      }
   }
  
  if (http) {
      http.onreadystatechange = function() {
         if (http.readyState == 4) {
            if (http.status == 200) {
               try { 
                  eval(http.responseText);
               } catch (e3) {
                  alert(http.responseText); 
                  eval(http.responseText);
               }
            } else if (http.status > 0) {
               alert("An error has occured while communicating with the server.\nPlease contact 01760 750922 for assistance.");
            }
         }
      }; 

      strMethod = (strPost != "" ? "POST" : "GET");
      http.open(strMethod, strURI,  true); 
      if (strPost) {
         http.setRequestHeader("Host", strHost);
         http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
         http.setRequestHeader("Content-length", strPost.length);
      }
      http.setRequestHeader("Connection", "close");
      http.send(strPost);
   }
} 