<!--
var DHTML = (document.getElementById || document.all || document.layers);

function getObj(name)
{
  if (document.getElementById)
  {
          this.obj = document.getElementById(name);
        this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
        this.obj = document.all[name];
        this.style = document.all[name].style;
  }
  else if (document.layers)
  {
           this.obj = document.layers[name];
           this.style = document.layers[name];
  }
}

function opacity(op_id,opacity,sec_id,newcolor)
{
        if (!DHTML) return;
        var x = new getObj(op_id);
        var y = new getObj(sec_id);
        x.style.filter = 'alpha(opacity='+opacity+')'
        var temp = opacity / 100;
        x.style.opacity = temp;
        y.style.backgroundColor = newcolor;
}

function findPosX(obj)
{
        var curleft = 0;
        if (obj.offsetParent)
        {
                while (obj.offsetParent)
                {
                        curleft += obj.offsetLeft
                        obj = obj.offsetParent;
                }
        }
        else if (obj.x)
                curleft += obj.x;
        return curleft;
}

function opaquelayer(lid,lyr,opacity,newcolor,calledby_hmu)
{
        var bid = new getObj(lyr);
        var newX = findPosX(lid);

        bid.style.top = '52px';
        if(calledby_hmu)
        {
                newX += calledby_hmu;
        }
        newX+= 1;
        bid.style.left = newX + 'px';
        bid.style.filter = 'alpha(opacity='+opacity+')'
        var temp = opacity / 100;
        bid.style.opacity = temp;
        if(newcolor)
        {
                lid.style.backgroundColor = newcolor;
        }
}

function hideMenuItems()
{
        /******************************************************\
        /* Hide menu items depending on the current directory *\
        /* by setting their display to 'none'. Which items are*\
        /* hidden for which directory is hard coded, in the   *\
        /* future its a possibility to use an external file   *\
        /* for easy modification .                            *\
        /******************************************************/

        //browser needs to support DHTML for this to work
        if (!DHTML) return;

        //needed variables
        var addr_str = document.URL;
        var slasharray = new Array();
        var i = 0;
        var j = 0;
        var subdirstart = 0;
        var subdirend = 0;
        var subdir = "";
        var tap = new Array();
        var koffie = new Array();
        var duijnen = new Array();
        var loops = 0;
        var regex1 = "";
        var regex2 = "";
        var regex3 = "";
        var result1 = "";
        var result2 = "";
        var result3 = "";
        var offset = 0;

        //Check for browser, it might be needed to offset the white layer
        var detect = navigator.userAgent.toLowerCase();

        if (checkIt(detect,'konqueror'))
        {
                offset = 0;
        }
        else if (checkIt(detect,'safari'))
        {
                offset = 0;
        }
        else if (checkIt(detect,'omniweb'))
        {
                offset = 0;
        }
        else if (checkIt(detect,'opera'))
        {
                offset = 0;
        }
        else if (checkIt(detect,'webtv'))
        {
                offset = 0;
        }
        else if (checkIt(detect,'icab'))
        {
                offset = 0;
        }
        else if (checkIt(detect,'msie'))
        {
                offset = 0;
        }
        else if (!checkIt(detect,'compatible'))
        {
                offset = 0;
        }
        else
        {
                offset = 0;
        }

        //Look through the url looking for tap, koffie or van_duinen
        regex1 = /tap/gi;
        result1 = addr_str.search(regex1)
        regex2 = /koffie/gi;
        result2 = addr_str.search(regex2)
        regex3 = /van_duijnen/gi;
        result3 = addr_str.search(regex3)

				directory = '';
        if(result1 != -1)
        {
                directory = 'tap';
        }
        else if(result2 != -1)
        {
                directory = 'koffie';
        }
        else if (result3 != -1)
        {
                directory = 'van_duijnen';
        }
        else
        {
//                alert ('Probleem');
//                directory='';
        }
				
				// Update: 061108. Koffie en tap zijn uit elkaar gehaald en zijn nu een aparte website.
				if (directory != 'van_duijnen')
				{
					directory = 'tap';
				}

        //now detect subdirectory
        for (count = 0; count < addr_str.length; count++)
        {
                if (addr_str.charAt(count) == "/")
                {
                        i++;
                        slasharray[i] = count;
                }
        }
        j = i-1;
        subdirstart = slasharray[j]+1;
        subdirend = slasharray[i];
        subdir = addr_str.substring(subdirstart,subdirend);
        //alert (subdirstart+', '+subdirend+', '+subdir);

        if(directory == "tap")
        {
                //Put the translucent layer over the current sectionlink
                opaquelayer(document.getElementById('link_3'),'opaquelayer2',20,'#0099CC',offset)

                //Create array "tap"
                i=0;
                tap[i] = 'menu_concept';
                i++;
                if(subdir == 'horecaconcept'){
                                tap[i] = 'submenu_combi';
                                i++;
                                tap[i] = 'submenu_rendement';
                                i++;
                }
                tap[i] = 'menu_producten';
                i++;
                if(subdir == 'producten')
                {
                        tap[i] = 'submenu_bierzuil';
                        i++;
                        tap[i] = 'submenu_frisdrankinstallatie';
                        i++;
                        tap[i] = 'submenu_nondrips';
                        i++;
                        tap[i] = 'submenu_wijninstallaties';
                        i++;
                        tap[i] = 'submenu_weeglades';
                        i++;
                        tap[i] = 'submenu_co2';
                        i++;
                        tap[i] = 'submenu_backbars';
                        i++;
                        tap[i] = 'submenu_fustenkasten';
                        i++;
                        tap[i] = 'submenu_onderschuifbuffetten';
                        i++;
                        tap[i] = 'submenu_onderschuifbuffettenglasdeur';
                        i++;
                        tap[i] = 'submenu_wijntapsystemen';
                        i++;
                        tap[i] = 'submenu_modul-line';
                        i++;												
                }
                tap[i] = 'menu_klanten_aan_het_woord_tap';
                i++;
                tap[i] = 'menu_service_tap';
                i++;
                if(subdir == 'service_tap')
                {
//                        tap[i] = 'submenu_servicedienst_tap';
//                        i++;
                }
								
								tap[i]= 'menu_mvo';
                i++;
								
                tap[i] = 'menu_informatie';
                i++;
                tap[i] = 'menu_financieringsregeling';

                //loop through tap array to set display to 'block'
                loops = tap.length;
                for (i=0;i<loops;i++)
                {
                        var x = new getObj(tap[i]);
                        x.style.display = 'block';
                        //alert(x.style);
                }
        }
        else if(directory == "koffie")
        {
                //Put the translucent layer over the current sectionlink
                opaquelayer(document.getElementById('link_2'),'opaquelayer2',20,'#0099CC')

                //Create the array "koffie"
                i=0;
                koffie[i] = 'menu_koffie';
                i++;
                if(subdir == 'subkoffie')
                {
                        koffie[i] = 'submenu_concept';
                        i++;
                        koffie[i] = 'submenu_ingredienten';
                        i++;
                        koffie[i] = 'submenu_koffieautomaten';
                        i++;
//                        koffie[i] = 'submenu_service_koffie';
//                        i++;
                }
                koffie[i] = 'menu_zoet';
                i++;
                koffie[i] = 'menu_thee';
                i++;
                if(subdir == 'zoet_en_fris')
                {
                        koffie[i] = 'submenu_service_zoet';
                        i++;
                }
                koffie[i] = 'menu_water';
                i++;
                if(subdir == 'water')
                {
                        koffie[i] = 'submenu_waterautomaten';
                        i++;
                }
                koffie[i] = 'menu_bestellen';
                i++;

                koffie[i]= 'menu_service_koffie';
                i++;
								
								koffie[i]= 'menu_mvo';
                i++;

                koffie[i] = 'menu_info';
                i++;
                /*if(subdir == 'informatie')
                {
                        koffie[i] = 'submenu_informatie_koffie';
                        i++;
                }*/
                koffie[i] = 'menu_klanten_aan_het_woord_koffie';

                //loop through koffie array to set display to 'block'
                loops = koffie.length;
                for (i=0;i<loops;i++)
                {
                        var x = new getObj(koffie[i]);
                        x.style.display = 'block';
                }
        }
        else if(directory == "van_duijnen")
        {
                //Put the translucent layer over the current sectionlink
                opaquelayer(document.getElementById('link_4'),'opaquelayer2',20,'#0099CC')

                //Create the array "van_duijnen"
                i=0;
                duijnen[i] = 'menu_routebeschrijving';
                i++
                duijnen[i] = 'menu_werken';
                i++
    duijnen[i] = 'menu_sollicitatie';
                i++
                /*if(subdir == 'werken')
                {
                        duijnen[i] = 'submenu_online_solliciteren';
                        i++;
                }*/

                //loop through duijnen array to set display to 'block'
                loops = duijnen.length;
                for (i=0;i<loops;i++)
                {
                        var x = new getObj(duijnen[i]);
                        x.style.display = 'block';
                }

        }
}

function checkIt(detect,string)
{
        var thestring;
        place = detect.indexOf(string) + 1;
        thestring = string;
        return place;
}

function preloadImages() {
   if (document.images) {
      for (var i = 0; i < preloadImages.arguments.length; i++) {
         (new Image()).src = preloadImages.arguments[i];
      }
   }
}

function mouseSquare(self,image,newimage,newcolor)
{
        var x = new getObj(image);
        x.obj.src = newimage;
        self.style.backgroundColor = newcolor;
}

function mouseSquareText(self,newvis,par,newcolor)
{
        var x = new getObj(par);
        x.style.display = newvis;
        self.style.backgroundColor = newcolor;
}
-->