                
function getE(id)
{
	return document.getElementById(id);
}


function show_submenu(id)
{
	clear_sub_timeout();
	var oSub = document.getElementById(id);
	if(oSub) oSub.style.display = 'block';
}

function hide_submenu(id,oTime)
{
	if(typeof oTime == 'undefined') oTime = 800;
	oSub = document.getElementById(id);
	if(oSub) oHideTimer = setTimeout("hide_it()",oTime);
}

function clear_sub_timeout() { 	if(typeof oHideTimer != 'undefined') clearTimeout(oHideTimer); }

function hide_it() { oSub.style.display = 'none';}

function hide_all_subs()
{
	for(i=0;i<oSubmenu_array.length;i++)
	{
		var oSub = document.getElementById(oSubmenu_array[i]);
		if(oSub) oSub.style.display = 'none';
	}
}


function showhide(id)
{
	t = document.getElementById(id);
	if(t.style.display == 'none') t.style.display = '';
	else t.style.display = 'none';	
}

function show_parent_nodes(oSub,level)
{
	for(i=0;i<level+1;i++)
	{
		if(oSub.parentNode != null && oSub.parentNode.style != null)
		{
			oSub = oSub.parentNode;
			oSub.style.display = '';
		}
	}
}

function top_offset(oThis,oTarget_id,topOffset)
{
	if(!oThis.currentStyle)
	{
		oTopMargin = oThis.offsetHeight * topOffset;
		document.getElementById(oTarget_id).style.marginTop = oTopMargin;
	}
}


if(typeof oActive_insert == 'undefined') oActive_insert 	= new Object();
oActive_insert 	= function (src,type,width,height,params)
{
	this.oSrc 		= src;
	this.oType		= type;
	this.oWidth		= width;
	this.oHeight		= height;
	this.oParams		= params;
	this.IEparams		= '';
	
	if(this.oParams == '') this.oParams = ' wmode="transparent" ';
	
	this.init		= function()
	{
		this.oHTML 		= ''; // reset the html
		
		if(this.oParams == '' || typeof(this.oParams) == 'undefined') 	this.oParams = 'autoplay=\"0\" autostart=\"0\"';
		this.getIE_params(this.oParams);
		if(this.oType == 'swf') this.getswf();
		else if(this.oType == 'mov') this.getmov();
		else if(this.oType == 'avi') this.getmov();
		else if(this.oType == 'mpeg' || this.oType == 'mpg') this.getmpeg();
		else if(this.oType == 'wmv') this.getwmv();	
    else this.getswf();		
		//document.getElementById('output').innerHTML += 'testing:' + this.oHTML.replace(/</gi,"&lt;") + '<br /><br />';
    document.write(this.oHTML);
		
	}
	
	this.getIE_params = function(oParams)
	{
		oSplit = oParams.split(' ');
		for(var i=0; i<oSplit.length; i++)
		{
			if(oSplit[i] != '')
			{
				oName 		= oSplit[i].substr(0,oSplit[i].indexOf('='));
				oValue 		= oSplit[i].substr(oSplit[i].indexOf('=')+1,oSplit[i].length);			
				this.IEparams += "<param name=\""+oName+"\" value=\""+oValue+"\" />";
			}
		}
	}
		
	this.getswf = function()
	{
	
    this.oHTML 		= '<embed src="'+this.oSrc+'" '+ this.oParams +' pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+this.oWidth+'" height="'+this.oHeight+'" />';
    
    return;    
        
    this.oHTML 		= '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+this.oWidth+'" height="'+this.oHeight+'">';
		this.oHTML 		+= '<param name="allowScriptAccess" value="sameDomain" />';
		this.oHTML 		+= this.IEparams;
		this.oHTML 		+= '<embed src="'+this.oSrc+'" '+ this.oParams +' pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+this.oWidth+'" height="'+this.oHeight+'" />';
		this.oHTML 		+= '</object>';
	}
	
	this.getmov = function()
	{
        this.oHTML 		= '  <embed src="'+this.oSrc+'" '+ this.oParams +' pluginspage="http://www.apple.com/quicktime/download/" type="video/quicktime" width="'+this.oWidth+'" height="'+this.oHeight+'" />';
	}
	
	this.getmpeg = function()
	{
        this.oHTML 		= '  <embed src="'+this.oSrc+'" '+ this.oParams +' pluginspage="http://www.microsoft.com/mac/otherproducts/otherproducts.aspx?pid=windowsmedia" type="video/quicktime" width="'+this.oWidth+'" height="'+this.oHeight+'" />';
	}
	
	this.getwmv = function()
	{
		this.oSrc = this.oSrc.replace("../../userfiles/",oAbspath+"userfiles/"); // op de een of andere manier werkt wmv alleen met absoluut pad
        this.oHTML 		= '  <embed src="'+this.oSrc+'" '+ this.oParams +' width="'+this.oWidth+'" height="'+this.oHeight+'" />';
	}
	
	this.init();
}

function backlink()
{
	oBl = document.getElementById('backlink');
	if(oBl)
	{
		if(window.history.length > 1)
		{
			oBl.style.display = '';
		}
	}
	
}

window.setTimeout('backlink()',400);

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 getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}


