//Content voor Home
var menu1 = new Array()
	//menu1[0] = '<a href="http://www.thecounters.nl/">Homepage</a>';

//Content voor Nieuws
var menu2 = new Array()
	menu2[0] = '<a href="http://www.thecounters.nl/Berichten/index.php">Laatste nieuws</a>';
	menu2[1] = '<a href="http://www.thecounters.nl/Berichten/verslagen.php">Wedstrijdverslagen</a>';
	menu2[2] = '<a href="http://www.thecounters.nl/Berichten/mededelingen.php">Mededelingen</a>';

//Content voor The Counters
var menu3 = new Array()
	menu3[0] = '<a href="http://www.thecounters.nl/Selectie/index.php">Selectie</a>'; 
	menu3[1] = '<a href="http://www.thecounters.nl/Selectie/wedstrijden.php">Wedstrijden</a>'; 
	menu3[2] = '<a href="http://www.thecounters.nl/Selectie/verslagen.php">Wedstrijdverslagen</a>'; 
	menu3[3] = '<a href="http://www.thecounters.nl/Selectie/stand.php">Stand</a>'; 
	menu3[4] = '<a href="http://www.thecounters.nl/Selectie/selectie_c2.php">The Counters 2</a>'; 
	
//Content voor The Counters - Overige Heren
var menu4 = new Array()
	menu4[0] = '<a href="http://www.thecounters.nl/Heren/index.php?team=3">The Counters 3</a>'; 
	menu4[1] = '<a href="http://www.thecounters.nl/Heren/index.php?team=4">The Counters 4</a>';
	menu4[2] = '<a href="http://www.thecounters.nl/Heren/index.php?team=5">The Counters 5</a>'; 
	menu4[3] = '<a href="http://www.thecounters.nl/Heren/index.php?team=6">The Counters 6</a>';
	menu4[4] = '<a href="http://www.thecounters.nl/Heren/index.php?team=7">The Counters 7</a>';
	menu4[5] = '<a href="http://www.thecounters.nl/Heren/index.php?team=8">The Counters 8</a>';
	menu4[6] = '<a href="http://www.thecounters.nl/Heren/index.php?team=9">The Counters 9</a>';
	menu4[7] = '<a href="http://www.thecounters.nl/Heren/index.php?team=10">The Counters 10</a>';
	menu4[8] = '<a href="http://www.thecounters.nl/Heren/index.php?team=11">The Counters 11</a>';
	menu4[9] = '<a href="http://www.thecounters.nl/Heren/index.php?team=12">The Counters 12</a>';
	menu4[10] = '<a href="http://www.thecounters.nl/Heren/index.php?team=13">The Counters 13</a>';
	menu4[11] = '<a href="http://www.thecounters.nl/Heren/index.php?team=14">The Counters 14</a>';
	menu4[121] = '<a href="http://www.thecounters.nl/Heren/index.php?team=15">The Counters 15</a>';


//Content voor The Counters Dames
var menu5 = new Array()
	menu5[0] = '<a href="http://www.thecounters.nl/Dames/index.php?team=51">The Counters Da. 1</a>';
	menu5[1] = '<a href="http://www.thecounters.nl/Dames/index.php?team=52">The Counters Da. 2</a>';
	menu5[3] = '<a href="http://www.thecounters.nl/Dames/index.php?team=53">The Counters Da. 3</a>';
	menu5[4] = '<a href="http://www.thecounters.nl/Dames/index.php?team=54">The Counters Da. 4</a>';
	
//Content voor Informatie
var menu6 = new Array()
	menu6[0] = '<a href="http://www.thecounters.nl/Informatie/info_contact.php">Contact</a>'; 
	menu6[1] = '<a href="http://www.thecounters.nl/Informatie/info_club.php">De club</a>'; 
	menu6[2] = '<a href="http://www.thecounters.nl/Informatie/info_bestuur.php">Het bestuur</a>'; 
	menu6[3] = '<a href="http://www.thecounters.nl/Informatie/info_vrijwilligers.php">Vrijwilligers</a>'; 
	menu6[4] = '<a href="http://www.thecounters.nl/Informatie/info_lidworden.php">Lid worden</a>'; 
	menu6[5] = '<a href="http://www.thecounters.nl/Informatie/info_scheidsrechters.php">Scheidsrechters</a>'; 
	//menu6[5] = '<a href="http://www.thecounters.nl/Informatie/info_secretariaatenzaaldienst.php">Secretariaat- en zaaldienst</a>';
	menu6[6] = '<a href="http://www.thecounters.nl/Informatie/info_programmaoverzicht.php">Programmaoverzicht</a>';   

//Content voor Sponsors
var menu7 = new Array()
	menu7[0] = '<a href="http://www.thecounters.nl/Sponsors/spons_hoofdsponsor.php">Hoofdsponsor</a>'; 
	menu7[1] = '<a href="http://www.thecounters.nl/Sponsors/spons_stersponsor.php">Stersponsor</a>'; 
	menu7[2] = '<a href="http://www.thecounters.nl/Sponsors/spons_kledingsponsor.php">Kledingsponsor</a>'; 
	menu7[3] = '<a href="http://www.thecounters.nl/Sponsors/spons_subsponsors.php">Subsponsors</a>'; 
	menu7[4] = '<a href="http://www.thecounters.nl/Sponsors/spons_teamsponsors.php">Team Sponsors</a>'; 
	menu7[5] = '<a href="http://www.thecounters.nl/Sponsors/spons_overigesponsors.php">Overige sponsors</a>'; 
	menu7[6] = '<a href="http://www.thecounters.nl/Sponsors/spons_clubvan71.php">Club van 71</a>';
	menu7[7] = '<a href="http://www.thecounters.nl/Sponsors/spons_sponsorworden.php">Sponsor worden</a>'; 
	 

//Content voor Community
var menu8 = new Array()
	menu8[0] = '<a href="http://www.thecounters.nl/Community/Gastenboek/index.php">Gastenboek</a>';
	menu8[1] = '<a href="http://www.thecounters.nl/Community/Leden/ledenlijst.php">Ledenlijst</a>';
	menu8[2] = '<a href="http://www.thecounters.nl/Community/sporthallen.php">Sporthallen</a>';
	//menu8[3] = '<a href="">Foto\'s</a>';
	//menu8[4] = '<a href="">Video\'s</a>';
	//menu8[5] = '<a href="">Links</a>';




var menuwidth = '112px'; 			//standaard
var menubgcolor = '#FFFFFF';  		//achtergrondkleur menu
var disappeardelay = 250;  			//verdwijntijd van menu onMouseout (in ms)
var hidemenu_onclick = "no"; 		//verdwijnt menu bij klikken?




var ie4=document.all; 
var ns6=document.getElementById&&!document.all; 

if (ie4||ns6) {
	document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>');
}


function getposOffset(what, offsettype) {
	var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
	var parentEl=what.offsetParent;
	while (parentEl!=null) {
		totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
		parentEl=parentEl.offsetParent;
	}
	return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth) {
	if (ie4||ns6) {
		dropmenuobj.style.left = dropmenuobj.style.top = -500;
	}
	if (menuwidth!="") {
		dropmenuobj.widthobj=dropmenuobj.style;
		dropmenuobj.widthobj.width=menuwidth;
	} 
	if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover") {
		obj.visibility=visible;
	}
	else if (e.type=="click") {
		obj.visibility=hidden;
	}
}


function iecompattest() {
	return (document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body;
}


function clearbrowseredge(obj, whichedge) {
	var edgeoffset = 0;
	if (whichedge == "rightedge") {
		var windowedge = ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15;
		dropmenuobj.contentmeasure = dropmenuobj.offsetWidth;
		if (windowedge - dropmenuobj.x < dropmenuobj.contentmeasure) {
			edgeoffset = dropmenuobj.contentmeasure - obj.offsetWidth;
		}
	}
	else {
		var windowedge = ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18;
		dropmenuobj.contentmeasure = dropmenuobj.offsetHeight;
		if (windowedge - dropmenuobj.y < dropmenuobj.contentmeasure) {
			edgeoffset = dropmenuobj.contentmeasure + obj.offsetHeight;
		}
	}
	return edgeoffset
}


function populatemenu(what) {
	if (ie4 || ns6) {
		dropmenuobj.innerHTML = what.join("");
	}
}


function dropdownmenu(obj, e, menucontents, menuwidth) {
	if (window.event) {
		event.cancelBubble = true;
	}
	else if (e.stopPropagation) e.stopPropagation()
	clearhidemenu()
	dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
	populatemenu(menucontents)
	
	if (ie4||ns6){
	showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
	dropmenuobj.x=getposOffset(obj, "left")
	dropmenuobj.y=getposOffset(obj, "top")
	dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
	dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu
