var myTimer_2;
function startTimer_2() {
		clearTimeout(myTimer_2);								// Remove old timer
		myTimer_2 = setTimeout('kbTimeout_2()',750);			
}
function kbTimeout_2() {
		updateCityState_2();
	}

var url_2 = "/scripts/getzipresults.cfm?noscript=1&requesttimeout=500&param="; // The server-side script

function handleHttpResponse_2() {
  if (http.readyState == 4) {
    // Split the comma delimited response into an array
    results = http.responseText.split(",");
    document.getElementById('shipping_city').value = results[0];
 	document.getElementById('shipping_state').value = results[1];
 	document.getElementById('shipping_country').selectedIndex = results[2]; 	
  }
}

function updateCityState_2() {
  var zipValue_2 = document.getElementById("shipping_zip").value;  
  http.open("GET", url_2 + escape(zipValue_2), true);   
  http.onreadystatechange = handleHttpResponse_2;
  http.send(null);  
}

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();
    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}

var http = getHTTPObject(); // We create the HTTP Object