/*************************************************************
*  Copyright © iWeBB, 2001-2002                              *
*  Carter BloodCare All rights reserved                      *
**************************************************************/
function cityzip()
{
  fixfocus    = "N";
  missinginfo = "";

  if ( 
         (document.calform.p_city.value == "") &&
         (document.calform.p_zip.value  == "")
     )   
  {
    missinginfo += "\n     -  City or Zip";
    if (fixfocus == "N")
    {
      document.calform.p_city.focus();
      fixfocus = "Y";
    }
  }
  else if (document.calform.p_city.value != "")
  {
    var xx = document.calform.p_city.value;
    xx = xx.toUpperCase();
    document.calform.p_city.value = xx;
  }


  else if (document.calform.p_zip.value != "")
  { var normalizedZIP = stripCharsInBag(document.calform.p_zip.value, ZIPCodeDelimiters)
      if (!isZIPCode(normalizedZIP, false)) 
         return warnInvalid (document.calform.p_zip, iZIPCode);
      else 
      {  // if you don't want to insert a hyphen, comment next line out
         document.calform.p_zip.value = reformatZIPCode(normalizedZIP)
         return true;
      }
  }


  if (missinginfo != "") 
  {
    missinginfo ="_____________________________\n" +
    "The following information is missing:\n" +
    missinginfo + "\n_____________________________" +
    "\nPlease re-enter and submit again!";
    alert(missinginfo);
    return false;
  }
  else return true;
}
