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

function check_contact_form()  {

// need to check last_name name address city state zip email
// name
    if  (!hasValue(document.contact.name, "TEXT" )) {
        if  (!onError(document.contact, document.contact.name, document.contact.name.value, "Please enter your name."))
        {
         document.contact.name.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; 
        }
    }
	
// verification code	
	if  (!hasValue(document.contact.verify, "TEXT" ) || document.contact.verify.value != 'E4U6T') {
        if  (!onError(document.contact, document.contact.verify, document.contact.verify.value, "Please enter the correct verification code."))
        {
           document.contact.verify.focus();
           return false; 
        }
    }	
	
} // end of function check_contact_form

function check_legislative_update_form() {
	// update type
	if  (!hasValue(document.update_form.event_type_id, "SELECT" )) {
        if  (!onError(document.update_form, document.update_form.event_type_id, document.update_form.event_type_id.value, "Please select an update type."))
        {
         document.update_form.event_type_id.focus();
         return false; 
        }
    }
	
	//title
	if  (!hasValue(document.update_form.title, "TEXT" )) {
        if  (!onError(document.update_form, document.update_form.title, document.update_form.title.value, "Please enter a title."))
        {
         document.update_form.title.focus();
         return false; 
        }
    }
	
	//summary
	if  (!hasValue(document.update_form.summary, "TEXT" )) {
        if  (!onError(document.update_form, document.update_form.summary, document.update_form.summary.value, "Please enter a summary."))
        {
         document.update_form.summary.focus();
         return false; 
        }
    }
	
	//description
	if  (!hasValue(document.update_form.description, "TEXT" )) {
        if  (!onError(document.update_form, document.update_form.description, document.update_form.description.value, "Please enter a description."))
        {
         document.update_form.description.focus();
         return false; 
        }
    }	
			
	
}// end of function check_legislative_update_form


  //category_id
  function check_events_form() {
	// update type
	if  (!hasValue(document.news_form.category_id, "SELECT" )) {
        if  (!onError(document.news_form, document.news_form.category_id, document.news_form.category_id.value, "Please select a category."))
        {
         document.news_form.category_id.focus();
         return false; 
        }
    }	
	

	//title
	if  (!hasValue(document.news_form.title, "TEXT" )) {
        if  (!onError(document.news_form, document.news_form.title, document.news_form.title.value, "Please enter a title."))
        {
         document.news_form.title.focus();
         return false; 
        }
    }
	
	//event_start_date
	if  (!hasValue(document.news_form.event_start_date, "TEXT" )) {
        if  (!onError(document.news_form, document.news_form.event_start_date, document.news_form.event_start_date.value, "Please pick a date."))
        {
         document.news_form.description.focus();
         return false; 
        }
    }
	
  }
  
  
  

  function check_join_form() {
	
	//company_name
	if  (!hasValue(document.join_form.company_name, "TEXT" )) {
        if  (!onError(document.join_form, document.join_form.company_name, document.join_form.company_name.value, "Please enter the name of the company."))
        {
         document.join_form.company_name.focus();
         return false; 
        }
    }
	
	//address
	if  (!hasValue(document.join_form.address, "TEXT" )) {
        if  (!onError(document.join_form, document.join_form.address, document.join_form.address.value, "Please enter an address."))
        {
         document.join_form.address.focus();
         return false; 
        }
    }
	
	
	//city
	if  (!hasValue(document.join_form.city, "TEXT" )) {
        if  (!onError(document.join_form, document.join_form.city, document.join_form.city.value, "Please enter a city."))
        {
         document.join_form.city.focus();
         return false; 
        }
    }
	
	//state
	if  (!hasValue(document.join_form.state, "TEXT" )) {
        if  (!onError(document.join_form, document.join_form.state, document.join_form.state.value, "Please enter a state."))
        {
         document.join_form.state.focus();
         return false; 
        }
    }	
	
	
	//zip
	if  (!hasValue(document.join_form.zip, "TEXT" )) {
        if  (!onError(document.join_form, document.join_form.zip, document.join_form.city.zip, "Please enter a zip."))
        {
         document.join_form.zip.focus();
         return false; 
        }
    }
	
	//name
	if  (!hasValue(document.join_form.name, "TEXT" )) {
        if  (!onError(document.join_form, document.join_form.name, document.join_form.name.value, "Please enter a name."))
        {
         document.join_form.name.focus();
         return false; 
        }
    }	
	
	
	//email
	if  (!hasValue(document.join_form.email, "TEXT" )) {
        if  (!onError(document.join_form, document.join_form.email, document.join_form.city.email, "Please enter an email."))
        {
         document.join_form.email.focus();
         return false; 
        }
    }
	
	//phone
	if  (!hasValue(document.join_form.phone, "TEXT" )) {
        if  (!onError(document.join_form, document.join_form.phone, document.join_form.phone.value, "Please enter a phone number."))
        {
         document.join_form.phone.focus();
         return false; 
        }
    }		
	
	// verification code	
	if  (!hasValue(document.join_form.verify, "TEXT" ) || document.join_form.verify.value != 'E4U6T') {
        if  (!onError(document.join_form, document.join_form.verify, document.join_form.verify.value, "Please enter the correct verification code."))
        {
           document.join_form.verify.focus();
           return false; 
        }
    }	
	
  }
  