function reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; }}
  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
}
reloadPage(true);
// -->

function findObj(n, d) { //v4.0
  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=findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function showHideLayers() { //v3.0
  var i,p,v,obj,args=showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function showMenu(strMenuName){
	var i,p,v,obj,args=new Array('item1','','hide','item2','','hide','item3','','hide','item4','','hide','item5','','hide','item6','','hide','item7','','hide','item8','','hide','item9','','hide','item10','','hide','item11','','hide','item12','','hide','item13','','hide','item14','','hide','item15','','hide','item16','','hide');
	for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) { v=args[i+2];
		if (args[i]==strMenuName+'High') {
			v='show';}
		if (args[i]=='bottom'+strMenuName+'High') {
			v='show';}
		if (args[i]==strMenuName+'Zoek') {
			v='show';}
		if (args[i]=='bottom'+strMenuName+'Zoek') {
			v='show';}
		if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
			obj.visibility=v; }
}

function showBannerblokInit(){
	var randi = Math.round(Math.random());
	hideBannerblok();
	eval("showBannerblok('RBanners"+ (1 + randi) + "');");
	randi = Math.round(Math.random());
	eval("showBannerblok('RBanners"+ (3 + randi) + "');");
	randi = Math.round(Math.random());
	eval("showBannerblok('RBanners"+ (5 + randi) + "');");
	randi = Math.round(Math.random());
	eval("showBannerblok('RBanners"+ (7 + randi) + "');");
}

function hideBannerblok(){
	var  j,i,p,v,objname,obj,args=new Array('TOP_RBanners');
	for (j=1;j<9;j++){
		eval("objname='TOP_RBanners"+j+"';");
		obj = findObj(objname);
		if (obj !=null) { 
			v='hide';
			if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
			obj.visibility=v; 
		}
	}
}

function showBannerblok(strMenuName){
	var  j,i,p,v,objname,obj,args=new Array('TOP_RBanners');
	for (j=1;j<9;j++){
		for (i=0; i<(args.length); i++) {
			eval("objname='"+args[i] +j+"';");
			obj = findObj(objname);
			if (obj !=null) { 
				v=args[i];
				if (objname.indexOf(strMenuName) >=0) {
					v='show';
					if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
					obj.visibility=v; 
				}
			}
		}
	}
}

function showZoekBlok(strMenuName){
	var i,p,v,obj,args=new Array('internetHigh','','hide','ggHigh','','hide','tgHigh','','hide','imagesHigh','','hide','internetZoek','','hide','ggZoek','','hide','tgZoek','','hide','imagesZoek','','hide');
	for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) { v=args[i+2];
		if (args[i]==strMenuName+'High') {
			v='show';}
		if (args[i]=='bottom'+strMenuName+'High') {
			v='show';}
		if (args[i]==strMenuName+'Zoek') {
			v='show';}
		if (args[i]=='bottom'+strMenuName+'Zoek') {
			v='show';}
		if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
			obj.visibility=v; }
}
