function validateZipCode()
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url=baseurl+"ajax-scripts/validate-zipcode.php"
url=url+"?zipcode="+document.getElementById("form-zipcode").value

xmlHttp.onreadystatechange=stateZipValidation
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateZipValidation ()
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		if(xmlHttp.responseText){
 			document.getElementById("form-zipcode").value=xmlHttp.responseText;
 			document.getElementById("form-zipcode").className="error";
 		}
 		else document.searchform.submit();
	}
}
function clearError(){
	if(document.getElementById("form-zipcode").className=="error"){
		document.getElementById("form-zipcode").className="";
		document.getElementById("form-zipcode").value="";
	}
}


