//function doHttpRequest1() {  // This function does the AJAX request
//var ad = "&"+document.getElementById('ad').value"=";


//http.open("GET", "http://www.skpages.com/classifieds/formrequest.php?aprovince="+document.getElementById('aprovince').value, true);
  
// http.onreadystatechange = getHttpRes;
// http.send(null);
//}



function doHttpRequest1() {  // This function does the AJAX request
//var ad = "&"+document.getElementById('ad').value"=";


http.open("GET", "http://www.reginaclassifieds.net/classifieds/provinceselect.php?aprovince="+document.getElementById('aprovince').value, true);  
  http.onreadystatechange = getHttpResy;
  http.send(null);
}


function getHttpResy() {
  if (http.readyState == 4) { 
    resy = http.responseText;  // These following lines get the response and update the page
    document.getElementById('div2').innerHTML = resy;
	  }
}

function getXHTTPy() {
  var xhttpy;
   try {   // The following "try" blocks get the XMLHTTP object for various browsers…
      xhttpy = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xhttpy = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e2) {
 		 // This block handles Mozilla/Firefox browsers...
	    try {
	      xhttpy = new XMLHttpRequest();
	    } catch (e3) {
	      xhttpy = false;
	    }
      }
    }
  return xhttpy; // Return the XMLHTTP object
}

var http = getXHTTPy(); // This executes when the page first loads.

