// JavaScript Document


function change(id){
     ID = document.getElementById(id);
    
     if(ID.style.display == "")
          ID.style.display = "none";
     else
          ID.style.display = "";
      }

function validateForm1() {
with (document.myform) {
var alertMsg = "The following REQUIRED fields have been left empty:\n\nPlease complete the following:\n";


if (fname.value == "") alertMsg += "\nFirst Name";
if (lname.value == "") alertMsg += "\nLast Name";
if (country.value == "") alertMsg += "\nCountry";
if (address.value == "") alertMsg += "\nAddress";
if (city.value == "") alertMsg += "\nCity";
if (state.value == "") alertMsg += "\nState";
if (zip.value == "") alertMsg += "\nZip Code";
if (homephone.value == "") alertMsg += "\nHome Phone";
if (workphone.value == "") alertMsg += "\nWork Phone";
if (email.value == "") alertMsg += "\nEmail";
if (organization.value == "") alertMsg += "\nOrganization";
if (position.value == "") alertMsg += "\nPosition";

// RADIO
radioOption = -1;
for (counter=0; counter<diet.length; counter++) {
if (diet[counter].checked) radioOption = counter;
}
if (radioOption == -1) alertMsg += "\nDiet";

if (bcountry.value == "") alertMsg += "\nBusiness Country";
if (baddress.value == "") alertMsg += "\nBusiness Address";
if (bcity.value == "") alertMsg += "\nBusiness City";
if (bstate.value == "") alertMsg += "\nBusiness State";
if (bzip.value == "") alertMsg += "\nBusiness Zip Code";
if (ccnumber.value == "") alertMsg += "\nCard Number";
if (ccname.value == "") alertMsg += "\nName on Card";
if (cctype.value == "") alertMsg += "\nCard Type";
if (ccexpMM.value == "") alertMsg += "\nCard Expiration Date (Month)";
if (ccexpYY.value == "") alertMsg += "\nCard Expiration Date (Year)";
if (cccode.value == "") alertMsg += "\nCard CVV2 Code";

// RADIO
radioOption = -1;
for (counter=0; counter<agree.length; counter++) {
if (agree[counter].checked) radioOption = counter;
}
if (radioOption == -1) alertMsg += "\nAgreement";


if (alertMsg != "The following REQUIRED fields have been left empty:\n\nPlease complete the following:\n") {
alert(alertMsg);

return false;
} else {
return true;
} } }