/*--------------------------------------------------*/
/* QuirksMode read cookie                           */
/*--------------------------------------------------*/
function QMreadCookie(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;
}

/*--------------------------------------------------*/
/* make sure page is always opened in its own frame */
/* called by all documents with contents            */
/*--------------------------------------------------*/
function inframe(pagename) {
	if (!top.head) {
        if (pagename == "x") {
			if (window.location.href.replace) {
				top.location.replace('index.html');
	        	}else{
				window.location.href = 'index.html';
	        }
            return;
        }
		document.cookie = "pag=" + pagename + "; path=/";
		if (pagename == "refresh") alert("U wordt naar de titelpagina\nvan deze website geleid.");

		if (window.location.href.replace) {
			top.location.replace('../index.html');
        	}else{
			window.location.href = '../index.html';
		}
	return;
	}
}

/*--------------------------------------------------*/
/* organize buttons and navigation headers          */
/* called by all documents with contents            */
/*--------------------------------------------------*/
function select(naam) {
/* Set navHead object */
if (top.head.document.navh) top.head.document.navh.src=top.nav.navhObj[naam].src;

/* Reset all buttons */
for(i=0; i<=4; i++) { 
  top.nav.btnObj[i].src=top.nav.btnfObj[i].src;
  top.nav.btnmoObj[i].src=top.nav.btnfmoObj[i].src;
  top.nav.document.images[4+i*2].src=top.nav.btnObj[i].src;
  }
/* Show selected button */
if (naam<5) {
  top.nav.btnObj[naam].src=top.nav.btncObj[naam].src;
  top.nav.btnmoObj[naam].src=top.nav.btncObj[naam].src;
  top.nav.document.images[4+naam*2].src=top.nav.btncObj[naam].src;
  }
}

/*--------------------------------------------------*/
/* print modification date                          */
/* called by all documents with contents            */
/*--------------------------------------------------*/
function moddat() {
if (Date.parse(document.lastModified) != 0) {
  var modiDate = new Date(document.lastModified);
  var modiYear = modiDate.getFullYear();
  modiYear = (modiYear < 2000) ? modiYear + 100 : modiYear;
  var monthName = new Array("januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december");
  document.write("<P class='mod'>Laatst gewijzigd: " + modiDate.getDate() + " " + monthName[modiDate.getMonth()] + " " + modiYear + "</P>");
  }
}

/*--------------------------------------------------*/
/* popup window with picture                        */
/* called by 31inter.html and 41voortg.html         */
/*--------------------------------------------------*/
var win2=null;
function popimg(picurl, wintitle, wi, hi)
{ 
  if (win2&&!win2.closed) win2.close();
  win2 = window.open("", "popup", "Width="+(wi)+",Height="+(hi)+",screenX=10,screenY=10,left=10,top=10,resizable=no");
  win2.document.open("text/html", "replace");
  win2.document.write("<HTML><HEAD><TITLE>"+wintitle+"</TITLE></HEAD>");
  if (navigator.appName=="Microsoft Internet Explorer")
     win2.document.write("<BODY style='margin: 0px'>")
  else
     win2.document.write("<BODY style='margin: -8px'>")
  win2.document.write("<IMG src='"+picurl+"'></BODY></HTML>");
  win2.document.close();
  if (win2&&!win2.closed) win2.focus();
}

/*--------------------------------------------------*/
/* secondary window for folder with swap possibility*/
/* called by h1welkom.php and links whereever       */
/*--------------------------------------------------*/
var folder=null;
function openfolder(location)
{
  if (top.window.opener&&!top.window.opener.closed)
    top.window.opener.focus();
  else
    if (folder&&!folder.closed)
      folder.focus();
    else
      folder=window.open(location,'folder');
}
