function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function isEmailAddr(email){
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0){
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}




//Name and Email Validation.
function join(){
		var check=true;
		var error="You failed to complete the following compulsory fields;\n\n";
		if (document.forms[0].elements['EMAIL'].value=="") { error+="EMAIL\n";check=false;}
		if (document.forms[0].elements['EMAIL'].value==""){alert("Please enter all your details.");return(false);}
		if (!isEmailAddr(document.forms[0].elements['EMAIL'].value)){alert("Please enter a complete email address in the form: yourname@yourdomain.com");return(false);}
		//if (document.forms[0].elements['name'].value=="") { error+="NAME\n";check=false;}
		if (error!="You failed to complete the following compulsory fields;\n\n"){alert(error);}
		return check;			
		}