/*
//
// APUS JS package, last modified $Date: 2005/05/11 08:28:03 $ by $Author: stamina $
// 
// This script contains some contactform functionality, like validating the form input
// and clearing the input field.
//
*/

function checkContact() {
	if (document.contactform.contactcompany.value == '') {
		alert("Please fill in a company.");
		document.contactform.contactcompany.focus();
	} else if (document.contactform.contactname.value == '') {
		alert("Please fill in a contact name.");
		document.contactform.contactname.focus();
	} else if (document.contactform.contactphone.value == '') {
		alert("Please fill in a telephone numbery.");
		document.contactform.contactphone.focus();
	} else if (document.contactform.contactemail.value == '') {
		alert("Please fill in an e-mail address.");
		document.contactform.contactemail.focus();
	} else {
		document.contactform.submit();
	}
}

function checkContactSubmit() {
	if (document.contactform.contactcompany.value == '') {
		alert("Please fill in a company.");
		document.contactform.contactcompany.focus();
		return false;
	} else if (document.contactform.contactname.value == '') {
		alert("Please fill in a contact name.");
		document.contactform.contactname.focus();
		return false;
	} else if (document.contactform.contactphone.value == '') {
		alert("Please fill in a telephone numbery.");
		document.contactform.contactphone.focus();
		return false;
	} else if (document.contactform.contactemail.value == '') {
		alert("Please fill in an e-mail address.");
		document.contactform.contactemail.focus();
		return false;
	}
	return true;
}
