//FUNCTION FOR ADDING A MATCH RESULT
function updatePage() {
  if (http.readyState == 4) {
      var div = document.getElementById('editable');
      div.innerHTML = http.responseText;
      isWorking = false;
  }
}

function getEquipment() {
  if (!isWorking && http) {
    http.open("GET", "equipment.html");
    http.onreadystatechange = updatePage;  
          // this sets the call-back function to be invoked when a response from the HTTP request is returned
    isWorking = true;
    http.send(null);
  }
}


function getPackages() {
  if (!isWorking && http) {
    http.open("GET", "packages.html");
    http.onreadystatechange = updatePage;  
          // this sets the call-back function to be invoked when a response from the HTTP request is returned
    isWorking = true;
    http.send(null);
  }
}

function getQuote() {
  if (!isWorking && http) {
    http.open("GET", "quote.html");
    http.onreadystatechange = updatePage;  
          // this sets the call-back function to be invoked when a response from the HTTP request is returned
    isWorking = true;
    http.send(null);
  }
}


function getContact() {
  if (!isWorking && http) {
    http.open("GET", "contact.html");
    http.onreadystatechange = updatePage;  
          // this sets the call-back function to be invoked when a response from the HTTP request is returned
    isWorking = true;
    http.send(null);
  }
}

function getClients() {
  if (!isWorking && http) {
    http.open("GET", "clients.html");
    http.onreadystatechange = updatePage;  
          // this sets the call-back function to be invoked when a response from the HTTP request is returned
    isWorking = true;
    http.send(null);
  }
}


function getHome() {
  if (!isWorking && http) {
    http.open("GET", "home.html");
    http.onreadystatechange = updatePage;  
          // this sets the call-back function to be invoked when a response from the HTTP request is returned
    isWorking = true;
    http.send(null);
  }
}

function getDesigns() {
  if (!isWorking && http) {
    http.open("GET", "designs.html");
    http.onreadystatechange = updatePage;  
          // this sets the call-back function to be invoked when a response from the HTTP request is returned
    isWorking = true;
    http.send(null);
  }
}




//GET THE HTTP OBJECT
function getHTTPObject() {
  var xmlhttp;
  /*@cc_on
  @if (@_jscript_version >= 5)
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
    }
  @else
  xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
      xmlhttp = new XMLHttpRequest();
      xmlhttp.overrideMimeType("text/xml"); 
    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}

var http = getHTTPObject(); //  create the HTTP Object
var isWorking = false;



