//***********************************************************************
// Author: Veronique Molinari
//***********************************************************************
//emailCheck(theForm)
//FrontPage_Form1_Validator(theForm)
//***********************************************************************
//**********************************************************
//Check that the e-mail address entered is like a@a.a
//**********************************************************

function emailCheck(theForm) {
txt=theForm.e_mail.value;
if (txt.indexOf("@")<1){
alert("I'm sorry. This email address seems wrong. Please"
+" check the prefix and '@' sign.");
return true;
}

str=txt.substr(txt.indexOf("@"))
if ((str.indexOf(".")<2)) {
	return true;
   }

return false;
}



//**********************************************************
//Check that the required fields are not left blank
//**********************************************************


function FrontPage_Form1_Validator(theForm)

{

	if (theForm.first_name.value == ""){
		theForm.first_name.focus();
		alert("Please enter a First Name.");
		return (false);
	}
	
	if (theForm.last_name.value == ""){
    	theForm.last_name.focus();
    	alert("Please enter a Last Name.");
     	return (false);

	}

       if (theForm.version.value == ""){
        theForm.version.focus();
        alert("Please choose a platform.");
        return (false);


    }


	if (theForm.e_mail.value == ""){
		theForm.e_mail.focus();
		alert("Please enter an e-mail address.");
		return (false);
	}



  //   if ((theForm.coach.value <>'')||(theForm.markets.value =='')){
//
  //             alert("Please select your field of interest.");
    //            return (false);
      //  }



  	if (emailCheck(theForm)){
		alert("Please enter a valid e-mail address.");
		theForm.e_mail.focus();
		return (false);
	}

	
return (true);
}

