// JavaScript Document
<!--



function doShowCatDesc(intID,intMax){
	for(i=1;i<=intMax;i++){
		if(i==intID){
			document.getElementById('desc_'+i).style.display='block';
			document.getElementById('desc_'+i).style.height='20px';
			document.getElementById('desc_'+i).style.overflow='visible';
			document.getElementById('cat_'+i).style.color='#ffffff';
			document.getElementById('cat_'+i).style.backgroundColor='#556579';
		}
		else{
			document.getElementById('desc_'+i).style.display='none';
			document.getElementById('cat_'+i).style.color='#ffffff';
			document.getElementById('cat_'+i).style.backgroundColor='#353F4B';
		}
	}
	return false;
}

function doValidateAct(objF){
	if(!objF.act[0].checked){
		if(!objF.act[1].checked){
			if(!objF.act[2].checked){
				alert("Please select an option.");
				objF.act[0].focus();
				return false;
			}
		}
	}
}

function doValidateEmailForm(objF){
	if(!objF.forename.value){
		alert("Please enter your first name.");
		objF.forename.focus();
		return false;
	}
	if(!objF.surname.value){
		alert("Please enter your surname.");
		objF.surname.focus();
		return false;
	}
	if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(objF.email.value)){
		alert("Please enter a valid primary email address.");
		objF.email.focus();
		return false;
	}
	if((objF.cv.value)&&(!/\.doc$|\.DOC$/.test(objF.cv.value))){
		alert("Please attach Microsoft Word (.doc) files only.");
		objF.cv.focus();
		return false;
	}
	
}

function doValidateRegForm(objF){
	if(!objF.forename.value){
		alert("Please enter your first name.");
		objF.forename.focus();
		return false;
	}
	if(!objF.surname.value){
		alert("Please enter your surname.");
		objF.surname.focus();
		return false;
	}
	if(!objF.address.value){
		alert("Please enter your postal address.");
		objF.address.focus();
		return false;
	}
	if(!objF.postcode.value){
		alert("Please enter your post/zip code.");
		objF.postcode.focus();
		return false;
	}
	if(!objF.nationality.value){
		alert("Please enter your nationality.");
		objF.nationality.focus();
		return false;
	}
	if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(objF.email.value)){
		alert("Please enter a valid primary email address.");
		objF.email.focus();
		return false;
	}
	
	if((!objF.skill_d_1.value)&&(!objF.skill_d_2.value)&&(!objF.skill_d_3.value)){
		alert("Please select at least one area of expertise.");
		objF.skill_d_1.focus();
		return false;
	}
	
	if (!/\.doc$|\.DOC$/.test(objF.cv.value)){
		alert("Please upload your CV in Microsoft Word (.doc) format.");
		objF.cv.focus();
		return false;
	}
	
}

//-->
