function redirect(){
	/* document.location.href="home_4.html" */
	 document.location.href="index.php";
}

function targetBlank(href){
	window.open(href, "NewWindow");
}

var popupHandle;
function popup() {
	window.name = "eerstevenster";
	var width = 800;
	var height = 600;
	//
	// fullscreen if screenX=800
	// Uitgeschakeld door MKL, op verzoek van Thieme.
	/* 
	if(navigator.appName == "Microsoft Internet Explorer") {
		screenX = window.screen.availWidth;
	}else{
		screenX = window.outerWidth
	}
	if (screenX==800) {
		var properties = "width=800,height=600,toolbar=no,status=no,resizable=no,scrollbars=no,fullscreen=yes";
	} else {
		var properties = "width=800,height=600,toolbar=no,status=no,resizable=no,scrollbars=no";
	}
	*/
	var properties = "width=800,height=600,toolbar=no,status=no,resizable=no,scrollbars=no";
	var leftprop, topprop, screenX, screenY, cursorX, cursorY, padAmt;
	if(navigator.appName == "Microsoft Internet Explorer") {
		screenY = document.body.offsetHeight;
		screenX = window.screen.availWidth;
	}else{
		screenY = window.outerHeight
		screenX = window.outerWidth
	}
	leftvar = Math.round((screenX - width) / 2);
	rightvar = Math.round((screenY - height) / 2);
	if(navigator.appName == "Microsoft Internet Explorer") {
		leftprop = leftvar;
		topprop = rightvar;
	}else {
		leftprop = (leftvar - pageXOffset);
		topprop = (rightvar - pageYOffset);
	}

	properties = properties + ",left=" + leftprop;
	properties = properties + ",top=" + topprop;

	var pagina="application/index.html";
	popupHandle = open( pagina, "carteOrange", properties);
	setTimeout('popupHandle.focus();redirect()',250);

}

/*
function veranderkleur (kleur) {
	if( document.body.id ){
		document.body.id = (kleur);		 
	}
}
//veranderkleur('groen')
*/

/*this function should survive when the demo goes away*/
function popupFlash(url) {
	window.name = "eerstevenster";
	var width = 800;
	var height = 600;
	var properties = "width=800,height=600,toolbar=no,status=no,resizable=no,scrollbars=no";
	var leftprop, topprop, screenX, screenY, cursorX, cursorY, padAmt;
	if(navigator.appName == "Microsoft Internet Explorer") {
		screenY = document.body.offsetHeight;
		screenX = window.screen.availWidth;
	}else{
		screenY = window.outerHeight
		screenX = window.outerWidth
	}
	leftvar = Math.round((screenX - width) / 2);
	rightvar = Math.round((screenY - height) / 2);
	if(navigator.appName == "Microsoft Internet Explorer") {
		leftprop = leftvar;
		topprop = rightvar;
	}else {
		leftprop = (leftvar - pageXOffset);
		topprop = (rightvar - pageYOffset);
	}

	properties = properties + ",left=" + leftprop;
	properties = properties + ",top=" + topprop;

	popupHandle = open( url, "carteOrange", properties);
	setTimeout('popupHandle.focus();',250);

}

function loadWin(url,h,w){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings =
	'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=0,resizable=0'
	win = window.open(url,'popup',settings)
}

function openSoundsWindow(url){
	window.name = "Audiobestanden";
	var width = 1024;
	var height = 600;
	var properties = "width=1024,height=600,toolbar=no,status=no,resizable=yes,scrollbars=yes";
	var leftprop, topprop, screenX, screenY, cursorX, cursorY, padAmt;
	if(navigator.appName == "Microsoft Internet Explorer") {
		screenY = document.body.offsetHeight;
		screenX = window.screen.availWidth;
	}else{
		screenY = window.outerHeight
		screenX = window.outerWidth
	}
	leftvar = Math.round((screenX - width) / 2);
	rightvar = Math.round((screenY - height) / 2);
	if(navigator.appName == "Microsoft Internet Explorer") {
		leftprop = leftvar;
		topprop = rightvar;
	}else {
		leftprop = (leftvar - pageXOffset);
		topprop = (rightvar - pageYOffset);
	}

	properties = properties + ",left=" + leftprop;
	properties = properties + ",top=" + topprop;

	popupHandle = open( url, "carteOrange", properties);
	setTimeout('popupHandle.focus();',250);
}

// "Lazy" mouseover script by MDI 2b, also checks input images
function createMouseOvers(){
	var p = 0, d = document.images;
	for (var i = 0; i < d.length; i++){
		attachSwapImage(d[i]);
	}	

	// b: input images
	var inp = document.getElementsByTagName('input');
	for (var i = 0; i < inp.length; i++){
		if (inp[i].type == 'image'){
			attachSwapImage(inp[i]);
		}		
	}
	// end b
	
}

// attach swap image and preload
function attachSwapImage(o){
	if (o.src.indexOf('_out') != -1){
		preloadImage(o.src.substring(0,o.src.length-8)+'_over.gif');
		o.onmouseover = function (){swapImage(this);}
		o.onmouseout = o.onmouseover;
	}
}

// preload images
prelImgs = new Array();
var preloadImage = function(_src){
	var l = prelImgs.length;
	prelImgs[l] = new Image();
	prelImgs[l].src =_src;
}

// swap image
function swapImage(o){
	var s = o.src;
	o.src = s.indexOf('_over') == -1 ?
	s.substring(0,s.length-8)+'_over.gif' :
	s.substring(0,s.length-9)+'_out.gif';
}

onload = createMouseOvers;
