<!--
  function checkDate() {
   
    currentTime = new Date();
    
    if (document.HousingListingForm.published.value == "false") {
        var pubMonth = document.HousingListingForm.pubMonth.value;
        var pubDay = document.HousingListingForm.pubDay.value;
        var pubYear = document.HousingListingForm.pubYear.value;
        if (pubDay == currentTime.getDate() && pubMonth == currentTime.getMonth() && pubYear == currentTime.getYear()) { 
            if (confirm( "Date selected to publish is current day.  Are you sure you want to publish this listing now?" )) {
                return true;
            } else {
                return false;
            }
        }
        if (pubMonth < currentTime.getMonth() && pubYear == currentTime.getYear()) {
            alert("Invalid publish date: Date selected has passed.");
            return false;
        }
        if (pubDay < currentTime.getDate() && pubMonth == currentTime.getMonth()) {
            alert("Invalid publish date: Date selected has passed.");
            return false;
        }
        //check to see that if one date value selected the others are as well
        if ((pubDay !="" || pubMonth !="" || pubYear !="") && (pubDay =="" || pubMonth =="" || pubYear=="")) {
            alert("Not all required fields to set publish date are selected");
            return false;
        }
    }
    var archiveMonth = document.HousingListingForm.archiveMonth.value;
    var archiveDay = document.HousingListingForm.archiveDay.value;
    var archiveYear = document.HousingListingForm.archiveYear.value;
  //  document.write("Arch Month: " +archiveMonth+ " Arc Day: " + archiveDay + " Arc Year: " + archiveYear);
  //  document.write("Cur Month: "+currentTime.getMonth() + " Cur Day: "+currentTime.getDate()+ " Cur year: "+currentTime.getYear());
     if (archiveDay == currentTime.getDate() && archiveMonth == currentTime.getMonth() && archiveYear == currentTime.getYear()) { 
       // confirm( "Date selected to archive is current day.  Are you sure you want to archive this listing now?" );
        if (confirm( "Date selected to archive is current day.  Are you sure you want to archive this listing now?" )) {
           return true;
        } else {
           return false;
        }
    }
   
    if (archiveMonth < currentTime.getMonth() && archiveYear == currentTime.getYear()) {
        alert("Invalid archive date: Date selected has passed.");
        return false;
    }
    if (archiveDay < currentTime.getDate() && archiveMonth == currentTime.getMonth()) {
        alert("Invalid archive date: Date selected has passed.");
        return false;
    }
    //check to see that if one date value selected the others are as well
    if ((archiveDay !="" || archiveMonth !="" || archiveYear !="") && (archiveDay =="" || archiveMonth =="" || archiveYear=="")) {
        alert("Not all required fields to set archive date are selected");
        return false;
    }
   
    
    return true;
  }
  function checkEmail() {
   if (document.listingRemoveForm.ContactEmail.value != '') {
    if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.listingRemoveForm.ContactEmail.value)){
        return (true)
    }
     else {   alert("Invalid E-mail Address! Please re-enter.") 
        return (false)
    }
   }
  }


//-->
