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_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_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.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];}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}

function MM_setTextOfLayer(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function alertWSize() {
  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 (myWidth + "x" + myHeight);
}

var agt=navigator.userAgent.toLowerCase();
var ie  = (agt.indexOf("msie") != -1);
var ns  = (navigator.appName.indexOf("Netscape") != -1);
var win = ((agt.indexOf("win")!=-1) || (agt.indexOf("32bit")!=-1));
var mac = (agt.indexOf("mac")!=-1);

if (ie && win) {	pluginlist = detectIE("Adobe.SVGCtl","SVG Viewer") + detectIE("SWCtl.SWCtl.1","Shockwave Director") + detectIE("ShockwaveFlash.ShockwaveFlash.1","Shockwave Flash") + detectIE("rmocx.RealPlayer G2 Control.1","RealPlayer") + detectIE("QuickTimeCheckObject.QuickTimeCheck.1","QuickTime") + detectIE("MediaPlayer.MediaPlayer.1","Windows Media Player") + detectIE("PDF.PdfCtrl.5","Acrobat Reader"); }
if (ns || !win) {
		nse = ""; for (var i=0;i<navigator.mimeTypes.length;i++) nse += navigator.mimeTypes[i].type.toLowerCase();
		pluginlist = detectNS("image/svg-xml","SVG Viewer") + detectNS("application/x-director","Shockwave Director") + detectNS("application/x-shockwave-flash","Shockwave Flash") + detectNS("audio/x-pn-realaudio-plugin","RealPlayer") + detectNS("video/quicktime","QuickTime") + detectNS("application/x-mplayer2","Windows Media Player") + detectNS("application/pdf","Acrobat Reader");
}

function detectIE(ClassID,name) { result = false; document.write('<SCRIPT LANGUAGE=VBScript>\n on error resume next \n result = IsObject(CreateObject("' + ClassID + '"))</SCRIPT>\n'); if (result) return name+','; else return ''; }
function detectNS(ClassID,name) { n = ""; if (nse.indexOf(ClassID) != -1) if (navigator.mimeTypes[ClassID].enabledPlugin != null) n = name+","; return n; }

pluginlist += navigator.javaEnabled() ? "Java," : "";
if (pluginlist.length > 0) pluginlist = pluginlist.substring(0,pluginlist.length-1);

function showObj(_o)
{
var _s="";
for(var i in _o)
{
_s+=i+"="+_o[i]+" <BR> ";
}
var _x=window.open();
_x.document.open();
_x.document.write(_s);
_x.document.close();
}
/* Tree View Grid Properties & Functions */
        var plusImage = "../afbeeldingen/plus1.gif";
        var minusImage = "../afbeeldingen/minus1.gif";
        var imageTagPrefix = "img";
        var nodeSeparator = ".";
        var nodeHighlightColor = "";
        var nodeMouseOverColor = "";
        var n = 1;
                                                                                                         
/*      Function to collapse a Node
        Function will be called Recursively till the Last Child of the Node
*/
        function Collapse(Node)
        {
                                objNode = document.getElementById(Node);
                                objNode.style.backgroundColor=nodeHighlightColor;
                                                                                                         
                /* Get n'th child of Node <n starts from 1 till the last child>*/
                objChildNode = document.getElementById(Node + nodeSeparator + n);
                                                                                                         
                /* Get image object of Node */
                objImg  = document.getElementById(imageTagPrefix + nodeSeparator + Node);
                                                                                                         
                /* Check if Child exists. If does not exist then Reset n = 1 & exit function & */
                if(objChildNode != null)
                {
                        /* Toggle the Child Status i.e. if visible then make it invisible & vis-versa */
                        if (objChildNode.style.display == "")
                        {
                                /* Close all the Childs, Sub-Childs and so on of the Node*/
                                if (objImg != null)objImg.src = plusImage;
                                closeAllChilds(Node)
                                return;
                        }else
                        {
                                objChildNode.style.display = "";
                                if (objImg != null)objImg.src = minusImage;
                        }
                        /* Call Collapse for the Next Child be increamenting n*/
                        n = n + 1;
                        Collapse(Node);
                }else n = 1;
        }
                                                                                                         
        /*if p_direction = 0 then Close else Open*/
        function ExplicitCollapse(Node,p_direction)
        {
                                objNode = document.getElementById(Node);
                                objNode.style.backgroundColor="";
                                                                                                         
                objChildNode = document.getElementById(Node + nodeSeparator + n);
                                                                                                         
                objImg  = document.getElementById(imageTagPrefix + nodeSeparator + Node);
                                                                                                         
                if(objChildNode != null)
                {
                        if (p_direction == "0")
                        {
                                objChildNode.style.display = "none";
                                if (objImg != null)objImg.src = plusImage;
                                if(!closeAllChilds(objChildNode.id)) return false;
                        }else
                        {
                                objChildNode.style.display = "";
                                if (objImg != null)objImg.src = minusImage;
                        }
                                                                                                         
                        n = n + 1;
                        ExplicitCollapse(Node,p_direction);
                }else n = 1;
        }
                                                                                                         
/*      Function to close all the childs of a Node
        As Each Child Node ID contains its Parent Node ID, Close all the rows having the Node ID as a prefix in their IDs.
*/
        function closeAllChilds(nNode)
        {       var tempNode,objTempNode,objNode,tempImg,objBody;
                objNode= document.getElementById(nNode);
                objNode.style.backgroundColor="";
                                                                                                         
                /* Get the Parent Element of Node ie. the Table Object */
                objTable = objNode.parentElement?objNode.parentElement:objNode.parentNode;
                                                                                                         
                var browserName=navigator.appName;
                if (browserName=="Microsoft Internet Explorer")
                {
                        tagNm = objTable.tagName;
                }else
                {
                        tagNm = "TBODY";
                }
                                                                                                         
                /* Get the Parent Element is not a Table then exit function */
                if(tagNm.toUpperCase() == "TBODY")
                {
                        /* For each TR of the Table*/
                        for(i=0;i<objTable.rows.length;i++)
                        {
                                /* Get the ID of the TR i.e. Node ID */
                                tempNode = objTable.rows[i].id;
                                                                                                         
                                /* If the ID of the TR contains nNode then make the TR invisible*/
                                if (tempNode != nNode)
                                {       if(tempNode.indexOf(nNode) >= 0)
                                        {       objTempNode     = document.getElementById(tempNode);
                                                tempImg         = document.getElementById(imageTagPrefix
+ nodeSeparator + tempNode);
                                                if (tempImg != null)tempImg.src = plusImage;
                                                objTempNode.style.display = "none";
                                                objTempNode.style.backgroundColor="";
                                        }
                                }
                        }
                }else
                {       alert("Table Tag not found");
                        return false;
                }
                return true;
        }
/*      Function to keep a Node open onLoad
        This function also opens up the corresponding Parent Nodes of that perticular Node
*/
        function OpenNode(strNode,p_direction)
        {       var objNode;
                var arrNode = strNode.split(nodeSeparator);
                var str = "";
                for(i=0;i<arrNode.length;i++){
                        if(str == "")
                        {  str = arrNode[i];
                        }else
                        {
                           str = str + nodeSeparator + arrNode[i];
                        }
                        objNode = document.getElementById(str);
                        if (objNode != null)
                        {
                                if (p_direction == "1")
                                {
                                        ExplicitCollapse(str,p_direction);
                                }else
                                {
                                        Collapse(str);
                                }
                        }
                                                                                                         
                }
        }
                                                                                                         
        function mOver(Node)
        {       objNode = document.getElementById(Node);
                        objNode.style.backgroundColor=nodeMouseOverColor;
        }
        function mOut(Node)
        {               objNode = document.getElementById(Node);
                                objImg  = document.getElementById(imageTagPrefix + nodeSeparator + Node);                               
                                 if (objImg != null)
                                {       strSrc  = objImg.src;
                                        if(strSrc.indexOf(minusImage) < 0)
                                        objNode.style.backgroundColor="";
                                        else
                                        objNode.style.backgroundColor=nodeHighlightColor;
                                }else
                                {
                                        objNode.style.backgroundColor="";
                                }
        }


