// JavaScript Document
function profile1Validate() 
{
var id;
if(document.profile1.fname.value=="")
{
alert("Enter the first name.");
document.profile1.fname.value="";
document.profile1.fname.focus();
return false;
}
if(document.profile1.lname.value=="")
{
alert("Enter the last name.");
document.profile1.lname.value="";
document.profile1.lname.focus();
return false;
}
if(document.profile1.primary_phone.value=="")
{
alert("Enter the primary phone number.");
document.profile1.primary_phone.value="";
document.profile1.primary_phone.focus();
return false;
}
if(document.profile1.secondary_phone.value=="")
{
alert("Enter the secondary phone number.");
document.profile1.secondary_phone.value="";
document.profile1.secondary_phone.focus();
return false;
}
if(document.profile1.email_address.value=="")
{
alert("Enter your Email.");
document.profile1.email_address.value="";
document.profile1.email_address.focus();
return false;
}
id=document.profile1.email_address.value;
<!--fid=document.form.femail.value;-->
if((id=="")||(id.indexOf("@")==-1))
{
alert("Enter Your Valid Email");
document.profile1.email_address.value="";
document.profile1.email_address.focus();
return false;
}
if(document.profile1.street_address1.value=="")
{
alert("Enter the street address1.");
document.profile1.street_address1.value="";
document.profile1.street_address1.focus();
return false;
}
if(document.profile1.street_address2.value=="")
{
alert("Enter the street address2.");
document.profile1.street_address2.value="";
document.profile1.street_address2.focus();
return false;
}
if(document.profile1.city.value=="")
{
alert("Enter the city.");
document.profile1.city.value="";
document.profile1.city.focus();
return false;
}
if(document.profile1.state.value=="")
{
alert("Enter the state.");
document.profile1.state.value="";
document.profile1.state.focus();
return false;
}
if(document.profile1.zip_code.value=="")
{
alert("Enter the zip code.");
document.profile1.zip_code.value="";
document.profile1.zip_code.focus();
return false;
}
}


function profile2Validate() 
{
var id1;



if(document.profile2.fname.value=="")
{
alert("Enter the first name.");
document.profile2.fname.value="";
document.profile2.fname.focus();
return false;
}
if(document.profile2.lname.value=="")
{
alert("Enter the last name.");
document.profile2.lname.value="";
document.profile2.lname.focus();
return false;
}

if(document.profile2.username.value=="")
{
alert("Enter the user name.");
document.profile2.username.value="";
document.profile2.username.focus();
return false;
}

if(document.profile2.userpwd.value=="")
{
alert("Enter the password.");
document.profile2.userpwd.value="";
document.profile2.userpwd.focus();
return false;
}



if(document.profile2.you_are.value=="-- Select --")
{
alert("Please select your profession.");
document.profile2.you_are.value="";
document.profile2.you_are.focus();
return false;
}
if(document.profile2.e_mail.value=="")
{
alert("Please enter your Email.");
document.profile2.e_mail.value="";
document.profile2.e_mail.focus();
return false;
}

id1=document.profile2.e_mail.value;
<!--fid=document.form.femail.value;-->
if((id1=="")||(id1.indexOf("@")==-1))
{
alert("Enter Your Valid Email");
document.profile2.e_mail.value="";
document.profile2.e_mail.focus();
return false;
}

if(document.profile2.primary_phone.value=="")
{
alert("Enter your primary phone number.");
document.profile2.primary_phone.value="";
document.profile2.primary_phone.focus();
return false;
}

if(document.profile2.street_address1.value=="")
{
alert("Please enter the street address1.");
document.profile2.street_address1.value="";
document.profile2.street_address1.focus();
return false;
}
if(document.profile2.city.value=="")
{
alert("Please enter the city.");
document.profile2.city.value="";
document.profile2.city.focus();
return false;
}
if(document.profile2.state.value=="")
{
alert("Please enter the state.");
document.profile2.state.value="";
document.profile2.state.focus();
return false;
}
if(document.profile2.zip_code.value=="")
{
alert("Please enter the zip code.");
document.profile2.zip_code.value="";
document.profile2.zip_code.focus();
return false;
}
if(document.profile2.category.value=="--Select--")
{
alert("Please select the category.");
document.profile2.category.value="";
document.profile2.category.focus();
return false;
}
if(document.profile2.biography_details.value=="")
{
alert("Please enter your biography.");
document.profile2.biography_details.value="";
document.profile2.biography_details.focus();
return false;
}
if(document.profile2.availability.value=="")
{
alert("Please enter your availability details.");
document.profile2.availability.value="";
document.profile2.availability.focus();
return false;
}
if(document.profile2.speaking_fee.value=="")
{
alert("Please enter your speaking fee.");
document.profile2.speaking_fee.value="";
document.profile2.speaking_fee.focus();
return false;
}
if(document.profile2.media_interviews.value=="")
{
alert("Please enter media interview fee.");
document.profile2.media_interviews.value="";
document.profile2.media_interviews.focus();
return false;
}
}


function profile3Validate() 
{
if(document.regform.attach1.value=="")
{
alert("Please browse an image.");
document.regform.attach1.value="";
document.regform.attach1.focus();
return false;
}
}


function photoValidate() 
{
if(document.photoupdate.photo_file.value=="")
{
alert("Please browse an image.");
document.photoupdate.photo_file.value="";
document.photoupdate.photo_file.focus();
return false;
}
}
/*
var id, id1;
if(document.buyer_registration.user_name.value=="")
{
alert("Enter the user name.");
document.buyer_registration.user_name.value="";
document.buyer_registration.user_name.focus();
return false;
}
if(document.buyer_registration.user_password.value=="")
{
alert("Enter the password.");
document.buyer_registration.user_password.value="";
document.buyer_registration.user_password.focus();
return false;
}
if(document.buyer_registration.confirm_password.value=="")
{
alert("Enter the confirm password.");
document.buyer_registration.confirm_password.value="";
document.buyer_registration.confirm_password.focus();
return false;
}
id=document.buyer_registration.user_email.value;
<!--fid=document.form.femail.value;-->
if((id=="")||(id.indexOf("@")==-1))
{
alert("Enter Your Valid Email");
document.buyer_registration.user_email.value="";
document.buyer_registration.user_email.focus();
return false;
}
id1=document.buyer_registration.confirm_email.value;
<!--fid=document.form.femail.value;-->
if((id1=="")||(id1.indexOf("@")==-1))
{
alert("Enter Your Valid Email");
document.buyer_registration.confirm_email.value="";
document.buyer_registration.confirm_email.focus();
return false;
}
if(document.buyer_registration.user_first_name.value=="")
{
alert("Enter your first name.");
document.buyer_registration.user_first_name.value="";
document.buyer_registration.user_first_name.focus();
return false;
}
if(document.buyer_registration.user_last_name.value=="")
{
alert("Enter your last name.");
document.buyer_registration.user_last_name.value="";
document.buyer_registration.user_last_name.focus();
return false;
}
if(document.buyer_registration.user_address1.value=="")
{
alert("Enter your correspondence address.");
document.buyer_registration.user_address1.value="";
document.buyer_registration.user_address1.focus();
return false;
}
if(document.buyer_registration.user_city.value=="")
{
alert("Enter the city.");
document.buyer_registration.user_city.value="";
document.buyer_registration.user_city.focus();
return false;
}
if(document.buyer_registration.user_state.value=="")
{
alert("Enter the state.");
document.buyer_registration.user_state.value="";
document.buyer_registration.user_state.focus();
return false;
}
if(document.buyer_registration.user_postal_code.value=="")
{
alert("Enter the zip/postal code.");
document.buyer_registration.user_postal_code.value="";
document.buyer_registration.user_postal_code.focus();
return false;
}
if(document.buyer_registration.user_phone_std.value=="")
{
alert("Enter the area code.");
document.buyer_registration.user_phone_std.value="";
document.buyer_registration.user_phone_std.focus();
return false;
}
if(document.buyer_registration.user_phone.value=="")
{
alert("Enter the phone number.");
document.buyer_registration.user_phone.value="";
document.buyer_registration.user_phone.focus();
return false;
}
if(document.buyer_registration.user_country.value=="Select")
{
alert("Select a country");
document.buyer_registration.user_country.value="Select";
document.buyer_registration.user_country.focus();
return false;
}
if(document.buyer_registration.accept_terms.checked==false)
{
alert("Please accept the FITW Terms & Conditions.");
document.buyer_registration.accept_terms.focus();
return (false);
}
return (true);
}
*/