<!--
function showStatus(msg){
	window.status = msg;
	return true;
	}
	
function welcome(){
	defaultStatus="Coastal Cup";
	}
	
function popup(lPage,la,lh,tour,site,date,game,time,type,id,rink){
var iMyWidth;
var iMyHeight;
var lPage;
var strPage;
var strResize;
var strScroll;
var strHeight;
var strWidth;
var lhome;
var laway;
var tour;
var site;
var date;
var game;
var time;
var type;
var id;

switch(lPage){
	case 'score':
		//strPage = ("ccPrintS.asp?a=" + la + "&h=" + lh + "&t=" + tour + "&s=" + site + "&d=" + date + "&g=" + game + "&ti=" + time + "&type=" + type + "&id=" + id + "&r=" & rink)
		strPage = ("ccPrintS.asp?a=" + la + "&h=" + lh + "&t=" + tour + "&s=" + site + "&d=" + date + "&g=" + game + "&id=" + id + "&ti=" + time + "&type=" + type)
		strResize = "yes"
		strScroll = "yes"
		strHeight = "600"
		strWidth = "900"
		break
	case 'print':
		strPage = ("ccPrintL.asp")	
		strResize = "yes"
		strScroll = "yes"
		strHeight = "600"
		strWidth = "900"
		break
	case 'view':
		strPage = ("ccPrintL.asp?view=yes")	
		strResize = "yes"
		strScroll = "yes"
		strHeight = "600"
		strWidth = "900"
		break
	case 'email':
		strPage = ("ccEMailStats.asp")	
		strResize = "yes"
		strScroll = "yes"
		strHeight = "250"
		strWidth = "600"
		break
	case 'payment':
		strPage = ("ccEditTeam.asp?tournid=" + la + "&team=" + lh + "&payment=" + tour + "&type=1&player=0")	
		strResize = "no"
		strScroll = "no"
		strHeight = "250"
		strWidth = "600"
		break
	case 'delete':
		strPage = ("ccStatsDelete.asp?g=" + la + "&t=" + lh)	
		strResize = "no"
		strScroll = "no"
		strHeight = "150"
		strWidth = "600"
		break
	case 'edit':
		strPage = ("ccStatsEdit.asp?g=" + la + "&t=" + lh + "&away=" + tour + "&home=" + site)	
		strResize = "yes"
		strScroll = "yes"
		strHeight = "500"
		strWidth = "600"
		break
	case 'all':
		strPage = ("ccPrintA.asp")	
		strResize = "no"
		strScroll = "no"
		strHeight = "300"
		strWidth = "600"
		break
	case 'rosters':
		strPage = ("ccPrintR.asp?tournid=" + la)	
		strResize = "yes"
		strScroll = "yes"
		strHeight = "300"
		strWidth = "600"
		break
	case 'roster':
		strPage = ("ccPrintR.asp?teamid=" + la + "&tournid=" + lh)	
		strResize = "yes"
		strScroll = "yes"
		strHeight = "300"
		strWidth = "600"
		break
	case 'team':
		strPage = ("ccEditTeam.asp?id=" + la)	
		strResize = "no"
		strScroll = "no"
		strHeight = "500"
		strWidth = "650"
		break
	case 'player':
		strPage = ("ccEditTeam.asp?player=" + la)	
		strResize = "no"
		strScroll = "no"
		strHeight = "300"
		strWidth = "650"
		break
	case 'nonpayment':
		strPage = ("ccNonPayment.asp?id=" + la)		
		strResize = "yes"
		strScroll = "yes"
		strHeight = "375"
		strWidth = "800"
		break
	case 'tournemail':
		strPage = ("ccTourneyEMail.asp?id=" + la)	
		strResize = "yes"
		strScroll = "yes"
		strHeight = "450"
		strWidth = "600"
		break
	case 'schedule':
		strPage = ("ccScheduleChange.asp?game=" + la + "&tournid=" + lh + "&57=" + tour + "&teamid=" + site)		
		strResize = "yes"
		strScroll = "yes"
		strHeight = "200"
		strWidth = "600"
		break	
}

//gets top and left positions based on user's resolution so hint window is centered.
iMyWidth = (window.screen.width/2) - ((strWidth/2) + 10)//half the screen width minus half the new window width (plus 5 pixel borders).
iMyHeight = (window.screen.height/2) - ((strHeight/2) + 50)//half the screen height minus half the new window height (plus title and status bars).
	var win2 = window.open(strPage,"CCPrint","status,height=" + strHeight + ",width=" + strWidth + ",resizable=" + strResize + ",left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=" + strScroll + "")
}

function formFocus(){
	var bFound = false;
	// for each form
	for (f=0; f < document.forms.length; f++){
	// for each element in each form
	for(i=0; i < document.forms[f].length; i++){
	  // if it's not a hidden element
	  if (document.forms[f][i].type != "hidden"){
		// and it's not disabled
		if (document.forms[f][i].disabled != true){
			// set the focus to it
			document.forms[f][i].focus();
			var bFound = true;
		}
	  }
	  // if found in this element, stop looking
	  if (bFound == true)
		break;
	}
	// if found in this form, stop looking
	if (bFound == true)
	  break;
	}
}
//-->