var hoofditems = new Array();
var subitems = new Array();

var navRootURL = "/archief/2004/ek2004";
hoofditems['name'] = new Array('dummy', 'Nieuws', 'Nieuwsoverzicht', 'Wedstrijden', 'Statistiek', 'Teams', 'Stadions', 'Historie', 'Rubrieken');
hoofditems['link'] = new Array('dummy', '/nieuws/', '/nieuwsoverzicht/', '/wedstrijden/', '/statistiek/', '/teams/', '/stadions/', '/historie/', '/rubrieken/');
hoofditems['id'] = new Array('dummy', 05, 10, 15, 20, 25, 30, 35, 40);
subitems[15] = new Array();
subitems[15]['name'] = new Array('dummy', 'Uitslagen&nbsp;en&nbsp;Standen');
subitems[15]['link'] = new Array('dummy', '/wedstrijden/uitslagenenstanden/');
subitems[40] = new Array();
subitems[40]['name'] = new Array('dummy', 'De&nbsp;Oranje-Barometer', 'De&nbsp;voorbeschouwing', 'De&nbsp;columnist', 'De&nbsp;knipoog');
subitems[40]['link'] = new Array('dummy', '/rubrieken/deoranjebarometer/', '/rubrieken/devoorbeschouwing/', '/rubrieken/decolumnist/', '/rubrieken/deknipoog/');
subitems[45] = new Array();
subitems[45]['name'] = new Array('dummy', 'Sportzomer&nbsp;Foto');
subitems[45]['link'] = new Array('dummy', '/interactief/sportzomerfoto/');

ReplaceMainTopicURL(45);

switch (location.pathname){
   case navRootURL +'/' :
      // Redirect to main page
      location.href = navRootURL + hoofditems['link'][1] + 'index.html'
      break;
   case navRootURL+'/index.html' :
      // Redirect to main page
      location.href = navRootURL + hoofditems['link'][1] + 'index.html'
      break;
}



function ReplaceMainTopicURL(id)
{
  for(i=1;i<hoofditems['id'].length;i++){
      if(id == hoofditems['id'][i]) {
         if (location.pathname == navRootURL + hoofditems['link'][i] + 'index.html'){
           location.href = navRootURL+subitems[id]['link'][1] + 'index.html';
         } else {
         hoofditems['link'][i] = subitems[id]['link'][1];
         }
      }
  }
}

function displayMainTopic(topic, url, selected)
{
   if (topic.toLowerCase( ) == selected.toLowerCase( ))
	{
		document.write('  <tr> ');
		document.write('    <td colspan="2" height="19" style="background:    url(/gfx/global/sectiemenu/menu_button_active.gif);" valign="middle" bgcolor="#101010" id="'+ topic +'" onMouseOver="swapSubMenu(\''+ topic +'\',\'in\')" onMouseOut="swapSubMenu(\''+ topic +'\',\'out\')" onClick="goUrl(\''+navRootURL+url+'index.html\');">');
		document.write('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="'+navRootURL+url+'index.html" class="menu_active" id="'+ topic +'_link" onMouseOver="javascript:swapSubMenu(\''+ topic +'\',\'in\')">' + topic + '</a>');
		document.write('  </td></tr>');
		document.write('  <tr> ');
		document.write('    <td colspan="2" height="1"><img src="/gfx/global/sectiemenu/menu_button_active_bottom.gif" width="157" height="1" alt="" border="0" /></td>');
		document.write('  </tr>');
	} else {
		document.write('  <tr> ');
		document.write('    <td colspan="2" height="1"><img src="/gfx/global/sectiemenu/menu_button_inactive_top.gif" width="157" height="1" alt="" border="0" /></td>');
		document.write('  </tr>');	
		document.write('  <tr> ');
		document.write('    <td colspan="2" height="19" style="background:    url(/gfx/global/sectiemenu/menu_button_inactive.gif);" valign="middle" bgcolor="#B5B5B5" id="'+ topic +'" onMouseOver="swapMenu(\''+ topic +'\',\'in\')" onMouseOut="swapMenu(\''+ topic +'\',\'out\')" onClick="goUrl(\''+navRootURL+url+'index.html\');">');
		document.write('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="'+navRootURL+url+'index.html" class="menu_inactive" id="'+ topic +'_link" onMouseOver="javascript:swapMenu(\''+ topic +'\',\'in\')">' + topic + '</a>');
		document.write('  </td></tr>');
		document.write('  <tr> ');
		document.write('    <td colspan="2" height="1"><img src="/gfx/global/sectiemenu/menu_button_inactive_bottom.gif" width="157" height="1" alt="" border="0" /></td>');
		document.write('  </tr>');
	}
} // displayMainTopic

function displaySubTopics(key,subselected)
{
		if(typeof subitems[key] != "undefined")
		{
			for(i=1;i<subitems[key]['name'].length;i++){
				var url = subitems[key]['link'][i];
				if(subitems[key]['name'][i].toLowerCase( ) == subselected.toLowerCase( )) {  //check selected
					document.write('<tr> ');
					document.write('	<td colspan="2" height="18" style="background:    url(/gfx/global/sectiemenu/menu_sub_button_active.gif);"bgcolor="#929292" valign="middle" id="s'+i+'" onMouseOver="swapSubMenu(\'s'+i+'\',\'in\')" onMouseOut="swapSubMenu(\'s'+i+'\',\'out\')" onClick="goUrl(\''+navRootURL+url+'index.html\');">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="'+navRootURL+url+'index.html" class="submenu" id="s'+i+'_link" onMouseOver="javascript:swapSubMenu(\'s'+i+'\',\'in\')">'+subitems[key]['name'][i]+'</a></td>');
					document.write('</tr>');
				} else {
					document.write('<tr> ');
               document.write('	<td colspan="2" height="18" style="background:    url(/gfx/global/sectiemenu/menu_sub_button_inactive.gif);" valign="middle" bgcolor="" id="s'+i+'" onMouseOver="swapSubMenu(\'s'+i+'\',\'in\')" onMouseOut="swapSubMenu(\'s'+i+'\',\'out\')" onClick="goUrl(\''+navRootURL+url+'index.html\');">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="'+navRootURL+url+'index.html" class="submenu" id="s'+i+'_link" onMouseOver="javascript:swapSubMenu(\'s'+i+'\',\'in\')">'+subitems[key]['name'][i]+'</a></td>');
					document.write('</tr>');
				}
			}
		}
} // displaySubTopics


function displayHoofdNav(selected,subselected)
{
	document.write('<table cellspacing="0" cellpadding="0" border="0">');
	document.write('  <tr> ');
	document.write('    <td height="28" colspan="2" bgcolor="#373737"><img src="/gfx/global/hoofdmenu/menu_ek2004_topbg.gif" width="157" height="28" alt="Home | Nieuws | Sport" title="Home | Nieuws | Sport" border="0" usemap="#hoofdmenu" /></td>');
	document.write('  </tr>');
	document.write('  <tr> ');
	document.write('    <td width="2" style="background:    url(/gfx/global/sectiemenu/menu_leftbg.gif);"><img src="/gfx/global/spacer.gif" width="2" height="1" alt="" border="0" /></td>');
	document.write('    <td height="66" width="155"><a href="/ek2004/index.html"><img src="/gfx/ek2004/menu/menu_image_ek2004.jpg" width="155" height="116" alt="" border="0" /></a></td>');
	document.write('  </tr>');

	document.write('  <tr> ');
	document.write('    <td colspan="2" height="1"><img src="/gfx/global/sectiemenu/menu_button_inactive_top.gif" width="157" height="1" alt="" border="0" /></td>');
	document.write('  </tr>');	
	document.write('  <tr> ');
	document.write('    <td colspan="2" height="19" style="background:    url(/gfx/global/sectiemenu/menu_button_mainsite.gif);" valign="middle" bgcolor="#B5B5B5" id="eerste" onMouseOver="swapMenu(\'eerste\',\'in\')" onMouseOut="swapMenu(\'eerste\',\'out\')" onClick="goUrl(\'http://www.nos.nl/sport/\');">');
	document.write('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.nos.nl/sport/sport/index.html" class="menu_inactive" id="eerste_link" onMouseOver="javascript:swapMenu(\'eerste\',\'in\')">Sport</a>');
	document.write('  </td></tr>');
	document.write('  <tr> ');
	document.write('    <td colspan="2" height="1"><img src="/gfx/global/sectiemenu/menu_button_inactive_bottom.gif" width="157" height="1" alt="" border="0" /></td>');
	document.write('  </tr>');
	
	document.write('  <tr> ');
	document.write('    <td colspan="2" height="1"><img src="/gfx/global/sectiemenu/menu_button_inactive_top.gif" width="157" height="1" alt="" border="0" /></td>');
	document.write('  </tr>');	
	document.write('  <tr> ');
	document.write('    <td colspan="2" height="19" style="background:    url(/gfx/global/sectiemenu/menu_back.gif);" valign="middle" bgcolor="#B5B5B5" id="tweede">');
	document.write('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#FFFFFF" class="menu_inactive">E K &nbsp;2 0 0 4</font>');
	document.write('  </td></tr>');
	document.write('  <tr> ');
	document.write('    <td colspan="2" height="1"><img src="/gfx/global/sectiemenu/menu_button_inactive_bottom.gif" width="157" height="1" alt="" border="0" /></td>');
	document.write('  </tr>');
	


  for(i=1;i<hoofditems['name'].length;i++){
		displayMainTopic(hoofditems['name'][i],hoofditems['link'][i],selected);
	if(selected.toLowerCase( ) == hoofditems['name'][i].toLowerCase( )) {
			displaySubTopics(hoofditems['id'][i],subselected);
		}
  }




	document.write('  <tr>');
	document.write('    <td height="15" colspan="2" style="background:    url(/gfx/global/sectiemenu/menu_middlebg.gif);" bgcolor="#B5B5B5">&nbsp;</td>');
	document.write('  </tr>');
	document.write('  <tr> ');
	document.write('    <td width="157" height="67" colspan="2" style="background:    url(/gfx/global/sectiemenu/menu_middlebg.gif);" bgcolor="#B5B5B5"> ');

var MM_contentVersion = 5;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	    }
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) 
{
	//MM_FlashCanPlay = IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion));
	MM_FlashCanPlay = true;
}

	document.write('  <tr valign="bottom"> ');
	document.write('    <td height="11" colspan="2"><img src="/gfx/global/sectiemenu/menu_bottom.gif" alt="" width="157" border="0" /></td>');
	document.write('  </tr>');
	document.write('</table>');
} // einde functie displayHoofdNav
