			function go(state){
				if(document.getElementById('state').value=='Select'){
					var countieSelect=document.getElementById("counties");
					countieSelect.innerHTML="";
					countieOpt=document.createElement("option");
					countieOpt.setAttribute("selected","selected");
					countieOpt.setAttribute("value",'Select Counties');
					countieOpt.innerHTML='Select Counties';
					countieSelect.appendChild(countieOpt);
				}
				else{
					var url="fillcounties.php?state="+state.value;
					retrieveURL(url,'getcounties(m)');
				}
			}
			function getcounties(m){
				var e=eval("["+m+"]");
				var counties=e[0];
				var countieOpt="";
				var countieSelect=document.getElementById("counties");
				countieSelect.innerHTML="";
				countieOpt=document.createElement("option");
				countieOpt.setAttribute("value","");
				countieOpt.innerHTML='All';
				countieSelect.appendChild(countieOpt);
				countieOpt="";
				if(e==''){
					countieOpt=document.createElement("option");
					countieOpt.setAttribute("value","All");
					countieOpt.innerHTML='All';
					countieSelect.appendChild(countieOpt);
					countieOpt="";
				}
				var abc=document.createElement("option");
				for(i in counties){
					res=counties[i];
					countieOpt=document.createElement("option");
					countieOpt.setAttribute("value",res['counties']);
					if(counties2==res['counties'])countieOpt.setAttribute("selected","selected");
					countieOpt.innerHTML=res['counties'];
					countieSelect.appendChild(countieOpt);
					countieOpt="";
				}
			
			}
			function check(form){
				var	valid=new validator(form);
				var str='';
				var returnval=true;
				valid.presenceOf(form.zipcode);
				valid.numericalityOf(form.zipcode);
				if(valid.errorString!=''){
					alert(valid.errorString);
					return false;
				}
				if(document.getElementById('zipcode').value.length>=6){
					alert("Zipcode should be maximum 5 numbers");
					returnval=false;
				}
				return returnval;
			}
