//find out browser window width, depending on browser 
function BwindowWidth() { 
if (window.innerWidth) return window.innerWidth; 
else if (document.body && document.body.offsetWidth) return document.body.offsetWidth-25; 
else return 0; 
} 

// Offset from left of screen 
function CalcOffset() {
breedte = BwindowWidth()
mOffset = (breedte -840)/2; 
if (mOffset < 10) mOffset = 10; 
} 

function recal() { 
mResizeAmount = (breedte - BwindowWidth()) ; 
if (mResizeAmount < 0) mResizeAmount = (-1) * mResizeAmount; 
if (mResizeAmount > 2) window.history.go(0); 
} 


CalcOffset(); 
window.onresize = recal;

var curpage = 'home.html';
function toon(pagina) {
	curpag=pagina
	window.open(curpag, 'inhoud');
}

BLANK_IMAGE = 'images/b.gif';

var STYLE = {
	border:1,			// item's border width, pixels; zero means "none"
	shadow:2,			// item's shadow size, pixels; zero means "none"
	color:{
		border:"#30d0d0",	// color of the item border, if any def: #666666
		shadow:"#DBD8D1",	// color of the item shadow, if any
		bgON:"#90f0f0",		// background color for the items
		bgOVER:"#40f0f0"	// background color for the item which is under mouse right now
	},
	css:{
		ON:"clsCMOn",		// CSS class for items
		OVER:"clsCMOver"	// CSS class  for item which is under mouse
	}
};



var MENU_ITEMS = [
	{pos:[(mOffset),202], itemoff:[0,120], leveloff:[21,0], style:STYLE, size:[22,120]},
	{code:"Home", url:"index.html"
	},
	{code:"Algemeen", url:"javascript:toon('home.html')",
		sub:[
			{itemoff:[21,0]},
			{code:"Reglement", url:"javascript:toon('reglement.html')"
			},
			{code:"Statuten", url:"javascript:toon('statuten.html')"
			},
			{code:"Contributie", url:"javascript:toon('contributie.html')"
			},
			{code:"Bestuur", url:"javascript:toon('bestuur.html')"
			},
			{code:"Sponsors", url:"javascript:toon('sponsors.html')"
			}
		]
	},
	{code:"Jeugd", url:"javascript:toon('jeugd_algemeen.html')",
		sub:[
			{itemoff:[21,0]},
			{code:"Algemeen", url:"javascript:toon('jeugd_algemeen.html')"
			},
			{code:"Trainingstijden", url:"javascript:toon('jeugd_tijden.html')"
			},
			{code:"Foto's", url:"javascript:toon('jeugd_fotos.html')"
			}
		]
	},
	{code:"Zwemmen", url:"javascript:toon('zwemmen_algemeen.html')",
		sub:[
			{itemoff:[21,0]},
			{code:"Algemeen", url:"javascript:toon('zwemmen_algemeen.html')"
			},
			{code:"Trainingstijden", url:"javascript:toon('zwemmen_tijden.html')"
			},
			{code:"Wedstrijden", url:"javascript:toon('zwemmen_wedstrijden.html')"
			},
			{code:"Foto's", url:"javascript:toon('zwemmen_fotos.html')"
			}
		]
	},
	{code:"Waterpolo", url:"javascript:toon('waterpolo_algemeen.html')",
		sub:[
			{itemoff:[21,0]},
			{code:"Algemeen", url:"javascript:toon('waterpolo_algemeen.html')"
			},
			{code:"Trainingstijden", url:"javascript:toon('waterpolo_tijden.html')"
			},
			{code:"Wedstrijden", url:"javascript:toon('waterpolo_wedstrijden.html')"
			},
			{code:"Foto's", url:"javascript:toon('waterpolo_fotos.html')"
			}
		]
	},
	{code:"Recreatief", url:"javascript:toon('recreatief_algemeen.html')",
		sub:[
			{itemoff:[21,0]},
			{code:"Algemeen", url:"javascript:toon('recreatief_algemeen.html')"
			},
			{code:"Trainingstijden", url:"javascript:toon('recreatief_tijden.html')"
			},
			{code:"Foto's", url:"javascript:toon('recreatief_fotos.html')"
			}
		]
	},
        {code:"Contact", url:"javascript:toon('contact.html')"
	},
	];

