function gotostate(st){
	document.location="http://"+st+".bargainforeclosurehomes.com/";
}
function gotocounty(st,county) {
	document.location="http://"+county+"."+st+".bargainforeclosurehomes.com/";
}
function gotocity(st,county, city) {
	if (city.length==0) {
		document.location="http://"+county+"."+st+".bargainforeclosurehomes.com/";
	}else{
		document.location="http://"+county+"."+st+".bargainforeclosurehomes.com/"+city+".htm";
	}
}
function searchzip(zipcode) {
	document.zipform.action="http://www.bargainforeclosurehomes.com/search.htm?zipcode="+zipcode;
	document.zipform.submit();
	
}
function gotozipcode(st, county, zipcode) {
	if (zipcode.length==0) {
		document.location="http://"+county+"."+st+".bargainforeclosurehomes.com/";
	}else{
		document.location="http://www.bargainforeclosurehomes.com/search.htm?zipcode="+zipcode;
	}
}

function formataNumeros(myfield, e, dec){
	var key;
	var keychar;
	
	if (window.event)
	   key = window.event.keyCode;
	else if (e)
	   key = e.which;
	else
	   return true;
	keychar = String.fromCharCode(key);
	// control keys
	if ((key==null) || (key==0) || (key==8) ||
		(key==9) || (key==13) || (key==27) )
	   return true;
	// numbers
	else if ((("0123456789").indexOf(keychar) > -1))
	   return true;
	// decimal point jump
	else if (dec && (keychar == "."))
	   {
	   myfield.form.elements[dec].focus();
	   return false;
	   }
	else
	   return false;
}//formataNumeros()