



//Write CSS stylesheet
//---------------------------------------------------------
function writecss()
{
document.writeln ("<style>");
document.writeln ("body { background-image: url(/Images/watermark4.gif); background-color: #E7E7E7 }");
document.writeln ("table { font-family: arial, helvetica, sans-serif; font-size: 9pt; color: #005070; padding: 0px 0px 0px 0px }");
document.writeln (".darkbar { font-size: 10pt; color: #FFFFFF; font-weight: bold; text-align: center; background-color: #005070; line-height: 85% }");
document.writeln (".orangeline { color: #B57329; background-color: #B57329 }");
document.writeln (".subhead { background-color: #FFFFFF; font-size: 12pt; font-style: italic; font-weight: bold }");
document.writeln (".newsbar { font-size: 12pt; font-weight: bold; font-style: italic; vertical-align: middle; background-color: #78AEC8; border-width: 1px 1px 0px 0px; border-color: #78AEC8; border-style: solid }");
document.writeln (".newsbarL { font-size: 12pt; font-weight: bold; font-style: italic; vertical-align: middle; background-color: #78AEC8; border-width: 1px 0px 0px 1px; border-color: #78AEC8; border-style: solid }");
document.writeln (".stripe { font-size: 12pt; font-weight: bold; font-style: italic; vertical-align: middle; background-color: #78AEC8 }");
document.writeln (".sidenavB { font-size: 10pt; color: #005070; font-weight: bold; padding-left: 10px; padding-top: 2px; padding-bottom: 2px }");
document.writeln (".sidenav { font-size: 10pt; color: #005070; padding-left: 10px; padding-top: 2px; padding-bottom: 2px }");
document.writeln (".sidenav9 { font-size: 9pt; color: #005070; padding-left: 10px; padding-top: 2px; padding-bottom: 2px }");
document.writeln (".sidenavhead { font-size: 10pt; color: #005070; font-weight: bold; text-decoration: underline; padding-left: 10px; padding-top: 10px; padding-bottom: 2px }");
document.writeln (".sidenavsmall { font-size: 7pt; color: #005070; padding-left: 10px }");
document.writeln (".navstrip { font-size: 8pt; color: #909099 }");
document.writeln (".newshead { background-color: #FFFFFF; color: #000000; font-weight: bold; line-height: 95% }");
document.writeln (".newsheadL { background-color: #FFFFFF; color: #000000; border-width: 0px 0px 0px 1px; border-color: #78AEC8; border-style: solid }");
document.writeln (".newsheadR { background-color: #FFFFFF; color: #000000; border-width: 0px 1px 0px 0px; border-color: #78AEC8; border-style: solid }");
document.writeln (".newsbottom { background-color: #FFFFFF; color: #000000; border-width: 0px 1px 1px 1px; border-color: #78AEC8; border-style: solid }");
document.writeln (".newsheadnew { background-color: #FFFFFF; color: #B57329; font-weight: bold; font-style: italic }");
document.writeln (".scoretop { font-size: 10pt; color: #005070; background-color: #78AEC8; border-width: 1px 1px 0px 1px; border-color: #78AEC8; border-style: solid }");
document.writeln (".scorehead { font-weight: bold; line-height: 95%; text-align: center }");
document.writeln (".scoretext { line-height: 95%; }");
document.writeln (".scoreL { background-color: #FFFFFF; font-size: 8pt; border-width: 0px 0px 0px 1px; border-color: #78AEC8; border-style: solid }");
document.writeln (".scoreR { background-color: #FFFFFF; font-size: 8pt; border-width: 0px 1px 0px 0px; border-color: #78AEC8; border-style: solid }");
document.writeln (".score { background-color: #FFFFFF; font-size: 8pt }");
document.writeln (".scorebottom { font-size: 8pt; background-color: #FFFFFF; border-width: 0px 1px 1px 1px; border-color: #78AEC8; border-style: solid }");
document.writeln (".scoretourn { font-size: 10pt; color: #005070; background-color: #FFFFFF; border-width: 1px 1px 0px 1px; border-color: #78AEC8; border-style: solid }");
document.writeln (".thead { background-color: #005070; color: #FFFFFF; border-width: 1px 1px 0px 1px; border-color: #78AEC8; border-style: solid }");
document.writeln (".thead18 { font-size: 18pt; color: #005070 }");
document.writeln (".thead16 { font-size: 16pt; color: #005070 }");
document.writeln (".thead14 { font-size: 14pt; color: #005070 }");
document.writeln (".thead12 { font-size: 12pt; color: #005070 }");
document.writeln (".thead10 { font-size: 10pt; background-color: #005070; color: #FFFFFF }");
document.writeln (".thead8 { font-size: 8pt; background-color: #005070; color: #FFFFFF }");
document.writeln (".trowtop { background-color: #78AEC8 }");
document.writeln (".trowtop10 { font-size: 10pt; background-color: #78AEC8 }");
document.writeln (".trowtop8 { font-size: 8pt; background-color: #78AEC8 }");
document.writeln (".trow { background-color: #FFFFFF }");
document.writeln (".trow10 { font-size: 10pt; background-color: #FFFFFF; border-width: 1px 1px 1px 1px; border-color: #78AEC8; border-style: solid }");
document.writeln (".trow8 { font-size: 8pt; background-color: #FFFFFF; border-width: 1px 1px 1px 1px; border-color: #78AEC8; border-style: solid }");
document.writeln (".trow8alt { font-size: 8pt; background-color: #FFFFFF; border-width: 1px 1px 1px 1px; border-color: #78AEC8; border-style: solid }");
document.writeln (".trowblack { color: #202020; background-color: #FFFFFF; border-width: 1px 1px 1px 1px; border-color: #78AEC8; border-style: solid }");
document.writeln (".trowyellow { font-size: 8pt; background-color: #EBF4B0; border-width: 1px 1px 1px 1px; border-color: #78AEC8; border-style: solid }");
document.writeln (".trowyellow10 { font-size: 10pt; background-color: #EBF4B0; border-width: 1px 1px 1px 1px; border-color: #78AEC8; border-style: solid }");
document.writeln (".tblackfull { color: #000000 }");
document.writeln (".tblack { color: #000000 }");
document.writeln (".tblack10 { color: #000000; font-size: 10pt }");
document.writeln (".tblack8 { color: #000000; font-size: 8pt }");
document.writeln (".tblack10B { color: #000000; font-size: 10pt; font-weight: bold }");
document.writeln (".tblack12B { color: #000000; font-size: 12pt; font-weight: bold }");
document.writeln (".tblue10 { color: #005070; font-size: 10pt }");
document.writeln (".tblue8 { color: #005070; font-size: 8pt }");
document.writeln (".tblue9 { color: #005070; font-size: 9pt }");
document.writeln (".tblue9w { color: #005070; font-size: 9pt; background-color: #FFFFFF }");
document.writeln (".tblue12 { color: #005070; font-size: 12pt }");
document.writeln (".tblue12B { color: #005070; font-size: 12pt; font-weight: bold }");
document.writeln ("form { font-family: arial, helvetica, sans-serif; font-size: 9pt; color: #005070 }");
document.writeln ("form8 { font-family: arial, helvetica, sans-serif; font-size: 8pt; color: #005070 }");
document.writeln ("select { font-family: arial, helvetica, sans-serif; font-size: 8pt; color: #005070 }");
document.writeln ("input { font-family: arial, helvetica, sans-serif; font-size: 8pt; color: #005070 }");
document.writeln ("textarea { font-family: arial, helvetica, sans-serif; font-size: 9pt; color: #005070 }");
document.writeln ("img{ border: none }");
document.writeln ("a:link { color: #005070 }");
document.writeln ("a:visited { color: #005070 }");
document.writeln ("a:hover { color: #78AEC8 }");
document.writeln ("a:active { color: #78AEC8 }");
document.writeln ("a.side:link { color: #005070; text-decoration: none }");
document.writeln ("a.side:visited { color: #005070; text-decoration: none }");
document.writeln ("a.side:hover { color: #78AEC8; text-decoration: none }");
document.writeln ("a.side:active { color: #78AEC8; text-decoration: none }");
document.writeln ("a.strip:link { color: #005070; text-decoration: none }");
document.writeln ("a.strip:visited { color: #005070; text-decoration: none }");
document.writeln ("a.strip:hover { color: #909099; text-decoration: none }");
document.writeln ("a.strip:active { color: #909099; text-decoration: none }");
document.writeln ("a.nav:link { color: #FFFFFF; text-decoration: none }");
document.writeln ("a.nav:visited { color: #FFFFFF; text-decoration: none }");
document.writeln ("a.nav:hover { color: #78AEC8; text-decoration: none }");
document.writeln ("a.nav:active { color: #78AEC8; text-decoration: none }");
document.writeln ("a.news:link { color: #000000; text-decoration: none }");
document.writeln ("a.news:visited { color: #000000; text-decoration: none }");
document.writeln ("a.news:hover { color: #78AEC8; text-decoration: none }");
document.writeln ("a.news:active { color: #78AEC8; text-decoration: none }");
document.writeln ("</style>");
}


		
//Write the top/main navigation bar
//---------------------------------------------------------
function writenav()
{
document.writeln ("<td class=darkbar height=32 width=106><a href='/homepage.php' class=nav>Home</a></td>");
document.writeln ("<td class=darkbar height=32 width=2>|</td>");
document.writeln ("<td class=darkbar height=32 width=106><a href='/ClubInfo.html' class=nav>Club<br>Information</a></td>");
document.writeln ("<td class=darkbar height=32 width=2>|</td>");
document.writeln ("<td class=darkbar height=32 width=106><a href='/Teams.html' class=nav>Teams &<br>Schedules</a></td>");
document.writeln ("<td class=darkbar height=32 width=2>|</td>");
document.writeln ("<td class=darkbar height=32 width=106><a href='/cgi-bin/newsarchives.pl?cat=init' class=nav>News<br>Archives</a></td>");
document.writeln ("<td class=darkbar height=32 width=2>|</td>");
document.writeln ("<td class=darkbar height=32 width=106><a href='/cgi-bin/swapshop.pl?cat=init' class=nav>Swap Shop</a></td>");
document.writeln ("<td class=darkbar height=32 width=2>|</td>");
document.writeln ("<td class=darkbar height=32 width=106><a href='/Link.html' class=nav>Other Links</a></td>");
document.writeln ("<td class=darkbar height=32 width=2>|</td>");
document.writeln ("<td class=darkbar height=32 width=150><img src='/Images/clear.gif'></td>");
document.writeln ("<td class=darkbar height=32 width=2><img src='/Images/clear.gif'></td>");
document.writeln ("<td class=darkbar height=32 width=100%><img src='/Images/clear.gif'></td>");
}


//Write the bottom navigation strip
//---------------------------------------------------------
function writenavstrip()
{
document.writeln ("<a href='/homepage.php' class=strip>Home</a> | ");
document.writeln ("<A HREF='/ClubInfo.html' class=strip>Club Information</A> | ");
document.writeln ("<A HREF='/Teams.html' class=strip>Teams</A> | ");
document.writeln ("<A HREF='/cgi-bin/newsarchives.pl?cat=init' class=strip>News Archives</A> | ");
document.writeln ("<A HREF='/cgi-bin/swapshop.pl?cat=init' class=strip>Swap Shop</A> | ");
document.writeln ("<A HREF='/Link.html' class=strip>Other Links</A></font><br>");
document.writeln ("Copyright &copy; 2003-06 San Jose Jr. Sharks Youth Hockey Program. All rights reserved.");
document.writeln ("</td>");
}


//Write the left navigation bar on Club pages bar 
//---------------------------------------------------------
function writeClubnav()
{
document.writeln ("<td height=100% width=150>");
document.writeln ("<table valign=top cellspacing=0 cellpadding=0 border=0 height=100%>");
document.writeln ("<tr valign=top><td height=10 width=150><img src='/Images/clear150.gif' border=0></td></tr>");
document.writeln ("<tr valign=top><td class=sidenavhead height=20 width=150>More Season Info</td></tr>");
document.writeln ("<tr valign=top><td class=sidenav><a href='/Club/aboverview.html' class=side>A/B Overview</a></td></tr>");
//document.writeln ("<tr valign=top><td class=sidenav><a href='/Club/travelregistration.html' class=side>Travel Registration</a></td></tr>");
document.writeln ("<tr valign=top><td class=sidenav><a href='/Club/aaoverview.html' class=side>AAA/AA Overview</a></td></tr>");
document.writeln ("<tr valign=top><td class=sidenav><a href='/Club/GWoverview.html' class=side>Girls/Women's Overview</a></td></tr>");
//document.writeln ("<tr valign=top><td class=sidenav><a href='/Club/tierregistration.html' class=side>Tier Registration</a></td></tr>");
document.writeln ("<tr valign=top><td class=sidenav><a href='/Club/aaaFAQ.html' class=side>AAA FAQ</a></td></tr>");
document.writeln ("<tr valign=top><td class=sidenavhead height=20 width=150>Additional Club Info</td></tr>");
document.writeln ("<tr valign=top><td class=sidenav><a href=\"javascript:popupscroll('/Club/JrSharksBylaws.doc','ByLawInfo',750,550)\" class=side>Club By-Laws</a></td></tr>");
document.writeln ("<tr valign=top><td class=sidenav><a href='/Club/Committees.html' class=side>Committee Members</a></td></tr>");
document.writeln ("<tr valign=top><td class=sidenav><a href='/Club/meetings.html' class=side>Meeting Minutes</a></td></tr>");
document.writeln ("<tr valign=top><td class=sidenav><a href='/Club/Champs.html' class=side>Past Champions</a></td></tr>");
document.writeln ("<tr valign=top><td class=sidenav><a href=\"javascript:popupscroll('/Club/scholarship.pdf','ScholarshipApp',800,600)\" class=side>Financial Aid</a></td></tr>");
document.writeln ("<tr valign=top><td class=sidenav><a href='/Contact.html' class=side>Contact Us</a></td></tr>");
document.writeln ("<tr valign=top><td height=100% width=100%><img src='/Images/clear150.gif' border=0></td></tr>");
document.writeln ("</table>");
document.writeln ("</td>");
}


//Call a popup window
//---------------------------------
function popup(URL, title, w, h) {
 winprops = 'height='+h+',width='+w+',top=0,left=0,menubar=yes,toolbar=yes,status=yes,scrollbars=auto,resizable=1';
 var page = window.open(URL, title, winprops);
 page.focus();
}

//Call a popup window with scroll
//---------------------------------
function popupscroll(URL, title, w, h) {

 winprops = 'height='+h+',width='+w+',top=0,left=0,menubar=yes,toolbar=yes,status=yes,scrollbars=yes,resizable=1';
 var page = window.open(URL, title, winprops);
 page.focus();
}


//Choose an image for the page header
//-------------------------------------
function choosePic(){
	headerImages = new Array("Images/headerSkater.gif","Images/skater2.gif","Images/skater3.gif")
	imgCt = headerImages.length
	pix = Math.floor((Math.random() * imgCt))
	document.picture.src = headerImages[pix]
}


//Choose an image for the page header from a directory other than home
//-------------------------------------
function choosePicUp(){
	headerImages = new Array("/Images/headerSkater.gif","/Images/skater2.gif","/Images/skater3.gif")
	imgCt = headerImages.length
	pix = Math.floor((Math.random() * imgCt))
	document.picture.src = headerImages[pix]
}


//Call the adjpos() function (see below) whenever window is resized
//-------------------------------------
window.onresize = adjpos;

	
//This function repositions the drop-down menus based on the window size
//-------------------------------------
	function adjpos() 
	{
  	var lpos1 = -3;		
  	var lpos2 = 104;		
  	var lpos3 = 213;		
  	var lpos4 = 322;		
  	var lpos5 = 431;		
  	var lpos6 = 540;		
   	var lpos7 = 140;		
 	var myWidth = 0;
  		if( typeof( window.innerWidth ) == 'number' ) 
		{
    		//Non-IE
    		myWidth = window.innerWidth;
  		} 
		else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
		{
    		//IE 6+ in 'standards compliant mode'
    		myWidth = document.documentElement.clientWidth;
  		} 
		else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
		{
    		//IE 4 compatible
    		myWidth = document.body.clientWidth;
  		}

		if (myWidth > 800)
		{
			lpos1 = ((myWidth-800)/2)-3;
			lpos2 = ((myWidth-800)/2)+104;
			//lpos2 = Math.round(pos2);
			lpos3 = ((myWidth-800)/2)+213;
			lpos4 = ((myWidth-800)/2)+322;
			lpos5 = ((myWidth-800)/2)+431;
			lpos6 = ((myWidth-800)/2)+540;
			lpos7 = 140;
		} 
		else 
		{
			lpos1 = 0;
			lpos2 = 107;
			lpos3 = 216;
			lpos4 = 325;
			lpos5 = 434;
			lpos6 = 543;
			lpos7 = 140;
		}

		if (document.all)
		{
			document.all.home.style.left=lpos1;
			document.all.club.style.left=lpos2;
			document.all.teams.style.left=lpos3;
			document.all.archive.style.left=lpos4;
			document.all.swap.style.left=lpos5;
			document.all.links.style.left=lpos6;
			document.all.abteams.style.left=lpos7;
			document.all.aateams.style.left=lpos7;
			document.all.gwteams.style.left=lpos7;
		} 
		else 
		{

  			document.getElementById('home').style.left=lpos1;
  			document.getElementById('home').style.top=183;
			document.getElementById('club').style.left=lpos2;
			document.getElementById('club').style.top=183;
			document.getElementById('teams').style.left=lpos3;
			document.getElementById('teams').style.top=183;
			document.getElementById('archive').style.left=lpos4;
			document.getElementById('archive').style.top=183;
			document.getElementById('swap').style.left=lpos5;
			document.getElementById('swap').style.top=183;
			document.getElementById('links').style.left=lpos6;
			document.getElementById('links').style.top=183;
			document.getElementById('abteams').style.left=lpos7;
			document.getElementById('abteams').style.top=6;
			document.getElementById('aateams').style.left=lpos7;
			document.getElementById('aateams').style.top=22;
			document.getElementById('gwteams').style.left=lpos7;
			document.getElementById('gwteams').style.top=38;
		}
	}

//These functions hide/show the dropdowns and change the background color of the menu items
//--------------------------------

	function showmenu(elmnt)
	{
		document.getElementById(elmnt).style.visibility="visible"
	}


	function hidemenu(elmnt)
	{
		document.getElementById(elmnt).style.visibility="hidden"
	}


	function highlight(elmnt)
	{
		document.getElementById(elmnt).style.background="#E0E0E0"
	}


	function restore(elmnt)
	{
		document.getElementById(elmnt).style.background="#00515C"
	}


//This function is called when a dropdown menu item is selected
//------------------------------

	function redirect(page)
	{	
		window.location=page
	}




//-----------------------------------------------------
