function trim(str)
{
    return str.replace(/^\s+|\s+$/g,"");
}

function GetXmlHttpObject()
{
    var xmlHttp=null;
    try
    {
        // Firefox, Opera 8.0+, Safari
        xmlHttp=new XMLHttpRequest();
    }
    catch (e)
    {
        //Internet Explorer
        try
        {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e)
        {
            xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
    }
    return xmlHttp;
}

///search job/////
function uscityzip()
{

		var city=document.getElementById("location").value;
	
		

			if(city.length>1)
		{

		
					if(city!="")
					{
			
		
							xmlHttp=GetXmlHttpObject()
								if (xmlHttp==null) 
								{
									return
								}
					var url="ind.jsp"
						
					xmlHttp.onreadystatechange=stateChanged337(city)
					xmlHttp.open("GET",url,true)
					xmlHttp.send(null)
					}
		}
}
function stateChanged337(locationcity)
{
	var altercity=locationcity;


	
	var xmlhttp;
	if (window.XMLHttpRequest)
	  {// code for IE7+, Firefox, Chrome, Opera, Safari
	  xmlhttp=new XMLHttpRequest();
	 
	  }
	 else
	  {// code for IE6, IE5
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	xmlhttp.onreadystatechange=function()
	  { 
	  if (xmlhttp.readyState==4 && xmlhttp.status==200)
	    {
		
		 var hh=trim(xmlhttp.responseText);
		 
		
		// alert(data)
		//alert(hh);
		var len=data.length;
		
		//alert(len);
		//alert(len);
	 if(len>2){
			//alert("inside"+data[2])
			//alert("inside"+data[1])
			document.getElementById("location").value=data;
		   
		 }
	    
	    }
	  }
	
	/*
	xmlhttp.open("GET","zip.jsp?disp="+altercity,true);
	xmlhttp.send();
	*/
	

	}
///post job show()///

