<!-- // (c)2000-2007 www.easy2edit.com r.p.j. stolk
/*******************************************************
 parts (c)1999-2007 - www.easy2edit.com 
 *******************************************************/
var scroller_richting=0;
d=document;
defaultStatus ="Copyright 2007 - All Rights Reserved."
// mouse over
function easyOver(toDO) {
  toDO.style.backgroundColor="#C9C9C9";
}
function easyOut(toDO) {
  toDO.style.backgroundColor="";
}
//

//d.oncontextmenu = nocontextmenu;      // for IE5+
//d.onmousedown = norightclick;      // for all others
function Redirect(url, msg)
{
   var TARG_ID = "REDIRECT";
   var DEF_MSG = "";

   if( ! msg )
   {
      msg = DEF_MSG;
   }

   if( ! url )
   {
      url='/index.php?id=home';
   }


   var e = document.getElementById(TARG_ID);

   if( ! e )
   {
      throw new Error('"REDIRECT" element id not found');
   }

   var cTicks = parseInt(e.innerHTML);

   var timer = setInterval(function()
   {
      if( cTicks )
      {
         e.innerHTML = --cTicks;
      }
      else
      {
         clearInterval(timer);
         document.body.innerHTML = msg;
         location = url;	  
      }

   }, 1000);
}

function check_events(){
		
}

function emptystr(string) {
	var x = 0;
	var chr;
	var empty = true;
	if (string.length) {
		do {
			chr = string.substring(x, x + 1);
			x++;
			empty = (chr == ' ' || chr == '\\t' || chr == '\\n' || chr == '\\r');
		} while (empty && x < string.length);
	}
	return empty;
}
function TabClick( nTab )
{	nTab = parseInt(nTab);
	var oTab;
	var prevTab = nTab-1;
	var nextTab = nTab+1;
	event.cancelBubble = true;
	el = event.srcElement;
	for (var i = 0; i < TabContent.length; i++)
	{		oTab = tabs[i];
		oTab.className = "clsTab";
		oTab.style.borderLeftStyle = "";
		oTab.style.borderRightStyle = "";
		TabContent[i].style.display = "none";
	}
	TabContent[nTab].style.display = "block";
	tabs[nTab].className = "clsTabSelected";
	oTab = tabs[nextTab];
	if (oTab) oTab.style.borderLeftStyle = "none";
		oTab = tabs[prevTab];
	if (oTab) oTab.style.borderRightStyle = "none";
		event.returnValue = false;
	}
	
function findPos(num){
  // alert(num)
  if(bw.ns4){   //Netscape 4
    x = document.layers["layerMenu"+num].pageX
    y = document.layers["layerMenu"+num].pageY
  }else{ //other browsers
    x=0; y=0; var el,temp
    el = bw.ie4?document.all["divMenu"+num]:document.getElementById("divMenu"+num);
    if(el.offsetParent){
      temp = el
      while(temp.offsetParent){ //Looping parent elements to get the offset of them as well
        temp=temp.offsetParent;
        x+=temp.offsetLeft
        y+=temp.offsetTop;
      }
    }
    x+=el.offsetLeft
    y+=el.offsetTop
  }
  //Returning the x and y as an array
  return [x,y]
}
//0=80%
//1=top
//2=100%
//3=400x350
//4=470x420
//var windowtype = "3";
// mouse over image


<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //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=MM_preloadImages.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 MM_findObj(n, d) { //v4.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=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->

// Navigational
function e2ePopup(siteURL,x,y,windowtitel,xx,yy){
	if(windowtitel==''){	windowtitel='easy2edit popup';	}
	if(xx==''){	xx='50';}
	if(yy==''){	yy='50';}	
	tmpWin2=window.open(siteURL,windowtitel,"toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width="+x+",height="+y+",left="+xx+",top="+yy);
	tmpWin2.focus();
}
function PopupBox(siteURL,windowtype, windowtitel)
{ startDate= new Date();
  if (windowtype==0)
  { if (parseInt(navigator.appVersion)>=4)
    { tmpWin2=window.open(siteURL,startDate.getTime(),"toolbar=yes,location=yes,resizable=yes,status=yes,scrollbars=yes,menubar=yes,width="+
      ((screen.width/100)*80)+",height="+(((screen.height/100)*85)-200)+",left="+((screen.width/100)*9)+",top="+((screen.height/100)*14)); }
    else
    { tmpWin2=window.open(siteURL,startDate.getTime(),"toolbar=yes,location=yes,resizable=yes,status=yes,scrollbars=yes,menubar=yes,width=600,height=280"); } }
  if (windowtype==1)
  { top.location.href=siteURL; }
  if (windowtype==2)
  { if(parseInt(navigator.appVersion)>=4)
    { tmpWin2=window.open(siteURL,startDate.getTime(),"toolbar=yes,location=yes,resizable=yes,status=yes,scrollbars=yes,menubar=yes,width="+
      ((screen.width/100)*99)+",height="+(((screen.height/100)*107)-200)+",left=0,top=0"); }
    else
    { tmpWin2=window.open(siteURL,startDate.getTime(),"toolbar=yes,location=yes,resizable=yes,status=yes,scrollbars=yes,menubar=yes,width=600,height=280"); } }
  if (windowtype=='3')
  { tmpWin2=window.open(siteURL,"reUsableWindow","toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width=400,height=350,left=100,top=100");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
  if (windowtype=='4')
  { tmpWin2=window.open(siteURL,"RegWindow","toolbar=no,location=no,resizable=no,status=no,scrollbars=no,menubar=no,width=500,height=440,left=100,top=100");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
  if (windowtype=='5')
  { tmpWin2=window.open(siteURL,"PrivacyWindow","toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width=510,height=510,left=50,top=50");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
  if (windowtype=='6')
  { tmpWin2=window.open(siteURL,"Webcam","toolbar=no,location=no,resizable=no,status=no,scrollbars=no,menubar=no,width=510,height=400,left=50,top=50");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
  if (windowtype=='7')
  { tmpWin2=window.open(siteURL,"Helpdesk","toolbar=no,location=no,resizable=no,status=no,scrollbars=no,menubar=no,width=300,height=300,left=15,top=15");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='10')
  { tmpWin2=window.open(siteURL,"ChatWindowBeheer","toolbar=no,location=no,resizable=yes,status=no,scrollbars=no,menubar=no,width=640,height=480,left=10,top=50");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='11')
  { ChatWindow=window.open(siteURL,"ChatWindow","toolbar=no,location=no,resizable=yes,status=no,scrollbars=no,menubar=no,width=640,height=480,left=10,top=50");
	  if(ChatWindow==null){	alert('Error: While launching the chat window\n\nYour browser may be blocking Popup windows.\nPlease check your Popup Blocker Settings');	
	  }else	{	ChatWindow.focus(); 	}
  }
if (windowtype=='12')
  { tmpWin2=window.open(siteURL,"login","toolbar=no,location=no,resizable=yes,status=no,scrollbars=no,menubar=no,width=350,height=210,left=100,top=100");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }	
if (windowtype=='13')
  { tmpWin2=window.open(siteURL,"document","toolbar=yes,location=yes,resizable=yes,status=no,scrollbars=yes,menubar=yes,width=800,height=600,left=100,top=100");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }	
if (windowtype=='20')
  { 
  	if(windowtitel==''){	windowtitel='Custom window';	}
	tmpWin2=window.open(siteURL,windowtitel,"toolbar=no,location=no,resizable=yes,status=yes,scrollbars=yes,menubar=yes,width=800,height=600,left=50,top=50");
	  tmpWin2.focus(); }
if (windowtype=='21')
  { 
  	if(windowtitel==''){	windowtitel='Custom window';	}
	tmpWin2=window.open(siteURL,windowtitel,"toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width=800,height=600,left=50,top=50");
	  tmpWin2.focus(); }  
if (windowtype=='22')
  { 
  	if(windowtitel==''){	windowtitel='Custom window';	}
	tmpWin2=window.open(siteURL,windowtitel,"toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width=930,height=620,left=50,top=50");
	tmpWin2.focus();
  }
if (windowtype=='23')
  { 
  	if(windowtitel==''){	windowtitel='Custom window';	}
	tmpWin2=window.open(siteURL,windowtitel,"toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width=450,height=620,left=50,top=50");
	tmpWin2.focus();
  }
if (windowtype=='73')
  { tmpWin2=window.open(siteURL,"Files","toolbar=no,location=no,resizable=no,status=no,scrollbars=no,menubar=no,width=800,height=400,left=25,top=25");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='74')
  { tmpWin2=window.open(siteURL,"atmail","toolbar=no,location=no,resizable=yes,status=no,scrollbars=no,menubar=no,width=850,height=640,left=50,top=25");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='75')
  { tmpWin2=window.open(siteURL,"HELP","toolbar=no,location=no,resizable=no,status=no,scrollbars=no,menubar=no,width=820,height=630,left=5,top=5");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='76')
  { tmpWin2=window.open(siteURL,"DMS-OPENCONTENT","toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=yes,width=990,height=680,left=5,top=5");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='77'){
  	if(windowtitel==''){	windowtitel='DMS';	}
	 tmpWin2=window.open(siteURL,windowtitel,"toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width=990,height=680,left=5,top=5");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='78')
  { tmpWin2=window.open(siteURL,"Login","toolbar=no,location=no,resizable=no,status=no,scrollbars=no,menubar=no,width=450,height=415,left=50,top=25");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }

if (windowtype=='79')
  { tmpWin2=window.open(siteURL,"VideoPopup","toolbar=no,location=no,resizable=no,status=no,scrollbars=no,menubar=no,width=380,height=470,left=50,top=50");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='80')
  { tmpWin2=window.open(siteURL,"Webexplorer","toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width=640,height=500,left=1,top=1");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='81')
  { tmpWin2=window.open(siteURL,"Toolbox","toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width=740,height=740,left=1,top=1");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='82')
  { tmpWin2=window.open(siteURL,"Flashbox","toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width=830,height=700,left=1,top=1");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='83')
  { tmpWin2=window.open(siteURL,"Editbox","toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width=800,height=500,left=1,top=1");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='84')
  { tmpWin2=window.open(siteURL,"Editbox","toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width=800,height=500,left=1,top=1");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='85')
  { tmpWin2=window.open(siteURL,"mailbox","toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width=800,height=590,left=1,top=1");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='86')
  { tmpWin2=window.open(siteURL,"Scroll","toolbar=no,location=no,resizable=yes,status=yes,scrollbars=yes,menubar=no,width=800,height=500,left=1,top=1");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='87')
  { tmpWin2=window.open(siteURL,"Scroll","toolbar=no,location=no,resizable=yes,status=yes,scrollbars=yes,menubar=no,width=800,height=500,left=1,top=1");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='88')
  { tmpWin2=window.open(siteURL,"controlfull","toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width=1022,height=766,left=1,top=1");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='89')
  { tmpWin2=window.open(siteURL,"mediawindow","toolbar=no,location=no,resizable=no,status=no,scrollbars=no,menubar=no,width=350,height=480,left=5,top=5");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='90')
  { tmpWin2=window.open(siteURL,"Locatiewindow1","toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width=825,height=620,left=5,top=5");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='91')
  { tmpWin2=window.open(siteURL,"Locatiewindow2","toolbar=yes,location=yes,resizable=yes,status=no,scrollbars=yes,menubar=no,width=800,height=600,left=50,top=50");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='92')
  { tmpWin2=window.open(siteURL,"Extrawindow","toolbar=yes,location=no,resizable=yes,status=yes,scrollbars=yes,menubar=yes,width=800,height=600,left=50,top=50");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='93')
  { tmpWin2=window.open(siteURL,"Editwindow","toolbar=no,location=no,resizable=yes,status=yes,scrollbars=yes,menubar=yes,width=800,height=600,left=50,top=50");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='94')
  { tmpWin2=window.open(siteURL,"Kassa","toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width=930,height=620,left=10,top=10");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
if (windowtype=='97')
  { tmpWin2=window.open(siteURL,"PrintWindow","toolbar=no,location=no,resizable=no,status=no,scrollbars=no,menubar=no,width=300,height=300,left=50,top=50");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
  if (windowtype=='98')
  { tmpWin2=window.open(siteURL,"Edit","toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width=550,height=200,left=15,top=15");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
  if (windowtype=='99')
  { tmpWin2=window.open(siteURL,"Edit","toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width=640,height=480,left=15,top=15");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
  if (windowtype=='96')
  { tmpWin2=window.open(siteURL,"Question","toolbar=no,location=no,resizable=yes,status=no,scrollbars=no,menubar=no,width=400,height=250,left=15,top=15");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
  if (windowtype=='95')
  { tmpWin2=window.open(siteURL,"imode","toolbar=no,location=no,resizable=yes,status=no,scrollbars=no,menubar=no,width=200,height=360,left=15,top=15");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
  if (windowtype=='8')
  { tmpWin2=window.open(siteURL,"Klein","toolbar=no,location=no,resizable=no,status=no,scrollbars=yes,menubar=no,width=640,height=480,left=35,top=35");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
  if (windowtype=='9')
  { tmpWin2=window.open(siteURL,"editor","toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width=830,height=630,left=15,top=15");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
  if (windowtype=='10')
  { tmpWin2=window.open(siteURL,"Groot","toolbar=no,location=no,resizable=no,status=no,scrollbars=no,menubar=no,width=1024,height=768,left=15,top=15");
	  //ipv reUsableWindow was het startDate.getTime()
	  tmpWin2.focus(); }
}

function openSmallWindow(siteURL)
{ startDate= new Date();
  tmpWin = window.open(siteURL, startDate.getTime(),'toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width=640,height=400');
}

//This block will capture the right click and discard it
if (window.Event) // Only Netscape will have the CAPITAL E.
  document.captureEvents(Event.MOUSEUP); // catch the mouse up event
function nocontextmenu() // this function only applies to IE4, ignored otherwise.
{ event.cancelBubble = true
  event.returnValue = false;
  return false;
}

function norightclick(e)   // This function is used by all others
{ if (window.Event)   // again, IE or NAV ?
  { if (e.which == 2 || e.which == 3)
    { return false; }
  }
  else
  { if (event.button == 2 || event.button == 3)
    { event.cancelBubble = true
      event.returnValue = false;
      return false;
    }
  } 
}

// datum

function writeToday(){
  var vada = new Date();
  var StrVandaag;
switch (vada.getDay())
{ case 0 : StrVandaag = "zondag "; break;
  case 1 : StrVandaag = "maandag "; break;
  case 2 : StrVandaag = "dinsdag "; break;
  case 3 : StrVandaag = "woensdag "; break;
  case 4 : StrVandaag = "donderdag "; break;
  case 5 : StrVandaag = "vrijdag "; break;
  case 6 : StrVandaag = "zaterdag "; break; }
StrVandaag += vada.getDate()
switch (vada.getMonth())
{ case  0 : StrVandaag += " januari "; break;
  case  1 : StrVandaag += " februari "; break;
  case  2 : StrVandaag += " maart "; break;
  case  3 : StrVandaag += " april "; break;
  case  4 : StrVandaag += " mei "; break;
  case  5 : StrVandaag += " juni "; break;
  case  6 : StrVandaag += " juli "; break;
  case  7 : StrVandaag += " augustus "; break;
  case  8 : StrVandaag += " september "; break;
  case  9 : StrVandaag += " oktober "; break;
  case 10 : StrVandaag += " november "; break;
  case 11 : StrVandaag += " december "; break; }
StrVandaag += vada.getFullYear();
d.write(StrVandaag);
}

function MM_showHideLayers() { //v2.0
  var i, visStr, args, theObj;
  args = MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=4) { //with arg triples (objNS,objIE,visStr)
    visStr   = args[i+2];
    if (navigator.appName == 'Netscape' && document.layers != null) {
      theObj = eval(args[i]);
      if (theObj) theObj.visibility = visStr;
    } else if (document.all != null || document.getElementById != null) { //IE and NS6
      if (visStr == 'show') visStr = 'visible'; //convert vals
      if (visStr == 'hide') visStr = 'hidden';
      theObj = eval(args[i+1]);
      if (theObj) theObj.style.visibility = visStr;
  } }
}

function ChangeXYtoMouse(me,objID){// zet de x en y positie van de pulldown naar de x en y van de muis
	if (document.layers){
		eval('document.layers.'+objID+'.left = 90');
		//me.pageX-5
		eval('document.layers.'+objID+'.top = me.pageY-5');
	}
	else{
		document.getElementById(objID).style.left = 90;
		//me.clientX-5
		document.getElementById(objID).style.top = me.clientY-5;
	}
}

function popImage(imageURL,imageTitle,esc, base){
// Set the horizontal and vertical position for the popup
PositionX = 10;
PositionY = 10;
// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)
defaultWidth  = 5;
defaultHeight = 5;
// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows
var AutoClose = true;
if (esc=='true'){
	imageURL=unescape(imageURL);
} else {
	imageURL=escape(imageURL);
}
var siteurl = location.href;
if(base!="" && typeof(base)!="undefined"){
	if (siteurl.match('https://')) {
		base= "<base href='https://"+base+"'>";
	}
	else {
		base= "<base href='http://"+base+"'>";
	}
}else{
	base=location.hostname;
	if(base!=""){
		if (siteurl.match('https://')) {
			base= "<base href='https://"+base+"'>";
		}
		else {
			base= "<base href='http://"+base+"'>";
		}
	}
}


// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
	if (isNN){imgWin=window.open('about:blank','',optNN);}
	if (isIE){imgWin=window.open('about:blank','',optIE);}
	with (imgWin.document){
	writeln('<html><head>'+base+'<title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
	writeln('var isNN,isIE;');
	writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
	writeln('isNN=(navigator.appName=="Netscape")?1:0;');
	writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
	writeln('function reSizeToImage(){');
		writeln('if (isIE){');
			writeln('window.resizeTo(400,400);');
			writeln('var px_breder=(400-document.body.clientWidth);');
			writeln('var px_langer=(400-document.body.clientHeight);');
			writeln('width=document.images[0].width+px_breder;');
			writeln('height=document.images[0].height+px_langer;');
			//writeln('alert( document.images[0].height+" - "+ document.images[0].width);');
			writeln('pcWidth = screen.width;');
			writeln('pcHeight = screen.height;');
			//writeln('alert(height+" - "+width);');
			writeln('if (width > pcWidth) { width = pcWidth-50; }');
			writeln('if (height > pcHeight) { height = pcHeight-50; }');
			//writeln('alert(height+" - "+width);');
			writeln('window.resizeTo(width,height);');
			writeln('document.images[0].width = document.body.offsetWidth-(document.body.clientLeft*2);');
			writeln('document.images[0].height = document.body.offsetHeight-(document.body.clientTop*2);');
		writeln('}');
		writeln('if (isNN){');
			writeln('pcWidth = screen.width;');
			writeln('pcHeight = screen.height;');
			writeln('width = document.images["easy2edit"].width;');
			writeln('height = document.images["easy2edit"].height;');
  			writeln('if (width > pcWidth) { var newWidth = pcWidth; if(newWidth!=0){var newHeight=(((newWidth*100)/width)/100)*height; } width=newWidth; height=newHeight;}');
			writeln('if (height > pcHeight) { var newHeight = pcHeight-150; if(newHeight!=0){var newWidth=(((newHeight*100)/height)/100)*width; } height=newHeight; width=newWidth;}');
			writeln('window.innerWidth=width;');
			writeln('window.innerHeight=height;');
			writeln('document.images["easy2edit"].width = document.body.offsetWidth;');
			writeln('document.images["easy2edit"].height = document.body.offsetHeight;');
		writeln('}');
	writeln('}');
	writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
	if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
		else 	writeln('</head><body bgcolor=CC0000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
				writeln('<img name="easy2edit" src='+imageURL+' style="display:block">');
				writeln('</body></html>');
	close();		
}}

//-->

// Node object

function Node(id, pid, name, url, title, target, icon, iconOpen, open) {

	this.id = id;

	this.pid = pid;

	this.name = name;

	this.url = url;

	this.title = title;

	this.target = target;

	this.icon = icon;

	this.iconOpen = iconOpen;

	this._io = open || false;

	this._is = false;

	this._ls = false;

	this._hc = false;

	this._ai = 0;

	this._p;

};



// Tree object

function easyTree(objName) {

	this.config = {

		target					: null,

		folderLinks			: true,

		useSelection		: true,

		useCookies			: true,

		useLines				: true,

		useIcons				: true,

		useStatusText		: false,

		closeSameLevel	: false,

		inOrder					: false

	}

	this.icon = {

		root				: 'images/system/minibuttons/tree_base.gif',

		folder			: 'images/system/minibuttons/tree_folder.gif',

		folderTemplate			: 'images/system/minibuttons/tree_template_folder.gif',

		folderPostbus			: 'images/system/minibuttons/tree_postbus_folder.gif',
		
		folderProjecten			: 'images/system/minibuttons/tree_projecten_folder.gif',
		
		folderRelaties			: 'images/system/minibuttons/tree_relatie.gif',

		folderImages			: 'images/system/minibuttons/tree_imgfolder.gif',

		folderSearch			: 'images/system/minibuttons/tree_zoekfolder.gif',

		folderOpen	: 'images/system/minibuttons/tree_folderopen.gif',

		node				: 'images/system/minibuttons/tree_page.gif',

		empty				: 'images/system/minibuttons/tree_empty.gif',

		line				: 'images/system/minibuttons/tree_line.gif',

		join				: 'images/system/minibuttons/tree_join.gif',

		joinBottom	: 'images/system/minibuttons/tree_joinbottom.gif',

		plus				: 'images/system/minibuttons/tree_plus.gif',

		plusBottom	: 'images/system/minibuttons/tree_plusbottom.gif',

		minus				: 'images/system/minibuttons/tree_minus.gif',

		minusBottom	: 'images/system/minibuttons/tree_minusbottom.gif',

		nlPlus			: 'images/system/minibuttons/tree_nolines_plus.gif',

		nlMinus			: 'images/system/minibuttons/tree_nolines_minus.gif'

	};

	this.obj = objName;

	this.aNodes = [];

	this.aIndent = [];

	this.root = new Node(-1);

	this.selectedNode = null;

	this.selectedFound = false;

	this.completed = false;

};



// Adds a new node to the node array

easyTree.prototype.add = function(id, pid, name, url, title, target, icon, iconOpen, open) {

	this.aNodes[this.aNodes.length] = new Node(id, pid, name, url, title, target, icon, iconOpen, open);

};



// Open/close all nodes

easyTree.prototype.openAll = function() {

	this.oAll(true);

};

easyTree.prototype.closeAll = function() {

	this.oAll(false);

};



// Outputs the tree to the page

easyTree.prototype.toString = function() {

	var str = '<div class="easytree">\n';

	if (document.getElementById) {

		if (this.config.useCookies) this.selectedNode = this.getSelected();

		str += this.addNode(this.root);

	} else str += 'Browser not supported.';

	str += '</div>';

	if (!this.selectedFound) this.selectedNode = null;

	this.completed = true;

	return str;

};



// Creates the tree structure

easyTree.prototype.addNode = function(pNode) {

	var str = '';

	var n=0;

	if (this.config.inOrder) n = pNode._ai;

	for (n; n<this.aNodes.length; n++) {

		if (this.aNodes[n].pid == pNode.id) {
			var cn = this.aNodes[n];

			cn._p = pNode;

			cn._ai = n;

			this.setCS(cn);

			if (!cn.target && this.config.target) cn.target = this.config.target;

			if (cn._hc && !cn._io && this.config.useCookies) cn._io = this.isOpen(cn.id);

			if (!this.config.folderLinks && cn._hc) cn.url = null;

			if (this.config.useSelection && cn.id == this.selectedNode && !this.selectedFound) {

					cn._is = true;

					this.selectedNode = n;

					this.selectedFound = true;

			}

			str += this.node(cn, n);

			if (cn._ls) break;

		}

	}

	return str;

};



// Creates the node icon, url and text

easyTree.prototype.node = function(node, nodeId) {

	var str = '<div class="easyTreeNode">' + this.indent(node, nodeId);

	if (this.config.useIcons) {

		if (!node.icon) node.icon = (this.root.id == node.pid) ? this.icon.root : ((node._hc) ? this.icon.folder : this.icon.node);

		if (!node.iconOpen) node.iconOpen = (node._hc) ? this.icon.folderOpen : this.icon.node;

		if (this.root.id == node.pid) {

			node.icon = this.icon.root;

			node.iconOpen = this.icon.root;

		}

		str += '<img id="i' + this.obj + nodeId + '" src="' + ((node._io) ? node.iconOpen : node.icon) + '" alt="" />';

	}

	if (node.url) {

		str += '<a id="s' + this.obj + nodeId + '" class="' + ((this.config.useSelection) ? ((node._is ? 'nodeSel' : 'node')) : 'node') + '" href="' + node.url + '"';

		if (node.title) str += ' title="' + node.title + '"';

		if (node.target) str += ' target="' + node.target + '"';

		if (this.config.useStatusText) str += ' onmouseover="window.status=\'' + node.name + '\';return true;" onmouseout="window.status=\'\';return true;" ';

		if (this.config.useSelection && ((node._hc && this.config.folderLinks) || !node._hc))

			str += ' onclick="javascript: ' + this.obj + '.s(' + nodeId + ');"';

		str += '>';
//alert(str);

	}

	else if ((!this.config.folderLinks || !node.url) && node._hc && node.pid != this.root.id)

		str += '<a href="javascript: ' + this.obj + '.o(' + nodeId + ');" class="node">';

	str += node.name;

	if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += '</a>';

	str += '</div>';

	if (node._hc) {

		str += '<div id="d' + this.obj + nodeId + '" class="clip" style="display:' + ((this.root.id == node.pid || node._io) ? 'block' : 'none') + ';">';

		str += this.addNode(node);

		str += '</div>';

	}

	this.aIndent.pop();

	return str;

};



// Adds the empty and line icons

easyTree.prototype.indent = function(node, nodeId) {

	var str = '';

	if (this.root.id != node.pid) {

		for (var n=0; n<this.aIndent.length; n++)

			str += '<img src="' + ( (this.aIndent[n] == 1 && this.config.useLines) ? this.icon.line : this.icon.empty ) + '" alt="" />';

		(node._ls) ? this.aIndent.push(0) : this.aIndent.push(1);

		if (node._hc) {

			str += '<a href="javascript: ' + this.obj + '.o(' + nodeId + ');"><img id="j' + this.obj + nodeId + '" src="';

			if (!this.config.useLines) str += (node._io) ? this.icon.nlMinus : this.icon.nlPlus;

			else str += ( (node._io) ? ((node._ls && this.config.useLines) ? this.icon.minusBottom : this.icon.minus) : ((node._ls && this.config.useLines) ? this.icon.plusBottom : this.icon.plus ) );

			str += '" alt="" /></a>';

		} else str += '<img src="' + ( (this.config.useLines) ? ((node._ls) ? this.icon.joinBottom : this.icon.join ) : this.icon.empty) + '" alt="" />';

	}

	return str;

};



// Checks if a node has any children and if it is the last sibling

easyTree.prototype.setCS = function(node) {

	var lastId;
	for (var n=0; n<this.aNodes.length; n++) {			
		if (this.aNodes[n].pid == node.id) node._hc = true;
		if (this.aNodes[n].pid == node.pid) lastId = this.aNodes[n].id;
	}
	if (lastId==node.id) node._ls = true;

};



// Returns the selected node

easyTree.prototype.getSelected = function() {

	var sn = this.getCookie('cs' + this.obj);

	return (sn) ? sn : null;

};



// Highlights the selected node

easyTree.prototype.s = function(id) {

	if (!this.config.useSelection) return;

	var cn = this.aNodes[id];

	if (cn._hc && !this.config.folderLinks) return;

	if (this.selectedNode != id) {

		if (this.selectedNode || this.selectedNode==0) {

			eOld = document.getElementById("s" + this.obj + this.selectedNode);

			eOld.className = "node";

		}

		eNew = document.getElementById("s" + this.obj + id);

		eNew.className = "nodeSel";

		this.selectedNode = id;

		if (this.config.useCookies) this.setCookie('cs' + this.obj, cn.id);

	}

};



// Toggle Open or close

easyTree.prototype.o = function(id) {

	var cn = this.aNodes[id];

	this.nodeStatus(!cn._io, id, cn._ls);

	cn._io = !cn._io;

	if (this.config.closeSameLevel) this.closeLevel(cn);

	if (this.config.useCookies) this.updateCookie();

};



// Open or close all nodes

easyTree.prototype.oAll = function(status) {
	for (var n=0; n<this.aNodes.length; n++) {
		if (this.aNodes[n]._hc && this.aNodes[n].pid != this.root.id) {
			this.nodeStatus(status, n, this.aNodes[n]._ls)
			this.aNodes[n]._io = status;
		}
	}
	if (this.config.useCookies) this.updateCookie();
};



// Opens the tree to a specific node

easyTree.prototype.openTo = function(nId, bSelect, bFirst) {

	if (!bFirst) {

		for (var n=0; n<this.aNodes.length; n++) {

			if (this.aNodes[n].id == nId) {

				nId=n;

				break;

			}

		}

	}

	var cn=this.aNodes[nId];

	if (cn.pid==this.root.id || !cn._p) return;

	cn._io = true;

	cn._is = bSelect;

	if (this.completed && cn._hc) this.nodeStatus(true, cn._ai, cn._ls);

	if (this.completed && bSelect) this.s(cn._ai);

	else if (bSelect) this._sn=cn._ai;

	this.openTo(cn._p._ai, false, true);

};



// Closes all nodes on the same level as certain node

easyTree.prototype.closeLevel = function(node) {

	for (var n=0; n<this.aNodes.length; n++) {

		if (this.aNodes[n].pid == node.pid && this.aNodes[n].id != node.id && this.aNodes[n]._hc) {

			this.nodeStatus(false, n, this.aNodes[n]._ls);

			this.aNodes[n]._io = false;

			this.closeAllChildren(this.aNodes[n]);

		}

	}

}



// Closes all children of a node

easyTree.prototype.closeAllChildren = function(node) {

	for (var n=0; n<this.aNodes.length; n++) {

		if (this.aNodes[n].pid == node.id && this.aNodes[n]._hc) {

			if (this.aNodes[n]._io) this.nodeStatus(false, n, this.aNodes[n]._ls);

			this.aNodes[n]._io = false;

			this.closeAllChildren(this.aNodes[n]);		

		}

	}

}



// Change the status of a node(open or closed)

easyTree.prototype.nodeStatus = function(status, id, bottom) {

	eDiv	= document.getElementById('d' + this.obj + id);

	eJoin	= document.getElementById('j' + this.obj + id);

	if (this.config.useIcons) {

		eIcon	= document.getElementById('i' + this.obj + id);

		eIcon.src = (status) ? this.aNodes[id].iconOpen : this.aNodes[id].icon;

	}

	eJoin.src = (this.config.useLines)?

	((status)?((bottom)?this.icon.minusBottom:this.icon.minus):((bottom)?this.icon.plusBottom:this.icon.plus)):

	((status)?this.icon.nlMinus:this.icon.nlPlus);

	eDiv.style.display = (status) ? 'block': 'none';

};





// [Cookie] Clears a cookie

easyTree.prototype.clearCookie = function() {

	var now = new Date();

	var yesterday = new Date(now.getTime() - 1000 * 60 * 60 * 24);

	this.setCookie('co'+this.obj, 'cookieValue', yesterday);

	this.setCookie('cs'+this.obj, 'cookieValue', yesterday);

};



// [Cookie] Sets value in a cookie

easyTree.prototype.setCookie = function(cookieName, cookieValue, expires, path, domain, secure) {

	document.cookie =

		escape(cookieName) + '=' + escape(cookieValue)

		+ (expires ? '; expires=' + expires.toGMTString() : '')

		+ (path ? '; path=' + path : '')

		+ (domain ? '; domain=' + domain : '')

		+ (secure ? '; secure' : '');

};



// [Cookie] Gets a value from a cookie

easyTree.prototype.getCookie = function(cookieName) {
	var cookieValue = '';
	var posName = document.cookie.indexOf(escape(cookieName) + '=');
	if (posName != -1) {
		var posValue = posName + (escape(cookieName) + '=').length;
		var endPos = document.cookie.indexOf(';', posValue);
		if (endPos != -1) cookieValue = unescape(document.cookie.substring(posValue, endPos));
		else cookieValue = unescape(document.cookie.substring(posValue));
	}
	return (cookieValue);
};



// [Cookie] Returns ids of open nodes as a string
easyTree.prototype.updateCookie = function() {
	var str = '';
	for (var n=0; n<this.aNodes.length; n++) {
		if (this.aNodes[n]._io && this.aNodes[n].pid != this.root.id) {
			if (str) str += '.';
			str += this.aNodes[n].id;
		}
	}
	this.setCookie('co' + this.obj, str);
};



// [Cookie] Checks if a node id is in a cookie

easyTree.prototype.isOpen = function(id) {

	var aOpen = this.getCookie('co' + this.obj).split('.');

	for (var n=0; n<aOpen.length; n++)

		if (aOpen[n] == id) return true;

	return false;

};



// If Push and pop is not implemented by the browser

if (!Array.prototype.push) {

	Array.prototype.push = function array_push() {

		for(var i=0;i<arguments.length;i++)

			this[this.length]=arguments[i];

		return this.length;

	}

};

if (!Array.prototype.pop) {

	Array.prototype.pop = function array_pop() {

		lastElement = this[this.length-1];

		this.length = Math.max(this.length-1,0);

		return lastElement;

	}

};

function klapVak_toggle(parentElm, blockID)
{
    var blockElm = document.getElementById(blockID);
    if (blockElm.style.display == 'none')
    {
        blockElm.style.display = 'block';
        parentElm.className='';
    }
    else
    {
        blockElm.style.display = 'none';
        parentElm.className='down';
    }
};

function klapVak_down(parentElm, blockID)
{
    var blockElm = document.getElementById(blockID);
    if (blockElm.style.display == 'none')
    {
        blockElm.style.display = 'block';
        parentElm.className='';
    }
};
var waiting_for_scroller_setmessage=false;
// pause scroller 
function pausescroller(content, divId, divClass, delay){

this.content=content; //message array content
this.tickerid=divId; //ID of ticker div to display information
this.delay=delay; //Delay between msg change, in miliseconds.
//this.delay=100000;
this.mouseoverBol=1; //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1; //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div>')
document.write('<div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[0]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, 0)
}
// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

pausescroller.prototype.animateup=function(){
	var scrollerinstance=this
	//if (this.mouseover==false) {//if mouse is currently over scoller, do nothing (pause it)
		if (scroller_richting==0){
			if (parseInt(this.hiddendiv.style.left)>(this.visibledivtop+1)){
				this.visiblediv.style.left=parseInt(this.visiblediv.style.left)-1+"px"
				this.hiddendiv.style.left=parseInt(this.hiddendiv.style.left)-1+"px"
				setTimeout(function(){scrollerinstance.animateup()}, 60)
			} else{
				this.getinline(this.hiddendiv, this.visiblediv)
				this.swapdivs()
				waiting_for_scroller_setmessage=true;
				setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
			}
		} else if (scroller_richting==1){
			var testwidth=0;
			if (parseInt(this.hiddendiv.style.left)<(testwidth)){
				this.visiblediv.style.left=parseInt(this.visiblediv.style.left)+1+"px"
				this.hiddendiv.style.left=parseInt(this.hiddendiv.style.left)+1+"px"
				setTimeout(function(){scrollerinstance.animateup()}, 60)
			} else{
				this.getinline(this.hiddendiv, this.visiblediv)
				this.swapdivs()
				waiting_for_scroller_setmessage=true;
				setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
			}
		}
	//}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}
pausescroller.prototype.change_direction=function(direction){
	if(direction==scroller_richting){ return;	}
	else{		
		scroller_richting=direction;
		var i=this.hiddendivpointer
		var ceiling=this.content.length
		if (scroller_richting==0){
			if(waiting_for_scroller_setmessage!=true){
				this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
				this.swapdivs();
			}else{
				this.getinline(this.visiblediv, this.hiddendiv)
				var scrollerinstance=this;
				setTimeout(function(){scrollerinstance.setmessage()}, 0)
			}
		}else if (scroller_richting==1){
			if(waiting_for_scroller_setmessage!=true){
				this.hiddendivpointer=(i-1<0)? (ceiling-1) : i-1
				this.swapdivs();
			}else{
				this.getinline(this.visiblediv, this.hiddendiv)
				var scrollerinstance=this;
				setTimeout(function(){scrollerinstance.setmessage()}, 0)
			}
		}
	}
}
pausescroller.prototype.getinline=function(div1, div2){
	if (scroller_richting==0){
		div1.style.left=this.visibledivtop+"px";
// 		alert(this.visibledivtop+"px - "+(Math.max(div1.parentNode.offsetWidth, div1.offsetWidth)));
		div2.style.left=Math.max(div1.parentNode.offsetWidth, div1.offsetWidth)+"px"
	}else if (scroller_richting==1){
		div1.style.left="5px"
		div2.style.left="-"+Math.max(div1.parentNode.offsetWidth, div1.offsetWidth)+"px"
	}
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){
	var scrollerinstance=this
	if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
		setTimeout(function(){scrollerinstance.setmessage()}, 100)
	else{
		if(waiting_for_scroller_setmessage==true){
			waiting_for_scroller_setmessage=false;
			var i=this.hiddendivpointer
			var ceiling=this.content.length
			if (scroller_richting==0){
				this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
			}else if (scroller_richting==1){
				this.hiddendivpointer=(i-1<0)? (ceiling-1) : i-1
			}
			//alert('set divs - pointer van '+i+' naar '+this.hiddendivpointer);
			this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
			this.animateup()
		}
	}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}
