<!-- HIDE

//Script to check for missing required form information before server submission

function ChkForm(custpoll) {

var AlertText = "You are missing the following:\n";
var ErrFlag = 0;
var ChkFlag, i;

// Regular expression patterns
//   Email address
var Epattern = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/;

//Reset generic respondent name to email address
document.forms[0].realname.value = document.forms[0].FirstName.value + " " + document.forms[0].LastName.value

//Check for missing required information
    
if (custpoll.FirstName.value == "") {
    AlertText += "           Your first name\n";
    ErrFlag = 1;
    }
    
if (custpoll.LastName.value == "") {
    AlertText += "           Your last name\n";
    ErrFlag = 1;
    }
    
var ve = custpoll.email.value;
var testResult = Epattern.test(ve);
if (testResult == false) {
    AlertText += "           A valid email address\n";
    ErrFlag = 1;
    }
       
if (custpoll.WhatToDo[0].checked == false && custpoll.WhatToDo[1].checked == false) {
    AlertText += "           What you'd like us to do\n";
    ErrFlag = 1;
    }
    
// If no missing required info, return a true and pass form to server

if (ErrFlag == 0) return true;

// Otherwise, return a false with an alert box
    
AlertText += "\nPlease supply the missing information and click Send Form.";
    
alert(AlertText);
return false;

}

//STOP HIDING -->

