// Op verzoek van diverse bezoekers uitgezet
// top.window.moveTo(0,0);
// top.window.resizeTo(screen.availWidth,screen.availHeight);

// Prepare for writing out last modified date
var days = new Array(7);
days[0] = "zondag";
days[1] = "maandag";
days[2] = "dinsdag";
days[3] = "woensdag";
days[4] = "donderdag";
days[5] = "vrijdag";
days[6] = "zaterdag";
var months = new Array(12);
months[0] = "januari";
months[1] = "februari";
months[2] = "maart";
months[3] = "april";
months[4] = "mei";
months[5] = "juni";
months[6] = "juli";
months[7] = "augustus";
months[8] = "september";
months[9] = "oktober";
months[10] = "november";
months[11] = "december";
var dateObj = new Date(document.lastModified)

var NN2 = (navigator.appName == "Netscape") && (navigator.userAgent.indexOf("Mozilla/2") != -1);

function VensterFocus() {
if (!NN2) {
  self.focus();
  }
}

function isBlank() {
value=document.forms[0].elements['sp-q'].value;

if ( value == "" ){
        alert("Een zoek-woord invullen a.u.b.");
        return false;
    }
    else {
    return true;
    }
}

// Continue without scripterror
function blockError() {return true;}

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this header

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;

function ddInit(e){
  topDog=isIE ? "BODY" : "HTML";
  whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer");
  hotDog=isIE ? event.srcElement : e.target;
  while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
    hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
  }
  if (hotDog.id=="titleBar"){
    offsetx=isIE ? event.clientX : e.clientX;
    offsety=isIE ? event.clientY : e.clientY;
    nowX=parseInt(whichDog.style.left);
    nowY=parseInt(whichDog.style.top);
    ddEnabled=true;
    document.onmousemove=dd;
  }
}

function dd(e){
  if (!ddEnabled) return;
  whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx;
  whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  return false;
}

function ddN4(whatDog){
  if (!isN4) return;
  N4=eval(whatDog);
  N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  N4.onmousedown=function(e){
    N4.captureEvents(Event.MOUSEMOVE);
    N4x=e.x;
    N4y=e.y;
  }
  N4.onmousemove=function(e){
    if (isHot){
      N4.moveBy(e.x-N4x,e.y-N4y);
      return false;
    }
  }
  N4.onmouseup=function(){
    N4.releaseEvents(Event.MOUSEMOVE);
  }
}

function hideMe(){
  if (isIE||isNN) whichDog.style.visibility="hidden";
  else if (isN4) document.theLayer.visibility="hide";
}

function showMe(){
  if (isIE||isNN) whichDog.style.visibility="visible";
  else if (isN4) document.theLayer.visibility="show";
}

document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");


// -----------------------------------------------
// This is designed to be a very easy to implement generic window popper function to fit all
// foreseeable requirements of a popup window using just one single javascript function call
// ------------------------------------------------

function popwin( path, target, w, h, extras, align, resizeExisting ){

	// error check and set default values
	if( !path ){
		alert('path - not defined');
		return;
	}
	if( !target ){
		target = '_blank';
	}
	if( !w || !h ){
		w = 400;
		h = 300;
	}
	if( !extras ){
		extras = 'none';
	}
	if( !align ){
		align = 'MC';
	}
	if( !resizeExisting ){
		resizeExisting = true;
	}
	
	// set window size
	var settings = 'width=' +w+ ',height=' +h;

	// set window position
	align = align.toUpperCase();
		
	// compensate for window chrome (outer borders)
	var real_w = w + 15;
	var real_h = h + 30;
  
	// set x position
	if( align.indexOf('L',0) != -1 ){
		x = 0;
	} else if( align.indexOf('C',0) != -1 ){
		x = (screen.availWidth * 0.5) - (real_w * 0.5);
	} else if( align.indexOf('R',0) != -1 ){
		x = screen.availWidth-real_w;
	}
	
	// set y position
	if( align.indexOf('T',0) != -1 ){
		y = 0;
	} else if( align.indexOf('M',0) != -1 ){
		y = (screen.availHeight * 0.5) - (real_h * 0.5);
	} else if( align.indexOf('B',0) != -1 ){
		y = screen.availHeight-real_h;
	}
	
	settings += ',left=' +x+ ',top=' +y;

	// set the window properties
	var props = '';
	props += ',scrollbars=' + ((extras.indexOf('scroll',0)==-1)?'no':'yes');
	props += ',resizable=' + ((extras.indexOf('resiz',0)==-1)?'no':'yes');
	props += ',menubar=' + ((extras.indexOf('menu',0)==-1)?'no':'yes');
	props += ',toolbar=' + ((extras.indexOf('tool',0)==-1)?'no':'yes');
	props += ',status=' + ((extras.indexOf('status',0)==-1)?'no':'yes');
	props += ',location=' + ((extras.indexOf('url',0)==-1)?'no':'yes');
	props += ',directories=' + ((extras.indexOf('links',0)==-1)?'no':'yes');

	// open up the window 
	var popwin = null;
	popwin = window.open('', target, settings+props);
	popwin.document.location = path;
	
	// if allowed to, resize in case window was already open
	if( resizeExisting == true ){
		popwin.resizeTo(w,h);
		popwin.moveTo(x,y);
	}

	// bring new window to the front
	popwin.focus();

}
