function changeImage(x)
{
document.getElementById('thisImage').src=x;
}
function popHelp() 
{
window.open('help.html','','width=700,height=600,scrollbars=yes')
}
function popPeople(PID) 
{
url='people_pop.php?PID=' + PID 
window.open(url,'','width=550,height=600,scrollbars=yes')
}
function openPage(url) 
{
window.open(url,'_blank')
}
function newPage(url)
{
window.location=url;
/*window.open="http://www.w3schools.com"; alternative*/
}
function addOne(eleid)
{
document.getElementById(eleid).value=++document.getElementById(eleid).value;
}
function trOver(obj,stat)
{
switch (stat)
{
case "ddlnk": ;
	obj.style.color='#ff6600' ;
	break;
case "lnk":
/*	obj.style.fontWeight='bolder' ;*/
	obj.style.color='#ffff00' ;
	break;
case "ln1":
	obj.style.backgroundColor='#808080' ;
	break;
case "ln0":
	obj.style.backgroundColor='#d3d3d3' ;
	break;
case "unav":
	obj.style.backgroundColor='#996699' ;
	break;
case "grouplist":
	obj.style.backgroundColor='#2f4f4f' ;
	break;
case "mwish":
	obj.style.backgroundColor='#c0c0c0' ;
	break;
case "mwhen":
	obj.style.backgroundColor='#d7d7d7' ;
	break;
case "mmed":
	obj.style.backgroundColor='#ffff00' ;
	break;
case "mhigh":
	obj.style.backgroundColor='#fedc52' ;
	break;
case "mvery":
	obj.style.backgroundColor='#fa8072' ;
	break;
case "low":
		 obj.style.backgroundColor='#c0c0c0';
		 break;
case "med":
		 obj.style.backgroundColor='#ffff66';
		 break;
case "high":
		 obj.style.backgroundColor='#fa8072';
		 break;
case "tba":
		 obj.style.backgroundColor='#ffff80';
		 break;
case "neutral":
		 obj.style.backgroundColor='#bfffbf';
		 break;
case "home":
		 obj.style.backgroundColor='#666';
		 break;
case "away":
		 obj.style.backgroundColor='#ccc';
		 break;
case "stba":
		 obj.style.backgroundColor='#ffff80';
		 break;
case "sneutral":
		 obj.style.backgroundColor='#bfffbf';
		 break;
case "shome":
		 obj.style.backgroundColor='#2f4f4f';
		 break;
case "saway":
		 obj.style.backgroundColor='#e8e8e8';
		 break;
}
}
function trOff(obj,stat)
{
switch (stat)
{
case "ddlnk": ;
	obj.style.fontWeight='normal' ;
	obj.style.color='#000080' ;
	break;
case "lnk": ;
	obj.style.fontWeight='normal' ;
	obj.style.color='#fff' ;
	break;
case "ln1":
	obj.style.backgroundColor='#c0c0c0' ;
	break;
case "ln0":
	obj.style.backgroundColor='#f8f8ff' ;
	break;
case "unav":
case "grouplist":
	obj.style.backgroundColor='#333' ;
	break;
case "mwish":
	obj.style.backgroundColor='#e6e6fa' ;
	break;
case "mwhen":
	obj.style.backgroundColor='#fff' ;
	break;
case "mmed":
	obj.style.backgroundColor='#ffff93' ;
	break;
case "mhigh":
	obj.style.backgroundColor='#ffff66' ;
	break;
case "mvery":
	obj.style.backgroundColor='#fddedb' ;
	break;
case "low":
		 obj.style.backgroundColor='#e8e8e8';
		 break;
case "med":
		 obj.style.backgroundColor='#ffff93';
		 break;
case "high":
		 obj.style.backgroundColor='#fddedb';
		 break;
case "tba":
		 obj.style.backgroundColor='#faebd7';
		 break;
case "neutral":
		 obj.style.backgroundColor='#d9ffd9';
		 break;
case "home":
		 obj.style.backgroundColor='#eee';
		 break;
case "away":
		 obj.style.backgroundColor='#fff';
		 break;
case "stba":
		 obj.style.backgroundColor='#ffffcc';
		 break;
case "sneutral":
		 obj.style.backgroundColor='#ecffec';
		 break;
case "shome":
		 obj.style.backgroundColor='#888';
		 break;
case "saway":
		 obj.style.backgroundColor='#fff';
		 break;
}
}
 function frmSubmit(frm)
 {
 document.getElementById(frm).submit();
 }
 function msgbox(frm)
 {
 if(frm=="req")
  {
 	alert("Sorry service not yet enabled" + '\n' + "Please email your name or nick name to" + '\n' + "webadmin@thurrockrfc.com" + '\n' + "and we will deal with your request within 24hours" + '\n' + "Thank You") ;
 	}
 }
 function valid_req(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
  {alert(alerttxt);return false;}
else {return true}
}
}

function valid(thisform)
{
with (thisform)
{
if (valid_req(user,"The user name must be filled out!")==false)
  {user.focus();return false;}
if (valid_req(pw,"The password must be filled out!")==false)
  {pw.focus();return false;}
}
}

function conf()
{
var r=confirm("Are you sure" + "\n" + "This cannot be undone!");
if (r==true)
  {
window.open("person_delete.php")
  }
}
