function CheckForm() {
	var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i
	strErrorMessage = "";
	if ( document.Contact.SubjectSelector.value == "" && document.Contact.OtherSubject.value == "" ) {
		strErrorMessage += "A Subject is required" + "\n";
	}			
	if ( document.Contact.Comments.value == "" ) {
		strErrorMessage += "Your Comment or Request is required" + "\n";
	}			
	if ( document.Contact.Name.value == "" ) {
		strErrorMessage += "Your name is required" + "\n";
	}			
	if ( emailfilter.test(document.Contact.Email.value) == false ) {				
		strErrorMessage += "A valid e-mail address is required." + "\n";
	}	
	if ( strErrorMessage != "" ) {
		alert (strErrorMessage);
		return false;
	}
	else {
		return true;
	}
}
function SetupForm(){
document.getElementById("CareerNoticeWrapper").style.display = "none";
document.getElementById("SupplierNoticeWrapper").style.display = "none";
document.getElementById("OtherSubjectWrapper").style.display = "none";
document.Contact.CommentsFieldset.style.display = "none";
document.Contact.BusinessInformationFieldset.style.display = "none";
document.Contact.ContactInformationFieldset.style.display = "none";
document.getElementById("SubmitButtonWrapper").style.display = "none";
}
function SelectForm(){
if(document.Contact.SubjectSelector.value == ''){
	document.getElementById("CareerNoticeWrapper").style.display = "none";
	document.getElementById("SupplierNoticeWrapper").style.display = "none";
	document.getElementById("OtherSubjectWrapper").style.display = "none";
	document.Contact.CommentsFieldset.style.display = "none";
	document.Contact.BusinessInformationFieldset.style.display = "none";
	document.Contact.ContactInformationFieldset.style.display = "none";
	document.getElementById("SubmitButtonWrapper").style.display = "none";
	}
if(document.Contact.SubjectSelector.value != '' || document.Contact.SubjectSelector.value != 'Employment' || document.Contact.SubjectSelector.value != 'Supplier Relations'){
	document.getElementById("CareerNoticeWrapper").style.display = "none";
	document.getElementById("SupplierNoticeWrapper").style.display = "none";
	document.Contact.CommentsFieldset.style.display = "block";
	document.Contact.BusinessInformationFieldset.style.display = "block";
	document.Contact.ContactInformationFieldset.style.display = "block";
	document.getElementById("SubmitButtonWrapper").style.display = "block";
	}
if(document.Contact.SubjectSelector.value == '' || document.Contact.SubjectSelector.value == 'Employment' || document.Contact.SubjectSelector.value == 'Supplier Relations'){
	document.getElementById("OtherSubjectWrapper").style.display = "none";
	document.Contact.CommentsFieldset.style.display = "none";
	document.Contact.BusinessInformationFieldset.style.display = "none";
	document.Contact.ContactInformationFieldset.style.display = "none";
	document.getElementById("SubmitButtonWrapper").style.display = "none";
	}
if(document.Contact.SubjectSelector.value == 'Employment'){
	document.getElementById("CareerNoticeWrapper").style.display = "block";
	document.getElementById("SupplierNoticeWrapper").style.display = "none";
	}
if(document.Contact.SubjectSelector.value == 'Supplier Relations'){
	document.getElementById("CareerNoticeWrapper").style.display = "none";
	document.getElementById("SupplierNoticeWrapper").style.display = "block";
	}
if(document.Contact.SubjectSelector.value == 'Other'){
	document.getElementById("CareerNoticeWrapper").style.display = "block";
	document.getElementById("SupplierNoticeWrapper").style.display = "block";
	document.getElementById("OtherSubjectWrapper").style.display = "block";
	}
if(document.Contact.SubjectSelector.value != 'Other'){
	document.getElementById("OtherSubjectWrapper").style.display = "none";
	}
}
function LimitText(Field,Counter,Maximum) {
	if (Field.value.length > Maximum)
		Field.value = Field.value.substring(0, Maximum);
	else
		Counter.value = Maximum - Field.value.length;
}