// Verwijder stippellijnen 
function setBlur() {
	entries = document.getElementsByTagName('a');
	for (var i=0; i < entries.length; i++) {
		entries[i].onfocus = function() {this.blur()}
	}
}
// Einde

// Geen statusbar message
function hidestatus(){
window.status=''
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus
document.onmouseout=hidestatus
// Einde

// Nieuwe windows
try {
		document.addEventListener('click', handleClick, false);
	} catch(e) {
		if(document.attachEvent) {
			document.attachEvent('onclick', handleClick);
		} else {
			document.onclick = handleClick;
		}
	}

	function handleClick(e) {
		var event = e || window.event;
		if(event.ctrlKey || event.shiftKey || event.altKey) return true;
		if(event.which && event.which != 1) return true;

		var target = event.target || event.srcElement;
		while(target && !/^a$/i.test(target.nodeName)) {
			target = target.parentNode;
		}

		if(!target || !target.getAttribute('rel')) return true;

	   var rel = target.getAttribute('rel');
	   var href = target.getAttribute('href');
	   switch(rel) {
		case 'route':
			 window.open(href, '', 'width=637,height=575');
			 break;
		case 'reageer':
			 window.open(href, '', 'width=250,height=575');
			 break;
		case 'allefotos':
			 window.open(href, '', 'width=403,height=305');
			 break;
		case 'extern':
			 window.open(href);
			 break;
		  default:
			 return true;
	   }

	   try { event.preventDefault(); } catch(e){}
	   return false;
	}
// Einde

// Verander lettergrootte
function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}

function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}

function getPreferredStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1
       && a.getAttribute("rel").indexOf("alt") == -1
       && a.getAttribute("title")
       ) return a.getAttribute("title");
  }
  return null;
}

// Bekijk resolutie
function getWindowWidth() {
	var windowWidth = 0;
	if (typeof(window.innerWidth) == 'number') {
		windowWidth = window.innerWidth;
	}  
	else {
		if (document.documentElement && document.documentElement.clientWidth) {
				windowWidth = document.documentElement.clientWidth;
		} 
		else {
			if (document.body && document.body.clientWidth) {
				windowWidth = document.body.clientWidth;
			}
		}
	}
	return windowWidth;
}

function init () {
	var windowWidth = getWindowWidth();
	var activeStyleSheet = getActiveStyleSheet();
	if (windowWidth < 990) {
		setActiveStyleSheet('acht')
	}
/*		if (windowWidth > 990) {
		setActiveStyleSheet('default')
	}*/
}

function showDiv(id) {
	document.getElementById(id).style.display = "block";
	}

// Verberg een div
function hideDiv(id) {
	document.getElementById(id).style.display = "none";
	}

// Submenu
navHover = function() {
	var lis = document.getElementById("navmenu").getElementsByTagName("LI");
	for (var i=0; i<lis.length; i++) {
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover);

// Popup window
var win= null;
function nieuweWindow(mypage,myname,w,h,scroll){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
      settings +='scrollbars='+scroll+',';
      settings +='resizable=no';
  win=window.open(mypage,myname,settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}
