/*************************************/
/* Window OnLoad Handling Routines   */
/*************************************/
var WindowOnLoadCalls = new Array();
function WindowOnLoadHandler() {
	if (WindowOnLoadFilled()) {
		for (var i = 0; i < WindowOnLoadCalls.length; i++) { 
			if (typeof(WindowOnLoadCalls[i]) == 'function') {
				WindowOnLoadCalls[i]();
			}
			if (typeof(WindowOnLoadCalls[i]) == 'string') {
				eval(WindowOnLoadCalls[i]);
			}
		}
	}
}
function WindowOnLoadAdd(func) {
	WindowOnLoadCalls[WindowOnLoadCalls.length] = func;
}
function WindowOnLoadFilled() {
	if (WindowOnLoadCalls.length > 0) {
		return true;
	} else {
		return false;
	}
}
window.onload = WindowOnLoadHandler;


/*************************************/
/* Functions                         */
/*************************************/

//Find all link elements and add an onfocus attribute and value 
function hideFocusBorders(){ 
	var theahrefs = document.getElementsByTagName("a"); 
	if (!theahrefs){return;} 
	for(var x=0;x!=theahrefs.length;x++){ 
		theahrefs[x].onfocus = function (){
			this.hideFocus=true;
		}; 
	}
}
WindowOnLoadAdd(hideFocusBorders)

function ResizeLeftAndRight() {
	var x;
	if ((document.getElementById('divInhoud').clientHeight + document.getElementById('divTitel').clientHeight) > document.body.clientHeight) {
		x = document.getElementById('divInhoud').clientHeight + document.getElementById('divTitel').clientHeight;
	} else {
		x = document.body.clientHeight;
	}
	document.getElementById('divLinks').style.height = (x + 20) + 'px';
	document.getElementById('divRechts').style.height = (x + 20) + 'px';
}
WindowOnLoadAdd(ResizeLeftAndRight)

