<!--
function check_email(e) {
	ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";

	for(i=0; i < e.length ;i++){
	if(ok.indexOf(e.charAt(i))<0){ 
	return (false);
	}	
		} 

			if (document.images) {
			re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
			re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
			if (!e.match(re) && e.match(re_two)) {
			return (-1);		
		} 
	}
}
;
function txtEmail_onchange() {
			 { // f is the form (passed using the this keyword)
			// check the first email address ( the exclamation means "not" )
			if(!check_email(frmInvesting.txtEmail.value)){
			alert("Please check the e-mail address and make sure it follows the  'someone@somewhere.com' format.");
			frmInvesting.txtEmail.focus(); 
			// make sure the form is not submitted
			return false;
		}
	}
}
;
var nums=new Array('document.frmInvesting.phone1');
function phone1_onchange() {
var re= /\D/;
// test for this format: (xxx)xxx-xxxx
var re2 = /^\({1}\d{3}\)\d{3}-\d{4}/; 
// test for this format: xxx-xxx-xxxx
//var re2 = /^\d{3}-\d{3}-\d{4}/;

for (i=0; i<nums.length;i++){
var num=eval(nums[i]+'.value');

var newNum;
 if (num != "" && re2.test(num)!=true){
   if (num != ""){
     while (re.test(num)){
     num = num.replace(re,"");
     }
   }

  if (num.length != 10){
    alert('Please enter a 10 digit phone number');
    eval(nums[i]).select();
    frmInvesting.phone1.focus();
    return false;
    }
   else {
     // for format (xxx)xxx-xxxx
     newNum = '(' + num.substring(0,3) + ')' + num.substring(3,6) + '-' + num.substring(6,10);
     // for format xxx-xxx-xxxx
     // newNum = num.substring(0,3) + '-' + num.substring(3,6) + '-' + num.substring(6,10);
     eval(nums[i]).value=newNum;
     }
   }
  }
}
;
var Form;
function validate(Form) {
//	This portion of the validation is for contact information.
//

	if (frmInvesting.txtFname.value == "") {
		alert("You have not entered first name");
		frmInvesting.txtFname.focus()
		return false; 
	}
	;
	if (frmInvesting.txtLname.value == "") {
		alert("You have not entered a last name");
		frmInvesting.txtLname.focus()
		return false;
	}
	;
	if (frmInvesting.txtAddr.value == "") {
		alert("You have not entered an address");
		frmInvesting.txtAddr.focus()
		return false;
	}
	;
	if (frmInvesting.txtCity.value == "") {
		alert("You have not entered in a city");
		frmInvesting.txtCity.focus()
		return false;
	}
	;
	if (frmInvesting.selSt.value == "") {
		alert("You must select a state");
		frmInvesting.selSt.focus()
		return false;
	}
	;
	if (frmInvesting.txtZip.value == "") {
		alert("You have not entered in a zipcode");
		frmInvesting.txtZip.focus()
		return false;
	}
	;
	if (frmInvesting.phone1.value == "") {
		alert("Please enter in a phone number")
		frmInvesting.phone1.focus()
		return false;
	}
	;
	if (frmInvesting.txtEmail.value == "") {
		alert("Please enter in a valid E-mail address");
		frmInvesting.txtEmail.focus()
		return false;
	}
	;
//
//	This portion of the validation is for Billing information
//
//	var btn = frmInvesting.rdoExp;
//	if (btn == null) alert("You have not selected a level of experience");
//	//else alert('Button Value' + btn + 'slelected');
//	return false;
	
//	function valButton(btn) {
//	var cnt = -1;
//	for (var i=0; i < btn.length; i++) {
//	   if (btn[i].checked) {cnt = i; i = btn.length;}
//	   }
//	if (cnt > -1) return btn[cnt].value;
//	}
 }	
//-->
