document.write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='/scripts/check_form_base.js'></SCRIPT>");

function check_contact_form()  {

// first name
    if  (!hasValue(document.contact.fname, "TEXT" ) || document.contact.fname.value == 'FIRST') {
        if  (!onError(document.contact, document.contact.fname, document.contact.fname.value, "Please enter your first name."))
        {
         document.contact.fname.focus();
         return false; 
        }
    }

// last name
    if  (!hasValue(document.contact.lname, "TEXT" ) || document.contact.lname.value == 'LAST') {
        if  (!onError(document.contact, document.contact.lname, document.contact.lname.value, "Please enter your last name."))
        {
         document.contact.lname.focus();
         return false; 
        }
    }
	
	
// email 
    if  (!hasValue(document.contact.email, "TEXT" )) {
        if  (!onError(document.contact, document.contact.email, document.contact.email.value, "Please enter your email address."))
        {
           document.contact.email.focus();
           return false; 
        }
    }

// question 
    if  (!hasValue(document.contact.question, "TEXT" )) {
        if  (!onError(document.contact, document.contact.question, document.contact.question.value, "Please enter your question or comment."))
        {
           document.contact.question.focus();
           return false; 
        }
    }
	
	// address 
    if  (!hasValue(document.contact.address, "TEXT" )) {
        if  (!onError(document.contact, document.contact.address, document.contact.address.value, "Please enter your address."))
        {
           document.contact.address.focus();
           return false; 
        }
    }
	
	// state 
    if  (!hasValue(document.contact.state, "TEXT" )) {
        if  (!onError(document.contact, document.contact.state, document.contact.state.value, "Please enter your state."))
        {
           document.contact.state.focus();
           return false; 
        }
    }
	
	// zip 
    if  (!hasValue(document.contact.zip, "TEXT" )) {
        if  (!onError(document.contact, document.contact.zip, document.contact.zip.value, "Please enter your zip code."))
        {
           document.contact.zip.focus();
           return false; 
        }
    }
	
	// phone 
    if  (!hasValue(document.contact.phone, "TEXT" )) {
        if  (!onError(document.contact, document.contact.phone, document.contact.phone.value, "Please enter your phone number."))
        {
           document.contact.phone.focus();
           return false; 
        }
    }
} // end of function check_contact_form

function check_login_form() {
// username
    if  (!hasValue(document.login.username, "TEXT" )) {
        if  (!onError(document.login, document.login.username, document.login.username.value, "Please enter a username."))
        {
         document.login.username.focus();
         return false; 
        }
    }
	// password
	if  (!hasValue(document.login.password, "TEXT" )) {
		if  (!onError(document.login, document.login.password, document.login.password.value, "Please enter a password."))
		{
		 document.login.password.focus();
		 return false; 
		}
	}
}




function check_hunting_form() {
// username
    if  (!hasValue(document.save_hunting.contact, "TEXT" )) {
        if  (!onError(document.save_hunting, document.save_hunting.contact, document.save_hunting.contact.value, "Please enter a contact name."))
        {
         document.save_hunting.contact.focus();
         return false; 
        }		
    }

}

/*  if(!document.save_hunting["leasetypeid[]"].checked) 
	  {
		alert ('You didn\'t choose any of the checkboxes!');
		return false;
	  } */
	  
	  
/*function check_hunting_form2() {
  var boxes = document.save_hunting.leasetypeid.length;
  var txt = "";
  for (i = 0; i < boxes; i++) {
    if (document.save_hunting.leasetypeid[i].checked) {
      txt = txt + document.save_hunting.leasetypeid[i].value + " ";
    }
   }

  if (txt == "") {
    alert ('no boxes selected');
	return false;
  }
  else {
    alert ('boxes selected');
	return true;
  }
}*/



function check_churches_form() {
    if  (!hasValue(document.save_churches.name, "TEXT" )) {
        if  (!onError(document.save_churches, document.save_churches.name, document.save_churches.name.value, "Please enter a name."))
        {
         document.save_churches.name.focus();
         return false; 
        }
    }
	
    if  (!hasValue(document.save_churches.denomination, "TEXT" )) {
        if  (!onError(document.save_churches, document.save_churches.denomination, document.save_churches.denomination.value, "Please enter a denomination."))
        {
         document.save_churches.denomination.focus();
         return false; 
        }
    }	
	
	
    if  (!hasValue(document.save_churches.contact, "TEXT" )) {
        if  (!onError(document.save_churches, document.save_churches.contact, document.save_churches.contact.value, "Please enter a contact."))
        {
         document.save_churches.contact.focus();
         return false; 
        }
    }
	
    if  (!hasValue(document.save_churches.address, "TEXT" )) {
        if  (!onError(document.save_churches, document.save_churches.address, document.save_churches.address.value, "Please enter an address."))
        {
         document.save_churches.address.focus();
         return false; 
        }
    }	
	
}







function check_civic_form() {
    if  (!hasValue(document.save_civic_organization.name, "TEXT" )) {
        if  (!onError(document.save_civic_organization, document.save_civic_organization.name, document.save_civic_organization.name.value, "Please enter a name."))
        {
         document.save_civic_organization.name.focus();
         return false; 
        }
    }
	
    if  (!hasValue(document.save_civic_organization.contact, "TEXT" )) {
        if  (!onError(document.save_civic_organization, document.save_civic_organization.contact, document.save_civic_organization.contact.value, "Please enter a contact."))
        {
         document.save_civic_organization.contact.focus();
         return false; 
        }
    }	
}




function check_local_bus_form() {
    if  (!hasValue(document.save_local_businesses.name, "TEXT" )) {
        if  (!onError(document.save_local_businesses, document.save_local_businesses.name, document.save_local_businesses.name.value, "Please enter a name."))
        {
         document.save_local_businesses.name.focus();
         return false; 
        }
    }
		
	
    if  (!hasValue(document.save_local_businesses.address, "TEXT" )) {
        if  (!onError(document.save_local_businesses, document.save_local_businesses.address, document.save_local_businesses.address.value, "Please enter an address."))
        {
         document.save_local_businesses.address.focus();
         return false; 
        }
    }	
	
	
}



function check_press_form() {
    if  (!hasValue(document.save_press_release.title, "TEXT" )) {
        if  (!onError(document.save_press_release, document.save_press_release.title, document.save_press_release.title.value, "Please enter a title."))
        {
         document.save_press_release.title.focus();
         return false; 
        }
    }
	
}



function check_meetings_form() {
    if  (!hasValue(document.save_meetings.date, "TEXT" )) {
        if  (!onError(document.save_meetings, document.save_meetings.date, document.save_meetings.date.value, "Please select a meeting date."))
        {
         document.save_meetings.date.focus();
         return false; 
        }
    }
	
}


function check_users_form() {
    if  (!hasValue(document.save_users.username, "TEXT" )) {
        if  (!onError(document.save_users, document.save_users.username, document.save_users.username.value, "Please enter a username."))
        {
         document.save_users.username.focus();
         return false; 
        }
    }
	
}
