function check_for_numbers(c)
   {
   var str = c;     
   // Return false if characters are not a-z, A-Z, or a space.
   for (var i = 0; i < str.length; i++) 
      {
      var ch = str.substring(i, i + 1);
      if ("1234567890".indexOf(ch) !=-1)
		return false;
      }
   return true;
   }

function check_for_alpha(c)
   {
   var str = c;     
   // Return false if characters are not a-z, A-Z, or a space.
   for (var i = 0; i < str.length; i++) 
      {
      var ch = str.substring(i, i + 1);
      if ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(ch) !=-1)
		return false;
      }
   return true;
   }

function ValidateInvestorRelations(theForm)
{

  if (theForm.name.value == "")
  {
    alert("Please enter a value for the \"Full Name\" field.");
    theForm.name.focus();
    return (false);
  }  
  else if (theForm.address.value == "")
  {
    alert("Please enter a value for the \"Address\" field.");
    theForm.address.focus();
    return (false);
  }
  else if (theForm.city.value == "")
  {
		alert("Please enter a value for the \"City\" field.");
		theForm.city.focus();
		return (false);

  }
  else if (!check_for_numbers(theForm.city.value))
  {
	alert("Please enter a valid City for the \"City\" field.");
	theForm.city.focus();
	return (false);
  }
  else if (theForm.provState.value == "")
  {
     alert("Please enter a value for the \"Prov/State\" field.");
     theForm.provState.focus();
     return (false);
  }

  else if (!check_for_numbers(theForm.provState.value))
  {
	alert("Please enter a valid Province or State for the \"Prov/State\" field.");
	theForm.provState.focus();
	return (false);
  }
  else if (theForm.country.value == "")
  {
     alert("Please enter a value for the \"Country\" field.");
     theForm.country.focus();
     return (false);
  }

  else if (!check_for_numbers(theForm.country.value))
  {
	alert("Please enter a valid Country for the \"Country\" field.");
	theForm.provState.focus();
	return (false);
  }

  else if (theForm.postalZip.value == "")
  {
     alert("Please enter a value for the \"Postal/Zip\" field.");
     theForm.postalZip.focus();
     return (false);
  }
   else if (theForm.phone.value == "")
  {
     alert("Please enter a value for the \"Phone Number\" field.");
     theForm.phone.focus();
     return (false);
  } 

  else if (!check_for_alpha(theForm.phone.value))
  {
	alert("Please enter a numerical Phone Number for the \"Phone Number\" field.");
	theForm.phone.focus();
	return (false);
  }

   else if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"E-mail Address\" field.");
    theForm.email.focus();
    return (false);
  }
  else if (theForm.email.value.length < 7)
  {
    alert("Please enter at least 7 characters in the \"E-mail Address\" field.");
    theForm.email.focus();
    return (false);
  }
  else if (theForm.email.value.length > 40)
  {
    alert("Please enter at most 40 characters in the \"E-mail Address\" field.");
    theForm.email.focus();
    return (false);
  }  
  else if (theForm.email.value.indexOf("@") == -1 || theForm.email.value.indexOf(".") == -1) 
  {
    alert("Please include a proper \"E-mail Address\".");	
    theForm.email.focus();
    return (false);
  }
  else if (check_blank(theForm.email.value) )
  {   
      alert("Please include a proper \"E-mail Address\".");	  
      theForm.email.focus();
      return (false);
  }

}