http://www.dynamicdrive.com/dynamicindex1/chrome/index.htm
This is all-encompassing so you don't have to download or host the .js files. There are different variations on the chrome menu, but if you want the blue/red/green (or your own color), it'll be do-it-yourself. This color scheme was by done smithktff who was the mastermind behind implementing this to look like cbs commissioner for converts (he should get all the credit).
If you want to use this, you'll be best served by saving the two gif's used on your own webspace and changing the links:
the down arrow & chromemenubg
And then of course you'll need to edit all the links to match it up to your own page
Home Page Message:
CODE
<script language="JavaScript" type="text/javascript">
var cssdropdown={
disappeardelay: 250, //set delay in miliseconds before menu disappears onmouseout
dropdownindicator: '<img src="http://i668.photobucket.com/albums/vv45/quickolas1/downarrow.gif" border="0"/>', //specify full HTML to add to end of each menu item with a drop down menu
enablereveal: [true, 8], //enable swipe effect? [true/false, steps (Number of animation steps. Integer between 1-20. Smaller=faster)]
enableiframeshim: 1, //enable "iframe shim" in IE5.5 to IE7? (1=yes, 0=no)
//No need to edit beyond here////////////////////////
dropmenuobj: null, asscmenuitem: null, domsupport: document.all || document.getElementById, standardbody: null, iframeshimadded: false, revealtimers: {},
getposOffset:function(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
},
css:function(el, targetclass, action){
var needle=new RegExp("(^|\\s+)"+targetclass+"($|\\s+)", "ig")
if (action=="check")
return needle.test(el.className)
else if (action=="remove")
el.className=el.className.replace(needle, "")
else if (action=="add" && !needle.test(el.className))
el.className+=" "+targetclass
},
showmenu:function(dropmenu, e){
if (this.enablereveal[0]){
if (!dropmenu._trueheight || dropmenu._trueheight<10)
dropmenu._trueheight=dropmenu.offsetHeight
clearTimeout(this.revealtimers[dropmenu.id])
dropmenu.style.height=dropmenu._curheight=0
dropmenu.style.overflow="hidden"
dropmenu.style.visibility="visible"
this.revealtimers[dropmenu.id]=setInterval(function(){cssdropdown.revealmenu(dropmenu)}, 10)
}
else{
dropmenu.style.visibility="visible"
}
this.css(this.asscmenuitem, "selected", "add")
},
revealmenu:function(dropmenu, dir){
var curH=dropmenu._curheight, maxH=dropmenu._trueheight, steps=this.enablereveal[1]
if (curH<maxH){
var newH=Math.min(curH, maxH)
dropmenu.style.height=newH+"px"
dropmenu._curheight= newH + Math.round((maxH-newH)/steps) + 1
}
else{ //if done revealing menu
dropmenu.style.height="auto"
dropmenu.style.overflow="hidden"
clearInterval(this.revealtimers[dropmenu.id])
}
},
clearbrowseredge:function(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=document.all && !window.opera? this.standardbody.scrollLeft+this.standardbody.clientWidth-15 : window.pageXOffset+window.innerWidth-15
var dropmenuW=this.dropmenuobj.offsetWidth
if (windowedge-this.dropmenuobj.x < dropmenuW) //move menu to the left?
edgeoffset=dropmenuW-obj.offsetWidth
}
else{
var topedge=document.all && !window.opera? this.standardbody.scrollTop : window.pageYOffset
var windowedge=document.all && !window.opera? this.standardbody.scrollTop+this.standardbody.clientHeight-15 : window.pageYOffset+window.innerHeight-18
var dropmenuH=this.dropmenuobj._trueheight
if (windowedge-this.dropmenuobj.y < dropmenuH){ //move up?
edgeoffset=dropmenuH+obj.offsetHeight
if ((this.dropmenuobj.y-topedge)<dropmenuH) //up no good either?
edgeoffset=this.dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
},
dropit:function(obj, e, dropmenuID){
if (this.dropmenuobj!=null) //hide previous menu
this.hidemenu() //hide menu
this.clearhidemenu()
this.dropmenuobj=document.getElementById(dropmenuID) //reference drop down menu
this.asscmenuitem=obj //reference associated menu item
this.showmenu(this.dropmenuobj, e)
this.dropmenuobj.x=this.getposOffset(obj, "left")
this.dropmenuobj.y=this.getposOffset(obj, "top")
this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"
this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"
this.positionshim() //call iframe shim function
},
positionshim:function(){ //display iframe shim function
if (this.iframeshimadded){
if (this.dropmenuobj.style.visibility=="visible"){
this.shimobject.style.width=this.dropmenuobj.offsetWidth+"px"
this.shimobject.style.height=this.dropmenuobj._trueheight+"px"
this.shimobject.style.left=parseInt(this.dropmenuobj.style.left)+"px"
this.shimobject.style.top=parseInt(this.dropmenuobj.style.top)+"px"
this.shimobject.style.display="block"
}
}
},
hideshim:function(){
if (this.iframeshimadded)
this.shimobject.style.display='none'
},
isContained:function(m, e){
var e=window.event || e
var c=e.relatedTarget || ((e.type=="mouseover")? e.fromElement : e.toElement)
while (c && c!=m)try {c=c.parentNode} catch(e){c=m}
if (c==m)
return true
else
return false
},
dynamichide:function(m, e){
if (!this.isContained(m, e)){
this.delayhidemenu()
}
},
delayhidemenu:function(){
this.delayhide=setTimeout("cssdropdown.hidemenu()", this.disappeardelay) //hide menu
},
hidemenu:function(){
this.css(this.asscmenuitem, "selected", "remove")
this.dropmenuobj.style.visibility='hidden'
this.dropmenuobj.style.left=this.dropmenuobj.style.top="-1000px"
this.hideshim()
},
clearhidemenu:function(){
if (this.delayhide!="undefined")
clearTimeout(this.delayhide)
},
addEvent:function(target, functionref, tasktype){
if (target.addEventListener)
target.addEventListener(tasktype, functionref, false);
else if (target.attachEvent)
target.attachEvent('on'+tasktype, function(){return functionref.call(target, window.event)});
},
startchrome:function(){
if (!this.domsupport)
return
this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
for (var ids=0; ids<arguments.length; ids++){
var menuitems=document.getElementById(arguments[ids]).getElementsByTagName("a")
for (var i=0; i<menuitems.length; i++){
if (menuitems[i].getAttribute("rel")){
var relvalue=menuitems[i].getAttribute("rel")
var asscdropdownmenu=document.getElementById(relvalue)
this.addEvent(asscdropdownmenu, function(){cssdropdown.clearhidemenu()}, "mouseover")
this.addEvent(asscdropdownmenu, function(e){cssdropdown.dynamichide(this, e)}, "mouseout")
this.addEvent(asscdropdownmenu, function(){cssdropdown.delayhidemenu()}, "click")
try{
menuitems[i].innerHTML=menuitems[i].innerHTML+" "+this.dropdownindicator
}catch(e){}
this.addEvent(menuitems[i], function(e){ //show drop down menu when main menu items are mouse over-ed
if (!cssdropdown.isContained(this, e)){
var evtobj=window.event || e
cssdropdown.dropit(this, evtobj, this.getAttribute("rel"))
}
}, "mouseover")
this.addEvent(menuitems[i], function(e){cssdropdown.dynamichide(this, e)}, "mouseout") //hide drop down menu when main menu items are mouse out
this.addEvent(menuitems[i], function(){cssdropdown.delayhidemenu()}, "click") //hide drop down menu when main menu items are clicked on
}
} //end inner for
} //end outer for
if (this.enableiframeshim && document.all && !window.XDomainRequest && !this.iframeshimadded){ //enable iframe shim in IE5.5 thru IE7?
document.write('<IFRAME id="iframeshim" src="about:blank" frameBorder="0" scrolling="no" style="left:0; top:0; position:absolute; display:none;z-index:90; background: transparent;"></IFRAME>')
this.shimobject=document.getElementById("iframeshim") //reference iframe object
this.shimobject.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)'
this.iframeshimadded=true
}
} //end startchrome
}
</script>
<script type="text/javascript">
function ddtabcontent(tabinterfaceid){
this.tabinterfaceid=tabinterfaceid //ID of Tab Menu main container
this.tabs=document.getElementById(tabinterfaceid).getElementsByTagName("a") //Get all tab links within container
this.enabletabpersistence=true
this.hottabspositions=[] //Array to store position of tabs that have a "rel" attr defined, relative to all tab links, within container
this.currentTabIndex=0 //Index of currently selected hot tab (tab with sub content) within hottabspositions[] array
this.subcontentids=[] //Array to store ids of the sub contents ("rel" attr values)
this.revcontentids=[] //Array to store ids of arbitrary contents to expand/contact as well ("rev" attr values)
this.selectedClassTarget="link" //keyword to indicate which target element to assign "selected" CSS class ("linkparent" or "link")
}
ddtabcontent.getCookie=function(Name){
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
if (document.cookie.match(re)) //if cookie found
return document.cookie.match(re)[0].split("=")[1] //return its value
return ""
}
ddtabcontent.setCookie=function(name, value){
document.cookie = name+"="+value+";path=/" //cookie value is domain wide (path=/)
}
ddtabcontent.prototype={
expandit:function(tabid_or_position){ //PUBLIC function to select a tab either by its ID or position(int) within its peers
this.cancelautorun() //stop auto cycling of tabs (if running)
var tabref=""
try{
if (typeof tabid_or_position=="string" && document.getElementById(tabid_or_position).getAttribute("rel")) //if specified tab contains "rel" attr
tabref=document.getElementById(tabid_or_position)
else if (parseInt(tabid_or_position)!=NaN && this.tabs[tabid_or_position].getAttribute("rel")) //if specified tab contains "rel" attr
tabref=this.tabs[tabid_or_position]
}
catch(err){alert("Invalid Tab ID or position entered!")}
if (tabref!="") //if a valid tab is found based on function parameter
this.expandtab(tabref) //expand this tab
},
cycleit:function(dir, autorun){ //PUBLIC function to move foward or backwards through each hot tab (tabinstance.cycleit('foward/back') )
if (dir=="next"){
var currentTabIndex=(this.currentTabIndex<this.hottabspositions.length-1)? this.currentTabIndex+1 : 0
}
else if (dir=="prev"){
var currentTabIndex=(this.currentTabIndex>0)? this.currentTabIndex-1 : this.hottabspositions.length-1
}
if (typeof autorun=="undefined") //if cycleit() is being called by user, versus autorun() function
this.cancelautorun() //stop auto cycling of tabs (if running)
this.expandtab(this.tabs[this.hottabspositions[currentTabIndex]])
},
setpersist:function(bool){ //PUBLIC function to toggle persistence feature
this.enabletabpersistence=bool
},
setselectedClassTarget:function(objstr){ //PUBLIC function to set which target element to assign "selected" CSS class ("linkparent" or "link")
this.selectedClassTarget=objstr || "link"
},
getselectedClassTarget:function(tabref){ //Returns target element to assign "selected" CSS class to
return (this.selectedClassTarget==("linkparent".toLowerCase()))? tabref.parentNode : tabref
},
urlparamselect:function(tabinterfaceid){
var result=window.location.search.match(new RegExp(tabinterfaceid+"=(\\d+)", "i")) //check for "?tabinterfaceid=2" in URL
return (result==null)? null : parseInt(RegExp.$1) //returns null or index, where index (int) is the selected tab's index
},
expandtab:function(tabref){
var subcontentid=tabref.getAttribute("rel") //Get id of subcontent to expand
//Get "rev" attr as a string of IDs in the format ",john,george,trey,etc," to easily search through
var associatedrevids=(tabref.getAttribute("rev"))? ","+tabref.getAttribute("rev").replace(/\s+/, "")+"," : ""
this.expandsubcontent(subcontentid)
this.expandrevcontent(associatedrevids)
for (var i=0; i<this.tabs.length; i++){ //Loop through all tabs, and assign only the selected tab the CSS class "selected"
this.getselectedClassTarget(this.tabs[i]).className=(this.tabs[i].getAttribute("rel")==subcontentid)? "selected" : ""
}
if (this.enabletabpersistence) //if persistence enabled, save selected tab position(int) relative to its peers
ddtabcontent.setCookie(this.tabinterfaceid, tabref.tabposition)
this.setcurrenttabindex(tabref.tabposition) //remember position of selected tab within hottabspositions[] array
},
expandsubcontent:function(subcontentid){
for (var i=0; i<this.subcontentids.length; i++){
var subcontent=document.getElementById(this.subcontentids[i]) //cache current subcontent obj (in for loop)
subcontent.style.display=(subcontent.id==subcontentid)? "block" : "none" //"show" or hide sub content based on matching id attr value
}
},
expandrevcontent:function(associatedrevids){
var allrevids=this.revcontentids
for (var i=0; i<allrevids.length; i++){ //Loop through rev attributes for all tabs in this tab interface
//if any values stored within associatedrevids matches one within allrevids, expand that DIV, otherwise, contract it
document.getElementById(allrevids[i]).style.display=(associatedrevids.indexOf(","+allrevids[i]+",")!=-1)? "block" : "none"
}
},
setcurrenttabindex:function(tabposition){ //store current position of tab (within hottabspositions[] array)
for (var i=0; i<this.hottabspositions.length; i++){
if (tabposition==this.hottabspositions[i]){
this.currentTabIndex=i
break
}
}
},
autorun:function(){ //function to auto cycle through and select tabs based on a set interval
this.cycleit('next', true)
},
cancelautorun:function(){
if (typeof this.autoruntimer!="undefined")
clearInterval(this.autoruntimer)
},
init:function(automodeperiod){
var persistedtab=ddtabcontent.getCookie(this.tabinterfaceid) //get position of persisted tab (applicable if persistence is enabled)
var selectedtab=-1 //Currently selected tab index (-1 meaning none)
var selectedtabfromurl=this.urlparamselect(this.tabinterfaceid) //returns null or index from: tabcontent.htm?tabinterfaceid=index
this.automodeperiod=automodeperiod || 0
for (var i=0; i<this.tabs.length; i++){
this.tabs[i].tabposition=i //remember position of tab relative to its peers
if (this.tabs[i].getAttribute("rel")){
var tabinstance=this
this.hottabspositions[this.hottabspositions.length]=i //store position of "hot" tab ("rel" attr defined) relative to its peers
this.subcontentids[this.subcontentids.length]=this.tabs[i].getAttribute("rel") //store id of sub content ("rel" attr value)
this.tabs[i].onclick=function(){
tabinstance.expandtab(this)
tabinstance.cancelautorun() //stop auto cycling of tabs (if running)
return false
}
if (this.tabs[i].getAttribute("rev")){ //if "rev" attr defined, store each value within "rev" as an array element
this.revcontentids=this.revcontentids.concat(this.tabs[i].getAttribute("rev").split(/\s*,\s*/))
}
if (selectedtabfromurl==i || this.enabletabpersistence && selectedtab==-1 && parseInt(persistedtab)==i || !this.enabletabpersistence && selectedtab==-1 && this.getselectedClassTarget(this.tabs[i]).className=="selected"){
selectedtab=i //Selected tab index, if found
}
}
} //END for loop
if (selectedtab!=-1) //if a valid default selected tab index is found
this.expandtab(this.tabs[selectedtab]) //expand selected tab (either from URL parameter, persistent feature, or class="selected" class)
else //if no valid default selected index found
this.expandtab(this.tabs[this.hottabspositions[0]]) //Just select first tab that contains a "rel" attr
if (parseInt(this.automodeperiod)>500 && this.hottabspositions.length>1){
this.autoruntimer=setInterval(function(){tabinstance.autorun()}, this.automodeperiod)
}
} //END int() function
} //END Prototype assignment
/***********************************************
* Tab Content script v2.2- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
<div class="chromestyle" id="chromemenu">
<ul>
<li><a href="http://www25.myfantasyleague.com/2009/home/69833" rel="dropmenu1">League Home</a></li>
<li><a href="http://www25.myfantasyleague.com/2009/live_scoring?L=69833" rel="dropmenu2">Live Scoring</a></li>
<li><a href="http://football25.myfantasyleague.com/2009/standings?L=69833" rel="dropmenu3">Standings</a></li>
<li><a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=07" rel="dropmenu4">My Team</a></li>
<li><a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=08" rel="dropmenu5">Stats</a></li>
<li><a href="http://football25.myfantasyleague.com/2009/news_articles?L=69833" rel="dropmenu6">Players</a></li>
<li><a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=22" rel="dropmenu7">Schedule</a></li>
<li><a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=120" rel="dropmenu8">Contests</a></li>
<li><a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=50" rel="dropmenu9">Options</a></li>
<li><a href="http://football25.myfantasyleague.com/2009/support?L=69833" rel="dropmenu10">Help</a></li>
</ul>
</div>
<div id="dropmenu1" class="dropmenudiv">
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=26">Rules</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=01">Teams & Owners</a>
<a href="http://football25.myfantasyleague.com/2009/accounting_report?L=69833&TYPE=GRID">Finances</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=17">Draft Results</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=29">Message Board</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=123">Calendar</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=09">Scoring</a>
</div>
<div id="dropmenu2" class="dropmenudiv">
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=169">Preview</a>
<a href="http://football25.myfantasyleague.com/2009/live_scoring?L=69833">GameCenter</a>
<a href="http://football25.myfantasyleague.com/2009/pro_schedule?L=69833">NFL Games</a>
</div>
<div id="dropmenu3" class="dropmenudiv">
<a href="http://football25.myfantasyleague.com/2009/standings?L=69833">Overall</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=20">Bar Chart</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=31">Breakdown</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=101">Power Rank</a>
</div>
<div id="dropmenu4" class="dropmenudiv">
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=02">Set Lineup</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=178">My Watch List</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=46">Add/Drop</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=05">Trade</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=133">On The Block</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=03">Transaction Report</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=118">Service Report</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=105">Roster Grid</a>
</div>
<div id="dropmenu5" class="dropmenudiv">
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=08">Stats</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=117">Roster Trends</a>
</div>
<div id="dropmenu6" class="dropmenudiv">
<a href="http://football25.myfantasyleague.com/2009/news_articles?L=69833">Player News</a>
<a href="http://football25.myfantasyleague.com/2009/options?O=08&CATEGORY=freeagent&L=69833">Free Agents</a>
<a href="http://football25.myfantasyleague.com/2009/player_search?L=69833">Player Search</a>
<a href="http://football25.myfantasyleague.com/2009/injury?L=69833">Injury Report</a>
</div>
<div id="dropmenu7" class="dropmenudiv">
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=15">Full Schedule</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=16">Team Schedule</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=54">Schedule Grid</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=79">Playoff Schedule</a>
</div>
<div id="dropmenu8" class="dropmenudiv">
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=120">Survivor</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=121">NFL Pick'em</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=179">CFL Pick'em</a>
</div>
<div id="dropmenu9" class="dropmenudiv">
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=50">Personal</a>
<a href="http://football25.myfantasyleague.com/2009/menu_page?L=69833&NAME=REPORTS_WIRELESS">Fantasy Alerts</a>
<a href="http://football25.myfantasyleague.com/2009/menu_page?L=69833&NAME=COMMUNICATIONS">Communications</a>
</div>
<div id="dropmenu10" class="dropmenudiv">
<a href="http://football25.myfantasyleague.com/2009/support?L=69833">Help Center</a>
</div>
<script type="text/javascript">
cssdropdown.startchrome("chromemenu")
</script>
var cssdropdown={
disappeardelay: 250, //set delay in miliseconds before menu disappears onmouseout
dropdownindicator: '<img src="http://i668.photobucket.com/albums/vv45/quickolas1/downarrow.gif" border="0"/>', //specify full HTML to add to end of each menu item with a drop down menu
enablereveal: [true, 8], //enable swipe effect? [true/false, steps (Number of animation steps. Integer between 1-20. Smaller=faster)]
enableiframeshim: 1, //enable "iframe shim" in IE5.5 to IE7? (1=yes, 0=no)
//No need to edit beyond here////////////////////////
dropmenuobj: null, asscmenuitem: null, domsupport: document.all || document.getElementById, standardbody: null, iframeshimadded: false, revealtimers: {},
getposOffset:function(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
},
css:function(el, targetclass, action){
var needle=new RegExp("(^|\\s+)"+targetclass+"($|\\s+)", "ig")
if (action=="check")
return needle.test(el.className)
else if (action=="remove")
el.className=el.className.replace(needle, "")
else if (action=="add" && !needle.test(el.className))
el.className+=" "+targetclass
},
showmenu:function(dropmenu, e){
if (this.enablereveal[0]){
if (!dropmenu._trueheight || dropmenu._trueheight<10)
dropmenu._trueheight=dropmenu.offsetHeight
clearTimeout(this.revealtimers[dropmenu.id])
dropmenu.style.height=dropmenu._curheight=0
dropmenu.style.overflow="hidden"
dropmenu.style.visibility="visible"
this.revealtimers[dropmenu.id]=setInterval(function(){cssdropdown.revealmenu(dropmenu)}, 10)
}
else{
dropmenu.style.visibility="visible"
}
this.css(this.asscmenuitem, "selected", "add")
},
revealmenu:function(dropmenu, dir){
var curH=dropmenu._curheight, maxH=dropmenu._trueheight, steps=this.enablereveal[1]
if (curH<maxH){
var newH=Math.min(curH, maxH)
dropmenu.style.height=newH+"px"
dropmenu._curheight= newH + Math.round((maxH-newH)/steps) + 1
}
else{ //if done revealing menu
dropmenu.style.height="auto"
dropmenu.style.overflow="hidden"
clearInterval(this.revealtimers[dropmenu.id])
}
},
clearbrowseredge:function(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=document.all && !window.opera? this.standardbody.scrollLeft+this.standardbody.clientWidth-15 : window.pageXOffset+window.innerWidth-15
var dropmenuW=this.dropmenuobj.offsetWidth
if (windowedge-this.dropmenuobj.x < dropmenuW) //move menu to the left?
edgeoffset=dropmenuW-obj.offsetWidth
}
else{
var topedge=document.all && !window.opera? this.standardbody.scrollTop : window.pageYOffset
var windowedge=document.all && !window.opera? this.standardbody.scrollTop+this.standardbody.clientHeight-15 : window.pageYOffset+window.innerHeight-18
var dropmenuH=this.dropmenuobj._trueheight
if (windowedge-this.dropmenuobj.y < dropmenuH){ //move up?
edgeoffset=dropmenuH+obj.offsetHeight
if ((this.dropmenuobj.y-topedge)<dropmenuH) //up no good either?
edgeoffset=this.dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
},
dropit:function(obj, e, dropmenuID){
if (this.dropmenuobj!=null) //hide previous menu
this.hidemenu() //hide menu
this.clearhidemenu()
this.dropmenuobj=document.getElementById(dropmenuID) //reference drop down menu
this.asscmenuitem=obj //reference associated menu item
this.showmenu(this.dropmenuobj, e)
this.dropmenuobj.x=this.getposOffset(obj, "left")
this.dropmenuobj.y=this.getposOffset(obj, "top")
this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"
this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"
this.positionshim() //call iframe shim function
},
positionshim:function(){ //display iframe shim function
if (this.iframeshimadded){
if (this.dropmenuobj.style.visibility=="visible"){
this.shimobject.style.width=this.dropmenuobj.offsetWidth+"px"
this.shimobject.style.height=this.dropmenuobj._trueheight+"px"
this.shimobject.style.left=parseInt(this.dropmenuobj.style.left)+"px"
this.shimobject.style.top=parseInt(this.dropmenuobj.style.top)+"px"
this.shimobject.style.display="block"
}
}
},
hideshim:function(){
if (this.iframeshimadded)
this.shimobject.style.display='none'
},
isContained:function(m, e){
var e=window.event || e
var c=e.relatedTarget || ((e.type=="mouseover")? e.fromElement : e.toElement)
while (c && c!=m)try {c=c.parentNode} catch(e){c=m}
if (c==m)
return true
else
return false
},
dynamichide:function(m, e){
if (!this.isContained(m, e)){
this.delayhidemenu()
}
},
delayhidemenu:function(){
this.delayhide=setTimeout("cssdropdown.hidemenu()", this.disappeardelay) //hide menu
},
hidemenu:function(){
this.css(this.asscmenuitem, "selected", "remove")
this.dropmenuobj.style.visibility='hidden'
this.dropmenuobj.style.left=this.dropmenuobj.style.top="-1000px"
this.hideshim()
},
clearhidemenu:function(){
if (this.delayhide!="undefined")
clearTimeout(this.delayhide)
},
addEvent:function(target, functionref, tasktype){
if (target.addEventListener)
target.addEventListener(tasktype, functionref, false);
else if (target.attachEvent)
target.attachEvent('on'+tasktype, function(){return functionref.call(target, window.event)});
},
startchrome:function(){
if (!this.domsupport)
return
this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
for (var ids=0; ids<arguments.length; ids++){
var menuitems=document.getElementById(arguments[ids]).getElementsByTagName("a")
for (var i=0; i<menuitems.length; i++){
if (menuitems[i].getAttribute("rel")){
var relvalue=menuitems[i].getAttribute("rel")
var asscdropdownmenu=document.getElementById(relvalue)
this.addEvent(asscdropdownmenu, function(){cssdropdown.clearhidemenu()}, "mouseover")
this.addEvent(asscdropdownmenu, function(e){cssdropdown.dynamichide(this, e)}, "mouseout")
this.addEvent(asscdropdownmenu, function(){cssdropdown.delayhidemenu()}, "click")
try{
menuitems[i].innerHTML=menuitems[i].innerHTML+" "+this.dropdownindicator
}catch(e){}
this.addEvent(menuitems[i], function(e){ //show drop down menu when main menu items are mouse over-ed
if (!cssdropdown.isContained(this, e)){
var evtobj=window.event || e
cssdropdown.dropit(this, evtobj, this.getAttribute("rel"))
}
}, "mouseover")
this.addEvent(menuitems[i], function(e){cssdropdown.dynamichide(this, e)}, "mouseout") //hide drop down menu when main menu items are mouse out
this.addEvent(menuitems[i], function(){cssdropdown.delayhidemenu()}, "click") //hide drop down menu when main menu items are clicked on
}
} //end inner for
} //end outer for
if (this.enableiframeshim && document.all && !window.XDomainRequest && !this.iframeshimadded){ //enable iframe shim in IE5.5 thru IE7?
document.write('<IFRAME id="iframeshim" src="about:blank" frameBorder="0" scrolling="no" style="left:0; top:0; position:absolute; display:none;z-index:90; background: transparent;"></IFRAME>')
this.shimobject=document.getElementById("iframeshim") //reference iframe object
this.shimobject.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)'
this.iframeshimadded=true
}
} //end startchrome
}
</script>
<script type="text/javascript">
function ddtabcontent(tabinterfaceid){
this.tabinterfaceid=tabinterfaceid //ID of Tab Menu main container
this.tabs=document.getElementById(tabinterfaceid).getElementsByTagName("a") //Get all tab links within container
this.enabletabpersistence=true
this.hottabspositions=[] //Array to store position of tabs that have a "rel" attr defined, relative to all tab links, within container
this.currentTabIndex=0 //Index of currently selected hot tab (tab with sub content) within hottabspositions[] array
this.subcontentids=[] //Array to store ids of the sub contents ("rel" attr values)
this.revcontentids=[] //Array to store ids of arbitrary contents to expand/contact as well ("rev" attr values)
this.selectedClassTarget="link" //keyword to indicate which target element to assign "selected" CSS class ("linkparent" or "link")
}
ddtabcontent.getCookie=function(Name){
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
if (document.cookie.match(re)) //if cookie found
return document.cookie.match(re)[0].split("=")[1] //return its value
return ""
}
ddtabcontent.setCookie=function(name, value){
document.cookie = name+"="+value+";path=/" //cookie value is domain wide (path=/)
}
ddtabcontent.prototype={
expandit:function(tabid_or_position){ //PUBLIC function to select a tab either by its ID or position(int) within its peers
this.cancelautorun() //stop auto cycling of tabs (if running)
var tabref=""
try{
if (typeof tabid_or_position=="string" && document.getElementById(tabid_or_position).getAttribute("rel")) //if specified tab contains "rel" attr
tabref=document.getElementById(tabid_or_position)
else if (parseInt(tabid_or_position)!=NaN && this.tabs[tabid_or_position].getAttribute("rel")) //if specified tab contains "rel" attr
tabref=this.tabs[tabid_or_position]
}
catch(err){alert("Invalid Tab ID or position entered!")}
if (tabref!="") //if a valid tab is found based on function parameter
this.expandtab(tabref) //expand this tab
},
cycleit:function(dir, autorun){ //PUBLIC function to move foward or backwards through each hot tab (tabinstance.cycleit('foward/back') )
if (dir=="next"){
var currentTabIndex=(this.currentTabIndex<this.hottabspositions.length-1)? this.currentTabIndex+1 : 0
}
else if (dir=="prev"){
var currentTabIndex=(this.currentTabIndex>0)? this.currentTabIndex-1 : this.hottabspositions.length-1
}
if (typeof autorun=="undefined") //if cycleit() is being called by user, versus autorun() function
this.cancelautorun() //stop auto cycling of tabs (if running)
this.expandtab(this.tabs[this.hottabspositions[currentTabIndex]])
},
setpersist:function(bool){ //PUBLIC function to toggle persistence feature
this.enabletabpersistence=bool
},
setselectedClassTarget:function(objstr){ //PUBLIC function to set which target element to assign "selected" CSS class ("linkparent" or "link")
this.selectedClassTarget=objstr || "link"
},
getselectedClassTarget:function(tabref){ //Returns target element to assign "selected" CSS class to
return (this.selectedClassTarget==("linkparent".toLowerCase()))? tabref.parentNode : tabref
},
urlparamselect:function(tabinterfaceid){
var result=window.location.search.match(new RegExp(tabinterfaceid+"=(\\d+)", "i")) //check for "?tabinterfaceid=2" in URL
return (result==null)? null : parseInt(RegExp.$1) //returns null or index, where index (int) is the selected tab's index
},
expandtab:function(tabref){
var subcontentid=tabref.getAttribute("rel") //Get id of subcontent to expand
//Get "rev" attr as a string of IDs in the format ",john,george,trey,etc," to easily search through
var associatedrevids=(tabref.getAttribute("rev"))? ","+tabref.getAttribute("rev").replace(/\s+/, "")+"," : ""
this.expandsubcontent(subcontentid)
this.expandrevcontent(associatedrevids)
for (var i=0; i<this.tabs.length; i++){ //Loop through all tabs, and assign only the selected tab the CSS class "selected"
this.getselectedClassTarget(this.tabs[i]).className=(this.tabs[i].getAttribute("rel")==subcontentid)? "selected" : ""
}
if (this.enabletabpersistence) //if persistence enabled, save selected tab position(int) relative to its peers
ddtabcontent.setCookie(this.tabinterfaceid, tabref.tabposition)
this.setcurrenttabindex(tabref.tabposition) //remember position of selected tab within hottabspositions[] array
},
expandsubcontent:function(subcontentid){
for (var i=0; i<this.subcontentids.length; i++){
var subcontent=document.getElementById(this.subcontentids[i]) //cache current subcontent obj (in for loop)
subcontent.style.display=(subcontent.id==subcontentid)? "block" : "none" //"show" or hide sub content based on matching id attr value
}
},
expandrevcontent:function(associatedrevids){
var allrevids=this.revcontentids
for (var i=0; i<allrevids.length; i++){ //Loop through rev attributes for all tabs in this tab interface
//if any values stored within associatedrevids matches one within allrevids, expand that DIV, otherwise, contract it
document.getElementById(allrevids[i]).style.display=(associatedrevids.indexOf(","+allrevids[i]+",")!=-1)? "block" : "none"
}
},
setcurrenttabindex:function(tabposition){ //store current position of tab (within hottabspositions[] array)
for (var i=0; i<this.hottabspositions.length; i++){
if (tabposition==this.hottabspositions[i]){
this.currentTabIndex=i
break
}
}
},
autorun:function(){ //function to auto cycle through and select tabs based on a set interval
this.cycleit('next', true)
},
cancelautorun:function(){
if (typeof this.autoruntimer!="undefined")
clearInterval(this.autoruntimer)
},
init:function(automodeperiod){
var persistedtab=ddtabcontent.getCookie(this.tabinterfaceid) //get position of persisted tab (applicable if persistence is enabled)
var selectedtab=-1 //Currently selected tab index (-1 meaning none)
var selectedtabfromurl=this.urlparamselect(this.tabinterfaceid) //returns null or index from: tabcontent.htm?tabinterfaceid=index
this.automodeperiod=automodeperiod || 0
for (var i=0; i<this.tabs.length; i++){
this.tabs[i].tabposition=i //remember position of tab relative to its peers
if (this.tabs[i].getAttribute("rel")){
var tabinstance=this
this.hottabspositions[this.hottabspositions.length]=i //store position of "hot" tab ("rel" attr defined) relative to its peers
this.subcontentids[this.subcontentids.length]=this.tabs[i].getAttribute("rel") //store id of sub content ("rel" attr value)
this.tabs[i].onclick=function(){
tabinstance.expandtab(this)
tabinstance.cancelautorun() //stop auto cycling of tabs (if running)
return false
}
if (this.tabs[i].getAttribute("rev")){ //if "rev" attr defined, store each value within "rev" as an array element
this.revcontentids=this.revcontentids.concat(this.tabs[i].getAttribute("rev").split(/\s*,\s*/))
}
if (selectedtabfromurl==i || this.enabletabpersistence && selectedtab==-1 && parseInt(persistedtab)==i || !this.enabletabpersistence && selectedtab==-1 && this.getselectedClassTarget(this.tabs[i]).className=="selected"){
selectedtab=i //Selected tab index, if found
}
}
} //END for loop
if (selectedtab!=-1) //if a valid default selected tab index is found
this.expandtab(this.tabs[selectedtab]) //expand selected tab (either from URL parameter, persistent feature, or class="selected" class)
else //if no valid default selected index found
this.expandtab(this.tabs[this.hottabspositions[0]]) //Just select first tab that contains a "rel" attr
if (parseInt(this.automodeperiod)>500 && this.hottabspositions.length>1){
this.autoruntimer=setInterval(function(){tabinstance.autorun()}, this.automodeperiod)
}
} //END int() function
} //END Prototype assignment
/***********************************************
* Tab Content script v2.2- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
<div class="chromestyle" id="chromemenu">
<ul>
<li><a href="http://www25.myfantasyleague.com/2009/home/69833" rel="dropmenu1">League Home</a></li>
<li><a href="http://www25.myfantasyleague.com/2009/live_scoring?L=69833" rel="dropmenu2">Live Scoring</a></li>
<li><a href="http://football25.myfantasyleague.com/2009/standings?L=69833" rel="dropmenu3">Standings</a></li>
<li><a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=07" rel="dropmenu4">My Team</a></li>
<li><a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=08" rel="dropmenu5">Stats</a></li>
<li><a href="http://football25.myfantasyleague.com/2009/news_articles?L=69833" rel="dropmenu6">Players</a></li>
<li><a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=22" rel="dropmenu7">Schedule</a></li>
<li><a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=120" rel="dropmenu8">Contests</a></li>
<li><a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=50" rel="dropmenu9">Options</a></li>
<li><a href="http://football25.myfantasyleague.com/2009/support?L=69833" rel="dropmenu10">Help</a></li>
</ul>
</div>
<div id="dropmenu1" class="dropmenudiv">
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=26">Rules</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=01">Teams & Owners</a>
<a href="http://football25.myfantasyleague.com/2009/accounting_report?L=69833&TYPE=GRID">Finances</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=17">Draft Results</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=29">Message Board</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=123">Calendar</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=09">Scoring</a>
</div>
<div id="dropmenu2" class="dropmenudiv">
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=169">Preview</a>
<a href="http://football25.myfantasyleague.com/2009/live_scoring?L=69833">GameCenter</a>
<a href="http://football25.myfantasyleague.com/2009/pro_schedule?L=69833">NFL Games</a>
</div>
<div id="dropmenu3" class="dropmenudiv">
<a href="http://football25.myfantasyleague.com/2009/standings?L=69833">Overall</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=20">Bar Chart</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=31">Breakdown</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=101">Power Rank</a>
</div>
<div id="dropmenu4" class="dropmenudiv">
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=02">Set Lineup</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=178">My Watch List</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=46">Add/Drop</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=05">Trade</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=133">On The Block</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=03">Transaction Report</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=118">Service Report</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=105">Roster Grid</a>
</div>
<div id="dropmenu5" class="dropmenudiv">
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=08">Stats</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=117">Roster Trends</a>
</div>
<div id="dropmenu6" class="dropmenudiv">
<a href="http://football25.myfantasyleague.com/2009/news_articles?L=69833">Player News</a>
<a href="http://football25.myfantasyleague.com/2009/options?O=08&CATEGORY=freeagent&L=69833">Free Agents</a>
<a href="http://football25.myfantasyleague.com/2009/player_search?L=69833">Player Search</a>
<a href="http://football25.myfantasyleague.com/2009/injury?L=69833">Injury Report</a>
</div>
<div id="dropmenu7" class="dropmenudiv">
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=15">Full Schedule</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=16">Team Schedule</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=54">Schedule Grid</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=79">Playoff Schedule</a>
</div>
<div id="dropmenu8" class="dropmenudiv">
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=120">Survivor</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=121">NFL Pick'em</a>
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=179">CFL Pick'em</a>
</div>
<div id="dropmenu9" class="dropmenudiv">
<a href="http://football25.myfantasyleague.com/2009/options?L=69833&O=50">Personal</a>
<a href="http://football25.myfantasyleague.com/2009/menu_page?L=69833&NAME=REPORTS_WIRELESS">Fantasy Alerts</a>
<a href="http://football25.myfantasyleague.com/2009/menu_page?L=69833&NAME=COMMUNICATIONS">Communications</a>
</div>
<div id="dropmenu10" class="dropmenudiv">
<a href="http://football25.myfantasyleague.com/2009/support?L=69833">Help Center</a>
</div>
<script type="text/javascript">
cssdropdown.startchrome("chromemenu")
</script>
Into your CSS file:
CODE
.chromestyle ul{
border-color: #BBB;
background: url(http://i668.photobucket.com/albums/vv45/quickolas1/chromemenubg.gif) center center repeat-x;}
.chromestyle ul li a{
color: #494949;
border-right-color:#DADADA;
}
.chromestyle ul li a:hover, .chromestyle ul li a.selected{ /*script dynamically adds a class of "selected" to the current active menu item*/
background: url(http://i668.photobucket.com/albums/vv45/quickolas1/chromemenubg.gif) center center repeat-x;
}
/* ######### Style for Drop Down Menu ######### */
.dropmenudiv{
border-color: #BBB;
background-color: white;
}
.dropmenudiv a{
border-bottom-color: #BBB;
color: black;
}
.dropmenudiv a:hover{
background-color: #F0F0F0;
}
#chromemenu {height: 35px;}
.chromestyle{
width: 100%;
font-weight: bold;
}
.chromestyle:after{ /*Add margin between menu and rest of content in Firefox*/
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.chromestyle ul{
width: 100%;
padding: 4px 0;
margin: 0;
text-align: center; /*set value to "left", "center", or "right"*/
border-width: 1px;
border-style: solid;
}
.chromestyle ul li{
display: inline;
margin-left: 0;
}
.chromestyle ul li a{
padding: 4px 7px;
margin: 0;
text-decoration: none;
border-right-width: 1px;
border-right-style: solid;
}
/* ######### Style for Drop Down Menu ######### */
.dropmenudiv{
position:absolute;
top: 0;
font:normal 12px Verdana;
line-height:18px;
z-index:100;
width: 200px;
visibility: hidden;
border-width: 1px;
border-style: solid;
border-bottom-width: 0;
}
.dropmenudiv a{
width: auto;
display: block;
text-indent: 3px;
padding: 2px 0;
text-decoration: none;
font-weight: bold;
border-bottom-width: 1px;
border-bottom-style: solid;
}
* html .dropmenudiv a{ /*IE only hack*/
width: 100%;}
border-color: #BBB;
background: url(http://i668.photobucket.com/albums/vv45/quickolas1/chromemenubg.gif) center center repeat-x;}
.chromestyle ul li a{
color: #494949;
border-right-color:#DADADA;
}
.chromestyle ul li a:hover, .chromestyle ul li a.selected{ /*script dynamically adds a class of "selected" to the current active menu item*/
background: url(http://i668.photobucket.com/albums/vv45/quickolas1/chromemenubg.gif) center center repeat-x;
}
/* ######### Style for Drop Down Menu ######### */
.dropmenudiv{
border-color: #BBB;
background-color: white;
}
.dropmenudiv a{
border-bottom-color: #BBB;
color: black;
}
.dropmenudiv a:hover{
background-color: #F0F0F0;
}
#chromemenu {height: 35px;}
.chromestyle{
width: 100%;
font-weight: bold;
}
.chromestyle:after{ /*Add margin between menu and rest of content in Firefox*/
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.chromestyle ul{
width: 100%;
padding: 4px 0;
margin: 0;
text-align: center; /*set value to "left", "center", or "right"*/
border-width: 1px;
border-style: solid;
}
.chromestyle ul li{
display: inline;
margin-left: 0;
}
.chromestyle ul li a{
padding: 4px 7px;
margin: 0;
text-decoration: none;
border-right-width: 1px;
border-right-style: solid;
}
/* ######### Style for Drop Down Menu ######### */
.dropmenudiv{
position:absolute;
top: 0;
font:normal 12px Verdana;
line-height:18px;
z-index:100;
width: 200px;
visibility: hidden;
border-width: 1px;
border-style: solid;
border-bottom-width: 0;
}
.dropmenudiv a{
width: auto;
display: block;
text-indent: 3px;
padding: 2px 0;
text-decoration: none;
font-weight: bold;
border-bottom-width: 1px;
border-bottom-style: solid;
}
* html .dropmenudiv a{ /*IE only hack*/
width: 100%;}



