// JavaScript Document

function checkForm() {
	var first_name = document.getElementById("first_name");
	var last_name = document.getElementById("last_name");
	var email = document.getElementById('email');
	var randomPassword = document.getElementById("randomPassword");
	var password = document.getElementById("password");
	
	if (!first_name.value || !last_name.value || !email.value || !password.value) {
				
		if(!first_name.value){
			first_name.style.backgroundColor = '#f0d4c1';
			}
		else{
			first_name.style.backgroundColor = '#ffffff';
			}
		if(!last_name.value){
			last_name.style.backgroundColor = '#f0d4c1';
			}
		else{
			last_name.style.backgroundColor = '#ffffff';
			}
		if(!email.value){
			email.style.backgroundColor = '#f0d4c1';
			}
		else{
			email.style.backgroundColor = '#ffffff';
			}			
		if(!password.value || password.value != randomPassword.value+"ZM"){
			password.style.backgroundColor = '#f0d4c1';
			//alert("Please check your submission code and try again");
			}
		alert("Please check your submission and complete all shaded areas.");
		return false;
	}
	else {
		return true;
	}
}

