function getAbsoluteLeft(objectId) { // Get an object left position from the upper left viewport corner // Tested with relative and nested objects o = document.getElementById(objectId) oLeft = o.offsetLeft // Get left position from the parent object while(o.offsetParent!=null) { // Parse the parent hierarchy up to the document element oParent = o.offsetParent // Get parent object reference oLeft += oParent.offsetLeft // Add parent left position o = oParent } // Return left postion return oLeft } function getAbsoluteTop(objectId) { // Get an object top position from the upper left viewport corner // Tested with relative and nested objects o = document.getElementById(objectId) oTop = o.offsetTop // Get top position from the parent object while(o.offsetParent!=null) { // Parse the parent hierarchy up to the document element oParent = o.offsetParent // Get parent object reference oTop += oParent.offsetTop // Add parent top position o = oParent } // Return top position return oTop } //UDMv3.5 //**DO NOT EDIT THIS ***** if (!exclude) { //******** //************************ /////////////////////////////////////////////////////////////////////////// // // ULTIMATE DROPDOWN MENU VERSION 3.5 by Brothercake // This is a special version for Dynamic Drive (http://www.dynamicdrive.com) // // Link-wrapping routine by Brendan Armstrong // Original KDE modifications by David Joham // Opera reload/resize based on a routine by Michael Wallner // Select-element hiding routine by Huy Do // /////////////////////////////////////////////////////////////////////////// // *** POSITIONING AND STYLES ********************************************* var menuALIGN = "left"; // alignment var absLEFT = getAbsoluteLeft("menulocation") - 35; // absolute left or right position (if menu is left or right aligned) var absTOP = getAbsoluteTop("menulocation"); // absolute top position var staticMENU = false; // static positioning mode (ie5,ie6 and ns4 only) var stretchMENU = false; // show empty cells var showBORDERS = false; // show empty cell borders var baseHREF = "http://www.istv.com/topmenu/"; // base path to .js files for the script (ie: resources/) var zORDER = 1000; // base z-order of nav structure (not ns4) var mCOLOR = "#666666"; // main nav cell color var rCOLOR = "#333333"; // main nav cell rollover color var bSIZE = 0; // main nav border size var bCOLOR = "black" // main nav border color var aLINK = "white"; // main nav link color var aHOVER = ""; // main nav link hover-color (dual purpose) var aDEC = "none"; // main nav link decoration var fFONT = "arial"; // main nav font face var fSIZE = 12; // main nav font size (pixels) var fWEIGHT = "bold" // main nav font weight var tINDENT = 0; // main nav text indent (if text is left or right aligned) var vPADDING = 2; // main nav vertical cell padding var vtOFFSET = 0; // main nav vertical text offset (+/- pixels from middle) var keepLIT = true; // keep rollover color when browsing menu var vOFFSET = 1; // shift the submenus vertically var hOFFSET = 1; // shift the submenus horizontally var smCOLOR = "#666666"; // submenu cell color var srCOLOR = "#333333"; // submenu cell rollover color var sbSIZE = 0; // submenu border size var sbCOLOR = "black" // submenu border color var saLINK = "white"; // submenu link color var saHOVER = ""; // submenu link hover-color (dual purpose) var saDEC = "none"; // submenu link decoration var sfFONT = "arial";// submenu font face var sfSIZE = 12; // submenu font size (pixels) var sfWEIGHT = "bold" // submenu font weight var stINDENT = 4; // submenu text indent (if text is left or right aligned) var svPADDING = 2; // submenu vertical cell padding var svtOFFSET = 0; // submenu vertical text offset (+/- pixels from middle) var shSIZE = 2; // submenu drop shadow size var shCOLOR = "#cccccc"; // submenu drop shadow color var shOPACITY = 75; // submenu drop shadow opacity (not ie4,ns4 or opera) var keepSubLIT = true; // keep submenu rollover color when browsing child menu var chvOFFSET = -12; // shift the child menus vertically var chhOFFSET = 2; // shift the child menus horizontally var openTIMER = 10; // [** new **] menu opening delay time (not ns4/op5/op6) var openChildTIMER = 20; // [** new **] child-menu opening delay time (not ns4/op5/op6) var closeTIMER = 330; // menu closing delay time var cellCLICK = true; // links activate on TD click var aCURSOR = "hand"; // cursor for active links (not ns4 or opera) var altDISPLAY = ""; // where to display alt text var allowRESIZE = mu; // allow resize/reload var redGRID = false; // show a red grid var gridWIDTH = 760; // override grid width var gridHEIGHT = 500; // override grid height var documentWIDTH = 0; // override document width var hideSELECT = false; // auto-hide select boxes when menus open (ie only) var allowForSCALING = false; // allow for text scaling in gecko browsers var allowPRINTING = false; // allow the navbar and menus to print (not ns4) var arrWIDTH = 13; // [** new **] arrow width (not ns4/op5/op6) var arrHEIGHT = 13; // [** new **] arrow height (not ns4/op5/op6) var arrHOFFSET = -1; // [** new **] arrow horizontal offset (not ns4/op5/op6) var arrVOFFSET = -3; // [** new **] arrow vertical offset (not ns4/op5/op6) var arrVALIGN = "middle"; // [** new **] arrow vertical align (not ns4/op5/op6) var arrLEFT = "<"; // [** new **] left arrow (not ns4/op5/op6) var arrRIGHT = ">"; // [** new **] right arrow (not ns4/op5/op6) //** LINKS *********************************************************** // add main link item ("url","Link name",width,"text-alignment","_target","alt text",top position,left position,"key trigger","mCOLOR","rCOLOR","aLINK","aHOVER") [** last four are new **] addMainItem("http://www.istv.com/index2.php","Home",45,"center","","",0,0,"","","","",""); addMainItem("http://www.istv.com/videos.php","Videos",50,"center","","",0,0,"","","","",""); addMainItem("http://www.istv.com/coppermine","Photo Gallery",90,"center","","",0,0,"","","","",""); addMainItem("http://www.istv.com/sports_bmx_stats.php","Race Results",90,"center","","",0,0,"","","","",""); addMainItem("http://www.istv.com/radio.php","Radio",45,"center","","",0,0,"","","","",""); // add main link item ("url","Link name",width,"text-alignment","_target","alt text",top position,left position,"key trigger","mCOLOR","rCOLOR","aLINK","aHOVER") [** last four are new **] addMainItem("http://www.istv.com/events_bmx.php","Schedules",70,"center","","",0,0,"","","","",""); //addMainItem("http://www.istv.com/interviews.php","Interviews",70,"center","","",0,0,"","","","",""); addMainItem("http://www.istv.com/news.php","News Center",90,"center","","",0,0,"","","","",""); /* addMainItem("","Shows",50,"center","","",0,0,"","","","",""); // define submenu properties (width,"align to edge","text-alignment",v offset,h offset,"filter","smCOLOR","srCOLOR","sbCOLOR","shCOLOR","saLINK","saHOVER") [** last six are new **] defineSubmenuProperties(100,"left","left",0,0,"","","","","","",""); // add submenu link items ("url","Link name","_target","alt text") addSubmenuItem("http://www.istv.com/shows_hayashi.php","Inside Track","",""); addSubmenuItem("http://www.istv.com/shows_worldride.php","Worldride","",""); addSubmenuItem("http://www.istv.com/shows_excess.php","Excess Lives","",""); addSubmenuItem("http://www.istv.com/shows_specials.php","Specials","",""); */ addMainItem("http://www.istv.com/ask_the_pro.php","Ask The Pro",80,"center","","",0,0,"","","","",""); // addMainItem("http://www.istv.com/contests.php","Contests",65,"center","","",0,0,"","","","",""); addMainItem("","More Sports",90,"center","","",0,0,"","","","",""); // define submenu properties (width,"align to edge","text-alignment",v offset,h offset,"filter","smCOLOR","srCOLOR","sbCOLOR","shCOLOR","saLINK","saHOVER") [** last six are new **] defineSubmenuProperties(200,"left","left",0,0,"","","","","","",""); // addSubmenuItem("http://www.thewfc.com","WFC","",""); addSubmenuItem("","SKATEBOARDING (coming soon)","",""); addSubmenuItem("","MOTOCROSS (coming soon)","",""); addSubmenuItem("","SKIMBOARDING (coming soon)","",""); addSubmenuItem("","SURFING (coming soon)","",""); addSubmenuItem("","MOUNTAIN BIKING (coming soon)","",""); addMainItem("https://secure.istv.com/subscribe.php","Subscribe",70,"center","","",0,0,"","","","",""); //**DO NOT EDIT THIS ***** }//*********************** //************************