/*DomPatch v1.01 Copyright 2001 by Elmer Bulthuis*/if( !window. document. getElementById ){if( window. document. layers ){initLayerElement = function( _layer ){var l = new Object();l. layer = _layer;l. watch( "innerHTML", function( _property, _oldValue, _newValue ){this. layer. document. open();this. layer. document. write( _newValue );this. layer. document. close();return _newValue;});if( _layer. document. width ){l. offsetWidth = _layer. document. width;}else{l. offsetWidth = _layer. clip. width;}if( _layer. document. height ){l. offsetHeight = _layer. document. height;}else{l. offsetHeight = _layer. clip. height;}l. style = new Object();l. style. layer = _layer;if( _layer. visibility == "show" ){l. style. visibility = "visible";}else if( _layer. visibility == "hide" ){l. style. visibility = "hidden";}else{l. style. visibility = _layer. visibility;}l. style. watch( "visibility", function( _property, _oldValue, _newValue ){if( _newValue == "visible" ){this. layer. visibility = "show";}else if( _newValue == "hidden" ){this. layer. visibility = "hide";}else{this. layer. visibility = _newValue;}return _newValue;});l. style. left = _layer. left + "px";l. style. watch( "left", function( _property, _oldValue, _newValue ){this. layer. left = parseFloat( _newValue );return this. layer. left + "px";});l. style. top = _layer. top + "px";l. style. watch( "top", function( _property, _oldValue, _newValue ){this. layer. top = parseFloat( _newValue );return this. layer. top + "px";});l. style. zIndex = _layer. zIndex;l. style. watch( "zIndex", function( _property, _oldValue, _newValue ){this. layer. zIndex = _newValue;return _newValue;});l. style. backgroundColor = _layer. bgColor;l. style. watch( "backgroundColor", function( _property, _oldValue, _newValue ){this. layer. bgColor = _newValue;return _newValue;});l. style. clip = "";l. style. watch( "clip", function( _property, _oldValue, _newValue ){var clipArray = _newValue. substring( _newValue. indexOf( "(" ) + 1, _newValue. indexOf( ")" ) ). split( " " );this. layer. clip. left = parseFloat( clipArray[ 3 ] );this. layer. clip. top = parseFloat( clipArray[ 0 ] );this. layer. clip. right = parseFloat( clipArray[ 1 ] );this. layer. clip. bottom = parseFloat( clipArray[ 2 ] );return _newValue;});return l;};foundElements = new Array();findElement = function( _id, _scope ){if( _scope. layers[ _id ] ){return initLayerElement( _scope. layers[ _id ] );}if( _scope. images[ _id ] ){return _scope. images[ _id ];}if( _scope. forms[ _id ] ){return _scope. forms[ _id ];}for( var c = 0; c < _scope. layers. length; c++ ){var found = findElement( _id, _scope. layers[ c ]. document );if( found ){return found;}}return null;};window. document. getElementById = function( _id ){if( !foundElements[ _id ] ){foundElements[ _id ] = findElement( _id, document );}return foundElements[ _id ];};}if( window. document. all ){window. document. getElementById = new Function( "return window. document. all[ arguments[ 0 ] ];" );}}
UICount = 0;function UI(){return "UI" + ( new Date() ). valueOf() + "UI" + ( UICount ++ );}
browser = new Object();
browser. mac = navigator. appVersion. toLowerCase(). indexOf( 'mac' ) >= 0;
browser. win = navigator. appVersion. toLowerCase(). indexOf( 'win' ) >= 0;
browser. unix = navigator. appVersion. toLowerCase(). indexOf( 'unix' ) >= 0;
browser. ie = navigator. appName. toLowerCase(). indexOf( 'microsoft internet explorer' ) >= 0;
browser. ns = navigator. appName. toLowerCase(). indexOf( 'netscape' ) >= 0;
if( browser. ns )	{
	browser. version = parseFloat( navigator. appVersion );
	}
if( browser. ie )	{
	browser. version = parseFloat( navigator. appVersion. substring( navigator. appVersion. toLowerCase(). indexOf( "msie" ) + 4 ) );
	}

if( document. all )	{
	getWindowWidth = new Function( 'return document. body. clientWidth;' );
	getWindowHeight = new Function( 'return document. body. clientHeight;' );
	getScrollX = new Function( 'return document. body. scrollLeft;' );
	getScrollY = new Function( 'return document. body. scrollTop;' );
	}
else	{
	getWindowWidth = new Function( 'return window. innerWidth;' );
	getWindowHeight = new Function( 'return window. innerHeight;' );
	getScrollX = new Function( 'return window. pageXOffset;' );
	getScrollY = new Function( 'return window. pageYOffset;' );
	}
if( document. layers )	{
	getPageX = new Function( 'return arguments[ 0 ]. layer. pageX;' );
	getPageY = new Function( 'return arguments[ 0 ]. layer. pageY;' );
	}
else	{
	if( browser. mac && browser. version < 5 && browser. ie )	{
		getPageX = new Function( 'var temp = 0; var tempLayer = arguments[ 0 ]; while( tempLayer. parentElement != null ){temp += tempLayer. offsetLeft;tempLayer = tempLayer. parentElement;}return temp;' );
		getPageY = new Function( 'var temp = 0; var tempLayer = arguments[ 0 ]; while( tempLayer. parentElement != null ){temp += tempLayer. offsetTop;tempLayer = tempLayer. parentElement;}return temp;' );
		}
	else	{
		getPageX = new Function( 'var temp = 0; var tempLayer = arguments[ 0 ]; while( tempLayer != null ){temp += tempLayer. offsetLeft;tempLayer = tempLayer. offsetParent;}return temp;' );
		getPageY = new Function( 'var temp = 0; var tempLayer = arguments[ 0 ]; while( tempLayer != null ){temp += tempLayer. offsetTop;tempLayer = tempLayer. offsetParent;}return temp;' );
		}
	}

function loadImage()	{
	var d = new Image;
	d. src = arguments[ 0 ];
	return d;
	}
function randomInt()	{
	var possibilitys = 0;
	var offset = 0;
	if( !arguments[ 0 ] )	{
		possibilitys = 2;
		}
	else if( !arguments[ 1 ] )	{
		possibilitys = arguments[ 0 ] + 1;
		}
	else	{
		offset = arguments[ 0 ];
		possibilitys = arguments[ 1 ] - offset + 1;
		}
	return Math. floor( Math. random() * possibilitys + ( new Date() ). valueOf() ) % possibilitys  + offset;
	}
if( document. layers )	{
	document. captureEvents( Event. MOUSEMOVE );
	}
var mouseX = 0;
var mouseY = 0;
document. onmousemove = function()	{
	if( arguments[ 0 ] )	{
		mouseX = arguments[ 0 ]. pageX;
		mouseY = arguments[ 0 ]. pageY;
		}
	else	{
		mouseX = event. clientX + document. body. scrollLeft;
		mouseY = event. clientY + document. body. scrollTop;
		}
	}


var endHTMLs = new Array();
function endHTML()	{
	var e = endHTMLs[ endHTMLs. length - 1 ]
	endHTMLs. length --;
	return e;
	}

function DLayer()	{
	this. layerId = UI();
	this. content = '&nbsp;';
	this. toString = DLayer_toString;
	this. startHTML = DLayer_startHTML;
	}
function DLayer_toString()	{
	return this. startHTML() + this. content + endHTML();
	}
function DLayer_startHTML()	{
	var s = '';
	var e = '';
	if( document. layers )	{
		s += '<ilayer';
		s += ' z-index="0"';
		s += '>';
		s += '<layer';
		s += ' name="' + this. layerId + '"';
		s += '>';
		e += '</layer>';
		e += '</ilayer>';
		}
	else	{
		s += '<div';
		s += ' id="' + this. layerId + '"';
		s += '>';
		e += '</div>';
		}
	endHTMLs[ endHTMLs. length ] = e;
	return s;
	}

function OffsetLayer()	{
	this. layerId = UI();
	this. content = '';
	this. toString = OffsetLayer_toString;
	this. startHTML = OffsetLayer_startHTML;
	}
function OffsetLayer_toString()	{
	return this. startHTML() + this. content + endHTML();
	}
function OffsetLayer_startHTML()	{
	var s = '';
	var e = '';
	if( document. layers )	{
		s += '<ilayer';
		s += ' name="' + this. layerId + '"';
		s += ' z-index="0"';
		s += '>';
		e += '</ilayer>';
		}
	else	{
		s += '<span';
		s += ' id="' + this. layerId + '"';
		s += '>';
		e += '</span>';
		}
	endHTMLs[ endHTMLs. length ] = e;
	return s;
	}



var multiImages = new Array();
function MultiImage()	{
	this. nr = multiImages. length;
	multiImages[ this. nr ] = this;
	this. imageId = UI();
	this. images = new Array();
	this. alt = "";
	for( var c = 0; c < arguments[ 0 ]. length; c ++ )	{
		if( arguments[ 0 ][ c ] )	{
			this. images[ c ] = loadImage( arguments[ 0 ][ c ] );
			if( this. value == null )	{
				this. value = c;
				}
			}
		}
	this. toString = MultiImage_toString;
	this. update = MultiImage_update;
	this. set = MultiImage_set;
	}
function MultiImage_toString()	{
	var d = '';
	d += '<img';
	if( document. layers )	{
		d += ' name="' + this. imageId + '"';
		}
	else	{
		d += ' id="' + this. imageId + '"';
		}
	d += ' src="' + this. images[ Math. floor( this. value ) ]. src + '"';
	d += ' hspace="0"';
	d += ' vspace="0"';
	d += ' border="0"';
	d += ' alt="' + this. alt + '"';
	d += '>';
	return d
	}
function MultiImage_update()	{
	if( !this. image )	{
		this. image = window. document. getElementById( this. imageId );
		}
	while( this. value < 0 )	{
		this. value += this. images. length;
		}
	this. value %= this. images. length;
	this. image. src = this. images[ Math. floor( this. value ) ]. src;
	}
function MultiImage_set()	{
	this. value = arguments[ 0 ];
	this. update();
	}


CheckboxDefaultImage = "cb.gif";
CheckboxDefaultImageChecked = "cbchecked.gif";
var checkboxes = new Array();
function Checkbox()	{
	this. nr = checkboxes. length;
	checkboxes[ this. nr ] = this;
	this. checked = arguments[ 0 ];
	this. image = CheckboxDefaultImage;
	this. imageChecked = CheckboxDefaultImageChecked;
	this. toString = Checkbox_toString;
	this. onclick = Checkbox_onclick;
	this. set = Checkbox_set;
	this. update = Checkbox_update;
	}
function Checkbox_toString()	{
	this. multiImage = new MultiImage( new Array( this. image, this. imageChecked ) );
	this. multiImage. value = this. checked ? 1 : 0;
	var d = ''
	d += '<a';
	d += ' href="javascript: checkboxes[ ' + this. nr + ' ]. onclick();"';
	d += '>';
	d += this. multiImage. toString();
	d += '</a>';
	return d;
	}
function Checkbox_onclick()	{
	this. checked ^= true;
	this. update();
	}
function Checkbox_set()	{
	this. checked = arguments[ 0 ];
	this. update();
	}
function Checkbox_update()	{
	if( ( this. checked != this. multiImage. value ) && this. onchange)	{
		this. onchange();
		}
	this. multiImage. set( this. checked ? 1 : 0 );
	}


var mouseOverLinks = new Array();
function MouseOverLink()	{
	this. nr = mouseOverLinks. length;
	mouseOverLinks[ this. nr ] = this;
	this. image = arguments[ 0 ];
	this. imageOver = arguments[ 1 ];
	this. href = arguments[ 2 ];
	this. target = arguments[ 3 ];
	this. alt = arguments[ 4 ];
	this. toString = MouseOverLink_toString;
	this. onmouseover = MouseOverLink_onmouseover;
	this. onmouseout = MouseOverLink_onmouseout;
	}
function MouseOverLink_toString()	{
	this. multiImage = new MultiImage( new Array( this. image, this. imageOver ) );
	this. multiImage. alt = this. alt;
	var d = '';
	d += '<a';
	if( this. href )	{
		d += ' href="' + this. href + '"';
		}
	if( this. target )	{
		d += ' target="' + this. target + '"';
		}
	d += ' onmouseover="mouseOverLinks[ ' + this. nr + ' ]. onmouseover();"';
	d += ' onmouseout="mouseOverLinks[ ' + this. nr + ' ]. onmouseout();"';
	d += '>';
	d += this. multiImage. toString();
	d += '</a>';
	return d;
	}
function MouseOverLink_onmouseover()	{
	this. multiImage. set( 1 );
	}
function MouseOverLink_onmouseout()	{
	this. multiImage. set( 0 );
	}



PopLayerDefaultImageScrollDown = "scrolldown.gif";
PopLayerDefaultImageScrollUp = "scrollup.gif";
PopLayerDefaultScrollSpeed = 10;
var popLayers = new Array();
popLayers. step = new Function( "for( var c = 0; c < this. length; c++ ) this[ c ]. step();" );
function PopLayer()	{
	this. nr = popLayers. length;
	popLayers[ this. nr ] = this;
	this. imageScrollDown = PopLayerDefaultImageScrollDown;
	this. imageScrollUp = PopLayerDefaultImageScrollUp;
	this. scrollSpeed = PopLayerDefaultScrollSpeed;
	this. layerId = UI();
	this. layerIdScrollUp = UI();
	this. layerIdScrollDown = UI();
	this. left = 0;
	this. top = 0;
	this. maxHeight = 0;
	this. zIndex = 100;
	this. visible = false;
	this. scrollDirection = 0;
	this. scrollPosition = 0;
	this. step = PopLayer_step;
	this. startHTML = PopLayer_startHTML;
	this. popOne = PopLayer_popOne;
	}
function PopLayer_startHTML()	{
	var s = '';
	var e = '';
	if( document. layers )	{
		s += '<layer';
		s += ' name="' + this. layerIdScrollUp + '"';
		s += ' visibility="hide"';
		s += ' left="0"';
		s += ' top="0"';
		s += ' z-index="' + ( this. zIndex + 1 ) + '"';
		s += '>';
		}
	else	{
		s += '<div';
		s += ' id="' + this. layerIdScrollUp + '"';
		s += ' style="';
		s += 'position:absolute;';
		s += 'visibility:hidden;';
		s += 'left:0px;';
		s += 'top:0px;';
		if( document. all )	{
			s += 'width:1px;';
			}
		s += 'z-index:' + ( this. zIndex + 1 ) + ';';
		s += '"';
		s += '>';
		}
	s += '<a';
	s += ' href="javascript: void( 0 );"';
	s += ' onmouseover="popLayers[ ' + this. nr + ' ]. scrollDirection = 1;"';
	s += ' onmouseout="popLayers[ ' + this. nr + ' ]. scrollDirection = 0;"';
	s += '>';
	s += '<img';
	s += ' src="' + this. imageScrollUp + '"';
	s += ' hspace="0"';
	s += ' vspace="0"';
	s += ' border="0"';
	s += ' alt=""';
	s += '>';
	s += '</a>';
	if( document. layers )	{
		s += '</layer>';
		}
	else	{
		s += '</div>';
		}
	if( document. layers )	{
		s += '<layer';
		s += ' name="' + this. layerIdScrollDown + '"';
		s += ' visibility="hide"';
		s += ' left="0"';
		s += ' top="0"';
		s += ' z-index="' + ( this. zIndex + 1 ) + '"';
		s += '>';
		}
	else	{
		s += '<div';
		s += ' id="' + this. layerIdScrollDown + '"';
		s += ' style="';
		s += 'position:absolute;';
		s += 'visibility:hidden;';
		s += 'left:0px;';
		s += 'top:0px;';
		if( document. all )	{
			s += 'width:1px;';
			}
		s += 'z-index:' + ( this. zIndex + 1 ) + ';';
		s += '"';
		s += '>';
		}
	s += '<a';
	s += ' href="javascript: void( 0 );"';
	s += ' onmouseover="popLayers[ ' + this. nr + ' ]. scrollDirection = - 1;"';
	s += ' onmouseout="popLayers[ ' + this. nr + ' ]. scrollDirection = 0;"';
	s += '>';
	s += '<img';
	s += ' src="' + this. imageScrollDown + '"';
	s += ' hspace="0"';
	s += ' vspace="0"';
	s += ' border="0"';
	s += ' alt=""';
	s += '>';
	s += '</a>';
	if( document. layers )	{
		s += '</layer>';
		}
	else	{
		s += '</div>';
		}

	if( document. layers )	{
		s += '<layer';
		s += ' name="' + this. layerId + '"';
		s += ' visibility="hide"';
		s += ' left="0"';
		s += ' top="0"';
		s += ' z-index="' + this. zIndex + '"';
		s += '>';
		}
	else	{
		s += '<div';
		s += ' id="' + this. layerId + '"';
		s += ' style="';
		s += 'position:absolute;';
		s += 'visibility:hidden;';
		s += 'left:0px;';
		s += 'top:0px;';
		if( document. all )	{
			s += 'width:1px;';
			}
		s += 'z-index:' + this. zIndex + ';';
		s += '"';
		s += '>';
		}
	if( document. layers )	{
		e += '</layer>';
		}
	else	{
		e += '</div>';
		}

	endHTMLs[ endHTMLs. length ] = e;
	return s;
	}
function PopLayer_step()	{
	if( !this. layer )	{
		this. layer = window. document. getElementById( this. layerId );
		}
	if( !this. layerScrollUp )	{
		this. layerScrollUp = window. document. getElementById( this. layerIdScrollUp );
		}
	if( !this. layerScrollDown )	{
		this. layerScrollDown = window. document. getElementById( this. layerIdScrollDown );
		}
	if( this. visible )	{
		var height = this. maxHeight ? Math. min( this. maxHeight - this. layerScrollUp. offsetHeight - this. layerScrollDown. offsetHeight, this. layer. offsetHeight ) : this. layer. offsetHeight;
		var scrollBars = this. layer. offsetHeight > this. maxHeight && this. maxHeight;
		var top = this. top;
	
		this. scrollPosition = Math. min( Math. max( height - this. layer. offsetHeight, this. scrollPosition + this. scrollSpeed * this. scrollDirection ), 0 );
	
		if( scrollBars )	{
			this. layerScrollUp. style. top = top;
			top += this. layerScrollUp. offsetHeight;
			}
		this. layer. style. top = top + this. scrollPosition;
		top += height;
		if( scrollBars )	{
			this. layerScrollDown. style. top = top;
			}
		this. layerScrollUp. style. left = this. left;
		this. layer. style. left = this. left;
		this. layerScrollDown. style. left = this. left;
		this. layer. style. clip = "rect(" + ( - this. scrollPosition ) + "px " + this. layer. offsetWidth + "px " + ( - this. scrollPosition + height ) + "px 0px)";
		}
	this. layer. style. visibility = this. visible ? "inherit" : "hidden";
	this. layerScrollUp. style. visibility = scrollBars && this. visible ? "inherit" : "hidden";
	this. layerScrollDown. style. visibility = this. layerScrollUp. style. visibility;
	}
function PopLayer_popOne()	{
	for( var c = 0; c < popLayers. length; c++ )	{
		popLayers[ c ]. visible = ( this. nr == c ) && ( popLayers[ c ]. visible ^= true );
		}
	}

function MousePopAni()	{
	this. layerId = UI();
	this. zIndex = 500;
	this. visible = false;
	this. counter = false;
//	this. multiImage = new MultiImage( new Array( "images/energie1.gif","images/energie2.gif","images/energie3.gif","images/energie2.gif" ) );
//	this. multiImage = new MultiImage( new Array( "images/energie_pijl1.gif","images/energie_pijl2.gif") );	
	this. toString = MousePopAni_toString;
	this. step = MousePopAni_step;
	}
function MousePopAni_toString()	{
	var s = '';
	if( document. layers )	{
		s += '<layer';
		s += ' name="' + this. layerId + '"';
		s += ' visibility="hide"';
		s += ' left="0"';
		s += ' top="0"';
		s += ' z-index="' + this. zIndex + '"';
		s += '>';
		}
	else	{
		s += '<div';
		s += ' id="' + this. layerId + '"';
		s += ' style="';
		s += 'position:absolute;';
		s += 'visibility:hidden;';
		s += 'left:0px;';
		s += 'top:0px;';
		if( document. all )	{
			s += 'width:1px;';
			}
		s += 'z-index:' + this. zIndex + ';';
		s += '"';
		s += '>';
		}
	s += '<a';
	s += ' href="' + this. href + '"';
	s += '>';
	s += this. multiImage. toString();
	s += '</a>';
	if( document. layers )	{
		s += '</layer>';
		}
	else	{
		s += '</div>';
		}
	return s;
	}
function MousePopAni_step()	{
	if( !this. layer )	{
		this. layer = window. document. getElementById( this. layerId );
		}
	var mouseMoved = this. mouseX != mouseX || this. mouseY != mouseY;
	this. mouseX = mouseX;
	this. mouseY = mouseY;
	if( mouseMoved == this. visible )	{
		this. counter ++;
		if( this. counter > ( this. visible ? 2 : 20 ) )	{
			this. visible = !mouseMoved;
			this. multiImage. value = 0;
			}
		}
	else	{
		this. counter = 0;
		}
	if( this. visible )	{
		this. multiImage. value += 0.2;
		this. multiImage. update();
		this. layer. style. left = mouseX - this. layer. offsetWidth / 2;
		this. layer. style. top = mouseY - this. layer. offsetHeight / 2;
		}
	this. layer. style. visibility = this. visible ? "inherit" : "hidden";
	}


function EdLayer()	{
	this. layerId = UI();
	this. startHTML = EdLayer_startHTML;
	}
function EdLayer_startHTML()	{
	var s = '';
	var e = '';
	if( document. layers )	{
		s += '<layer';
		s += ' name="' + this. layerId + '"';
		s += ' visibility="hide"';
		s += ' left="0"';
		s += ' top="0"';
		s += '>';
		}
	else	{
		s += '<div';
		s += ' id="' + this. layerId + '"';
		s += ' style="';
		s += 'position:absolute;';
		s += 'visibility:hidden;';
		s += 'left:0px;';
		s += 'top:0px;';
		if( document. all )	{
			s += 'width:1px;';
			}
		s += '"';
		s += '>';
		}
	if( document. layers )	{
		e += '</layer>';
		}
	else	{
		e += '</div>';
		}
	endHTMLs[ endHTMLs. length ] = e;
	return s;
	}




function tdTagStartHTML()	{
	var s = '';
	var e = '';

	s += '<td';
	s += ' width="612"';
	s += ' align="left"';
	s += ' valign="top"';
	if( document. layers )	{
		s += ' background="' + arguments[ 0 ] + '"';
		}
	s += '>';

	e += '</td>';
	
	endHTMLs[ endHTMLs. length ] = e;
	return s;
	}
	
	
jsLoaded = true;

//#######################################333
//## pop up functie
//#######################################333

function popup(_url, _winname, _prop){
	var mywin;
	if (_prop == null){_prop = 'width=500,height=500,toolbar=no,status=no,resizable=yes,scrollbars' };
	mywin = window.open(_url, _winname, _prop);
	mywin.focus();
}
