addEvent(window,'load',hideFocusBorders);

/* 'add event' functie om meerdere javascript-functies aan te roepen */
function addEvent(obj, evType, fn) {
	if (obj.addEventListener) {
		obj.addEventListener(evType, fn, true);
		return true;
	
	} else if (obj.attachEvent) {
		var r = obj.attachEvent('on'+evType, fn);
		return r;
	
	} else {
		return false;
	}
}

/* verwijder stippellijntjes rond links */
/* ontleend aan http://codylindley.com/Javascript/223/hiding-the-browsers-focus-borders-should-i-shouldnt-i */
function hideFocusBorders() {
	var theahrefs = document.getElementsByTagName('a');
	
	if(!theahrefs) {
		return;
	}
	
	for(var x=0;x!=theahrefs.length;x++) {
		theahrefs[x].onfocus = function stopLinkFocus() {
			this.hideFocus=true;
		};
	}
}


/* formulier-functies */
function cleartext(thefield) {
 	if (thefield.defaultValue == thefield.value)
 	thefield.value = ""
}

function fillemptytext(thefield) {
	if (thefield.value == "")
	thefield.value = thefield.defaultValue
}
