	function validateQuick(){
		alert('k');
		var fieldname = document.getElementById("name1");
		var fieldemail = document.getElementById("email1");
		var field1 = document.getElementById("phone1");
		var scubac  = document.getElementById("scubacourseid1");	
		var loc  = document.getElementById("loc1");		 		
		var submitnow = true		
						
		if(fieldname.value == ''){
			alert('Oops! You forgot to enter your name.');
			var submitnow = false
			}
		else if(fieldemail.value == ''){
			alert('Oops! You forgot to enter your email.');			
			var submitnow = false			
			}			
		else if(field1.value == ''){
			alert('Oops! You forgot to enter your phone number.');
			var submitnow = false			
			}			
		else if(scubac.value == '' || scubac.value == 'none'){
			alert('Oops! You forgot to choose a scuba course.');
			var submitnow = false			
			}							
			
		if(submitnow == true){
			document.ScubaInfoRequest1.action = "scubaCertificationmail1.cfm";
			document.ScubaInfoRequest1.submit();
			}	
	}

function change(id, newClass){
        identity=document.getElementById(id);
        identity.className=newClass;
}



		
function validate(){
	function SubmitForm(){
		document.ScubaInfoRequest.action = "scubaCertificationmail.cfm";
		document.ScubaInfoRequest.submit();
		}	
		
	function isValid(){
		field.style.border = "none";
		field.style.borderTop = "1px solid #422100";
		field.style.backgroundColor = "#ffffff";
		}
	function isNotValid(){
		field.style.border = "1px dashed red";
		field.style.backgroundColor = "#fdf79b";
		field.style.borderBottom = "none";
		}
//Above are the Global Functions for the validation.

	var fieldvalue = document.getElementById("name");
	var fieldvalue1 = document.getElementById("email");
	var field = document.getElementById("nameemail");
	
	var validForm = true;
	if(fieldvalue.value == "" || fieldvalue1.value == ""){
		isNotValid();
		validForm = false;
	}
	else if (fieldvalue.value != "" && fieldvalue1.value != ""){
		isValid();
	}		

	//alert(validForm);   //for debuging use

	var fieldvalue = document.getElementById("scubacourseid");
	var field = document.getElementById("scubacourse");
	if(fieldvalue.value == "none"){
		isNotValid();
		validForm = false;
	}
	else if (fieldvalue.value != "none"){
		isValid();
	}
    
	//alert(validForm);   //for debuging use

	if(validForm == true){
		SubmitForm();
		}
}