	 

	var isIE = document.all;
	var isFFox = document.getElementById && !document.all;


	var MENU = new Array();
	var SUBMENUS = new Array(); 

	MENU.push( new Array("Home", "index.html", "80px") );
		SUBMENUS.push( new Array() ); // No Submenu
  
	MENU.push( new Array("Bracket", "finals/bracket/index.html", "80px") );
			SUBMENUS.push( new Array() ); // No Submenu
  
	MENU.push( new Array("Finals","finals/participants/participants.xml", "100px") );
		SUBMENUS.push( new Array( 
							 
							new Array("Admission", "finals/admission.html"),
							new Array("All-Time Results", "finals/alltime-results/2007.xml"), 	
							new Array("All-Tournament", "finals/all-tournament/2007-alltournament-players/index.html"), 	
							new Array("Bracket", "finals/bracket/index.html"),	 
							new Array("Championship Records", "finals/ChampionshipRecords.pdf"),
							new Array("Fox Valley Media", "finals/foxvalleymedia.html"), 	
							new Array("Future Dates", "finals/futuredates.html"),
							new Array("Informational Handbook", "finals/InformationalHandbook.doc"), 	
							new Array("Key Contacts", "finals/keycontacts.html"),
							new Array("Media Credentials", "finals/mediacredentials.php"),
							new Array("Participants", "finals/participants/participants.xml"), 	
							new Array("Past Champions", "finals/pastchampions.html"), 	
							new Array("Photo Gallery", "#"),
							new Array("Press Releases", "finals/pressreleases.html"), 	
							new Array("Practice Schedule", "finals/practiceschedule.html"), 	
							new Array("Preview", "finals/preview.html"),
							new Array("Schedule/Results", "finals/scheduleresults.html"), 	
							new Array("Statistics", "finals/statistics/statistics.html"),  
							new Array("Venue", "finals/venue.html"),
							new Array("Visitor Information", "#"),
							new Array("Won-Lost Records", "http://www.titans.uwosh.edu/NCAAChampionship/2007/finals/FinalsWonLostRecords.pdf") ) );  
  

	MENU.push( new Array("Regionals","regionals/participants.html", "120px") );
		SUBMENUS.push( new Array( 
							new Array("Championship Records", "finals/ChampionshipRecords.pdf"), 	
							new Array("Participants", "regionals/participants.html"), 	
							new Array("Schedule/Results", "regionals/scheduleresults.html"),
							new Array("Seeds", "regionals/seeds.html"), 	
							new Array("Won-Lost Records", "regionals/WonLostRecords.pdf") ) );


	MENU.push( new Array("Base Hits","basehits/all-americans/2006.xml", "100px") );
		SUBMENUS.push( new Array(  
							new Array("All-Americans", "basehits/all-americans/2007.xml"),   	
							new Array("ABCA", "http://www.abca.org/"),   	
							new Array("Championship Brochure", "Basehits/2007ChampionshipBrochure.pdf"),   	
							new Array("Championship Hand Book", "Basehits/ChampionshipHandBook.pdf"),  
							new Array("Coaches' Poll", "http://www.muhlenberg.edu/sports/abcapoll50807.pdf"),  
							new Array("Corporate Partners", "#"), 
							new Array("D3baseball.com", "http://www.D3baseball.com/"), 
							new Array("Evaluation Regions", "#"),  
							new Array("Lawrence University", "http://www.lawrence.edu/"),  
							new Array("NCAA.org", "http://www.ncaa.org/"),   	
							new Array("NCAA Baseball Rules", "#"),  
							new Array("NCAA Records", "#"), 
							new Array("NCAA Statistics", "http://web1.ncaa.org/stats/StatsSrv/rankings?sportCode=MBA&rpt=wkly"), 
							new Array("NCAAsports.com", "http://www.ncaasports.com"),  
							new Array("UW-Oshkosh", "http://www.uwosh.edu/") ) );
							

		MENU.push( new Array("Past Championships","#", "200px") );
			SUBMENUS.push( new Array(   	
							new Array("2006 Championship", "http://www.titans.uwosh.edu/NCAAChampionship/2006/index.html"), 	
							new Array("2005 Championship", "http://www.titans.uwosh.edu/NCAAChampionship/2005/index.html"),
							new Array("2004 Championship", "http://www.titans.uwosh.edu/NCAAChampionship/2004/index.html"), 	
							new Array("2003 Championship", "http://www.titans.uwosh.edu/NCAAChampionship/2003/index.html"), 	
							new Array("2002 Championship", "http://www.titans.uwosh.edu/NCAAChampionship/2002/index.html"),
							new Array("2001 Championship", "http://www.titans.uwosh.edu/NCAAChampionship/2001/index.html"), 	
							new Array("2000 Championship", "http://www.titans.uwosh.edu/NCAAChampionship/2000/index.html") ) );

	
	/*
	if(  isIE ){
		MENU.push( new Array("Contact Us","contactus/index.html", "113px") ); 
			SUBMENUS.push( new Array() ); 

	}else if( isFFox ){
		MENU.push( new Array("Contact Us","contactus/index.html", "106px") );
			SUBMENUS.push( new Array() ); 
	}
*/
		 
						

	function swapClass(id, myclass ){
		document.getElementById(id).className = myclass;
	}

	var justShowedSelected = false;


    /*-------------------------------------------------------------*/
	function getMenuItem(i, showSeparator, first, last ){ 
 
		var str = '';
		var separator = '<div style="background-color: white; float: left; right: 1px; height: 11px;  top: 4px; width: 1px; position:relative; z-index: 100;color: white;"></div>';
 
		if(true == showSeparator ){
			str += separator;
		}
		 
 
		if ( PAGE == MENU[i][0] )
		{   
				

				// Current Page, PAGE is declared on the page which includes this scripts
				 
				if( SUBMENUS[i].length > 0){
					str += '<a id="menu-item-current" class="menu-item-current" style="width:' + MENU[i][2] + '" href="' + PATH + MENU[i][1] + '">' + MENU[i][0] + '</a>';

					str += '<div id="current-sub" ';
					
					if (  SUBMENUS[i].length > 9 )
					{
						str += 'class="menu-sub-split" ';
					} else{
						str += 'class="menu-sub" ';
					}
						
					str += 'style="position: absolute; visibility: hidden;" >';
					
					if( SUBMENUS[i].length > 9 ){

						

						/* WHEN YOU HAVE TOO MANY MENUES GROUP THEM IN TWO COLUMNS */
						str += '<table style="width:100%;" cellspacing="0" cellpadding="0"><tr><td style="vertical-align:top;">';
						var x;
						var half = SUBMENUS[i].length / 2;

						for( x = 0; x < half; x++){  
							str += '<a href="' + PATH + SUBMENUS[i][x][1]+ '" onmouseover="swapClass(\'menu-item-current\',\'menu-item-hover\');" onmouseout="swapClass(\'menu-item-current\',\'menu-item-current\');"'; 
							if(  SUBMENUS[i].length  > (x+1) ){str += ' class="submenu-bottom-border"  ';  } 
							str +='>' + SUBMENUS[i][x][0] + '</a>'; 
						}

						str += '</td><td style="vertical-align:top;">';

						while( x < SUBMENUS[i].length){  
							str += '<a href="' + PATH + SUBMENUS[i][x][1]+ '" onmouseover="swapClass(\'menu-item-current\',\'menu-item-hover\');" onmouseout="swapClass(\'menu-item-current\',\'menu-item-current\');"'; 
							if(  SUBMENUS[i].length  > (x+1) ){str += ' class="submenu-bottom-border"  ';  } 
							str +='>' + SUBMENUS[i][x][0] + '</a>';
							x++;
						}

						str += '</td></tr></table>';

					}else{  
						/* ELSE JUST INSERT THEM TO SUBMENU AS IS*/
 
						for( var x = 0; x < SUBMENUS[i].length; x++){ 

							str += '<a href="' + PATH + SUBMENUS[i][x][1]+ '" onmouseover="swapClass(\'menu-item-current\',\'menu-item-hover\');" onmouseout="swapClass(\'menu-item-current\',\'menu-item-current\');"'; 
							if(  SUBMENUS[i].length  > (x+1) ){str += ' class="submenu-bottom-border"  ';  } 
							str +='>' + SUBMENUS[i][x][0] + '</a>'; 
						} 
					} 

					str += '</div>'; 
					
					document.write( str );  
					
					at_attach("menu-item-current", "current-sub", "hover", "y", "pointer");

				}else{  
					/*
					if(PAGE != MENU[i][0] ){
						document.write( separator ); 
					} 
					*/
					document.write( '<a id="menu-item-current" class="menu-item-current" style="width:' + MENU[i][2] + '"  href="' + PATH + MENU[i][1] + '"/>' + MENU[i][0] + '</a>');

				}

		}else{ 
 
			 
				if( SUBMENUS[i].length > 0){
					str += '<a id="menuitem_' + i + '" class="menu-item" style="width:' + MENU[i][2] + '" href="' + PATH + MENU[i][1] + '">' + MENU[i][0] + '</a>'; 
				
					str += '<div id="submenu_' + i + '" ';
					
					if (  SUBMENUS[i].length > 9 )
					{
						str += 'class="menu-sub-split" ';
					} else{
						str += 'class="menu-sub" ';
					}
						
					str += 'style="position: absolute; visibility: hidden;" >';
					
					
					
					if( SUBMENUS[i].length > 9 ){
 
						/* WHEN YOU HAVE TOO MANY MENUES GROUP THEM IN TWO COLUMNS */
						str += '<table style="width:100%;" cellspacing="0" cellpadding="0"><tr><td style="vertical-align:top; width:50%;">';
						var x;
						var half = SUBMENUS[i].length / 2;
						
						for( x = 0; x < half; x++){ 

							str += '<a href="' + PATH + SUBMENUS[i][x][1]+ '" onmouseover="swapClass(\'menuitem_' + i + '\',\'menu-item-hover\');" onmouseout="swapClass(\'menuitem_' + i + '\',\'menu-item\');"'; 
							if(  SUBMENUS[i].length  > (x+1) ){str += ' class="submenu-bottom-border" ';  } 
							str +='>' + SUBMENUS[i][x][0] + '</a>';

						} 

						str += '</td><td style="vertical-align:top; width:50%;">';

						while( x < SUBMENUS[i].length){

							str += '<a href="' + PATH + SUBMENUS[i][x][1]+ '" onmouseover="swapClass(\'menuitem_' + i + '\',\'menu-item-hover\');" onmouseout="swapClass(\'menuitem_' + i + '\',\'menu-item\');"'; 
							if(  SUBMENUS[i].length  > (x+1) ){str += ' class="submenu-bottom-border" ';  } 
							str +='>' + SUBMENUS[i][x][0] + '</a>';
							x++;
						} 
 
						str += '</td></tr></table>';

					
					}else{
						
						 
					if( SUBMENUS[i][0].length > 9 ){
 

						/* WHEN YOU HAVE TOO MANY MENUES GROUP THEM IN TWO COLUMNS */
						str += '<table style="width:100%;" cellspacing="0" cellpadding="0"><tr><td style="vertical-align:top;">';
						var x;
						var half = SUBMENUS[i].length / 2;

						for( x = 0; x <half; x++){ 

							str += '<a href="' + PATH + SUBMENUS[i][x][1]+ '" onmouseover="swapClass(\'menuitem_' + i + '\',\'menu-item-hover\');" onmouseout="swapClass(\'menuitem_' + i + '\',\'menu-item\');"'; 
							if(  SUBMENUS[i].length  > (x+1) ){str += ' class="submenu-bottom-border" ';  } 
							str +='>' + SUBMENUS[i][x][0] + '</a>';
							x++;
						}  

						str += '</td><td>33333';


						while( x < SUBMENUS[i].length){

							str += '<a href="' + PATH + SUBMENUS[i][x][1]+ '" onmouseover="swapClass(\'menuitem_' + i + '\',\'menu-item-hover\');" onmouseout="swapClass(\'menuitem_' + i + '\',\'menu-item\');"'; 
							if(  SUBMENUS[i].length  > (x+1) ){str += ' class="submenu-bottom-border" ';  } 
							str +='>' + SUBMENUS[i][x][0] + '</a>';
							x++;
						} 

						str += '</td></tr></table>';

								
					}else{
						
							for( var x = 0; x < SUBMENUS[i].length; x++){ 

								str += '<a href="' + PATH + SUBMENUS[i][x][1]+ '" onmouseover="swapClass(\'menuitem_' + i + '\',\'menu-item-hover\');" onmouseout="swapClass(\'menuitem_' + i + '\',\'menu-item\');"'; 
								if(  SUBMENUS[i].length  > (x+1) ){str += ' class="submenu-bottom-border" ';  } 
								str +='>' + SUBMENUS[i][x][0] + '</a>';
							}  

						}	
					}
					str += '</div>'; 
					
					/*
					if(PAGE != MENU[i][0] ){
						document.write( separator ); 
					} 
					*/
					 document.write( str ); 

					at_attach("menuitem_" + i , "submenu_" + i, "hover", "y", "pointer");
				}else{

					/*
					if(PAGE != MENU[i][0] ){
						document.write( separator ); 
					} 
					*/
					
					document.write('<a id="menuitem_' + i + '" class="menu-item" style="width:' + MENU[i][2] + '"  href="' + PATH + MENU[i][1] + '" >' + MENU[i][0] + '</a>'); 
				}
		 }

		return str;
	}
 

	
    /*-------------------------------------------------------------*/
	var showSeparator = true;
	var first=true, last=false;
	var str = "";
	// This will be called when this script is executed
	for(var i=0; i<MENU.length; i++){
		
		str += '<div id="menu-item-current" class="menu-item-current" style="width:' + MENU[i][2] + '" onclick=document.location="' + PATH + MENU[i][1] + '"><span>' + MENU[i][0] + '</span></div>';

		
		if(i < MENU.length){
			showSeparator = false;
		}

		if( i > 0 ){ 
			first = false;
			
			if( i == MENU.length - 1){
				last = true;
			}
		}

		getMenuItem(i,  showSeparator, first, last);	 
	}

	