<!--
var agt=navigator.userAgent.toLowerCase();
var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
var is_nav6up = (is_nav && (is_major >= 5));
var is_ie4up  = (is_ie && (is_major >= 4));
var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie4up  = (is_ie && (is_major >= 4));

var current_open_submenu = null;
var current_open_link = null;

// Object type
function isObject(o) {
  return (typeof(o)=="object");
}
function isArray(o) {
  return (isObject(o) && (o.length) &&(!isString(o)));
}
function isFunction(o) {
  return (typeof(o)=="function");
}
function isString(o) {
  return (typeof(o)=="string");
}

// Event attacher
// ----------------------------------------------


// Event attacher
// ----------------------------------------------
document.events = [];
document.attachEvent = function(type, reference) {
    var evt = this.events;
    if(!evt[type]) evt[type] = [];
    evt[type][evt[type].length] = reference;

    document[type] = function(e) { 
        document.executeEvents(type, e);        
    }
}    

document.executeEvents = function(type, e) {
    for(var i in this.events[type]) {
        this.events[type][i](e);
    }    
}
window.onunload = function() { document.executeEvents('onunload'); }
window.onload = function() { document.executeEvents('onload'); }
window.onresize = function() { document.executeEvents('onresize'); }


/**
 * function get_browser_height()
 * Deze functie geeft de hoogte van het browservenster terug in pixels
 */
function get_browser_height(){
  
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else {
		if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
			//IE 6+ in 'standards compliant mode'
			myWidth = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		} else {
			if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
				//IE 4 compatible
				myWidth = document.body.clientWidth;
				myHeight = document.body.clientHeight;
			}
		}
	}

	return(myHeight);
} // function get_browser_height

function reset_input(element){
	if((element.value=="type een zoekterm")||(element.value=="username")){
		element.value="";
	}
}

function reset_pass(element){
	element.style.backgroundImage='none';
}

/*
 * function checkImgOver(this_image){
 * Voor de mouseover van een plaatje via een regexpression wordt _1.gif vervangen door _2.gif voor this_image
 */
function checkImgOver(this_image){
	re=new RegExp('_1.','gi');
	this_image.src = this_image.src.replace(re,"_2.");
} // function checkImgOver

/*
 * function checkImgOut(this_image){
 * Voor de mouseout van een plaatje : _1.gif wordt teruggezet voor this_image
 */
function checkImgOut(this_image){
	re=new RegExp('_2.','gi');
	this_image.src = this_image.src.replace(re,"_1.");
} // function checkImgOut


function toonHeading(title,width){
	
	var bgcolor='F4771A';

	document.writeln('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
	document.writeln('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
	document.writeln('id="knrb_title_' + width + '" width="' + width + '" height="40">');
	document.writeln('<param name=movie value="flash/knrb_title_' + width + '.swf" />');
	document.writeln('<param name="bgcolor" value="#' + bgcolor + '" />');
	document.writeln('<param name="quality" value="high" />');
	document.writeln('<param name="menu" value="false" />');
	document.writeln('<param name="allowscriptaccess" value="samedomain">');
	document.writeln('<param name="flashvars" value="title=' + title + '">'); 	
	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) {
    	document.writeln(' <embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="' + width + '" height="40" name="knrb_title_' + width + '" src="flash/knrb_title_' + width + '.swf" flashvars="title=' + title + '" bgcolor="#' + bgcolor + '" quality="high" swLiveConnect="true" allowScriptAccess="samedomain"></embed>');
	} else {
      document.writeln('<h1>' + title.toLowerCase() + '</h1>');		
 	}
	document.writeln('</object>'); 
	document.writeln('<br />'); 
}

function submitReactieForm(){
	
	if (document.reactie_form.name.value.length < 3){
			alert("Vul a.u.b. uw (voor)naam in.");
			document.reactie_form.name.focus();
			return false;
	}
	if (document.reactie_form.email.value.length <3){
		if (document.reactie_form.email.value.indexOf ('@',0) == -1 || document.reactie_form.email.value.indexOf ('.',0) == -1) {
				alert("Vul a.u.b. een geldig e-mailadres in. Dit is noodzakelijk voor het activeren van de reactie.");			
				document.reactie_form.email.focus();
				return false;
		}
	}
	if (document.reactie_form.title.value.length < 3){
			alert("Vul a.u.b. een titel in.");
			document.reactie_form.title.focus();
			return false;
	}
	if (document.reactie_form.text.value.length < 3){
			alert("Vul a.u.b. een reactie in.");
			document.reactie_form.text.focus();
			return false;
	}
	
} // function submitReactieForm


function submitNieuwsbriefForm(){

	if (document.nbform.nbin.value.indexOf ('@',0) == -1 || document.nbform.nbin.value.indexOf ('.',0) == -1) {
			alert("Vul a.u.b. een geldig e-mailadres in.");			
			document.nbform.nbin.focus();
			return false;
	}
	
} // function


function openWin(url_name){
	myWin = window.open(url_name,"Popup","toolbar=no,status=no,width=300,height=400");
	myWin.moveTo(0,0);
}

function popUpWin(url) {
	window.open(url, 'popupwin', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=800,height=600');
}


function swap_check_value(checkbox){
	if(checkbox.value==0){
		checkbox.value=1;
	} else {
		checkbox.value=0;
	}
	
} // function swap_check_value

function validateNewsBriefBlock(thisform){
	
		if (thisform.nieuwsbrief_email.value.indexOf ('@',0) == -1 || thisform.nieuwsbrief_email.value.indexOf ('.',0) == -1) {
				alert("Vul a.u.b. een geldig e-mailadres in.");			
				thisform.nieuwsbrief_email.focus();
				return false;
		}
	
} // function validateNieuwsbriefForm

function submitUploadForm(thisform){
	if(document.fotoupload.uploader_name.value == ""){
		alert("Vul a.u.b. een geldige naam in");
		document.fotoupload.uploader_name.focus();
		return false;
	} else {
		if(document.fotoupload.uploader_email.value.indexOf ('@',0) == -1 || document.fotoupload.uploader_email.value.indexOf ('.',0) == -1) {
			alert("Vul a.u.b. een geldig e-mailadres in.");			
			document.fotoupload.uploader_email.focus();
			return false;
		} else {
			if(document.fotoupload.fileField.value == ""){
				alert("Voeg a.u.b. een foto toe");
				document.fotoupload.fileField.focus();
				return false;
			} else {
				if(document.fotoupload.uploader_toelichting.value == ""){
					alert("Vul a.u.b. een toelichting in");
					document.fotoupload.uploader_toelichting.focus();
					return false;
				} else {
					thisform.submit();
				}
			}
		}
	}

}  // function submitUploadForm


// mediaplayer fucnties
/******************************************
*******************************************
*******************************************/

function toonMediaPlayer(url){
	document.writeln('<OBJECT ID="mediaplayer" width=352 height=288 ');	
	document.writeln('classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"');	
	document.writeln('codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902"');	
	document.writeln('standby="Loading Microsoft® Windows® Media Player components..." ');	
	document.writeln('type="application/x-oleobject">');	
	document.writeln('<PARAM NAME="FileName" VALUE="' + url + '">');	
	document.writeln('<PARAM NAME="AnimationatStart" VALUE="0">');	
	document.writeln('<PARAM NAME="TransparentatStart" VALUE="1">');	
	document.writeln('<PARAM NAME="AutoStart" VALUE="1">');	
	document.writeln('<PARAM NAME="ShowControls" VALUE="1">');	
	document.writeln('<PARAM NAME="SendPlayStateChangeEvents" VALUE="1">');	
	document.writeln('<PARAM NAME="EnableContextMenu" VALUE="1">');	
	document.writeln('<PARAM NAME="EnablePositionControls" VALUE="0"> ');	
	document.writeln('<PARAM NAME="ShowStatusBar" VALUE="0">');	
	document.writeln('<PARAM NAME="AllowScan" VALUE="0">');	
	document.writeln('<PARAM NAME="volume" VALUE="0">');	
	document.writeln('<PARAM NAME="displaySize" VALUE="0">');	

	document.writeln('<EMBED type="application/x-mplayer2" ');	
	document.writeln('pluginspage =" http://www.microsoft.com/Windows/MediaPlayer/"');	
	document.writeln('SRC="' + url + '"');	
	document.writeln('name="mediaplayer"');	
	//document.writeln('id="mediaplayer"');	
	document.writeln('WIDTH="352"');	
	document.writeln('HEIGHT="288"');	
	document.writeln('AutoStart="1"');	
	document.writeln('EnableContextMenu="0"');	
	document.writeln('ShowControls="1"');	
	document.writeln('AnimationAtStart="0"');	
	document.writeln('ShowStatusBar="1"');	
	document.writeln('volume="0"');	
	document.writeln('displaySize="0"');	
	document.writeln('>');	
	document.writeln('</EMBED>');	
	document.writeln('</OBJECT>');	
} 

function start(){
	var bWin32IE;
	if ((navigator.userAgent.indexOf("IE")
		> -1) && (navigator.platform == "Win32")) {
		 bWin32IE = true;
	} else {
		 bWin32IE = false;
	}

   if (bWin32IE == true) {
      mediaplayer.CurrentPosition = 0;
      mediaplayer.play();
   } else {
      document.getElementById('mediaplayer').SetCurrentPosition(0);
      document.getElementById('mediaplayer').Play();
      
   }
}

function stop(){
	var bWin32IE;
	if ((navigator.userAgent.indexOf("IE")
		> -1) && (navigator.platform == "Win32")) {
		 bWin32IE = true;
	} else {
		 bWin32IE = false;
	}

   if (bWin32IE == true) {
      mediaplayer.stop();
   } else {
		document.mediaplayer.Stop();
		document.mediaplayer.SetCurrentPosition(0);
   }
}// mediaplayer functies


function openVideo(video,width,height){

	newwin = window.open(sBaseUrl +"video.php?stream_id=" + video,"video","width=660,height=490,toolbar=0,location=0,directories=0,resizable=1,scrollbars=0,status=0");			
	newwin.focus();

} // function openPopup

function openPodcasts(podcast){
    
    newwin = window.open(sBaseUrl +"podcasts.php?podcast_id=" + podcast,"podcast","width=660,height=490,toolbar=0,location=0,directories=0,resizable=1,scrollbars=0,status=0");            
    newwin.focus();

} // function openPopup

function streamLink(url){

	if(window.opener == true){
		window.opener.location = url;
		window.opener.focus();
	} else {
		window.open(url);
	}

} // function openPopup

function show_and_hide(stream_cat,aantal_cats){
	
	if(document.getElementById(stream_cat)){
		if(document.getElementById(stream_cat).style.display=='block'){
			document.getElementById(stream_cat).style.display = 'none';
		} else {
			for (i=0; i <= aantal_cats; i++) {
				if(document.getElementById('cat_' + i)){
					if(document.getElementById('cat_' + i) != document.getElementById(stream_cat)){
						document.getElementById('cat_' + i).style.display = 'none';
					}
				} 
			} // for
			document.getElementById(stream_cat).style.display = 'block';
		}
	} 
	
} // function show_and_hide()

function show_active_stream(stream_id){
	if(document.getElementById(stream_id)){
		document.getElementById(stream_id).style.textDecoration = 'underline';
	}
}

//-->


function initForm() {

	document.getElementById('pvdadh').value='pvdadhgood07';

}

/*****
 Automatisch herladende header
*****/
function reloadHeaderImage() {    
    
    //reload the header of the site
    var image = headerImages[ headerImagesCount%headerImages.length ];
    var headerObject = document.getElementById('header');
    headerObject.style.background = "url(upload/images/"+image+") right top no-repeat";
    
    var headerLink = document.getElementById('headerLink');
    if( headerLinks[ headerImagesCount%headerImages.length ] == '' ) {
        headerLink.href = '#';
    }
    else {
        headerLink.href = headerLinks[ headerImagesCount%headerImages.length ];
    }

    headerImagesCount++;
        
}        
if(headerImages != 'undefined') {
    var clock = setInterval(reloadHeaderImage, 5000);
}

/*****
 Start litebox        
*****/
try{
    window.attachEvent("onload", init);     
}catch(e){};      
try{
    document.attachEvent("onload", init);     
}catch(e){};                       
         
// Init function
function init() {  
    if (window.initLightbox) {   
        initLightbox();              
    }                   
}     
