<!-- 

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)

function callExternalInterface(el) {

    thisMovie("flashheader").mouseLeave();
    
}

function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    }
    else {
        return document[movieName]
    }
}


// schrijf swf-file
function setHeaderMenu(swfSrc,page,baseURL) {
	//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.overflow = 'hidden';
		//document.getElementById('flash-menu').style.height = '35px';
		//document.getElementById('flash-menu').style.zindex = '999';
		// plaats swf-file
		var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" onmouseout="callExternalInterface(this)" id="flashheader"'
		+ 'width="970" height="440"'
		+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
		+ '<param name="movie" value="' + swfSrc + '?page=' + page + '&baseURL=' + baseURL + '" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="salign" value="lt" /><param name="wmode" value="transparent" />'
		+ '<embed src="' + swfSrc + '?page=' + page + '&baseURL=' + baseURL + '" menu="false" quality="high" scale="noscale" salign="lt" wmode="transparent"  '
		+ 'width="970" height="440" align="top" name="flashheader"'
		+ 'play="true"'
		+ 'loop="false"'
		+ 'quality="high"'
		+ 'allowScriptAccess="sameDomain"'
		+ 'type="application/x-shockwave-flash"'
		+ 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
		+ '<\/embed>'
		+ '<\/object>';
		document.write(oeTags);
		document.getElementById('header').style.display = 'none';
 	
		
		
		// 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 resize(){
	document.getElementById('flash-menu').style.height = "330px";
//alert('resizing to 305')
}
var t;
function resizeHeaderMenu(h) {
 if(document.getElementById('flash-menu').style.height != '269px'){


 	if(h==330 ){

	t = setTimeout("resize()",750);
// 	resize();
	}

else{
	if(t != undefined) clearTimeout(t);
//	document.getElementById('flash-menu-parent').style.height= '405px';
	document.getElementById('flash-menu').style.display='block';
	document.getElementById('flash-menu').style.height = h + "px";
}
}
 
  
	//		document.getElementById('flash-menu').style.display = 'block';	
			
	// 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.twynstragudde.nl" + strHref;
		  hrefs[i].href = strHref;
		  }
	  }
}

function loadScript() {
	playFlash();
	loadURL();
}
//-->
