// // /udm-resources/udm-custom.js // // UDMv4.5 // /***************************************************************/ var um={'menuClasses':[],'itemClasses':[],'menuCode':[]}; /***************************************************************\ ULTIMATE DROP DOWN MENU Version 4.5 by Brothercake http://www.udm4.com/ This script may not be used or distributed without license \***************************************************************/ /***************************************************************\ * CORE CONFIGURATION \***************************************************************/ //path to images folder um.baseSRC = "/udm-resources/"; //initialization trigger element ["id"]; um.trigger = "contact"; //navbar orientation um.orientation = [ "horizontal", // alignment ["vertical"|"horizontal"|"popup"|"expanding"] "left", // h align ["left"|"right"|"rtl"] "top", // v align ["top"|"bottom"] "relative", // positioning ["relative"|"absolute"|"fixed"|"allfixed"] "10px", // x position ["em"|"ex"|"px"|"0"] "0px", // y position ["em"|"ex"|"px"|"0"] "1000", // z order ["0" to "10000"] (menu takes 20000 headroom) ]; //navbar list output um.list = [ "flexible", // horizontal overflow ["rigid"|"flexible"] "yes", // -SPARE- "no", // -SPARE- ]; //menu behaviors um.behaviors = [ "200", // open timer ["milliseconds"|"0"] "500", // close timer ["milliseconds"|"never"|"0"] "yes", // reposition menus to stay inside the viewport ["yes"|"no"] "default", // manage windowed controls for win/ie ["default","hide","iframe","none"] ]; //reset behaviors um.reset = [ "yes", // reset from document mouse click ["yes"|"no"] "yes", // reset from window resize ["yes"|"no"] "yes", // reset from text resize ["yes"|"no"] "no", // reset after following link ["yes"|"no"] ]; //horizontal continuation strip um.hstrip = [ "none", // background ["color"|"#hex"|"rgb()"|"image.gif"|"none"] "yes", // copy item margin-right to margin-bottom ["yes"|"no"] ]; /***************************************************************\ * MODULE SETTINGS \***************************************************************/ //keyboard navigation um.keys = [ "38", // up ["n"] ("38" = up arrow key) "39", // right ["n"] ("39" = right arrow key) "40", // down ["n"] ("40" = down arrow key) "37", // left ["n"] ("37" = left arrow key) "123", // hotkey ["n"] ("123" = F12) "none", // hotkey modifier ["none"|"shiftKey"|"ctrlKey"|"altKey"|"metaKey"] "27", // escape ["n"|"none"] ("27" = escape key) "document.getElementsByTagName('a')[4]", // exit focus ["js-expression"] ]; /***************************************************************\ * NAVBAR DEFAULT STYLES \***************************************************************/ //styles which apply to the navbar um.navbar = [ "6", // nav to menu x-offset (+-)["n" pixels] "0", // nav to menu y-offset (+-)["n" pixels] "", // width ["em"|"ex"|"px"] (vertical navbar only - horizontal navbar items have "auto" width) ("%" doesn't work right) ]; //styles which apply to each navbar item um.items = [ "0", // margin between items ["n" pixels] "0", // border size ["n" pixels] (single value only) "collapse", // border collapse ["collapse"|"separate"] (only applies when margin = "0") "",// border colors ["color"|"#hex"|"rgb()"] (single, double or four values) "", // border styles ["solid"|"double"|"dotted"|"dashed"|"groove"|"ridge"|"inset"|"outset"] (single, double or four values; be careful with using "none") "",// hover/focus border colors ["color"|"#hex"|"rgb()"] (single, double or four values) "", // hover/focus border styles ["solid"|"double"|"dotted"|"dashed"|"groove"|"ridge"|"inset"|"outset"] (single, double or four values; be careful with using "none") "",// visited border colors ["color"|"#hex"|"rgb()"] (single, double or four values) "",// visited border styles ["solid"|"double"|"dotted"|"dashed"|"groove"|"ridge"|"inset"|"outset"] (single, double or four values; be careful with using "none") "6", // left/right padding ["n" pixels] (single value only) "10", // top/bottom padding ["n" pixels] (single value only) "",// background ["color"|"#hex"|"rgb()"|"image.gif"] "",// hover/focus background ["color"|"#hex"|"rgb()"|"image.gif"] "",// visited background ["color"|"#hex"|"rgb()"|"image.gif"] "0.9em", // font size ["em"|"ex"|"%"|"px"|"pt"|"absolute-size"|"relative-size"] "",// font family ["font1,font2,font3"] (always end with a generic family name) "", // font weight ["normal"|"bold"|"bolder"|"lighter|"100" to "900"] "none", // text decoration ["none"|"underline"|"overline"|"line-through"] "left", // text-align ["left"|"right"|"center"] "#008000", // color ["color"|"#hex"|"rgb()"] "", // hover/focus color ["color"|"#hex"|"rgb()"] "#fff", // visited color ["color"|"#hex"|"rgb()"] "normal", // font-style ["normal"|"italic"|"oblique"] "normal", // hover/focus font-style ["normal"|"italic"|"oblique"] "normal", // visited font-style ["normal"|"italic"|"oblique"] "color:white;",// additional link CSS (careful!) "",// additional hover/focus CSS (careful!) "",// additional visited CSS (careful!) "none",// menu indicator character/image ["text"|"image.gif"|"none"] "none",// menu indicator rollover image ["image.gif"|"none"] (only when using image arrows) "7", // clipping width of indicator image ["n" pixels] (only when using image arrows) "..", // alt text of indicator image ["text"] (only when using image arrows) ]; /***************************************************************\ * MENU DEFAULT STYLES \***************************************************************/ //styles which apply to each menu um.menus = [ "-7", // menu to menu x-offset (+-)["n" pixels] "3", // menu to menu y-offset (+-)["n" pixels] "3", // border size ["n" pixels] (single value only) "#153152",// border colors ["color"|"#hex"|"rgb()"] (single, double or four values) "solid", // border styles ["solid"|"double"|"dotted"|"dashed"|"groove"|"ridge"|"inset"|"outset"] (single, double or four values; be careful with using "none") "9.8em", // width ["em"|"ex"|"px"] "5", // padding ["n" pixels] (single value only) "#fff", // background ["color"|"#hex"|"rgb()"|"image.gif"] "border-top: 1px;", // additional menu CSS (careful!) (you can use a transition here but *not* a static filter) "shadow.png",// shadow background ["color"|"#hex"|"rgb()"|"image.gif"|"none"] "2px", // shadow offset (+-)["em"|"ex"|"px"|"%"|"0"] "filter:alpha(opacity=50);",// additional shadow layer CSS (if you use a Microsoft.Shadow filter here then Win/IE5.5+ will do that *instead* of default shadow) ]; //styles which apply to each menu item um.menuItems = [ "0", // margin around items ["n" pixels] (single value only; margins are like table cellspacing) "1", // border size ["n" pixels] (single value only) "collapse", // border collapse ["collapse"|"separate"] (only applies when margin = "0") "#e5e5e5", // border colors ["color"|"#hex"|"rgb()"] (single, double or four values) "solid", // border styles ["solid"|"double"|"dotted"|"dashed"|"groove"|"ridge"|"inset"|"outset"] (single, double or four values; be careful with using "none") "#ccc", // hover/focus border colors ["color"|"#hex"|"rgb()"] (single, double or four values) "solid", // hover/focus border styles ["solid"|"double"|"dotted"|"dashed"|"groove"|"ridge"|"inset"|"outset"] (single, double or four values; be careful with using "none") "#e5e5e5", // visited border colors ["color"|"#hex"|"rgb()"] (single, double or four values) "solid", // visited border styles ["solid"|"double"|"dotted"|"dashed"|"groove"|"ridge"|"inset"|"outset"] (single, double or four values; be careful with using "none") "7", // left/right padding ["n" pixels] (single value only) "3", // top/bottom padding ["n" pixels] (single value only) "transparent", // background ["color"|"#hex"|"rgb()"|"image.gif"] "#e5e5e5", // hover/focus background ["color"|"#hex"|"rgb()"|"image.gif"] "transparent", // visited background ["color"|"#hex"|"rgb()"|"image.gif"] "75%", // font size ["em"|"ex"|"%"|"px"|"pt"|"absolute-size"|"relative-size"] "arial,sans-serif",// font family ["font1,font2,font3"] (always end with a generic family name) "normal", // font weight ["normal"|"bold"|"bolder"|"lighter|"100" to "900"] "none", // text decoration ["none"|"underline"|"overline"|"line-through"] "left", // text-align ["left"|"right"|"center"] "#000", // color ["color"|"#hex"|"rgb()"] "#000", // hover/focus color ["color"|"#hex"|"rgb()"] "#000", // visited color ["color"|"#hex"|"rgb()"] "normal", // font-style ["normal"|"italic"|"oblique"] "normal", // hover/focus font-style ["normal"|"italic"|"oblique"] "normal", // visited font-style ["normal"|"italic"|"oblique"] "", // additional link CSS (careful!) "", // additional hover/focus CSS (careful!) "", // additional visited CSS (careful!) "right-green.gif",// submenu indicator character/image ["text"|"image.gif"|"none"] "right-black.gif",// submenu indicator rollover image ["image.gif"|"none"] (only when using image arrows) "3", // clipping width of indicator image ["n" pixels] (only when using image arrows) "..", // alt text of indicator image ["text"] (only when using image arrows) ]; /***************************************************************\ * MENU CLASSES \***************************************************************/ //classes which apply to menus um.menuClasses["orangeMenu"] = [ "#fdcb95 #a97742 #a97742 #fdcb95",// border colors ["color"|"#hex"|"rgb()"] "solid", // border styles ["solid"|"double"|"dotted"|"dashed"|"groove"|"ridge"|"inset"|"outset"] (single, double or four values; be careful with using "none") "8em", // width ["em"|"ex"|"px"] "#fec", // background ["color"|"#hex"|"rgb()"|"image.gif"] "",// additional menu CSS (careful!) (you can use a transition here but *not* a static filter) "orangeshadow.png",// shadow background ["color"|"#hex"|"rgb()"|"image.gif"|"none"] "2px", // shadow offset (+-)["em"|"ex"|"px"|"%"|"0"] "filter:alpha(opacity=50);", // additional shadow layer CSS (if you use a Microsoft.Shadow filter here then Win/IE5.5+ will do that *instead* of default shadow) ]; //classes which apply to menu items um.itemClasses["orangeMenuItem"] = [ "#fec", // border colors ["color"|"#hex"|"rgb()"] (single, double or four values) "solid", // border styles ["solid"|"double"|"dotted"|"dashed"|"groove"|"ridge"|"inset"|"outset"] (single, double or four values; be careful with using "none") "#edbb85", // hover/focus border colors ["color"|"#hex"|"rgb()"] (single, double or four values) "solid", // hover/focus border styles ["solid"|"double"|"dotted"|"dashed"|"groove"|"ridge"|"inset"|"outset"] (single, double or four values; be careful with using "none") "#fec", // visited border colors ["color"|"#hex"|"rgb()"] (single, double or four values) "solid", // visited border styles ["solid"|"double"|"dotted"|"dashed"|"groove"|"ridge"|"inset"|"outset"] (single, double or four values; be careful with using "none") "#fec", // background ["color"|"#hex"|"rgb()"|"image.gif"] "#f8fbd0", // hover/focus background ["color"|"#hex"|"rgb()"|"image.gif"] "#fec", // visited background ["color"|"#hex"|"rgb()"|"image.gif"] "70%", // font size ["em"|"ex"|"%"|"px"|"pt"|"absolute-size"|"relative-size"] "tahoma,sans-serif",// font family ["font1,font2,font3"] (always end with a generic family name) "normal", // font weight ["normal"|"bold"|"bolder"|"lighter|"100" to "900"] "none", // text decoration ["none"|"underline"|"overline"|"line-through"] "left", // text-align ["left"|"right"|"center"] "#803090", // color ["color"|"#hex"|"rgb()"] "#5656bd", // hover/focus color ["color"|"#hex"|"rgb()"] "#803090", // visited color ["color"|"#hex"|"rgb()"] "normal", // font-style ["normal"|"italic"|"oblique"] "normal", // hover/focus font-style ["normal"|"italic"|"oblique"] "normal", // visited font-style ["normal"|"italic"|"oblique"] "", // additional link CSS (careful!) "", // additional hover/focus CSS (careful!) "", // additional visited CSS (careful!) "right-purple.gif",// submenu indicator character/image ["text"|"image.gif"|"none"] (must be the same type as default submenu indicator) "right-blue.gif",// submenu indicator rollover image ["image.gif"|"none"] (only when using image arrows) "..", // alt text of indicator image ["text"] (only when using image arrow) ]; /***************************************************************\ * DYNAMIC MENUS \***************************************************************/ /***************************************************************\ \***************************************************************/ // // /udm-resources/udm-control.js // // UDMv4.52 // /////////////////////////////////////////////////////////////////// // // // ULTIMATE DROP DOWN MENU Version 4.52 by Brothercake // // http://www.udm4.com/ // // // // This script may not be used or distributed without license // // // /////////////////////////////////////////////////////////////////// //########################################################## //*** YOU WILL ALMOST-CERTAINLY NEED TO UPDATE //*** SERVER-SIDE GENERATORS WHENEVER YOU CHANGE THIS //########################################################## //*** DO NOT REMOVE //start or //stop OR SIMILAR COMMENTS //udm tree global var var umTree=null; //ready state flag for popup alignment //and for shielding unsupported browsers from interactive scripting //because for them it's never true um.ready=0; //cpstart //parseInt shortcut function um.pi=function(n){n=parseInt(n,10);return (isNaN(n)?0:n);}; //'undefined' um.un='undefined'; //document um.m=document; //cpstop //getElementById um.gd=function(n){return um.m.getElementById(n);}; //make it displayed/non-displayed um.xd=function(n){n.style.display='block';}; um.xn=function(n){n.style.display='none';}; //make it visible/invisible um.xv=function(n){n.style.visibility='visible';}; um.xh=function(n){n.style.visibility='hidden';}; //is this a navbar element um.ne=function(n){return n.parentNode.className=='udm';}; //cpstart //check for undefined new variables if(typeof um.reset==um.un){um.reset=['yes','yes','yes'];} if(typeof um.hstrip==um.un){um.hstrip=['none','yes'];} //CHANGED if(typeof um.reset[3]==um.un){um.reset[3]='no';} //process and copy all custom vars //both so that we can process them more efficiently //and so we'll have shortcut-names to reduce the code size //create an array of custom.js array names //so we can reference um.something == um['something'] == um[um.cx[i]] // 0-6 7-9 10-13 14-16 17-48 49-60 61-92 um.cx=['orientation','list','behaviors','navbar','items','menus','menuItems','menuClasses','itemClasses']; //compact array for custom vars um.ei=0;um.e=[]; //compact matrix for classes um.v=[];um.w=[]; //count ad-hoc classes um.vl=0; um.wl=0; //image objects array for caching um.ek=0;um.im=[]; //process vars method um.pcv=function(v) { //using regex literals here,because mac/ie5.0 //appears not to garbage collect the RegExp constructor properly //if it's a number variable if(v&&/^[+\-]?[0-9]+$/.test(v)) { //turn it into a number v=um.pi(v); //if this is open or close timer //and it's less than 1 set it to 1 //having a minimum value prevents a potential //shadow-displacement problem with popup alignment //and also saves a few snips of code in udm-dom.js //and also prevents negative numbers if((um.ei==10||um.ei==11)&&v<1){v=1;} } //if it's an image if(v&&/\.(gif|png|mng|jpg|jpeg|jpe|bmp)/i.test(v)) { //cache image objects in an array because image loading is asynchronous //so it might not have finished before this comes round again um.im[um.ek]=new Image; um.im[um.ek++].src=um.baseSRC+v; } return v; }; //cpstop //identify dom support//exclude HPR3.04 because its JS capabilities get in the way of good accessibility through graceful degrading um.d=(typeof um.m.getElementById!=um.un&&(typeof um.m.createElement!=um.un||typeof um.m.createElementNS!=um.un)&&typeof navigator.IBM_HPR==um.un); //get UA string - used with caution :) um.u=navigator.userAgent.toLowerCase(); //need to exclude O6,because it declares support for createElement() //but can't actually add the created element to the page //this var includes O5 for convenience's sake um.o5=/opera[\/ ][56]/.test(um.u); um.k=(navigator.vendor=='KDE'); //CHANGED: if(um.o5||um.k){um.d=0;} if(um.o5){um.d=0;} //browsers which support the basic navbar styling //CHANGED: um.b=(um.d||um.o5||um.k); um.b=(um.d||um.o5); //hide static menus for netscape 4 and other primitive CSS browsers //CHANGED: if(um.list[2]=='yes'&&!(um.d||um.b)) //{ // document.write(''); //} //identify specific browsers - these are used to exclude from a feature or add in a hack, //on the basis that everything is assumed to work right unless it's known not to //opera 7 or later um.o7=(um.d&&typeof window.opera!=um.un); //opera 7.5+ supports clip properly,so clip-based extensions can now be supported um.o75=0; //opera 7.3 supports