function hoverLink(id){
	document.getElementById(id).style.fontWeight='bold';
}
function unhoverLink(id){
	document.getElementById(id).style.fontWeight='normal';
}

function validateApplicationForm(){
	
	if(!validate())
		return false;
	if(!validateEmailAddress('email_address'))
		return false;
	}
	return true;
}



//check that all fields with classname 'required' are filled in
function validate(){
var elems=document.getElementsByTagName('input'); 
for(var i=0;i<elems.length;i++){
	if((elems[i].className=='required')&&(elems[i].value=="")){
		alert("Please fill in all required fields");
		return false;
	}
}
return true;
}

/*** This validation function checks that an email address contains both '@' and '.' **/
function validateEmailAddress(email_address){
var email = document.getElementById(email_address).value;
	if((email.indexOf('@')==-1)||(email.indexOf('.')==-1)){
		alert("Invalid email address");
		return false;
	}
	else
		return true;
}