<!--
// popup window
var newWindow = null;
function closeWin(){
if (newWindow != null){
if(!newWindow.closed)
newWindow.close();
}
}
function popUpWin(url, type, strWidth, strHeight){
closeWin();
if (type == "fullScreen"){
strWidth = screen.availWidth - 10;
strHeight = screen.availHeight - 160;
}
var tools="";
if (type == "standard" || type == "fullScreen") tools = "resizable,toolbar=yes,location=yes,scrollbars=yes,menubar=yes,width="+strWidth+",height="+strHeight+",top=0,left=0";
if (type == "console") tools = "resizable,toolbar=no,location=no,scrollbars=yes,width="+strWidth+",height="+strHeight+",left=0,top=0";
newWindow = window.open(url, 'newWin', tools);
newWindow.focus();
}

// menupijl horizontaal
//imghorz_width= new Array("297","268","202","100");
imghorz_width= new Array("271","242","175");
var active_h;

function getSub(id){
active=id;
changeProp('imghorz','','width', imghorz_width[id]);
}

function resetSub(){
active_h=0;
setTimeout('resetSubDelay()',1500);
}

function resetSubDelay(){
if(active_h==0){
var id = 1; // huidige pagina in hoofdmenu
changeProp('imghorz','','width', imghorz_width[id]);
}
}



// menupijl verticaal
var lineheight=15; // moet overeenkomen met de in de CSS gedefinieerde line-height voor het submenu
var menuoffset=12; // offset vanaf bovenkant
var active;

function getID(id){
active=id;
var id = id;
var newheight = menuoffset+(Number(id)*lineheight);
changeProp('imgvert','','height',newheight);
}

function resetID(id){
active=0;
setTimeout('resetDelay('+id+')',1500);
}

function resetDelay(id){
if(active==0){
var id = 2; // huidige pagina in submenu
var newheight = menuoffset+(Number(id)*lineheight);
changeProp('imgvert','','height',newheight);
}
}

function changeProp(objName,x,theProp,theValue) {
var obj = findObj(objName);
if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
if (theValue == true || theValue == false)
eval("obj."+theProp+"="+theValue);
else eval("obj."+theProp+"='"+theValue+"'");
}
}

function findObj(n, d) {
var p,i,x;
if(!d) d=document;
if(!(x=d[n])&&d.all) x=d.all[n];
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

// stylewisselaar
function setActiveStyleSheet(title) {
var i, a, main;
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
a.disabled = true;
if(a.getAttribute("title") == title) a.disabled = false;
}
}
}

function getActiveStyleSheet() {
var i, a;
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
}
return null;
}

function getPreferredStyleSheet() {
var i, a;
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
if(a.getAttribute("rel").indexOf("style") != -1
&& a.getAttribute("rel").indexOf("alt") == -1
&& a.getAttribute("title")
) return a.getAttribute("title");
}
return null;
}

function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}

window.onload = function(e) {
var cookie = readCookie("tstyle");
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);
}

window.onunload = function(e) {
var title = getActiveStyleSheet();
createCookie("tstyle", title, 365);
}

var cookie = readCookie("tstyle");
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);


// klap toelichting uit
function toggle(id){
	if (document.all){
		if(document.all[id].style.display == 'none'){
			document.all[id].style.display = '';
		} else {
			document.all[id].style.display = 'none';
		}
		return false;
	} else if (document.getElementById){
		if(document.getElementById(id).style.display == 'none') {
			document.getElementById(id).style.display = 'block';
		} else {
			document.getElementById(id).style.display = 'none';
		}
	return false;
	}
}

function toggleScreenSize(size) {
	var URL = new String(window.location);
	the_width = screen.availWidth
	the_height = screen.availHeight
	if (size == "full") {
		if (URL.match('\\?')) {
			URL = URL + "&screen=full";
		} else {
			URL = URL + "?screen=full";
		}
		window.open(URL,'fullscreen','directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,status=yes,titlebar=no,toolbar=no,width='+the_width+',height='+the_height);
	} else {
		if (URL.match('screen=full')) {
			URL = URL.replace("screen=full","");
			URL = URL.substr(0,URL.length - 1);
		}
		window.opener.goToURL(URL);
		window.close();
	}
}

//-->
