function write_activex(element) {
	document.writeln(element);
}

function Clip_Restore() { //v3.0
  var i,x,a=document.Source; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function Preloader() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=Preloader.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function Locator(n, d) { //v3.0
    var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=Locator(n,d.layers[i].document); return x;
}
function Clip_Change() { //v3.0
   var i,j=0,x,a=Clip_Change.arguments; document.Source=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=Locator(a[i]))!=null){document.Source[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

 function newWindow(url,name) { 
	LeftPosition = (screen.width) ? (screen.width-636)/2 : 0; 
	TopPosition = (screen.height) ? (screen.height-900)/2 : 0; 
	settings = 'height='+900+',width='+636+',top='+TopPosition+',left='+LeftPosition+',menubar=yes,scrollbars=no,resizable=no'; 
	var newwin = window.open(url,name,settings); 
} 

// return todays date
function DateToday() {
	currentdate = new Date();
	return currentdate.getDate() + '-' + (currentdate.getMonth()+1) + '-' + currentdate.getYear();
}

// redirect to url
function goTo(url) {
	location.href = url;
}

function edit(paginaID) { if (paginaID == undefined) { paginaID = parent.paginaID; } window.open('../scripts/content_direct_bewerken.php?contentID='+ paginaID + '&view=direct','tvndra','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,height=595,width=945'); }

function popup(url,w,h){
	window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,height='+h+',width='+w);
}

// get Cookie
var hasCookie = true;
function getCookie (NameOfCookie) {
	if (!document.cookie||document.cookie.indexOf(NameOfCookie+"=")==-1) {
		setCookie(NameOfCookie,1,365);
		hasCookie = false;
	}
}

// set Cookie
function setCookie (NameOfCookie, value, expiredays) {
	var ExpireDate = new Date ();
	ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 3600 * 24 * 365));
	document.cookie = NameOfCookie + "=" + escape(value) + ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}

				var win= null;
				function NewWindow(mypage,myname,w,h,scroll){
				  var winl = (screen.width-w)/2;
				  var wint = (screen.height-h)/2;
				  var settings  ='height='+h+',';
				      settings +='width='+w+',';
				      settings +='top='+wint+',';
				      settings +='left='+winl+',';
				      settings +='scrollbars='+scroll+',';
				      settings +='resizable=0';
				  win=window.open(mypage,myname,settings);
				  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
				}

// check Flash version
var flashVer=0;
var vbFlash3,vbFlash4,vbFlash5,vbFlash6=false,vbFlash7=false; vbFlash8=false; vbFlash9=false;
if(navigator.plugins["Shockwave Flash"]){flashVer=parseInt(navigator.plugins["Shockwave Flash"].description.substr(16));}
else{
	document.write('<scr'+'ipt language=VBScript>\n');
	document.write('on error resume next\n');
	document.write('vbFlash3=(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3")))\n');
	document.write('vbFlash4=(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))\n');
	document.write('vbFlash5=(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n');
	document.write('vbFlash6=(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")))\n');	
	document.write('vbFlash7=(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7")))\n');	
	document.write('vbFlash8=(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8")))\n');
	document.write('vbFlash9=(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.9")))\n');
	document.write('</scr'+'ipt>\n');
	flashVer=(vbFlash3)?3:flashVer;
	flashVer=(vbFlash4)?4:flashVer;
	flashVer=(vbFlash5)?5:flashVer;
	flashVer=(vbFlash6)?6:flashVer;
	flashVer=(vbFlash6)?7:flashVer;
	flashVer=(vbFlash6)?8:flashVer;
	flashVer=(vbFlash6)?9:flashVer;
	flashVer=(vbFlash7)?7:flashVer;
}