function validata() { 
    var okay = true;   
	var email = document.profile.email.value;
	if(okay && email == ''){
		alert("Please enter your email address.");
		document.profile.email.focus();
		okay = false;
	}
    var regex = /^.+@.+\..{2,3}$/;
    if (okay && !(regex.test(email))) { 
		alert("Please enter a valid email address.");
		document.profile.email.focus();
		okay = false;
    }
	if(okay && document.profile.password.value == ''){
		alert("Please enter your password.");
		document.profile.password.focus();
		okay = false;
	}
	if(okay){
	    document.profile.iSubmit.value = 1;
	}	
	if(okay){
	    document.profile.submit();
	    return true;
    } else {
	    return false;
	}
}