var playerWindowProps = 'width=425,height=400';

function openPlayer(props,s) {
	
	// see if the props has more than one param, if so, write the link to AuthUser instead
	var url = "/support/player/player.jsp?";
	window.open(url+props,'Player',playerWindowProps);
	return;
}

function checkBlanks(b) {
			if(b.value=="" || b.value==" " || b.value=="\r") {
				er="Please provide your "+b.name + "\n";
				b.focus()
				return er;
			} else {
			return ""
			}
		}
		function verify(f,v) {
			e = f.email.value;
			error = "";
			if(e.length!=0 && e.length>4) {
				if(e.indexOf("@")==-1 || e.indexOf(".")==-1) {
					error+="The email address is not valid\n" ;
				}
				if(e.indexOf(" ")!=-1 || e.indexOf("/")!=-1 || e.indexOf(",")!=-1 || e.indexOf(";")!=-1) {
					error+="The email address is not valid\n";
				}
			} else {
				error+="valid email required!\n";
			}
			if(!f.answer[0].checked && !f.answer[1].checked && !f.answer[2].checked) {
				f.answer[0].focus();
				error+="You must answer the competition answer\n";
			}
			if(checkBlanks(f.postcode)!="") {
				error+=checkBlanks(f.postcode);
			}
			if(checkBlanks(f.city)!="") {
				error+=checkBlanks(f.city);
			}
			if(checkBlanks(f.street)!="") {
				error+=checkBlanks(f.street);
			}
			if(checkBlanks(f.housenumber)!="") {
				error+=checkBlanks(f.housenumber);
			}
			if(checkBlanks(f.phone)!="") {
				error+=checkBlanks(f.phone);
			} 
			if(checkBlanks(f.surname)!="") {
				error+=checkBlanks(f.surname);
			}
			if(checkBlanks(f.forename)!="") {
				error+=checkBlanks(f.forename);
			}
			if(error!="") {alert(error);return false;
			}
			if(v && error=="") {
				f.submit();
			}
		}