function validateForm()
{

var Vendor_state = document.vending_app.Vendor_state.options[document.vending_app.Vendor_state.options.selectedIndex].value;
var Vendor_Type = document.vending_app.Vendor_Type.options[document.vending_app.Vendor_Type.options.selectedIndex].value;

if (document.vending_app.Vendor_FirstName.value == "")
{
alert("You must enter a First Name");
document.vending_app.Vendor_FirstName.focus();
		return false;
}
if (document.vending_app.Vendor_LastName.value == "")
{
alert("You must enter a Last Name");
document.vending_app.Vendor_LastName.focus();
		return false;
}
if (document.vending_app.Vendor_StreetAddress.value == "")
{
alert("You must enter an address");
document.vending_app.Vendor_StreetAddress.focus();
		return false;
}

if (document.vending_app.Vendor_City.value == "")
{
alert("You must enter a City");
document.vending_app.Vendor_City.focus();
		return false;
}

if (document.vending_app.Vendor_ZipCode.value == "")
{
alert("You must enter a Zipcode");
document.vending_app.Vendor_ZipCode.focus();
		return false;
}

if (document.vending_app.Vendor_Email.value == "")
{
alert("You must enter an email adress");
document.vending_app.Vendor_Email.focus();
		return false;
}

if (document.vending_app.Vendor_state.value == "")
{
alert("You must select a state");
document.vending_app.Vendor_state.focus();
		return false;
}

if (document.vending_app.Vendor_Type.value == "")
{
alert("You must select a vending type");
document.vending_app.Vendor_Type.focus();
		return false;
}

if ((document.vending_app.Vendor_Type.value == "Food" || document.vending_app.Vendor_Type.value == "Non-Profit Org") && !(document.vending_app.Vendor_state.value == "CA" ))
{
alert("Only California residents can apply for food vending and Non-Profit booths");
document.vending_app.Vendor_Type.focus();
		return false;
}

if ((document.vending_app.Vendor_Type.value == "Dry Other") && (document.vending_app.Vending_Dry_Desc.value == ""))
{
alert("You must Enter a Dry Goods Description");
document.vending_app.Vending_Dry_Desc.focus();
		return false;
}

if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test
(document.vending_app.Vendor_Email.value))
{
return (true);
}
alert("You must enter a valid email adress");
document.vending_app.Vendor_Email.focus();
		return false;

}
function validateScholar()
{

//var state = document.scholarship_app.state.options[document.scholarship_app.state.options.selectedIndex].value;
//var Vendor_Type = document.vending_app.Vendor_Type.options[document.vending_app.Vendor_Type.options.selectedIndex].value;

if (document.scholarship_app.first_name.value == "")
{
alert("You must enter a First Name");
document.scholarship_app.first_name.focus();
		return false;
}
if (document.scholarship_app.last_name.value == "")
{
alert("You must enter a Last Name");
document.scholarship_app.last_name.focus();
		return false;
}
if (document.scholarship_app.address.value == "")
{
alert("You must enter an address");
document.scholarship_app.address.focus();
		return false;
}

if (document.scholarship_app.city.value == "")
{
alert("You must enter a City");
document.scholarship_app.city.focus();
		return false;
}

if (document.scholarship_app.state.value == "")
{
alert("You must select a State");
document.scholarship_app.state.focus();
		return false;
}


if (document.scholarship_app.zip.value == "")
{
alert("You must enter a Zipcode");
document.scholarship_app.zip.focus();
		return false;
}

if ((document.scholarship_app.team_affiliation.value == "") && (document.scholarship_app.esfna_player.value == "Y"))
{
alert("You must select a team");
document.scholarship_app.team_affiliation.focus();
		return false;
}

if (document.scholarship_app.essay_content.value == "")
{
alert("You must enter your essay text");
document.scholarship_app.essay_content.focus();
		return false;
}


if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test
(document.scholarship_app.email.value))
{
return (true);
}
alert("You must enter a valid email adress");
document.scholarship_app.email.focus();
		return false;

}

function validateMentor()
{

//var state = document.scholarship_app.state.options[document.scholarship_app.state.options.selectedIndex].value;
//var Vendor_Type = document.vending_app.Vendor_Type.options[document.vending_app.Vendor_Type.options.selectedIndex].value;

if (document.scholarship_app.first_name.value == "")
{
alert("You must enter a First Name");
document.scholarship_app.first_name.focus();
		return false;
}
if (document.scholarship_app.last_name.value == "")
{
alert("You must enter a Last Name");
document.scholarship_app.last_name.focus();
		return false;
}
if (document.scholarship_app.address.value == "")
{
alert("You must enter an address");
document.scholarship_app.address.focus();
		return false;
}

if (document.scholarship_app.city.value == "")
{
alert("You must enter a City");
document.scholarship_app.city.focus();
		return false;
}

if (document.scholarship_app.state.value == "")
{
alert("You must select a State");
document.scholarship_app.state.focus();
		return false;
}


if (document.scholarship_app.zip.value == "")
{
alert("You must enter a Zipcode");
document.scholarship_app.zip.focus();
		return false;
}

if (document.scholarship_app.area_of_expertise.value == "")
{
alert("You must Enter an area of Expertise");
document.scholarship_app.area_of_expertise.focus();
		return false;
}

if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test
(document.scholarship_app.email.value))
{
return (true);
}
alert("You must enter a valid email adress");
document.scholarship_app.email.focus();
		return false;

}

function validateReconEnter()
{


//var state = document.scholarship_app.state.options[document.scholarship_app.state.options.selectedIndex].value;
//var Vendor_Type = document.vending_app.Vendor_Type.options[document.vending_app.Vendor_Type.options.selectedIndex].value;

if (document.friend_enter.recon_first_name.value == "")
{
alert("You must enter a First Name");
document.friend_enter.recon_first_name.focus();
		return false;
}
if (document.friend_enter.recon_last_name.value == "")
{
alert("You must enter a Last Name");
document.friend_enter.recon_last_name.focus();
		return false;
}
if (document.friend_enter.recon_cur_city.value == "")
{
alert("You must enter a City");
document.friend_enter.recon_cur_city.focus();
		return false;
}

if (document.friend_enter.recon_cur_country.value == "")
{
alert("You must enter your Country");
document.friend_enter.recon_cur_country.focus();
		return false;
}

if ((document.friend_enter.recon_cur_non_us_state.value == "") && (document.friend_enter.recon_cur_state.value == ""))
{
alert("You must Enter either A US/Canada State or non-US/Canada Province");
document.friend_enter.recon_cur_non_us_state.focus();
		return false;
}


if (document.friend_enter.recon_elementary.value == "")
{
alert("You must enter your Elemetary School");
document.friend_enter.recon_elementary.focus();
		return false;
}

if (document.friend_enter.recon_highschool.value == "")
{
alert("You must Enter Your Highschool");
document.friend_enter.recon_highschool.focus();
		return false;
}

if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test
(document.friend_enter.recon_email.value))
{
return (true);
}
alert("You must enter a valid email adress");
document.friend_enter.recon_email.focus();
		return false;

}

function validateReconSearch()
{

if ((document.friend_search.recon_first_name.value == "") && (document.friend_search.recon_last_name.value == "")
    && (document.friend_search.recon_cur_city.value == "") && (document.friend_search.recon_cur_non_us_state.value == "")
	&& (document.friend_search.recon_cur_state.value == "") && (document.friend_search.recon_cur_country.value == "")
	&& (document.friend_search.recon_prev_country.value == "") && (document.friend_search.recon_prev_province.value == "")
	&& (document.friend_search.recon_prev_city.value == "") && (document.friend_search.recon_elementary.value == "")
	&& (document.friend_search.recon_highschool.value == "") && (document.friend_search.recon_college.value == "")
	&& (document.friend_search.recon_sefer.value == "") && (document.friend_search.recon_kefitegna.value == "")
	&& (document.friend_search.recon_kebele.value == "") && (document.friend_search.recon_nick_name.value == ""))

{
alert("You must at least use One Search Criteria!");
document.friend_search.recon_first_name.focus();
		return false;
}



}


function validateReconFind()
{


//var state = document.scholarship_app.state.options[document.scholarship_app.state.options.selectedIndex].value;
//var Vendor_Type = document.vending_app.Vendor_Type.options[document.vending_app.Vendor_Type.options.selectedIndex].value;

if (document.friend_find.find_first_name.value == "")
{
alert("You must your First Name");
document.friend_find.find_first_name.focus();
		return false;
}

if (document.friend_find.find_last_name.value == "")
{
alert("You must your Last Name");
document.friend_find.find_last_name.focus();
		return false;
}



if (document.friend_find.find_search_first_name.value == "")
{
alert("You must your Friend's First Name");
document.friend_find.find_search_first_name.focus();
		return false;
}

if (document.friend_find.find_search_last_name.value == "")
{
alert("You must your Friend's Last Name");
document.friend_find.find_search_last_name.focus();
		return false;
}

if (document.friend_find.find_search_type.value == "")
{
alert("You must Select a Relationship Type");
document.friend_find.find_search_type.focus();
		return false;
}

if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test
(document.friend_find.find_email.value))
{
return (true);
}
alert("You must enter a valid email adress");
document.friend_find.find_email.focus();
		return false;

}

function validateReconLook()
{


//var state = document.scholarship_app.state.options[document.scholarship_app.state.options.selectedIndex].value;
//var Vendor_Type = document.vending_app.Vendor_Type.options[document.vending_app.Vendor_Type.options.selectedIndex].value;

if (document.look_find.find_first_name.value == "")
{
alert("You must Enter your First Name");
document.look_find.find_first_name.focus();
		return false;
}

if (document.look_find.find_last_name.value == "")
{
alert("You must Enter your Last Name");
document.look_find.find_last_name.focus();
		return false;
}


if (document.look_find.find_search_type.value == "")
{
alert("You must Select a Relationship Type");
document.look_find.find_search_type.focus();
		return false;
}

}

function validateMember()
{


//var state = document.scholarship_app.state.options[document.scholarship_app.state.options.selectedIndex].value;
//var Vendor_Type = document.vending_app.Vendor_Type.options[document.vending_app.Vendor_Type.options.selectedIndex].value;

if (document.member.member_FirstName.value == "")
{
alert("You must Enter your First Name");
document.member.member_FirstName.focus();
		return false;
}

if (document.member.member_LastName.value == "")
{
alert("You must Enter your Last Name");
document.member.member_LastName.focus();
		return false;
}

if (document.member.member_LastName.value == "")
{
alert("You must Enter your Last Name");
document.member.member_LastName.focus();
		return false;
}

if (document.member.member_gender.value == "")
{
alert("Please select a gender!");
document.member.member_gender.focus();
		return false;
}

if (document.member.member_StreetAddress.value == "")
{
alert("Please Enter an Address!");
document.member.member_StreetAddress.focus();
		return false;
}

if (document.member.member_City.value == "")
{
alert("Please Enter a City!");
document.member.member_City.focus();
		return false;
}

if (document.member.member_state.value == "")
{
alert("Please Select a State or Province!");
document.member.member_state.focus();
		return false;
}

if (document.member.member_ZipCode.value == "")
{
alert("Please Enter your Zipcode!");
document.member.member_ZipCode.focus();
		return false;
}

if (document.member.member_Phone.value == "")
{
alert("Please Enter your Phone Number!");
document.member.member_Phone.focus();
		return false;
}

if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test
(document.member.member_Email.value))
{
return (true);
}
alert("You must enter a valid email adress");
document.member.member_Email.focus();
		return false;


}


function validateMentorAsk()
{


//var state = document.scholarship_app.state.options[document.scholarship_app.state.options.selectedIndex].value;
//var Vendor_Type = document.vending_app.Vendor_Type.options[document.vending_app.Vendor_Type.options.selectedIndex].value;

if (document.ask_mentor.major_id_selected.value == "")
{
alert("You must Pick a Major");
document.ask_mentor.major_id_selected.focus();
		return false;
}

if (document.ask_mentor.name.value == "")
{
alert("You must Enter your Name");
document.ask_mentor.name.focus();
		return false;
}

if (document.ask_mentor.question.value == "")
{
alert("You must Enter your Question");
document.ask_mentor.question.focus();
		return false;
}

if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test
(document.ask_mentor.email.value))
{
return (true);
}
alert("You must enter a valid email adress");
document.ask_mentor.email.focus();
		return false;


}


function validatePledge()
{


//var state = document.scholarship_app.state.options[document.scholarship_app.state.options.selectedIndex].value;
//var Vendor_Type = document.vending_app.Vendor_Type.options[document.vending_app.Vendor_Type.options.selectedIndex].value;

if (document.esfna_pledge.Pledge_FirstName.value == "")
{
alert("You must Enter a First Name");
document.esfna_pledge.Pledge_FirstName.focus();
		return false;
}

if (document.esfna_pledge.Pledge_LastName.value == "")
{
alert("You must Enter a Last Name");
document.esfna_pledge.Pledge_LastName.focus();
		return false;
}

if (document.esfna_pledge.Pledge_Amount.value == "")
{
alert("You must Enter a Pledge Amount");
document.esfna_pledge.Pledge_Amount.focus();
		return false;
}

if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test
(document.esfna_pledge.Pledge_Email.value))
{
return (true);
}
alert("You must enter a valid email adress");
document.esfna_pledge.Pledge_Email.focus();
		return false;

 if(isNaN(document.esfna_pledge.Pledge_Amount.value)) 
   { 
     alert("Invalid data format.\n\nOnly numbers are allowed."); 
     document.esfna_pledge.Pledge_Amount.focus(); 
     return (false); 
   }
}


function validatePicUpload()
{

//var state = document.scholarship_app.state.options[document.scholarship_app.state.options.selectedIndex].value;
//var Vendor_Type = document.vending_app.Vendor_Type.options[document.vending_app.Vendor_Type.options.selectedIndex].value;

if (document.pic_file_upload.FileName.value == "")
{
alert("You must select a file to Upload");
document.pic_file_upload.FileName.focus();
		return false;
}

}


   
   
