<!--
var cansubmit = true;
function doSubmitRegister() {
  
	if (!cansubmit) alert("Please wait, your details are being processed")

	with (document) {
		error=""
		if (signup.newname.value.length<3) {
			error+="Name is too short (must be at least 3 characters)\n"
		}
		if (signup.newname.value.length>30) {
			error+="Name is too long (must be at less than 30 characters)\n"
		}
		if (signup.newname.value.match(/[!#$%^&*+=?_\\\/]/)) {
			error+="Name must not contain characters - ! # $ % ^ & * + = ? _ / \ \n"
		}
		if (signup.password1.value.length<3) {
			error+="Password is too short (must be at least 3 characters)\n"
			signup.password1.value=""
			signup.password2.value=""
		}
		if (signup.password1.value!=signup.password2.value) {
			error+="Passwords must match\n"
			signup.password1.value=""
			signup.password2.value=""
		}
		if (!signup.address.value.match(/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/) ) {
			error+="You must enter a valid e-mail address"
			signup.address.value=""
 			signup.address2.value=""
		}
		if (signup.address.value!=signup.address2.value) {
			error+="Email does not match - You must enter a valid e-mail address"
			signup.address.value=""
			signup.address2.value=""
		}
		if (error.length>0) {
			alert("Please correct the following:\n"+error)
			canSubmit = true
		} else {
			return signup.submit()
		}
	}
}

function popup1(html,x,y){
	eval("window.open(html,'Pocket','toobar=no,location=no,directories=no,status=no,scrollbars=no,resizable=yes,copyhistory=no,width=" + x + ",height=" + y +"')");
}
function popup2(html,x,y){
	eval("window.open(html,'Pocket','toobar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=" + x + ",height=" + y +"')");
}
function popup3(html,x,y){
	eval("window.open(html,'Pocket','toobar=yes,location=yes,directories=no,status=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=" + x + ",height=" + y +"')");
}

function validateInviteForm(form) {

    if (! form.name.value.match(/[\w\"\'\-\s\.]+/) ) {
        alert(
            "Error, your name is missing\n\n" + 
            "You must supply your own name if you want to\n" +
            "play a friend of yours. Your\n" +
            "name will be mentioned in the e-mail message\n" +
            "so that the receiving party knows that it's\n" +
            "not some form of spam.\n"
        );
        return;
    }
    if (! form.email.value.match(/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/) ) {
        if (
            ! confirm(
                "Warning, your e-mail address is invalid\n\n" + 
                "The e-mail address you supplied is not valid.\n"+
                "Although this address is optional, we advise to\n"+
                "supply one since you friend may want\n"+
                "to reply to the message.\n\n"+
                "Press 'OK' to continue without a reply-address\n"+
                "or press 'Cancel' to enter your e-mail address.\n"
            )
        ) {
            return;
        }
    }
    if (! form.friendemail.value.match(/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/) ) {
        alert(
            "Error, invalid recipient address\n\n" + 
            "The e-mail address you entered for your friend\n"+
            "can't be valid. Please enter the correct e-mail\n"+
            "address, otherwise you cannot send this email.\n"
        );
        return;
    }
    form.submit();
}


function doSubmit(form) {
     form.submit();	
}
function doStart(form,type) {
     form.f.value = type;
     form.submit();	
}

function doForgotForm(form) {

   if (! form.email.value.match(/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/) ) {
        alert(  "Warning, your e-mail address is invalid\n\n" + 
                "The e-mail address you supplied is not valid.\n" );
        
       return;
        
    }
    
    form.submit();
}

function validateFeedbackForm(form) {

    if (! form.email.value.match(/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/) ) {
        if (
            ! confirm(
                "Warning, your e-mail address is invalid\n\n" + 
                "The e-mail address you supplied does not appear to be valid.\n"+
                "Press 'OK' to continue\n"+
                "or press 'Cancel' to enter your e-mail address again.\n"
            )
        ) {
            return;
        }
    }
    
    form.submit();
}

function validateAbuseForm(form) {

    if (! form.name.value.match(/[\w\"\'\-\s\.]+/) ) {
        alert(
            "Error, your VALID player name is missing\n\n" + 
            "You must supply your own player name if you want to\n" +
            "report someone - otherwise we cannot take you request seriously.\n"
        );
        return;
    }
    if (! form.email.value.match(/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/) ) {
        if (
            ! confirm(
                "Warning, your e-mail address is invalid\n\n" + 
                "The e-mail address you supplied is not valid.\n"+
                "Although this address is optional, we advise to\n"+
                "supply one since you friend may want\n"+
                "to reply to the message.\n\n"+
                "Press 'OK' to continue without a reply-address\n"+
                "or press 'Cancel' to enter your e-mail address.\n"
            )
        ) {
            return;
        }
    }
    
    form.submit();
}

//-->
