// Goto the first field on the form
function toForm() {
document.rfpForm.compname.focus();
}

// Form validation
function checkWholeForm(thisForm) {
    var why = "";

    why += isEmpty(thisForm.compname.value,"Company Name");
    why += isEmpty(thisForm.compcont.value,"Company Contact");
    why += isEmpty(thisForm.streetadd1.value,"Street Address");
    why += isEmpty(thisForm.city.value,"City");
    why += checkDropdown(thisForm.provstate.selectedIndex,"a Province/State");
    why += checkDropdown(thisForm.country.selectedIndex,"a Country");
//    why += isEmpty(thisForm.country.value,"Country");
    why += isEmpty(thisForm.zip.value,"Postal/Zip");
    why += checkNum(thisForm.phone.value,"Phone Number",true,1);
    why += checkNum(thisForm.fax.value,"Fax Number",false,1);
    why += checkEmail(thisForm.email.value,"Email address",true);
    evdate = thisForm.dateunsure.value

    if (thisForm.dateunsure.checked == false) {
//    why += checkDatesValid(thisForm.arrday.selectedIndex, thisForm.arrmonth.selectedIndex, thisForm.arryear.selectedIndex, thisForm.depday.selectedIndex, thisForm.depmonth.selectedIndex, thisForm.depyear.selectedIndex);
      why += checkDatesValid(thisForm.arrday.value, thisForm.arrmonth.value, thisForm.arryear.value, thisForm.depday.value, thisForm.depmonth.value, thisForm.depyear.value);
    } else {
      why += checkDropdown(thisForm.arrmonth.selectedIndex,"an Arrival Month");
      why += checkDropdown(thisForm.arryear.selectedIndex,"an Arrival Year");
    }

    why += checkNum(thisForm.guestrooms.value,"Number of Guests Rooms needed per night",false,2);
    why += checkNum(thisForm.attendees.value,"Number of Attendees",true,2);
    why += checkNum(thisForm.meetneed.value,"Number of Meeting rooms needed",true,2);

    why += checkNum(thisForm.largespace.value,"Largest Meeting space required",false,2);

    if (why != "") {
       alert(why);
       return false;
    } else {
       return true;
    }
}
