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.comments, "TEXT" )) {
        if  (!onError(document.contact, document.contact.comments, document.contact.comments.value, "Please enter your question or comment."))
        {
           document.contact.comments.focus();
           return false; 
        }
    }

// verify 
    if  (!hasValue(document.contact.verify, "TEXT" ) || document.contact.verify.value != 'E4U6T') {
        if  (!onError(document.contact, document.contact.verify, document.contact.verify.value, "Please enter correct verification code."))
        {
           document.contact.verify.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_newsletter_form() {
// title
    if  (!hasValue(document.save_newsletter.title, "TEXT" )) {
        if  (!onError(document.save_newsletter, document.save_newsletter.title, document.save_newsletter.title.value, "Please enter a title."))
        {
         document.save_newsletter.title.focus();
         return false; 
        }
    }
}


function check_attorneys_form() {
// title
    if  (!hasValue(document.save_professional.last_name, "TEXT" )) {
        if  (!onError(document.save_professional, document.save_professional.last_name, document.save_professional.last_name.value, "Please enter a last name."))
        {
         document.save_professional.last_name.focus();
         return false; 
        }
    }
}


function check_groups_form() {
// title
    if  (!hasValue(document.practice_groups.name, "TEXT" )) {
        if  (!onError(document.practice_groups, document.practice_groups.name, document.practice_groups.name.value, "Please enter a name."))
        {
         document.practice_groups.name.focus();
         return false; 
        }
    }
}



function check_offices_form() {
// title
    if  (!hasValue(document.save_office.name, "TEXT" )) {
        if  (!onError(document.save_office, document.save_office.name, document.save_office.name.value, "Please enter a name."))
        {
         document.save_office.name.focus();
         return false; 
        }
    }
}

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



function check_news_form() {
// title
    if  (!hasValue(document.save_news.news_title, "TEXT" )) {
        if  (!onError(document.save_news, document.save_news.news_title, document.save_news.news_title.value, "Please enter a title."))
        {
         document.save_news.news_title.focus();
         return false; 
        }
    }
}




function check_articles_form() {
// title
    if  (!hasValue(document.save_article.name, "TEXT" )) {
        if  (!onError(document.name, document.save_article.name, document.save_article.name.value, "Please enter a name."))
        {
         document.save_article.name.focus();
         return false; 
        }
    }
}

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