/** * CSShiarchMenu v0.3 * written by: me[AT]daantje[DOT]nl * last update: Sun May 29 13:04:00 CEST 2005 * * Documentation: * Build this small script cause all the gpl-ed scripts I found where too big * and had too many options I never going to use, or the config for the menu * was not easy to set with a PHP routine. * * License: * Use this script any way you like... */ //declare var submenu = new Array(); var tmr = new Array(); var adj = new Array(); var last_zIndex = 10000; var lastOverId = ''; // EXAMPLE CONFIG var menuWidth = 160; //width of submenu in pixels var alignSubmenu = 'bottom'; //bottom or right side of the main button. var useLastItemCSS = true; //generate last menu item too //if false, it will behave as a normal item //and the css menuItemLast class will not be used //first submenu tree //second submenu tree submenu['menu2'] = new Array(); submenu['menu2'][0] = menuItem('Ausstellung','/pages/ausstell.asp','_self'); submenu['menu2'][1] = menuItem('AGB','/pages/agb.asp','_self'); submenu['menu2'][2] = menuItem('Service pur','/pages/argument.asp','_self'); //second submenu tree submenu['menu3'] = new Array(); submenu['menu3'][0] = menuItem('Angebot','shop/angebote.asp','_self'); submenu['menu3'][1] = menuItem('Katalog','/pages/argument.asp','_self'); //second submenu tree submenu['menu4'] = new Array(); submenu['menu4'][0] = menuItem('Berater','#','_self'); submenu['menu4'][1] = menuItem('News','#','_self'); submenu['menu4'][2] = menuItem('Newsletter','#','_self'); submenu['menu4'][3] = menuItem('Umfrage','#','_self'); //build or unhide submenu div... function buildSubmenu(obj){ lastOverId = obj.id; //get common part of div id menuPath = obj.id.split('_'); //unset mousout of parent menus and make sure they are visible... x = "div"; for(i=0;i" + m[i][0] + ""; adj[i] = obj.id + "_" + i; } //insert new menu subObj.innerHTML = content; //make all just made div's the same width... for(i=0;i=0 && navigator.userAgent.indexOf('Opera')==-1){ document.onmouseover = function(){ obj = event.srcElement; if(obj.className == 'menuItemFirst' || obj.className == 'menuItem' || obj.className == 'menuItemLast') obj.className+='Over'; } document.onmouseout = function(){ obj = event.srcElement; if(obj.className == 'menuItemFirstOver' || obj.className == 'menuItemOver' || obj.className == 'menuItemLastOver') obj.className = obj.className.substring(0,(obj.className.length - 4)); } } //*** End of msie patch