// JavaScript Document
function doSignup(){
if (document.splash_sign.email.value == "" || document.splash_sign.email.value =="Enter Your Email Address")
  {
     alert("Please enter your E-mail Address!");
     document.splash_sign.email.focus();
     return (false);
  }
// test if valid email address, must have @ and .
  var checkEmail = "@.";
  var checkStr = document.splash_sign.email.value;
  var EmailValid = false;
  var EmailAt = false;
  var EmailPeriod = false;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
     for (j = 0;  j < checkEmail.length;  j++)
    {
       if (ch == checkEmail.charAt(j) && ch == "@")
        EmailAt = true;
      if (ch == checkEmail.charAt(j) && ch == ".")
        EmailPeriod = true;
          if (EmailAt && EmailPeriod)
                 break;
           if (j == checkEmail.length)
                break;
        }
   // if both the @ and . were in the string
    if (EmailAt && EmailPeriod)
     {
    EmailValid = true
    break;
        }
  }
  if (!EmailValid)
  {
    alert("Please enter a valid Email Address!");
    document.splash_sign.email.focus();
    return (false);
  }
}
//
function doLogin(){
	if (document.logins.member_username.value == "" || document.logins.member_username.value =="User Name*")
  {
     alert("Please enter your username!");
     document.logins.member_username.focus();
     return false;
  }
  	if (document.logins.member_password.value == "" || document.logins.member_password.value =="Password")
  {
     alert("Please enter your password!");
     document.logins.member_password.focus();
     return false;
  }
}
//
function checkinquire(){
	if(document.myform.name_f.value == ""){
		alert("Please fill in your name");
		document.myform.name_f.focus();
		return false;
	}
if(document.myform.phone_f.value == ""){
		alert("Please fill in your phone number");
		document.myform.phone_f.focus();
		return false;
	}
if (document.myform.email_f.value == "")
  {
     alert("Please enter your E-mail Address!");
     document.myform.email_f.focus();
     return (false);
  }
// test if valid email address, must have @ and .
  var checkEmail = "@.";
  var checkStr = document.myform.email_f.value;
  var EmailValid = false;
  var EmailAt = false;
  var EmailPeriod = false;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
     for (j = 0;  j < checkEmail.length;  j++)
    {
       if (ch == checkEmail.charAt(j) && ch == "@")
        EmailAt = true;
      if (ch == checkEmail.charAt(j) && ch == ".")
        EmailPeriod = true;
          if (EmailAt && EmailPeriod)
                 break;
           if (j == checkEmail.length)
                break;
        }
   // if both the @ and . were in the string
    if (EmailAt && EmailPeriod)
     {
    EmailValid = true
    break;
        }
  }
  if (!EmailValid)
  {
    alert("Please enter a valid email address in \"Email\" field!");
    document.myform.email_f.focus();
    return (false);
  }
 }
function members(){
		if(document.register.member_name.value == ""){
		alert("Please enter your name");
		document.register.member_name.focus();
		return false;
	}
if (document.register.member_email.value == "")
  {
     alert("Please enter your E-mail Address!");
     document.register.member_email.focus();
     return (false);
  }
// test if valid email address, must have @ and .
  var checkEmail = "@.";
  var checkStr = document.register.member_email.value;
  var EmailValid = false;
  var EmailAt = false;
  var EmailPeriod = false;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
     for (j = 0;  j < checkEmail.length;  j++)
    {
       if (ch == checkEmail.charAt(j) && ch == "@")
        EmailAt = true;
      if (ch == checkEmail.charAt(j) && ch == ".")
        EmailPeriod = true;
          if (EmailAt && EmailPeriod)
                 break;
           if (j == checkEmail.length)
                break;
        }
   // if both the @ and . were in the string
    if (EmailAt && EmailPeriod)
     {
    EmailValid = true
    break;
        }
  }
  if (!EmailValid)
  {
    alert("Please enter a valid email address in \"Email\" field!");
    document.register.member_email.focus();
    return (false);
  }
		if(document.register.member_city.value == ""){
		alert("Please enter your city");
		document.register.member_city.focus();
		return false;
	}
}
function careers(){
	if(document.Careers.fullname.value == ""){
	alert("Please enter your name");
    document.Careers.fullname.focus();
    return (false);
	}
	if(document.Careers.fileatt.value == ""){
	alert("Please select your resume");
    document.Careers.fileatt.focus();
    return (false);
	}
}
function nextstep(){
	if(document.next.fullname.value == ""){
	alert("Please enter your name");
    document.next.fullname.focus();
    return (false);
	}
	if(document.next.address.value == ""){
	alert("Please enter your address");
    document.next.address.focus();
    return (false);
	}
	if(document.next.city.value == "0"){
	alert("Please select your city");
    document.next.city.focus();
    return (false);
	}
	if(document.next.prov.value == ""){
	alert("Please select your province");
    document.next.prov.focus();
    return (false);
	}
	if(document.next.zip.value == ""){
	alert("Please enter your postal code");
    document.next.zip.focus();
    return (false);
	}
	if(document.next.phone.value == ""){
	alert("Please enter your phone number");
    document.next.phone.focus();
    return (false);
	}
	if(document.next.pref_location == "0"){
	alert("Please select Preference of Locations");
    document.next.pref_location.focus();
    return (false);
	}
	if(document.next.present_ocuppation.value == ""){
	alert("Please enter your present occupation");
    document.next.present_ocuppation.focus();
    return (false);
	}
	if(document.next.experience.value == ""){
	alert("Please enter your Experience as an owner");
    document.next.experience.focus();
    return (false);
	}
	if(document.next.why.value == ""){
	alert("Please enter Why are your interested...");
    document.next.why.focus();
    return (false);
	}
	if(document.next.invest.value == ""){
	alert("Please enter Willing to invest...");
    document.next.invest.focus();
    return (false);
	}
	if(document.next.hear.value == ""){
	alert("Please enter Where did you hear...");
    document.next.hear.focus();
    return (false);
	}
}
function needlocation(){
	if(document.locations.fullname.value == ""){
	alert("Please enter your name");
    document.locations.fullname.focus();
    return (false);
	}
	if(document.locations.address.value == ""){
	alert("Please enter your address");
    document.locations.address.focus();
    return (false);
	}
	if(document.locations.city.value == "0"){
	alert("Please select your city");
    document.locations.city.focus();
    return (false);
	}
	if(document.locations.prov.value == ""){
	alert("Please select your province");
    document.locations.prov.focus();
    return (false);
	}
	if(document.locations.zip.value == ""){
	alert("Please enter your postal code");
    document.locations.zip.focus();
    return (false);
	}
	if(document.locations.phone.value == ""){
	alert("Please enter your phone number");
    document.locations.phone.focus();
    return (false);
	}
}