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.ie=this.ie4||this.ie5||this.ie6;

  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.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 Bladenshop.nl aan je favorieten toe te voegen!\n Voor Opera: druk op Control+T om Bladenshop.nl toe te voegen!');
	}
}
function bm(uri) {if(document.images){(new Image()).src='/bookmark.php?page='+uri ;}return true;}
function setHomepage(page) {
	var bw = new browser_check();
	if (bw.ie) {
		page.style.behavior='url(#default#homepage)';page.setHomePage('http://www.bladenshop.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' : '')
}

<!-- click counter /-->
function cc(i) {if(document.images){(new Image()).src='/c.php?l='+i ;}return true;}

function kleur(f1,f2) {
	var b=new browser_check();if(b.mozilla){document.getElementById('afr').style.height=document.getElementById('afr').scrollHeight+18+'px'};
	if(document.getElementById('zk') && f1 && b1){

		zk = document.getElementById('zk');
		for(i=0;i<zk.childNodes.length;i++) {
				alert(zk.childNodes.item(i).nodeName);

			if (a.childNodes.item(i).nodeName == 'DIV') {
				a.childNodes.item(i).style.color = '#' + ((f1 || f2) && b1 ? f1 : f2);
			}
		}

		a.style.color = '#' + ((f1 || f2) && b1 ? f1 : f2);
		a.style.backgroundColor = '#' + b1;
		for(i=0;i<a.childNodes.length;i++) {
			if (a.childNodes.item(i).nodeName == 'A') {
				a.childNodes.item(i).style.color = '#' + ((f1 || f2) && b1 ? f1 : f2);
			}
		}
	}

}
function Blad(tag) {window.location='/abonnement/'+tag+'.html'}
function Bladcadeau(tag) {window.location='/cadeau/'+tag+'.html'}
