//  JavaScript Document


function getBack() {

	 history.go(-1)

}

function putFocus() {
	
	if (document.forms.length > 0) {
		var field = document.forms[0];
		for (i = 0; i < field.length; i++) {
			if ((field.elements[i].type == "text") || (field.elements[i].type == "textarea") || (field.elements[i].type.toString().charAt(0) == "s")) {
				document.forms[0].elements[i].focus();
				break;
         			}
      		}
   	}
}

function clearBox(box) {

	if(box.value==box.defaultValue) {
	 	 	
		box.value = "";
	}
}

function isEmail(){
  
		 emailAddress=document.scoreRep.submit_by.value;

    // Return false if e-mail field is blank.

  		if (document.orderForm.submit_by.value == ""){
     			alert("\nThe E-MAIL field is blank.\n\nPlease enter your e-mail address.")
     			document.orderForm.submit_by.value;
     			return false; 
    		}

    // Return false if e-mail field does not contain a '@' and '.' .

 		if (document.orderForm.submit_by.value.indexOf ('@',0) == -1 || document.orderForm.submit_by.value.indexOf ('.',0) == -1){
     			alert("\nThe Email field requires a \"@\" and a \".\"be used.\n\nPlease re-enter your e-mail address.")
     			document.orderForm.submit_by.select();
      			document.orderForm.submit_by.focus();
    			return false;
      		}
   		else{
   	 		return true;
      		}
   	}


function evalAlert(){
	
	alert("Please enter your First Name.")
}

function subExit20(){

	var name1="document.scoreRep.firstName.value";
	var name2="document.scoreRep.lastname.value";
	document.scoreRep.subject.value="Over 20 Match Result from "+name1+" "+name2;
	document.scoreRep.redirect.value="o20home.htm";
}

function subReturn20(){
			
	var name1="document.scoreRep.firstName.value";
	var name2="document.scoreRep.lastname.value";
	document.scoreRep.subject.value="Over 20 Match Result from "+name1+" "+name2;
	document.scoreRep.redirect.value="o20ScoreRep.htm";
}

function subReturn30(){

	var name1="document.scoreRep.firstName.value";
	var name2="document.scoreRep.lastname.value";
	document.scoreRep.subject.value="Over 30 Match Result from "+name1+" "+name2;
	document.scoreRep.redirect.value="o30ScoreRep.htm";
}

function subExit30(){

	var name1="document.scoreRep.firstName.value";
	var name2="document.scoreRep.lastname.value";
	document.scoreRep.subject.value="Over 30 Match Result from "+name1+" "+name2;
	document.scoreRep.redirect.value="o30home.htm";
}

function subReturn40(){

	var name1="document.scoreRep.firstName.value";
	var name2="document.scoreRep.lastname.value";
	document.scoreRep.subject.value="Over 40 Match Result from "+name1+" "+name2;
	document.scoreRep.redirect.value="o40ScoreRep.htm";
}

function subExit40(){

	var name1="document.scoreRep.firstName.value";
	var name2="document.scoreRep.lastname.value";
	document.scoreRep.subject.value="Over 40 Match Result from "+name1+" "+name2;
	document.scoreRep.redirect.value="o40home.htm";
}

function subReturn50(){

	var name1="document.scoreRep.firstName.value";
	var name2="document.scoreRep.lastname.value";
	document.scoreRep.subject.value="Over 50 Match Result from "+name1+" "+name2;
	document.scoreRep.redirect.value="o50ScoreRep.htm";
}

function subExit50(){

	var name1="document.scoreRep.firstName.value";
	var name2="document.scoreRep.lastname.value";
	document.scoreRep.subject.value="Over 50 Match Result from "+name1+" "+name2;
	document.scoreRep.redirect.value="o50home.htm";
}
	
function subReturnRef(){

	var name1="document.scoreRep.firstName.value";
	var name2="document.scoreRep.lastname.value";
	document.scoreRep.subject.value="OTSL Referee Match Result from "+name1+" "+name2;
	document.scoreRep.redirect.value="refMatchRep.htm";
}

function subExitRef(){

	var name1="document.scoreRep.firstName.value";
	var name2="document.scoreRep.lastname.value";
	document.scoreRep.subject.value="OTSL Referee Match Result from "+name1+" "+name2;
	document.scoreRep.redirect.value="portal.htm";
}

function check()
  {
  document.getElementById("contactUs").checked=true
  }

