
		
	// ********************************************************************************************************
	// This script was written by Merrick - www.merrick.nl - info@merrick.nl
	// Unauthorized copying or distribution is not allowed
	// Author: J.E. Hoppenbrouwers
	// Version: 1.0
	// Date: 27-Apr-2004
	// ********************************************************************************************************


	var msgChangesProcessed = 'Uw wijzigingen zijn verwerkt.';

	function getPassword(field, length) {
		var strChars = 'abcdefghjklmnopqrstuvw'
		var pos = 0
		var strTemp = ''
		for (var i = 0; i < length; i++) {
			Pos = Math.abs((strChars.length) * Math.random() + 1)
			strTemp = strTemp + strChars.charAt(Pos)
		}
		field.value = strTemp
		return;
	}

	function OpenWindow(url, h, w) {
		var r = (Math.random() * 1000).toString();
		var f = r.substr(0,2);
		popup = window.open(url, "pagina" + f, "height="+h+", width="+w+", scrollbars=yes,resizable=yes")
		popup.window.moveTo(screen.width/2-(w/2),screen.height/2-(h/2))
	}	
	
	function OpenWindowX(url, h, w, vScrollbars, vResizable) {
		var r = (Math.random() * 1000).toString();
		var f = r.substr(0,2);
		popup = window.open(url, "pagina" + f, "height=" + h + ", width=" + w + ", scrollbars=" + vScrollbars + ",resizable=" + vResizable)
		popup.window.moveTo(screen.width/2-(w/2),screen.height/2-(h/2))
	}	
	
	function AutoMove(v1, RequiredLength, v2, noValue) {		
		if ((v1.value.length == RequiredLength) && (v1.value != noValue)) {
			v2.focus();
		}
	}	
	
	function confirmAction(msg, action) {
		if (window.confirm(msg)) {
			eval(action);
		} else {
			return;
		}
	}
	
	function showPopup(modal, url, parameters) {
		if (modal == 1) {
			vRetVal = window.showModalDialog('/popups/' + url, parameters, 'dialogHeight:150px; dialogWidth:450px; status=no; center=yes; scroll=yes'); 
		} else {
			vRetVal = window.showModelessDialog('/popups/' + url, parameters, 'dialogHeight:150px; dialogWidth:450px; status=no; center=yes; scroll=yes'); 
		}
		return vRetVal;
	}
	
	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 var 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;
	}

	function eraseCookie(name) {
		createCookie(name,"",-1);
	}
	
	
// Browser Detection 
function BrowserCheck() {
	var b = navigator.appName;	
	if (b=="Netscape") this.b = "ns";
	else if (b=="Microsoft Internet Explorer") this.b = "ie";
	else this.b = b;
	this.version = navigator.appVersion;
	//if (this.version.indexOf('Win')>0) this.os = "PC";
	//else if (this.version.indexOf('Mac')>0) this.os = "Mac";	
	this.WinOs = (this.version.indexOf('Win')>0);
	this.v = parseInt(this.version);
	this.ns = (this.b=="ns" && this.v>=4);
	this.ns4 = (this.b=="ns" && this.v==4);
	this.ns5 = (this.b=="ns" && this.v==5);
	this.ie = (this.b=="ie" && this.v>=4);
	this.ie4 = (this.version.indexOf('MSIE 4')>0);
	this.ie5 = (this.version.indexOf('MSIE 5')>0);
	this.ie6 = (this.version.indexOf('MSIE 6')>0);
	this.min = (this.ns||this.ie);
}
var browser = new BrowserCheck();

if ((!browser.WinOs) && (browser.ie)){
	window.onresize = new Function("window.location.href=document.location");
}


function adjustFooter(){	
	var center_row_height
	if (browser.ns){ 
		center_row_height = self.innerHeight-288; 
	}else{
		center_row_height = parseInt(document.body.clientHeight)-288;
	}
	if ((browser.ns || browser.ie) && (typeof center_row_height == "number")){
		document.writeln('<img src="/images/shared/spacer.gif" width="1" height="'+ center_row_height +'" border="0">'); 
	} else { 
		document.writeln('<img src="/images/shared/spacer.gif" width="1" height="'+ center_row_height +'" border="0">'); 
	}
}

function adjustPopUpTitleBar(){	
	var center_width
	if (browser.ns4){ 
		center_width = self.innerWidth-368; 
	}else if (browser.ns5){
		center_width = self.innerWidth-377; 
	}else{
		center_width = parseInt(document.body.clientWidth)-368;
	}
	if ((browser.ns || browser.ie) && (typeof center_width == "number")){
		document.writeln('<td valign="top"><img src="/images/shared/pop_up_top_sliver.gif" width="'+ center_width +'" height="43" border="0"></td>'); 
	} else { 
		document.writeln('<td valign="top"><img src="/images/shared/pop_up_top_sliver.gif" width="'+ center_width +'" height="43" border="0"></td>'); 
	}
}


//Netscape 4.x Resize
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


var oImgPath = new Object();
oImgPath.home = "/images/";
oImgPath.shared = "/images/menu/";


//------
//IMAGE ROLLOVERS
function imgOn(imgName) { document[imgName].src = eval(imgName + "_on.src"); }
function imgOff(imgName) { document[imgName].src = eval(imgName + "_off.src"); }

//IMAGE CACHING
function cacheImg(name,src,rollover,type){
	if (!type) var type = "gif";
	if (rollover==true){
		eval(name + "_off =  new Image");
		eval(name + "_off.src = \'" + src + name + "_off." + type + "\'");
		eval(name + "_on =  new Image");
		eval(name + "_on.src = \'" + src + name + "_on." + type + "\'");
	} else {
		eval(name + " = new Image");
		eval(name + ".src = \'"+src+name+"."+type+"\'");
	}
}


function popWindow(url, width, height, name, scrollbars){
	if (!scrollbars) scrollbars = false;
	if (!width) width = 500;
	if (!height) height = 500;
 	var realW = (width)/2;
	var realH = (height)/2;
 	if (document.all){		
        var xMax = screen.width, yMax = screen.height;
    }else if (document.layers){       
        var xMax = screen.width, yMax = screen.height;
    }else if (document.getElementById){
		var xMax = screen.width, yMax = screen.height;
	}else{
		var xMax = 800, yMax=600;
	}
	var xOffset = ((xMax)/2) - realW, yOffset = (((yMax)/2)) - realH; 
	if (yMax==600){
		yOffset = 0;
	}	
	
	if (scrollbars) {
		var options = "directories=no,status=no,location=no,scrollbars=yes,menubar=no,toolbar=no,resizable=no" + ",screenX=" + xOffset + ",screenY=" + yOffset + ",top=" + yOffset + ",left=" + xOffset + ",width=" + width + ",height=" + height;
	}else{
		var options = "directories=no,status=no,location=no,scrollbars=no,menubar=no,toolbar=no,resizable=no" + ",screenX=" + xOffset + ",screenY=" + yOffset + ",top=" + yOffset + ",left=" + xOffset + ",width=" + width + ",height=" + height;
	}
	
	if (!name) name = "default_window";
	
	popup = window.open(url,name,options);
	popup.focus();	
}

function popWindowArticles(url, pdf){
	var width;
	var height;
	var name;
	if (!pdf) pdf = false;
	if (pdf){
		width = 700;
		height = 500;
		name = "pdfPopWindow";
	}else{
		width = 700;
		height = 500;
		name = "OffSitePopWindow";
	}	
 	var realW = (width)/2;
	var realH = (height)/2;
 	if (document.all){		
        var xMax = screen.width, yMax = screen.height;
    }else if (document.layers){       
        var xMax = screen.width, yMax = screen.height;
    }else if (document.getElementById){
		var xMax = screen.width, yMax = screen.height;
	}else{
		var xMax = 800, yMax=600;
	}
	var xOffset = ((xMax)/2) - realW, yOffset = (((yMax)/2)) - realH; 
	if (yMax==600){
		yOffset = 0;
	}	
	
	if (pdf) {
		var options = "directories=no,status=no,location=no,scrollbars=no,menubar=no,toolbar=no,resizable=yes" + ",screenX=" + xOffset + ",screenY=" + yOffset + ",top=" + yOffset + ",left=" + xOffset + ",width=" + width + ",height=" + height;
	}else{
		var options = "directories=yes,status=yes,location=yes,scrollbars=yes,menubar=yes,toolbar=yes,resizable=yes" + ",screenX=" + xOffset + ",screenY=" + yOffset + ",top=" + yOffset + ",left=" + xOffset + ",width=" + width + ",height=" + height;
	}
	
	popup = window.open(url,name,options);
	popup.focus();	
}
//------	
