// JavaScript Document


function validateForm()
{
    valid = true;
    
    //email regex
    
    var regex = /\w+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/;
    
   	if (!regex.test(document.getElementById('email').value)) {
   		alert ("Please enter a valid email address.");
    	valid = false;
    }
    	

    if ( document.getElementById('verify').value != "orange" ) {
        alert ( "You must answer the 'orange' question to submit this form." );
		document.getElementById('verify').value = "";
		document.getElementById('verify').focus();
		valid = false;
    }

    return valid;
}

