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

function check_contact_form()  {
	var e = document.contact.email;
	var ec = document.contact.email_check;
	
// need to check last_name name address city state zip email
// first name
    if  (!hasValue(document.contact.f_name, "TEXT" ) || checkInteger(document.contact.f_name.value )) {
        if  (!onError(document.contact, document.contact.f_name, document.contact.f_name.value, "Please enter a valid first name."))
        {
         document.contact.f_name.focus();
         return false; 
        }
    }
	
// last name
    if  (!hasValue(document.contact.l_name, "TEXT" ) || checkInteger(document.contact.l_name.value )) {
        if  (!onError(document.contact, document.contact.l_name, document.contact.l_name.value, "Please enter a valid last name."))
        {
         document.contact.l_name.focus();
         return false; 
        }
    }

// email 
    if  (!hasValue(document.contact.email, "TEXT" ) || !checkEmail(document.contact.email, document.contact.email.value )) {
        if  (!onError(document.contact, document.contact.email, document.contact.email.value, "Please enter a valid email address."))
        {
           document.contact.email.focus();
           return false; 
        }
    }
	
// email_check 
    if  (!hasValue(document.contact.email_check, "TEXT" ) || !checkEmail(document.contact.email_check, document.contact.email_check.value)) {
        if  (!onError(document.contact, document.contact.email_check, document.contact.email_check.value, "Please re-enter a valid email address."))
        {
           document.contact.email_check.focus();
           return false; 
        }
    }
	
	if(e.value != ec.value){
		alert("You have entered two different email addresses");
		return false;
		document.contact.email.focus();
	}

// city 
/*    if  (!hasValue(document.contact.city, "TEXT" ) || checkInteger(document.contact.city.value )) {
        if  (!onError(document.contact, document.contact.city, document.contact.city.value, "Please enter a valid city."))
        {
           document.contact.city.focus();
           return false; 
        }
    }

// state 
    if  (!hasValue(document.contact.state, "SELECT" )) {
        if  (!onError(document.contact, document.contact.state, document.contact.state.value, "Please select a state."))
        {
           document.contact.state.focus();
           return false; 
        }
    }

// zip 
    if  (!hasValue(document.contact.zip, "TEXT" ) || !checkZip(document.contact.zip.value ) ) {
        if  (!onError(document.contact, document.contact.zip, document.contact.zip.value, "Please enter a valid zip."))
        {
           document.contact.zip.focus();
           return false; 
        }
    }
*/
// inquiry 
    if  (!hasValue(document.contact.inquiry, "SELECT" )) {
        if  (!onError(document.contact, document.contact.inquiry, document.contact.inquiry.value, "Please select a Reason for inquiry."))
        {
           document.contact.inquiry.focus();
           return false; 
        }
    }

// comments
    if  (!hasValue(document.contact.comments, "TEXT" )) {
        if  (!onError(document.contact, document.contact.comments, document.contact.comments.value, "Please enter a comment."))
        {
           document.contact.comments.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_reminder_form() {
	// reminder type
	if  (!hasValue(document.reminder_type_1.reminder_type, "SELECT" )) {
        if  (!onError(document.reminder_type_1, document.reminder_type_1.reminder_type, document.reminder_type_1.reminder_type.value, "Please select a Reminder Type."))
        {
           document.reminder_type_1.reminder_type.focus();
           return false; 
        }
    }	
	
	// category
	if  (!hasValue(document.save_reminder.category, "SELECT" )) {
        if  (!onError(document.save_reminder, document.save_reminder.category, document.save_reminder.category.value, "Please select a Reminder Occasion."))
        {
           document.save_reminder.category.focus();
           return false; 
        }
    }	
	//description
	if  (!hasValue(document.save_reminder.event_description, "TEXT" )) {
        if  (!onError(document.save_reminder, document.save_reminder.event_description, document.save_reminder.event_description.value, "Please enter a description."))
        {
           document.save_reminder.event_description.focus();
           return false; 
        }
    }
	// date of event
	if  (!hasValue(document.save_reminder.date, "TEXT" )) {
        if  (!onError(document.save_reminder, document.save_reminder.date, document.save_reminder.date.value, "Please choose a date."))
        {
           document.save_reminder.event_description.focus();
           return false; 
        }
    }
}
