function spawnWindow(URL,Name,features) { 
window.open(URL,Name,features); 
}


function MM_swapImgRestore() {
  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() {
  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) {
  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() {
  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_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' is geen geldig e-mailadres.\n';
      } else if (test!='R') {
        if (isNaN(val)) errors+='- '+nm+' moet een getal bevatten.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (val<min || max<val) errors+='- '+nm+' moet een getal zijn tussen '+min+' en '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is een verplicht veld.\n'; }
  } if (errors) alert('Fout:\n'+errors);
  document.MM_returnValue = (errors == '');
}









<!-- menu items -->

            YAHOO.example.OverlayManager = new YAHOO.widget.OverlayManager();


            // Data used to built product category submenus

            var g_aYProducts = {

                gordijnen: [
                
                    { text: "Gordijnen", url: "producten.php?id=2" },
					 { text: "Inbetweens", url: "producten.php?id=3" },
					  { text: "Rolgordijnen", url: "producten.php?id=4" },
					   { text: "Paneelgordijnen", url: "producten.php?id=5" },
					    { text: "Vouwgordijnen", url: "producten.php?id=15" },
						 { text: "Facette Shades", url: "producten.php?id=21" },
						 { text: "Horren", url: "producten.php?id=22" },
						 { text: "Silhouette Shades", url: "producten.php?id=23" },
						 { text: "Jaloezieën", url: "producten.php?id=6" },
						 { text: "Gordijnjaloezieën", url: "producten.php?id=18" },
						  { text: "Plissé en Duette Shades", url: "producten.php?id=20" },
						 { text: "Wood & Washi", url: "producten.php?id=17" },
					{ text: "Shutters", url: "producten.php?id=7" },
					{ text: "Elektrisch bedienbaar", url: "producten.php?id=16" }
                   

                ],

                vloeren: [

                    
					{ text: "Tapijt", url: "producten.php?id=8" },
					{ text: "Karpet", url: "producten.php?id=19" },
                    { text: "Marmoleum", url: "producten.php?id=9" },
                    { text: "Vinyl", url: "producten.php?id=10" },
                   	{ text: "Vinyl houtdecor", url: "producten.php?id=24" }
                

                ],
				
				     muur: [

                    
					{ text: "Behang", url: "producten.php?id=13" },
                    { text: "Fotobehang", url: "producten.php?id=14" }
                
                

                ],
                
                service: [

                    { text: "Interieuradvies", url: "content.php?cid=1" },
                    { text: "Montage en Transport", url: "content.php?cid=2" },
					{ text: "Onderhoud en nazorg", url: "content.php?cid=3" }
                  

                ],
				
				  inside: [

                    
					{ text: "Over Inside", url: "content.php?cid=4" },
					{ text: "Nieuws", url: "nieuws.php" },
                    { text: "Actuele projecten", url: "fotoboek.php" },
					{ text: "Veel gestelde vragen", url: "content.php?cid=6" },
					{ text: "Vacatures", url: "vacatures.php" },
					{ text: "Contact", url: "content.php?cid=7" }  

                ]
            
            };

            var g_nTimeoutId;


            // "mouseover" event handler for the root menu

            function onMenuBarMouseOver(p_sType, p_aArguments, p_oMenu) {

                if(g_nTimeoutId) {

                    window.clearTimeout(g_nTimeoutId);

                }
            
            }

            // "mouseover" event handler for each submenu

            function onSubmenuMouseOver(p_sType, p_aArguments, p_oMenu) {

                if(g_nTimeoutId) {

                    window.clearTimeout(g_nTimeoutId);

                }

            }


            // "mouseout" event handler for each submenu
            
            function onSubmenuMouseOut(p_sType, p_aArguments, p_oMenu) {

                function hideMenu() {

                    p_oMenu.hide();

                }


                if(g_nTimeoutId) {

                    window.clearTimeout(g_nTimeoutId);

                }

                g_nTimeoutId = window.setTimeout(hideMenu, 750);
            
            }


            // "mousedown" handler for the document

            function onDocumentMouseDown(p_oEvent) {
            
                YAHOO.example.OverlayManager.hideAll();

            }


            // "mouseover" handler for each item in the menu bar

            function onMenuBarItemMouseOver(p_sType, p_aArguments, p_oMenuItem) {
            
                var oActiveItem = this.parent.activeItem;
            
            
                // Hide any other submenus that might be visible
            
                if(oActiveItem && oActiveItem != this) {
            
                    this.parent.clearActiveItem();
            
                }
            
            
                // Select and focus the current MenuItem instance
            
                this.cfg.setProperty("selected", true);
                this.focus();
            
            
                // Show the submenu for this instance
            
                var oSubmenu = this.cfg.getProperty("submenu");
            
                if(oSubmenu) {
            
                    oSubmenu.show();
            
                }
            
            };
        

            // "mouseout" handler for each item in the menu bar
        
            function onMenuBarItemMouseOut(p_sType, p_aArguments, p_oMenuItem) {
            
                this.cfg.setProperty("selected", false);
            
            
                var oSubmenu = this.cfg.getProperty("submenu");
            
                if(oSubmenu) {
            
                    var oDOMEvent = p_aArguments[0],
                        oRelatedTarget = YAHOO.util.Event.getRelatedTarget(oDOMEvent);
            
                    if(
                        !(
                            oRelatedTarget == oSubmenu.element || 
                            this._oDom.isAncestor(oSubmenu.element, oRelatedTarget)
                        )
                    ) {
            
                        oSubmenu.hide();
            
                    }
            
                }
            
            };


            // "load" handler for the window

            function onWindowLoad() {

                var oMenuBar = new YAHOO.widget.MenuBar("yproducts");

                var i = oMenuBar.getItemGroups()[0].length - 1,
                    oMenuItem,
                    oSubmenu,               
                    aSubmenuItems,
                    nSubmenuItems;


                do {

                    oMenuItem = oMenuBar.getItem(i);
                    
                    aSubmenuItems = g_aYProducts[oMenuItem.element.id];

                    if(aSubmenuItems) {
                    
                        // Create a submenu

                        oSubmenu = new YAHOO.widget.Menu(
                                        (oMenuItem.element.id + "menu")
                                    );

                        // Add a "mouseover" event handler to the submenu

                        oSubmenu.mouseOverEvent.subscribe(
                                onSubmenuMouseOver, 
                                oSubmenu, 
                                true
                            );


                        // Add a "mouseout" event handler to the submenu

                        oSubmenu.mouseOutEvent.subscribe(
                                onSubmenuMouseOut,
                                oSubmenu, 
                                true
                            );


                        // Add items to the submenu

                        nSubmenuItems = aSubmenuItems.length;

                        for(var n=0; n<nSubmenuItems; n++) {

                            oSubmenu.addItem(
                                new YAHOO.widget.MenuItem(
                                    aSubmenuItems[n].text, 
                                    { url: aSubmenuItems[n].url}
                                    )
                                );

                        }


                        // Add the submenu to its parent item in the main menu

                        oMenuItem.cfg.setProperty("submenu", oSubmenu);

                        YAHOO.example.OverlayManager.register(oSubmenu);
                        
                    }
                
                }
                while(i--);


                // Render the menubar and corresponding submenus
                
                oMenuBar.render();


                /*
                    Add a "mouseover" and "mouseout" event handler each item 
                    in the menu bar 
                */               

                var aMenuBarItems = oMenuBar.getItemGroups()[0],
                    i = aMenuBarItems.length - 1;

                do {

                    aMenuBarItems[i].mouseOverEvent.subscribe(
                        onMenuBarItemMouseOver
                    );

                    aMenuBarItems[i].mouseOutEvent.subscribe(
                        onMenuBarItemMouseOut 
                    );
                
                }
                while(i--);


                // Add a "mouseover" handler to the menubar

                oMenuBar.mouseOverEvent.subscribe(
                        onMenuBarMouseOver, 
                        oMenuBar, 
                        true
                    );


                // Add a "mousedown" handler to the document

                YAHOO.util.Event.addListener(
                        document, 
                        "mousedown", 
                        onDocumentMouseDown
                    );

            }


            // Add a "load" handler for the window

            YAHOO.util.Event.addListener(window, "load", onWindowLoad);

    
