statelist = new Array("Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", 
				"Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", 
				"Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", 
				"Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", 
				"North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", 
				"South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", 
				"Wisconsin", "Wyoming");
abbrlist = new Array("AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", 
				"ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", 
				"PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY");

sportlist = new Array("Baseball", "Basketball", "Boxing", "Cow Tipping", "Cricket", "Fencing", "Ferret Juggling", 
				"Football", "Horse Racing", "Jousting", "Karate", "Soccer", "Softball", "Swimming");
schoollist = new Array("Draughns", "Harvard", "MIT", "Nossi", "Oxford", "Phoenix");

function index_head (onbutton)
{	document.writeln("<table border='0' cellpadding='0' cellspacing='0' width='712px'>");
	document.writeln("	<tr><td width='255px' align='center'><a href='index.cgi'><img src='images/logo.gif' border='0'></a></td>");
	document.writeln("		<td><img src='images/spacer.gif' width='128px' height='108px' border='0'></td>");
	document.writeln("		<td><table border='0' cellpadding='0' cellspacing='0' width='329px' style='text-align:center;'>");
	document.writeln("				<tr><td style='font:18px Arial; color:#464646;'>Our Site Is Absolutely <b>FREE</b>! So Use It.</td></tr>");
	document.writeln("				<tr><td><img src='images/spacer.gif' height='5px' border='0'></td></tr>");
	
	if (onbutton == 1)
	{	document.writeln("			<tr><td><img src='images/index/button_new_account_on.gif' border='0'></td></tr>");
	} else {
		document.writeln("			<tr><td><a href='acc_create.htm'><img src='images/index/button_new_account_off.gif' border='0' ");
		document.writeln("					id='signinbutton' onmouseover='javascript:showdrop();'></a></td></tr>");
	}
	
	document.writeln("				<tr><td><img src='images/spacer.gif' height='5px' border='0'></td></tr>");
	
	if (onbutton == 2)
	{	document.writeln("			<tr><td><img src='images/index/button_signin_on.gif' border='0'></td></tr>");
	} else {
		document.writeln("			<tr><td><a href='signin.htm'><img src='images/index/button_signin_off.gif' border='0' ");
		document.writeln("					onmouseover=\"this.src='images/index/button_signin_on.gif'\" ");
		document.writeln("					onmouseout=\"this.src='images/index/button_signin_off.gif'\"></a></td></tr>");
	}
	
	document.writeln("			</table></td></tr>");
	document.writeln("</table>");
}

function menu_tabs (access, ontab)
{	document.writeln("<table border='0' cellpadding='0' cellspacing='0' width='442px'><tr>");
	if (access == 2)
	{	if (ontab == 1)
			{ document.write  ("<td><img border='0' src='images/nav/nt_coaches_on.gif'></td>"); }
		else
			{	document.write  ("<td><a href='intranet.cgi?what=vidlist'><img border='0' onmouseover=\"this.src='images/nav/nt_coaches_on.gif'\" ");
				document.writeln("onmouseout=\"this.src='images/nav/nt_coaches_off.gif'\" src='images/nav/nt_coaches_off.gif'></td>");
			}
	} else {
		document.write  ("<td><img src='images/spacer.gif' width='141px' height='27px' border='0'></td>");
	}
	
	if (ontab == 2)
		{ document.write  ("<td><a href='watch_games.cgi'><img border='0' src='images/nav/nt_watch_on.gif'></a></td>"); }
	else
		{	document.write  ("<td><a href='watch_games.cgi'><img border='0' onmouseover=\"this.src='images/nav/nt_watch_on.gif'\" ");
			document.writeln("onmouseout=\"this.src='images/nav/nt_watch_off.gif'\" src='images/nav/nt_watch_off.gif'></a></td>");
		}
	
	if (access > 0)
	{	if (ontab == 3)
			{ document.write  ("<td><img border='0' src='images/nav/nt_player_on.gif'></td>"); }
		else
			{	document.write  ("<td><a href='intranet.cgi?what=proflist'><img border='0' onmouseover=\"this.src='images/nav/nt_player_on.gif'\" ");
				document.writeln("onmouseout=\"this.src='images/nav/nt_player_off.gif'\" src='images/nav/nt_player_off.gif'></td>");
			}
	} else {
		document.write  ("<td><img src='images/spacer.gif' width='140px' height='27px' border='0'></td>");
	}
	
	document.writeln("		<td><img src='images/spacer.gif' width='22px' height='27px' border='0'></td></tr>");
	document.writeln("</table>");
}

function search_box ()
{
	document.writeln("<form action='search.cgi' method='post' style='margin:0px;'>");
	document.writeln("<table border='0' cellpadding='0' cellspacing='0' width='325px'>");
	document.writeln("	<tr><td><img src='images/search_l.gif' border='0'></td>");
	  document.write("		<td background='images/search_bg.gif' width='240px'><input name='searchitem' type='text' id='searchitem' ");
	document.writeln("style='width:240px; font:12px Arial; color:#898989;' value='Search Games & Players' onfocus=\"this.value=''\"></td>");
	document.writeln("		<td background='images/search_bg.gif'><img src='images/spacer.gif' width='6px' height='47px' border='0'></td>");
	  document.write("		<td background='images/search_bg.gif' style='padding-top:10px;' valign='top'>");
	document.writeln("<input type='image' src='images/go_button.gif' border='0'></td>");
	document.writeln("		<td><img src='images/search_r.gif' border='0'></td></tr>");
	document.writeln("</table></form>");
}

function menu_bar (access, ontab)
{	links = new Array("", "index.cgi", "infopages.cgi?what=aboutus", "comments.cgi?what=comment", 
						"infopages.cgi?what=faqs", "infopages.cgi?what=contact");
	image = new Array("", "home", "about", "comments", "questions", "contact");
	if (access > 0) { links[1] = "intranet.cgi"; }
	
	document.writeln("<table border='0' cellpadding='0' cellspacing='0' width='772px'>");
	document.writeln("	<tr><td><img src='images/nav/l.gif' border='0'></td>");
	for (i=1; i<=5; i++)
	{	if (i ==  ontab)
		{	document.write  ("<td><img border='0' src='images/nav/nb_"+image[i]+"_on.gif'></td>");
		} else {
			document.write  ("<td><a href='"+links[i]+"'><img border='0' onmouseover=\"this.src='images/nav/nb_"+image[i]+"_on.gif'\" ");
			document.writeln("onmouseout=\"this.src='images/nav/nb_"+image[i]+"_off.gif'\" src='images/nav/nb_"+image[i]+"_off.gif'></td>");
		}
	}
	document.writeln("		<td><img src='images/nav/r.gif' border='0'></td></tr>");
	document.writeln("</table>");
}

function copyright ()
{	document.write("<span style='font:12px Arial; color:#636363;'>");
	document.write("&copy; Copyright 2009 www.hometeamdigital.com All Rights Reserved.");
	document.write("&nbsp;&nbsp;|&nbsp;&nbsp;");
	document.write("Terms & Conditions");
//	document.write("&nbsp;&nbsp;|&nbsp;&nbsp;");
//	document.write("Mission Statement");
	document.write("</span>");
}

/* ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- */

function showdrop (element)
{	var sibutton = document.getElementById(element);
	document.getElementById("dropmenu").height = '94px';
	document.getElementById("dropmenu").style.left = (findPosX(sibutton) - 1) + 'px';
	document.getElementById("dropmenu").style.top  = (findPosY(sibutton) - 1) + 'px';
	document.getElementById("dropmenu").style.visibility='visible';
}

function hidedrop ()
	{ document.getElementById("dropmenu").style.visibility='hidden'; }

function findPosX(obj)
{	var curleft = 0;
	if ( typeof obj == 'string' ) { var obj = document.getElementById(obj); }
	if (obj.offsetParent)
	{	while (obj.offsetParent)
		{	curleft += obj.offsetLeft;
			obj = obj.offsetParent;
		}
	} else if(obj.x) {
		curleft += obj.x
	}
	return curleft;
}

function findPosY(obj)
{	var curtop = 0;
	if ( typeof obj == 'string' ) { var obj = document.getElementById(obj); }
	if (obj.offsetParent)
	{	while (obj.offsetParent)
		{	curtop += obj.offsetTop;
			obj = obj.offsetParent;
		}
	} else if(obj.y) {
		curtop += obj.y
	}
	return curtop;
}

