window.onload = function() {
	if (document.getElementById("ztxt_menu")) {
		document.getElementById("ztxt_menu").focus();
	}
}
if (top.location != self.location) {
    top.location.replace(self.location);
}


function browser_check(){
  this.ver=navigator.appVersion;
  this.agent=navigator.userAgent;
  this.dom=document.getElementById?1:0;

  this.opera5=this.agent.indexOf("Opera 5")>-1;
  this.opera6=this.agent.indexOf("Opera 6")>-1;
  this.opera7=this.agent.indexOf("Opera 7")>-1;
  this.opera=this.opera5||this.opera6||this.opera7;
  
  this.mozilla=this.agent.indexOf("Gecko/")>-1;

  this.ie4=(document.all && !this.dom && !this.opera)? 1:0;
  this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera)? 1:0;
  this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera)? 1:0;
  this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom && !this.opera)? 1:0;
  this.ie=this.ie4||this.ie5||this.ie6||this.ie7;

  this.mac=this.agent.indexOf("Mac")>-1;
  this.macie=(this.agent.indexOf("Mac")>-1 && this.dom)? 1:0;
  this.macns4=(this.agent.indexOf("Mac")>-1 && !this.dom)? 1:0;

  this.ns6=(this.dom && parseInt(this.ver) >= 5 && !this.ie) ? 1:0;
  this.ns4=(document.layers && !this.dom)?1:0;
  this.ns = this.ns6 || this.ns4;
  this.bw=(this.ie7||this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera||this.mozilla);

  return this;

};


<!-- bookmark functions -->

function addBookmark() {
	var bw = new browser_check();
	if (bw.ie) {
		window.external.addFavorite(location.href, document.title);
	}
	else {
		alert('Je gebruikt een andere browser dan Internet Explorer.\n Voor Mozilla en Netscape: Druk op Control+D na het sluiten van dit venster om Geld-Gids.nl aan je favorieten toe te voegen!\n Voor Opera: druk op Control+T om Geld-Gids.nl toe te voegen!');
	}
}
function setHomepage(page) {
	var bw = new browser_check();
	if (bw.ie) {
		page.style.behavior='url(#default#homepage)';page.setHomePage('http://www.geld-gids.nl');
	}
	else {
		alert('Deze functie is niet beschikbaar in de browser die je gebruikt :(');
	}
}

function nieuwVenster(url, naam, initialsettings, w, h) {
	// centreren die hap
	if (h == undefined) h = 0;
	if (w == undefined) w = 0;
	leftP = (screen.width) ? (screen.width-w)/2 : 0;
	if (screen.height && (screen.height <= 600)) { topP = 0; } else { topP = (screen.height) ? (screen.height-h-100)/2 : 0; }

		var settings = ',width='+w;
		settings += ',height='+h;
		settings += ',left='+leftP;
		settings += ',top='+topP;
		initialsettings += settings;
	blaat = window.open(url, naam, initialsettings);
}

<!-- toggle een layer --/>
function toggle(id,id2) {
	document.getElementById(id).style.display = (document.getElementById(id).style.display =='block' ? 'none' : 'block')
	document.getElementById(id2).style.display = (document.getElementById(id).style.display =='block' ? 'none' : '')
}

function zichtbaar(id) {
	if(document.getElementById(id)){document.getElementById(id).style.display = 'block'};
}
function onzichtbaar(id) {
	if(document.getElementById(id)){document.getElementById(id).style.display = 'none'};
}

function cc(a,c) {
	if(document.images){(new Image()).src='/x/go.php?a='+a+'&c='+c ;}return true;
}
function strrev(str) {
   if (!str) return '';
   var revstr='';
   for (i = str.length-1; i>=0; i--)
       revstr+=str.charAt(i)
   return revstr;
}
function ga(a,b,c){window.open('http://'+b+strrev(a)+c);}
function lctr(i,c,r) {if(document.images){(new Image()).src='/x/lctr.php?pid='+i+'&c='+c+'&r='+r;}return true;}
function bmc(uri) {if(document.images){(new Image()).src='/x/go.php?bmc='+uri ;}return true;}

<!-- add link /-->
function link(r_uri,linktekst) {
	var link=prompt('Hieronder vindt u de code om een link te plaatsen naar deze pagina. Gebruik uw rechtermuisknop om de code te kopieren.', '<a href="http://www.geld-gids.nl'+r_uri+'" target="_blank">'+(linktekst ? linktekst : 'Geld-gids.nl')+'</a>');
}
<!-- wijzigt kleuren van een aantal elementen zodat ze matchen met de themakleur /-->
function thmclrs(kleur) {
	if(document.getElementById('sr')) {
		document.getElementById('sr').style.backgroundColor='#'+kleur;
	}
	if(document.getElementById('sr1')) {
		document.getElementById('sr1').style.backgroundColor='#'+kleur;
	}
	var a = (document.getElementById('sl') ? document.getElementById('sl') : (document.getElementById('sl1') ? document.getElementById('sl1') : (document.getElementById('sl2') ? document.getElementById('sl2') : false)));
	if (a) {
		for(i=0;i<a.childNodes.length;i++) {
			if (a.childNodes.item(i).nodeName == 'DIV' && a.childNodes.item(i).className == 'ctx') {
				a.childNodes.item(i).style.backgroundColor='#'+kleur;
				var b = a.childNodes.item(i);
				for (j=0;j<b.childNodes.length;j++) {
					if (b.childNodes.item(j).nodeName == 'DIV' && b.childNodes.item(j).className == 'submenu') {
						b.childNodes.item(j).style.backgroundColor='#'+kleur;
					}
				}
			}
		}
	}
	if(document.getElementById('tlgeldgids160x600')) {
		document.getElementById('tlgeldgids160x600').style.backgroundColor='#'+kleur;
	}

}
function toggle_beschrijving(mode) {
	if (mode == 1) {
		if(document.getElementById('acl')) {
			var a = document.getElementById('acl');
			for(i=0;i<a.childNodes.length;i++) {
				if (a.childNodes.item(i).nodeName == 'P' && a.childNodes.item(i).className == 'it') {
					a.childNodes.item(i).style.display='none';
				}
				else if (a.childNodes.item(i).nodeName == 'DIV' && a.childNodes.item(i).className == 'lees') {
					a.childNodes.item(i).style.display='none';
				}
				else if (a.childNodes.item(i).nodeName == 'A') {
					a.childNodes.item(i).style.border='none';
				}
			}
		}
		if(document.getElementById('acr')) {
			var a = document.getElementById('acr');
			for(i=0;i<a.childNodes.length;i++) {
				if (a.childNodes.item(i).nodeName == 'P' && a.childNodes.item(i).className == 'it') {
					a.childNodes.item(i).style.display='none';
				}
				else if (a.childNodes.item(i).nodeName == 'DIV' && a.childNodes.item(i).className == 'lees') {
					a.childNodes.item(i).style.display='none';
				}
				else if (a.childNodes.item(i).nodeName == 'A') {
					a.childNodes.item(i).style.border='none';
				}
			}
		}
		document.getElementById('bannert').style.display='none';
	}
	else {
		if(document.getElementById('acl')) {
			var a = document.getElementById('acl');
			for(i=0;i<a.childNodes.length;i++) {
				if (a.childNodes.item(i).nodeName == 'P' && a.childNodes.item(i).className == 'it') {
					a.childNodes.item(i).style.display='block';
				}
				else if (a.childNodes.item(i).nodeName == 'DIV' && a.childNodes.item(i).className == 'lees') {
					a.childNodes.item(i).style.display='block';
				}
				else if (a.childNodes.item(i).nodeName == 'A') {
					a.childNodes.item(i).style.border='1px dotted #000';
				}
			}
		}
		if(document.getElementById('acr')) {
			var a = document.getElementById('acr');
			for(i=0;i<a.childNodes.length;i++) {
				if (a.childNodes.item(i).nodeName == 'P' && a.childNodes.item(i).className == 'it') {
					a.childNodes.item(i).style.display='block';
				}
				else if (a.childNodes.item(i).nodeName == 'DIV' && a.childNodes.item(i).className == 'lees') {
					a.childNodes.item(i).style.display='block';
				}
				else if (a.childNodes.item(i).nodeName == 'A') {
					a.childNodes.item(i).style.border='1px dotted #000';
				}
			}
		}
		document.getElementById('bannert').style.display='block';
	}
}