function checkGroupName (strng) {
var error = "";
if (strng == "") {
   error = "Please Enter Your Group Name.\n";
}
return error;
}   

function checkTeamName (strng) {
var error = "";
if (strng == "") {
   error = "Please Enter Your Team Name.\n";
}
return error;
} 

function checkFirstName (strng) {
var error = "";
if (strng == "") {
   error = "Please Enter Your First Name.\n";
}
return error;
}

function checkLastName (strng) {
var error = "";
if (strng == "") {
   error = "Please Enter Your Last Name.\n";
}
return error;
}

function checkAddress (strng) {
var error = "";
if (strng == "") {
   error = "Please Enter Your Address.\n";
}
return error;
}  

function checkCity (strng) {
var error = "";
if (strng == "") {
   error = "Please Enter Your City.\n";
}
return error;
}

function checkState (strng) {
var error = "";
if (strng == "") {
   error = "Please Enter Your State.\n";
}
return error;
}

function checkZip (strng) {
var error = "";
if (strng == "") {
   error = "Please Enter Your Zip.\n";
}
return error;
}

// phone number - strip out delimiters and check for 10 digits

function checkDayPhone (strng) {
var error = "";
if (strng == "") {
   error = "Please Enter Your Day Phone Number.\n";
}

var stripped = strng.replace(/[\(\)\.\-\ ]/g, ''); //strip out acceptable non-numeric characters
    if (isNaN(parseInt(stripped))) {
       error = "The Phone Number Contains Illegal Characters.";
  
    }
    if (!(stripped.length == 10)) {
	error = "The Phone Number Is The Wrong Length. Make Sure You Included An Area Code.\n";
    } 
return error;
}


// email

function checkEmail (strng) {
var error="";
if (strng == "") {
   error = "Please Enter Your Contact Email Address.\n";
}

    var emailFilter=/^.+@.+\..{2,3}$/;
    if (!(emailFilter.test(strng))) { 
       error = "Please Enter a Valid Email Address.\n";
    }
    else {
//test email for illegal characters
       var illegalChars= /[\(\)\<\>\,\;\:\ \\\"\[\]]/
         if (strng.match(illegalChars)) {
          error = "The Email Address Contains Illegal Characters.\n";
       }
    }
return error;    
}

function checkIntendedUse (strng) {
var error = "";
if (strng == "") {
   error = "Please Enter the Intended Use of the Facility.\n";
}
return error;
}

function checkEventDate (strng) {
var error = "";
if (strng == "") {
   error = "Please Enter the Event Date.\n";
}
return error;
}

function checkEventStartTime (strng) {
var error = "";
if (strng == "") {
   error = "Please Enter the Events Start Time.\n";
}
return error;
}

function checkEventEndTime (strng) {
var error = "";
if (strng == "") {
   error = "Please Enter the Events End Time.\n";
}
return error;
}

function checkSetUpDate (strng) {
var error = "";
if (strng == "") {
   error = "Please Enter the Event Set-Up Date.\n";
}
return error;
}

function checkSetUpStartTime (strng) {
var error = "";
if (strng == "") {
   error = "Please Enter the Event Set-Up Start Time.\n";
}
return error;
}

function checkSetUpEndTime (strng) {
var error = "";
if (strng == "") {
   error = "Please Enter the Event Set-Up End Time.\n";
}
return error;
}

function checkCleanUpStartTime (strng) {
var error = "";
if (strng == "") {
   error = "Please Enter the Clean-Up Start Time.\n";
}
return error;
}

function checkCleanUpEndTime (strng) {
var error = "";
if (strng == "") {
   error = "Please Enter the Clean-Up End Time.\n";
}
return error;
}

function checkInitials (strng) {
var error = "";
if (strng == "") {
   error = "You Must Enter Your Initials.\n";
}
return error;
}
