<!--
//PLEASE NOTE THIS VERSION OF validate_stage1 is not used by the stage1.asp page. The copy of the function in branches.js is used. Don't know about other pages - JIM 26/7/4
//
function validate_stage1() {

	if(validate_stageDetails1())
	{
	    if(document.getElementById("txtpass1").value == "") {
		    alert("Please enter a password");
		    return false;
	    }
	    if(document.getElementById("txtpass2").value == "") {
		    alert("Please confirm your password");
		    return false;
	    }	
	    if(document.getElementById("txtpass1").value != document.getElementById("txtpass2").value) {
		    alert("Please check your password as they do not match.");
		    return false;
	    }
    	
	    if(!checkboxSelected("questionTwo")) {
		    alert("Please confirm if you are legally entitled to live and work in the EU.");
		    return false;
	    }
    		
	    if(!checkboxSelected("workpermit")) {
		    alert("Please confirm whether you require a Work Permit.");
		    return false;
	    }

	   if(!checkboxSelected("buildingEquipment")) {
		    alert("Please confirm that you will willing participate in hands-on learning by working within Wolseley`s operations in warehouses, branches, distribution centres, and showrooms, as required by the European Graduate Programme.");
		    return false;
	    }
    	
	    if(!checkboxSelected("relocate")) {
		    alert("Please confirm whether you are willing to travel / relocate.");
		    return false;
	    }
    	
	    if(!checkboxSelected("questionOne")) {
		    alert("Please confirm that you have read through the above statement and give your consent to the processing of your Data including your Personal Sensitive Data in accordance with that statement.");
		    return false;
	    }
    		
	    return true;
	}
	
	return false;	
}

function validate_stageDetails1() {

	if(document.getElementById("txtFirstName").value == "") {
		alert("Please enter your First Name");
		return false;
	}
	if(document.getElementById("txtLastName").value == "") {
		alert("Please enter your Last Name");
		return false;
	}
	
	if(document.getElementById("txtEmailAdd").value == "") {
		alert("Please enter your email address");
		return false;
	}
	if(document.getElementById("txtEmailAddCon").value == "") {
		alert("Please confirm your email address");
		return false;
	}
	
	if(document.getElementById("txtEmailAddCon").value != document.getElementById("txtEmailAdd").value) {
		alert("Please check your email address as they do not match.");
		return false;
	}
	
	if(!test(document.getElementById("txtEmailAdd").value)){
		alert("Please enter a valid email address.");
		return false;
	}
			
	return true;	
}
// -->