function clickclear(thisfield, defaulttext) {
	if (thisfield.value == defaulttext) {
		thisfield.value = "";
	}
}

function clickrecall(thisfield, defaulttext) {
	if (thisfield.value == "") {
		thisfield.value = defaulttext;
	}
}

function IsNumeric(strString)
   //  check for valid numeric strings	
   {
   var strValidChars = "0123456789";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }



function verifySearch() {
	var cityzip = document.getElementById('cityzip').value;
	
	if (document.getElementById('cityzip').value == "Enter a City or Zip Code") {
		alert("Please enter a city or zip code before searching.");
		return;
	}
	else if (IsNumeric(cityzip) == false) {
		document.theform.city.value = cityzip;
		document.theform.zipcode.value = "";
		document.theform.submit();
	}
	else {
		document.theform.zipcode.value = cityzip;
		document.theform.city.value = "";
		document.theform.submit();
	}
}
