<!--
// Preload images
image1 = new Image();
image1.src = "/img/back_form_bt_on.gif";
image2 = new Image();
image2.src = "/img/druppel_top_on.gif";
image3 = new Image();
image3.src = "/img/bt_weblog_off.gif"
image4 = new Image();
image4.src = "/img/bt_fotolog_on.gif";
image5 = new Image();
image5.src = "/img/bt_links_on.gif";
image6 = new Image();
image6.src = "/img/bt_contact_on.gif";
image7 = new Image();
image7.src = "/img/bt_bernard_on.gif";
image8 = new Image();
image8.src = "/img/bt_ridder_on.gif";
image9 = new Image();
image9.src = "/img/bt_vrouwelijk_schoon_on.gif";
image10 = new Image();
image10.src = "/img/bt_categorie_on.gif";
image11 = new Image();
image11.src = "/img/bt_archieven_on.gif";

// Swap images
function swap(what) {
  if (what.src.indexOf("_on")==-1) {
    var onStatus = "";
    var regex = /_off/g;
    onStatus = what.src.replace(regex,"_on");
  } else {
    var onStatus = "";
    var regex = /_on/g;
    onStatus = what.src.replace(regex,"_off");
  }
  what.src = onStatus;
}


// Copyright (c) 1996-1997 Athenia Associates.
// http://www.webreference.com/js/
// License is granted if and only if this entire
// copyright notice is included. By Tomer Shiran.

function setCookie (name, value, expires, path, domain, secure) {
    var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "");
    document.cookie = curCookie;
}

function getCookie (name) {
    var prefix = name + '=';
    var c = document.cookie;
    var nullstring = '';
    var cookieStartIndex = c.indexOf(prefix);
    if (cookieStartIndex == -1)
        return nullstring;
    var cookieEndIndex = c.indexOf(";", cookieStartIndex + prefix.length);
    if (cookieEndIndex == -1)
        cookieEndIndex = c.length;
    return unescape(c.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}

function deleteCookie (name, path, domain) {
    if (getCookie(name))
        document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
}


// FontSizer
// read the cookie to get the proper font size, set to default 12 if a first timer
fs = parseInt(getCookie('fontSize'));
if (!fs>0) fs=12;

var p_fs, h1_fs, h2_fs, h3_fs;

// this changes the sizes of the various elements relative to the fs
function setSizes() {
	p_fs = fs;
	h1_fs = p_fs+12;
	h2_fs = p_fs+6;
	h3_fs = p_fs+0;
	}

function changeType() {
	if (!document.getElementsByTagName) {return false;} // unclean! unclean!
	// because NS6 seems to freak out on abs. positionined divs
	// when you change a style property of the body, we have to
	// set the fontFamily and fontSize on div elements and not the body
	setStyleByTag('p','fontSize',p_fs+'px');
	setStyleByTag('h1','fontSize',h1_fs+'px');
	setStyleByTag('h2','fontSize',h2_fs+'px');
	setStyleByTag('h2','fontSize',h3_fs+'px');
	
	// store these values in cookies for subsequent page loads
	setCookie('fontSize',fs);
	}

// this function is called from the A+ button
function increaseSize() {
	fs+=1;
	setSizes();
	changeType();
	}

// this function is called from the A- button
function decreaseSize() {
	if (p_fs>1) {
		fs-=1;
		setSizes();
		changeType();
		}
	}

function writeControls() {
	if (document.getElementsByTagName) { // kosher
		document.writeln('<a href="/" title="Vergroot Font" onclick="increaseSize(); return false;"><img src="/img/bt_a_plus_off.gif" alt="Vergroot Font" width="27" height="17" style="margin-right:3px" id="aPlus" onmouseover="swap(this);" onmouseout="swap(this);" /></a><a href="/" title="Verklein Font" onclick="decreaseSize(); return false;"><img src="/img/bt_a_minus_off.gif" alt="Verklein Font" width="27" height="17" onmouseover="swap(this);" onmouseout="swap(this); "/></a>')
		}
	}


// thanks to randomwalks.com for this code
function targetLinks(boNew) {
	if (boNew) 
		where = "_blank";
	else
		where = "_self";
	for (var i=0; i<=(document.links.length-1); i++) {
		document.links[i].target = where;
		}
	}

// These 2 setstyle functions were modified from code by Steven Champeon found at
// http://developer.apple.com/internet/_javascript/styles.html
//  e - element type or id
//  p - property
//  v - value
function setStyleByTag(e, p, v) {
	var elements = document.getElementsByTagName(e);
	for(var i = 0; i < elements.length; i++) {
		elements.item(i).style[p] = v;
		}
	}
// setStyleById: given an element id, style property and 
// value, apply the style.
//  i - element id
//  p - property
//  v - value
// 
function setStyleById(i, p, v) {
	var n = document.getElementById(i);
	n.style[p] = v;
}


//-->
