<!-- 

var Opera = window.opera ? true : false;

// ----------------------- CLIENT-CHECK
function getClient() {
	// convert all characters to lowercase to simplify testing
	var agt=navigator.userAgent.toLowerCase()
	var apv=navigator.appVersion.toLowerCase()
	this.major = parseInt(navigator.appVersion)
	// browserversion
	this.ns  = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1)))
	this.gecko = (this.ns && (this.major >= 5))
	this.ie   = (agt.indexOf("msie") != -1)
	this.ie4  = (this.ie && (this.major == 3))
	this.ie45 = (agt.indexOf('msie 4.5') != -1);
	this.ie5  = (this.ie && (this.major == 4))
	// IE 5 or 5.5
	this.ie555 = (agt.indexOf('msie 5.5') != -1);
	//Safari
	this.isSafari = (agt.indexOf('safari') != - 1);
	this.versionMinor = parseFloat(navigator.appVersion); 
	this.isSafari10 = ((this.isSafari) && (this.versionMinor < 87));
	//Mozilla
	this.moz = ((agt.indexOf('mozilla') != -1)&& (agt.indexOf('gecko') != -1) && (agt.indexOf('netscape') == -1));
	// platform
	this.mac = (apv.indexOf("macintosh")>0);
	// compatible browsers
	this.ie4comp = ((this.ie4 && !this.mac) || this.ie45 || this.ie5)
	this.comp = (this.ie4comp || this.gecko);
	return (this);
}

var is = new getClient();

// ----------------------- IMAGE PRELOAD
function preloadImages() { 
	if (document.images) {
		var imgStr = preloadImages.arguments;
		if (!document.preloadArray) document.preloadArray = new Array();
		var n = document.preloadArray.length;
		for (var i=0; i<preloadImages.arguments.length; i++) {
			document.preloadArray[n] = new Image;
			document.preloadArray[n].src = imgStr[i];
			n++;
		} 
	}
}

// ----------------------- SWAP-IMAGE SUBMIT BG:
function roSubmit(id,pic,pos){
	if(is.comp && !(is.mac && is.ie4comp)){
		var ref = document.getElementById(id);
		ref.style.background = "url('" + pic + "') no-repeat";
		if(roSubmit.arguments.length > 2) {
			if (pos==1){ ref.style.backgroundPosition = 'right'; }
		}
	}
}

function roSubmitImg(id,pic){
	if(is.comp && !(is.mac && is.ie4comp)){
		var ref = document.getElementById(id);
		ref.src = pic;		
	}
}

// ----------------------- JAVASCRIPT MENU FUNCTIONS (toegevoegd op 25-10-2006)

// schrijf swf-file
function setHeaderMenu(swfSrc,xmlSrc,activeItem) {
	if(hasRightFlashVersion) {  // if we've detected an acceptable version
		// verberg html menu
		document.getElementById('main-navigation').style.display = 'none';
		document.getElementById('top-navigation').style.display = 'none';
		document.getElementById('flash-menu').style.display = 'block';
		document.getElementById('flash-menu').style.zindex = '999';
		// plaats swf-file
		var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
		+ 'width="760" height="350"'
		+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
		+ '<param name="movie" value="' + swfSrc + '?xmlSrc=' + xmlSrc + '&activeItem=' + activeItem + '" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="allowScriptAccess" value="always" /><param name="salign" value="lt" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#942042" />'
		+ '<embed src="' + swfSrc + '?xmlSrc=' + xmlSrc + '&activeItem=' + activeItem + '" menu="false" quality="high" scale="noscale" salign="lt" wmode="transparent" bgcolor="#942042" '
		+ 'width="760" height="350" name="menu" align="top"'
		+ 'play="true"'
		+ 'loop="false"'
		+ 'quality="high"'
		//+ 'allowScriptAccess="sameDomain"'
		+ 'allowScriptAccess="always"'
		+ 'type="application/x-shockwave-flash"'
		+ 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
		+ '<\/embed>'
		+ '<\/object>';
		document.write(oeTags);   // embed the flash movie
	} else {  // flash is too old or we can't detect the plugin
		var alternateContent = '';
	document.write(alternateContent);  // insert non-flash content
	}
}

function resizeHeaderMenu(h) {
	if(document.getElementById('flash-menu')!=null) {
		document.getElementById('flash-menu').style.height = h + "px";
	}
	// verberg teaser op home als he menu er overheen uitklapt
	if(document.getElementById('flash-teaser')!=null) {
		if (h>80) {
			document.getElementById('flash-teaser').style.visibility = 'hidden';
		} else {
			document.getElementById('flash-teaser').style.visibility = 'visible';
		}
	}
	// verberg subnavigatie op content als het menu er overheen uitklapt
	if(document.getElementById('leftNavigation')!=null) {
		if (h>80) {
			document.getElementById('leftNavigation').style.visibility = 'hidden';
		} else {
			document.getElementById('leftNavigation').style.visibility = 'visible';
		}
	}
	// verberg videoBlok op content als het menu er overheen uitklapt
	if(document.getElementById('videoBlok')!=null) {
		if (h>80) {
			document.getElementById('videoBlok').style.visibility = 'hidden';
		} else {
			document.getElementById('videoBlok').style.visibility = 'visible';
		}
	}
	// verberg videoBlok op content als het menu er overheen uitklapt
	if(document.getElementById('flashLayer')!=null) {
		if (h>80) {
			document.getElementById('flashLayer').style.visibility = 'hidden';
		} else {
			document.getElementById('flashLayer').style.visibility = 'visible';
		}
	}
	if(document.getElementById('boekenoverzicht')!=null) {
		if (h>80) {
			document.getElementById('boekenoverzicht').style.zIndex = -1;
		} else {
			document.getElementById('boekenoverzicht').style.zIndex = 1;
		}
	}
}




// Volgende functie wordt vanuit Flash aangeroepen om de zoekstring te verwerken tot een url
function zoekFunctie(str) {
//alert(str);
document.forms['gs'].elements['q'].value = str;
document.gs.submit();
}


function playFlash(){
	if (document.getElementById("videomudule") != null){
		document.videomudule.Play();
	}
}

function loadURL() {
	var hrefs,i,strHref,strUrl;
	hrefs=document.getElementsByTagName('a');
	strUrl = location.hostname;
	for (i=0;i<hrefs.length;i++)
	  {
	  strHref = hrefs[i].toString();
	  if (strHref.match(strUrl)!= null)
		  {
		  strHref = strHref.slice(strUrl.length + 7);
		  strHref = "http://www.twynstraguddekennisbank.nl" + strHref;
		  hrefs[i].href = strHref;
		  }
	  if (strHref.indexOf("twynstraguddeblog.nl")>-1)
		{
			hrefs[i].target = "_blank";
		}
	  }
}

function loadScript(x) {
	playFlash();
	loadURL();
	loadPoll(x);
}
//-->