<!--

function goJoin() {
    var allValid = 1;
    var x = document.join;
	if (allValid == 1 && !emailOK(x.Email.value)){
		alert("You must enter a valid email address to join.")
		x.Email.value='';
		x.Email.focus();
		allValid = 0
	}

    if(allValid == 1 && x.Fname.value == ''){
		alert("You must enter your first name in order to join.")
		x.Fname.focus();
		allValid = 0
    }
    if(allValid == 1 && x.Lname.value == ''){
		alert("You must enter your last name in order to join.")
		x.Lname.focus();
		allValid = 0
    }
    if(allValid == 1 && x.privacypolicy.checked == false){
		alert("You must agree to the privacy policy in order to join.")
		x.privacypolicy.focus();
		allValid = 0
    }

    if (allValid == 1) {
        x.submit();
        return true;
    } else {
        return false;   
    }
}

function emailOK(str) {
    var emailOK = 1;
    var at="@"
    var dot="."
    var lat=str.indexOf(at)
    var lstr=str.length
    var ldot=str.indexOf(dot)

    if (str.indexOf(at)==-1){
        emailOK = 0;
    }else if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
        emailOK = 0;
    }else if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
        emailOK = 0;
    }else if (str.indexOf(at,(lat+1))!=-1){
        emailOK = 0;
    }else if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
        emailOK = 0;
    }else if (str.indexOf(dot,(lat+2))==-1){
        emailOK = 0;
    }else if (str.indexOf(" ")!=-1){
        emailOK = 0;
    }
    return(emailOK);
}

//-->