<!--
/*
 * This file contains functions that help protect 'Free Information Request' form from spambots.
 */

/*
 * This function verifies the challenge response question at the end of the form. If the answer is correct, 
 * the 'action' attribute of the form is changed from the bogus one to the correct one here. This effectively 
 * hides the action from a spambot attempting to submit the form.
 */
function formValidate() {
    	valid = true;

    	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;
	}

	if (valid) 
	{
			document.getElementById("info_request_form").setAttribute("action","cgi-bin/cgiemail/info_request.txt");
	}

	return valid;


}
//-->
