function formcheck(theForm)
{
  if (theForm.address.value.length < 5) {
    alert( "Please provide a valid ZIP Code." );
    theForm.address.focus();
    return false;
  }
   /*if (isValidZipCode(theForm.address.value.trim() == false) {
        alert("Please provide a valid zip code.");
        theForm.address.focus();      
        return false;
    }*/ 
}

function isValidZipCode(value) {
    alert(value);
    var re = /^\d{5}([\-]\d{4})?$/;
    return (re.test(value));
}