// JavaScript Document
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0


  var i,j=0,x,a=MM_swapImage.arguments;
  document.MM_sr=new Array; 
  for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){
	   
 		//tweak to MM Javascript to turn off mouseover on current page  
	   if (a[i] != pagename) {
	   
	   document.MM_sr[j++]=x; 
			if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
		}
	}
}
//-->

//--add a javascript var called pgID to each page, that determines what page we're on e.g.  var pgID = 'home' //

function setPGTab(pgID){
var imgSel = pgID
//--we get the source of the logo (the default image folder for the site) to figure out where we are in the site.  This is so if pages move to other folders this will still work//
var imgSrc = document.headerlogo.src
var namePos = imgSrc.indexOf("headerlogo.gif")
var nameLen = imgSrc.length
var lopIt = nameLen - namePos
imgSrc = imgSrc.substring(0, nameLen - lopIt)


//--if adding additional buttons add the button to the case structure below--//

switch (imgSel) {

case 'home' :
	document.home.src = imgSrc + pgID + "3.gif"
break;

case 'events' :
	document.events.src = imgSrc + pgID + "3.gif"
break;

case 'store' :
	document.store.src = imgSrc + pgID + "3.gif"
break;

case 'media' :
	document.media.src = imgSrc + pgID + "3.gif"
break;

case 'sponsors' :
	document.sponsors.src = imgSrc + pgID + "3.gif"
break;

case 'tickets' :
	document.tickets.src = imgSrc + pgID + "3.gif"
break;

case 'lockerroom' :
	document.lockerroom.src = imgSrc + pgID + "3.gif"
break;

case 'cznews' :
	document.cznews.src = imgSrc + pgID + "3.gif"
break;

case 'about' :
	document.about.src = imgSrc + pgID + "3.gif"
break;

//--These are the default images if no page name is provided--//

default :
	document.home.src = imgSrc + "home.gif"
	document.events.src = imgSrc + "events.gif"
	document.store.src = imgSrc + "store.gif"
	document.media.src = imgSrc + "media.gif"
	document.sponsors.src = imgSrc + "sponsors.gif"
	document.lockerroom.src = imgSrc + "lockerroom.gif"
	document.about.src = imgSrc + "about.gif"
	document.tickets.src = imgSrc + "tickets.gif"
	}
}

//--Outputs the links at the bottom of the screen. To add another, add the item to the array and increment the ubound of the array below
function writeBottomNavs()  {

	footerLinks = new Array(8)
	
	footerLinks[0] = new Array(3)
	footerLinks[0][0] = "home"
	footerLinks[0][1] = "index.asp"
	footerLinks[0][2] = "home"

	footerLinks[1] = new Array(3)
	footerLinks[1][0] = "events"			//--the page id
	footerLinks[1][1] = "events.asp"		//--the page to link to
	footerLinks[1][2] = "events"			//--the text to display

	footerLinks[2] = new Array(3)
	footerLinks[2][0] = "tickets"
	footerLinks[2][1] = "tickets.asp"
	footerLinks[2][2] = "tickets"
	
	footerLinks[3] = new Array(3)
	footerLinks[3][0] = "store"
	footerLinks[3][1] = "store.asp"
	footerLinks[3][2] = "store"
	
	footerLinks[4] = new Array(3)
	footerLinks[4][0] = "pics • video"
	footerLinks[4][1] = "media.asp"
	footerLinks[4][2] = "pics • video"
	
	footerLinks[5] = new Array(3)
	footerLinks[5][0] = "sponsors"
	footerLinks[5][1] = "sponsors.asp"
	footerLinks[5][2] = "sponsors"
	
	footerLinks[6] = new Array(3)
	footerLinks[6][0] = "locker room"
	footerLinks[6][1] = "lockerroom.asp"
	footerLinks[6][2] = "locker room"
		
	footerLinks[7] = new Array(3)
	footerLinks[7][0] = "cz news"
	footerLinks[7][1] = "cznews.asp"
	footerLinks[7][2] = "cz news"

	footerLinks[8] = new Array(3)
	footerLinks[8][0] = "about"
	footerLinks[8][1] = "aboutus.asp"
	footerLinks[8][2] = "about us"
	
	var LinkStr = ''
	var totElements = footerLinks.length

	
	for (i=0;i<footerLinks.length;i++){
		if (footerLinks[i][0] != pagename) {
			LinkStr='&nbsp;&nbsp;<a href=\"' + footerLinks[i][1] + '"\>' + footerLinks[i][2] + '</a>&nbsp;&nbsp;'
			}
		else{
			LinkStr='&nbsp;&nbsp;' + footerLinks[i][2] + '&nbsp;&nbsp;'	
			}
	if (i!=(totElements -1)) {
			LinkStr = LinkStr + '|'
			}
		document.write(LinkStr)
		}	//next i
}
	
