

	// Force IE6 to cache background images
	try {
		document.execCommand("BackgroundImageCache", false, true);
	} catch(err) {}


	// standalone onDomReady function from http://www.ajaxprogrammer.com/
	window.onDomReady = function(fn){
		window.__ondom_functionArray.push(fn);
	};
	(function(){
		window.__ondom_functionArray = [];
		function _runFunctions(){
			for (var i in window.__ondom_functionArray){
				(window.__ondom_functionArray[i])();
			}
		};
		var _khtml = /(WebKit|khtml)/i.test(navigator.userAgent);
		if(document.addEventListener && !_khtml){
			document.addEventListener("DOMContentLoaded", _runFunctions, false);
		}else if(_khtml){
			var _timer = setInterval(function(){
				if(/loaded|complete/.test(document.readyState)){
					clearInterval(_timer);
					_runFunctions();
				}
			}, 10);
		}else{
			document.write("<script id=__ie_ondom defer src=javascript:void(0)><\/script>");
			var script = document.getElementById("__ie_ondom");
			script.onreadystatechange = function(){
				if(this.readyState == "complete"){
					_runFunctions();
				}
			};
		}
	})();


	// on dom ready
	onDomReady(function(){

		// set some styles for browser differences
		if (navigator.userAgent.indexOf('Opera') != -1 || navigator.userAgent.indexOf('Safari') != -1)
		{
			document.getElementById('contentBackground').style.width = '1001px';
			document.getElementById('contentOnder').style.width = '1001px';
			document.getElementById('contentOnderBlauw').style.backgroundImage = 'url(/images/contentOnderBlauwVoorSaOp.gif)';
		}
		else if (navigator.userAgent.indexOf("Firefox") != -1)
		{
			document.getElementById('contentBackground').style.width = '999px';
			document.getElementById('contentOnder').style.width = '999px';
			document.getElementById('contentOnderBlauw').style.backgroundImage = 'url(/images/contentOnderBlauwVoorFf.gif)';
		}

		// show menu image with map areas to work with instead of menu link hovering
		document.getElementById('menuMappenLaag').style.display = 'block';
		// and initialize the mouseover effect of the areas
		var area, areas = document.getElementById('menuMap').getElementsByTagName('area');
		for (var i = 0; area = areas[i]; i++)
		{
			area.onmouseover = function(){
				var fileName = this.href.match(/[^\/\\]+$/);
				activeateMenuItem(fileName[0]);
			};
		}

		// store the default z-index of each menuItem
		var menuItem, menuItems = document.getElementById('menu').getElementsByTagName('a');
		for (var i = 0; menuItem = menuItems[i]; i++)
		{
			menuItem.defaultZIndex = menuItem.style.zIndex;
		}

	});


	function activeateMenuItem(fileName)
	{
		var menuItem, menuItems = document.getElementById('menu').getElementsByTagName('a');
		for (var i = 0; menuItem = menuItems[i]; i++)
		{
			if (menuItem.href.indexOf(fileName) > -1)
			{
				menuItem.style.zIndex = '8';
			}
			else
			{
				menuItem.style.zIndex = menuItem.defaultZIndex;
			}
		}
	}

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;



/***********************************************
* Highlight Table Cells Script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Specify highlight behavior. "TD" to highlight table cells, "TR" to highlight the entire row:
var highlightbehavior="TR"

var ns6=document.getElementById&&!document.all
var ie=document.all

function changeto(e,highlightcolor){
source=ie? event.srcElement : e.target
if (source.tagName=="TABLE")
return
while(source.tagName!=highlightbehavior && source.tagName!="HTML")
source=ns6? source.parentNode : source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}

function contains_ns6(master, slave) { //check if slave is contained by master
while (slave.parentNode)
if ((slave = slave.parentNode) == master)
return true;
return false;
}

function changeback(e,originalcolor){
if (ie&&(event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")||source.tagName=="TABLE")
return
else if (ns6&&(contains_ns6(source, e.relatedTarget)||source.id=="ignore"))
return
if (ie&&event.toElement!=source||ns6&&e.relatedTarget!=source)
source.style.backgroundColor=originalcolor
}