var browser = navigator.userAgent;

if(browser.indexOf('MSIE') != -1 && browser.indexOf('Opera') == -1) var browser = "Microsoft Internet Explorer";


function _m(_user,_domain)
{
	oM = _user + '@' + _domain;
	
	if(!getE('im'))
	{
		oDiv 					= document.createElement('DIV');
		oDiv.innerHTML			= '<iframe id="im" name="im" style="width:1px;height:1px;" frameborder="0" src="about:blank"></iframe>';		
		document.body.appendChild(oDiv);
	}
	
	im.location.href = 'mailto:'+oM;
}

function getE(id) { return document.getElementById(id); }


function showhide(id)
{
	t = document.getElementById(id);
	if(t.style.display == 'none') t.style.display = '';
	else t.style.display = 'none';	
}

function _hide(id) { getE(id).style.display = 'none'; }



function opac_ie(id) { document.getElementById(id).style.filter = "alpha(opacity=90,type=2)"; }


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;

	if(this.oParams == '' || this.oParams == undefined) 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\"';
		if(this.oType == 'swf') this.getswf();
		if(this.oType == 'mov') this.getmov();
		if(this.oType == 'avi') this.getmov();
		if(this.oType == 'dcr') this.getdcr();
		if(this.oType == 'mpeg' || this.oType == 'mpg') this.getmpeg();
		if(this.oType == 'wmv') this.getwmv();		
		document.write(this.oHTML);
	}
		
	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+'" />';
	}
	
	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 +' width="'+this.oWidth+'" height="'+this.oHeight+'" />'; // pluginspage="http://www.microsoft.com/mac/otherproducts/otherproducts.aspx?pid=windowsmedia" type="video/quicktime"
	}
	
	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.getdcr = function()
	{
		this.oSrc = this.oSrc.replace("../../userfiles/",oAbspath+"userfiles/"); // op de een of andere manier werkt wmv alleen met absoluut pad
        this.oHTML 		= '  <embed '+ this.oParams +' src="'+this.oSrc+'" '+ this.oParams +' width="'+this.oWidth+'" height="'+this.oHeight+'" />';
        this.oHTML 		= '	<OBJECT CLASSID="clsid:166B1BCA-3F9C-11CF-8075-444553540000"  CODEBASE="http://active.macromedia.com/director/cabs/sw.cab" WIDTH="'+this.oWidth+'" HEIGHT="'+this.oHeight+'" > <PARAM NAME="SRC" VALUE="'+this.oSrc+'"><embed src="'+this.oSrc+'" width="'+this.oWidth+'"  height="'+this.oHeight+'" '+ this.oParams +'> </OBJECT>';
	}
	
	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;
}


