//Contents for Local News
var menuA=new Array()
menuA[0]='<a href="/apps/pbcs.dll/section?Category=NEWS&template=front">News main</a>'
menuA[1]='<a href="/apps/pbcs.dll/section?Category=NEWS05">Metro</a>'
menuA[2]='<a href="/apps/pbcs.dll/section?Category=NEWS01">Detroit</a>'
menuA[3]='<a href="/apps/pbcs.dll/section?Category=NEWS02">Wayne</a>'
menuA[4]='<a href="/apps/pbcs.dll/section?Category=NEWS03">Oakland</a>'
menuA[5]='<a href="/apps/pbcs.dll/section?Category=NEWS04">Macomb</a>'
menuA[6]='<a href="/apps/pbcs.dll/section?Category=NEWS06">Michigan</a>'
menuA[7]='<a href="/apps/pbcs.dll/section?Category=NEWS10">Roadwork</a>'
menuA[8]='<a href="/apps/pbcs.dll/section?Category=NEWS13">Columnists</a>'
menuA[9]='<a href="/community">Community</a>'

//Contents for Sports

var menuB=new Array()
menuB[0]='<a href="/apps/pbcs.dll/section?Category=SPORTS&template=front">Sports main</a>'
menuB[1]='<a href="http://www.freep.com/sports/scoreboard/index.htm">Scores and stats</a>'
menuB[2]='<a href="/apps/pbcs.dll/section?Category=SPORTS01">Lions</a>'
menuB[3]='<a href="/apps/pbcs.dll/section?Category=SPORTS05">Red Wings</a>'
menuB[4]='<a href="/apps/pbcs.dll/section?Category=SPORTS03">Pistons</a>'
menuB[5]='<a href="/apps/pbcs.dll/section?Category=SPORTS02">Tigers</a>'
menuB[6]='<a href="/apps/pbcs.dll/section?Category=SPORTS04">Shock</a>'
menuB[7]='<a href="/apps/pbcs.dll/section?Category=SPORTS06">Wolverines</a>'
menuB[8]='<a href="/apps/pbcs.dll/section?Category=SPORTS07">Spartans</a>'
menuB[9]='<a href="/apps/pbcs.dll/section?Category=SPORTS10">Outdoors</a>'
menuB[10]='<a href="/apps/pbcs.dll/section?Category=SPORTS15">Golf</a>'
menuB[11]='<a href="/apps/pbcs.dll/section?Category=SPORTS09">Preps</a>'
menuB[12]='<a href="/apps/pbcs.dll/section?Category=SPORTS22">Columnists</a>'

//Contents for Nation/World
var menuC=new Array()
menuC[0]='<a href="/apps/pbcs.dll/section?Category=NEWS07">News main</a>'
menuC[1]='<a href="http://www.usatoday.com">USA Today</a>'
menuC[2]='<a href="http://hosted.ap.org/dynamic/fronts/HOME?SITE=MIDTF&SECTION=HOME">AP Wire</a>'

//Contents for Entertainment
var menuD=new Array()
menuD[0]='<a href="/apps/pbcs.dll/section?Category=ENT&template=front">Entertainment main</a>'
menuD[1]='<a href="/apps/pbcs.dll/section?Category=ENT01">Movies</a>'
menuD[2]='<a href="/apps/pbcs.dll/section?Category=ENT04">Music</a>'
menuD[3]='<a href="/apps/pbcs.dll/section?Category=ENT03">TV/Radio</a>'
menuD[4]='<a href="/apps/pbcs.dll/section?Category=ENT08">Dining</a>'
menuD[5]='<a href="/apps/pbcs.dll/section?Category=ENT07">People</a>'
menuD[6]='<a href="/apps/pbcs.dll/section?Category=ENT06">Video games</a>'
menuD[7]='<a href="/apps/pbcs.dll/section?Category=ENT05">Arts</a>'

//Contents for Business
var menuE=new Array()
menuE[0]='<a href="/apps/pbcs.dll/section?Category=BUSINESS&template=front">Business main</a>'
menuE[1]='<a href="/apps/pbcs.dll/section?Category=BUSINESS01">Auto news</a>'
menuE[2]='<a href="/apps/pbcs.dll/section?Category=BUSINESS02">Auto reviews</a>'
menuE[3]='<a href="/apps/pbcs.dll/section?Category=BUSINESS06">Michigan business</a>'
menuE[4]='<a href="/apps/pbcs.dll/section?Category=BUSINESS07">Nation/World business</a>'
menuE[5]='<a href="/apps/pbcs.dll/section?Category=BUSINESS08">Stock search</a>'
menuE[6]='<a href="/apps/pbcs.dll/section?Category=BUSINESS04">Real estate</a>'
menuE[7]='<a href="/apps/pbcs.dll/section?Category=BUSINESS10">Columnists</a>'

//Contents for Features 
var menuF=new Array()
menuF[0]='<a href="/apps/pbcs.dll/section?Category=FEATURES&template=front">Features main</a>'
menuF[1]='<a href="/apps/pbcs.dll/section?Category=FEATURES01">Lifestyles</a>'
menuF[2]='<a href="/apps/pbcs.dll/section?Category=FEATURES05">Books</a>'
menuF[3]='<a href="/apps/pbcs.dll/section?Category=FEATURES09">Calendar</a>'
menuF[4]='<a href="/apps/pbcs.dll/section?Category=FEATURES02">Food</a>'
menuF[5]='<a href="/apps/pbcs.dll/section?Category=FEATURES08">Health</a>'
menuF[6]='<a href="/apps/pbcs.dll/section?Category=NEWS09">Technology</a>'
menuF[7]='<a href="/apps/pbcs.dll/article?AID=200551018004">Comics</a>'
menuF[8]='<a href="/apps/pbcs.dll/section?Category=YAK">Yak\'s Corner</a>'
menuF[9]='<a href="http://www.twistdetroit.com">Twist</a>'

//Contents for Travel
var menuG=new Array()
menuG[0]='<a href="/apps/pbcs.dll/section?Category=FEATURES07">Travel main</a>'
menuG[1]='<a href="http://asp.usatoday.com/travel/gcitravel/destination.aspx?cid=freep">USA Today.com travel</a>'

//Contents for Obits
var menuH=new Array()
menuH[0]='<a href="/apps/pbcs.dll/section?Category=NEWS08">Obituaries</a>'
menuH[1]='<a href="http://www.detroitnewspapers.com/deathnotices/?freep">Death notices</a>'

//Contents for Opinion
var menuI=new Array()
menuI[0]='<a href="/apps/pbcs.dll/section?Category=OPINION&template=front">Opinion main</a>'
menuI[1]='<a href="/apps/pbcs.dll/section?Category=OPINION01">Editorials</a>'
menuI[2]='<a href="/apps/pbcs.dll/section?Category=OPINION04">Letters</a>'
menuI[3]='<a href="/apps/pbcs.dll/section?Category=OPINION02">Columnists</a>'
menuI[4]='<a href="/apps/pbcs.dll/section?Category=COL25">Editorial cartoons</a>'
menuI[5]='<a href="/blogs">Blogs</a>'

//Contents for Multimedia
var menuJ=new Array()
menuJ[0]='<a href="/multimedia">Multimedia main</a>'
menuJ[1]='<a href="/photos">Photos</a>'
menuJ[2]='<a href="/video">Video</a>'
menuJ[3]='<a href="/podcasts">Podcasts</a>'
menuJ[4]='<a href="/specials">Specials</a>'

var menuwidth='165px' //default menu width
var menubgcolor='#EFEFE7'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(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;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=-2
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return true
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu