function validate_investor_step1 () {
  var doc = document.investor;
  
  var fn = new Array();
  fn[0]="fname";
  fn[1]="lname";
  fn[2]="companyname";
  fn[3]="address";
  fn[4]="city";
  fn[5]="state";
  fn[6]="country";
  fn[7]="email";
  fn[8]="zip";
  fn[9]="phone";
  fn[10]="username1";
  fn[11]="password1";
  fn[12]="position";

  var ft = new Array();
  ft[0]="First Name";
  ft[1]="Last Name";
  ft[2]="Company Name";
  ft[3]="Address";
  ft[4]="City";
  ft[5]="State";
  ft[6]="Country";
  ft[7]="Email";
  ft[8]="Zip Code";
  ft[9]="Phone";
  ft[10]="Username";
  ft[11]="Password";
  ft[12]="Position";

	/*if(doc.birth_year.value=="YYYY" || doc.birth_year.value==""){
		alert("Please enter your birth date.");
		return false;
	}*/
	
    if(doc.email.value.indexOf("@")==-1){
   alert("Please provider a proper Email Address");
   doc.email.focus();
   return false;
  }
      if(doc.email.value.indexOf(".")==-1){
   alert("Please provider a proper Email Address");
   doc.email.focus();
   return false;
  }

  for(i=0;i<fn.length;i++){
     var tempObj = eval("document.investor."+fn[i]);
     if(tempObj.value==""){
        alert("Please fill in your "+ft[i]+" before continuing.");
        tempObj.focus();
        return false;
     }
  }
  if(doc.password1.value != doc.password2.value){
    alert("Please be sure that your Passwords match.");
    doc.password1.focus();
    return false;
  }


}

function validate_investor_step3(){
	var doc = document.investor;
	var a;
   a = false;
   for (var i=0; i<doc.accredited.length; i++) {
	      if (doc.accredited[i].checked) {
	         a=true;
		  }
   }
   if (a==false) {
      alert("Please Sign the Qualified Client Form");
      return false;
   }
}

function validate_investor_upgrade(){
	if(document.investor.inv_register.selectedIndex == 0)
	{
	   alert("Please Select Your Registration Type");
	   document.investor.inv_register.focus();
	   return false;
	}
	if(document.investor.inv_register.selectedIndex == 2 && document.investor.inv_org_name.value == "")
	{
	   alert("Enter Your Organization Name");
	   document.investor.inv_register.focus();
	   return false;
	}
	
	if(document.investor.inv_org_invest.selectedIndex == 0)
	{
	   alert("Do you or your organization invest in hedge funds ?");
	   document.investor.inv_org_invest.focus();
	   return false;
	}
	
	if(document.investor.inv_invest_fund.selectedIndex == 0)
	{
	   alert("Do you or your organization invest in Fund of Funds ?");
	   document.investor.inv_invest_fund.focus();
	   return false;
	}
	
	if(document.investor.inv_cta_invest.selectedIndex == 0)
	{
	   alert("Do you or your organization invest in CTA funds ?");
	   document.investor.inv_cta_invest.focus();
	   return false;
	}
	
/*	if(document.investor.inv_portfolio_size.selectedIndex == 0)
	{
	   alert("What is the size of your portfolio ?");
	   document.investor.inv_portfolio_size.focus();
	   return false;
	}*/

	/*Start Validation for new added fields on 27/08/2004*/
	if(document.investor.inv_org_pvt_invest.selectedIndex == 0)
	{
	   alert("Do you or your organization invest in Private equity funds?");
	   document.investor.inv_org_pvt_invest.focus();
	   return false;
	}
	if(document.investor.inv_net_worth.selectedIndex == 0)
	{
	   alert("What is your Net Worth?");
	   document.investor.inv_net_worth.focus();
	   return false;
	}
	if(document.investor.inv_liq_net_worth.selectedIndex == 0)
	{
	   alert("What is your liquid net worth?");
	   document.investor.inv_liq_net_worth.focus();
	   return false;
	}
	/*End Validation for new added fields on 27/08/2004*/

	if(document.investor.inv_hedge_fund_portfolio.selectedIndex == 0)
	{
	   alert("What is the size of your hedge fund portfolio ?");
	   document.investor.inv_hedge_fund_portfolio.focus();
	   return false;
	}
	
	if(document.investor.inv_current_invest_count.selectedIndex == 0)
	{
	   alert("In how many hedge funds are you currently invested ?");
	   document.investor.inv_current_invest_count.focus();
	   return false;
	}
	
	if(document.investor.inv_description.selectedIndex == 0)
	{
	   alert("Please choose the option that best describes you");
	   document.investor.inv_description.focus();
	   return false;
	}
	
	if(document.investor.inv_fund_lookup.selectedIndex == 0)
	{
	   alert("What type of fund are you currently looking for ?");
	   document.investor.inv_fund_lookup.focus();
	   return false;
	}
	var doc = document.investor;
	var a;
   a = false;
   for (var i=0; i<doc.accredited.length; i++) {
	      if (doc.accredited[i].checked) {
	         a=true;
		  }
   }
   if (a==false) {
      alert("Please Sign the Qualified Client Form");
      return false;
   }
	
	return true;
}


function validate_investor_step2(){
	
	if(document.investor.inv_register.selectedIndex == 0)
	{
	   alert("Please Select Your Registration Type");
	   document.investor.inv_register.focus();
	   return false;
	}
	if(document.investor.inv_register.selectedIndex == 2 && document.investor.inv_org_name.value == "")
	{
	   alert("Enter Your Organization Name");
	   document.investor.inv_register.focus();
	   return false;
	}
	
	if(document.investor.inv_org_invest.selectedIndex == 0)
	{
	   alert("Do you or your organization invest in hedge funds ?");
	   document.investor.inv_org_invest.focus();
	   return false;
	}
	
	if(document.investor.inv_invest_fund.selectedIndex == 0)
	{
	   alert("Do you or your organization invest in Fund of Funds ?");
	   document.investor.inv_invest_fund.focus();
	   return false;
	}
	
	if(document.investor.inv_cta_invest.selectedIndex == 0)
	{
	   alert("Do you or your organization invest in CTA funds ?");
	   document.investor.inv_cta_invest.focus();
	   return false;
	}
	
/*	if(document.investor.inv_portfolio_size.selectedIndex == 0)
	{
	   alert("What is the size of your portfolio ?");
	   document.investor.inv_portfolio_size.focus();
	   return false;
	}*/

	/*Start Validation for new added fields on 27/08/2004*/
	if(document.investor.inv_org_pvt_invest.selectedIndex == 0)
	{
	   alert("Do you or your organization invest in Private equity funds?");
	   document.investor.inv_org_pvt_invest.focus();
	   return false;
	}
	if(document.investor.inv_net_worth.selectedIndex == 0)
	{
	   alert("What is your Net Worth?");
	   document.investor.inv_net_worth.focus();
	   return false;
	}
	if(document.investor.inv_liq_net_worth.selectedIndex == 0)
	{
	   alert("What is your liquid net worth?");
	   document.investor.inv_liq_net_worth.focus();
	   return false;
	}
	/*End Validation for new added fields on 27/08/2004*/

	if(document.investor.inv_hedge_fund_portfolio.selectedIndex == 0)
	{
	   alert("What is the size of your hedge fund portfolio ?");
	   document.investor.inv_hedge_fund_portfolio.focus();
	   return false;
	}
	
	if(document.investor.inv_current_invest_count.selectedIndex == 0)
	{
	   alert("In how many hedge funds are you currently invested ?");
	   document.investor.inv_current_invest_count.focus();
	   return false;
	}
	
	if(document.investor.inv_description.selectedIndex == 0)
	{
	   alert("Please choose the option that best describes you");
	   document.investor.inv_description.focus();
	   return false;
	}
	
	if(document.investor.inv_fund_lookup.selectedIndex == 0)
	{
	   alert("What type of fund are you currently looking for ?");
	   document.investor.inv_fund_lookup.focus();
	   return false;
	}
	return true;
}

function setUsername(){
  var doc = document.investor;
  document.getElementById('usernamechange').innerHTML=doc.email.value;
  doc.username1.value=doc.email.value;
}


function validate_terms(){
	if(document.investor.terms_agree.checked==true){
		document.investor.accept.disabled=false;
	}else{
		document.investor.accept.disabled=true;
	}
}


