// Title: Donation Form validations

function Validate(){
					var valid = false;
					var nam = validateName();
					var eml = validateEmail();
					var occ = validateOccupation();
					var adr = validateAddress();
					var acpt = validateAccept();
					
					if((nam == false)||(eml == false)||(occ == false)||(adr == false)||(acpt == false)){
						valid = false;
						} else {
							valid = true;
						}
					return valid;
					}
						
			function validateName(){
					valid = false;
					if(document.getElementById("realname").value == ""){
						alert("Please enter your name and submit again!");
					} else {
						valid = true;
					}
					return valid;
				}	
															
			function validateEmail(){
					valid = false;
					if(document.getElementById("email").value == ""){
						alert("Please enter your e-mail address and submit again!");
					} else {
						valid = true;
					}
					return valid;
				}	
				
			function validateOccupation(){
					valid = false;
					if(document.getElementById("occupation").value == ""){
						alert("Please enter your occupation and submit again!");
					} else {
						valid = true;
					}
					return valid;
				}
					
			function validateAddress(){
					valid = false;
					if(document.getElementById("address").value == ""){
						alert("Please enter your address and submit again!");
					} else {
						valid = true;
					}
					return valid;
				}
									
			function validateAccept(){
				valid = false;
        if (! document.getElementById("accept_terms").checked){
            alert("Please click the checkbox to accept the terms and conditions.");
        } else {
					valid = true;
				}
				return valid;
    	}
