/***********************************************
* AnyLink Drop Down Menu- Â© Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1=new Array()

//Contents for menu 2, and so on  NEWS
var menu2=new Array()
menu2[0]='<a href="http://www.wsls.com/sls/news/local/">Local</a>'
menu2[1]='<a href="http://www.wsls.com/sls/business/consumer">Consumer</a>'
menu2[2]='<a href="http://www.wsls.com/sls/lifestyles/health_med_fit/">Health News</a>'
menu2[3]='<a href="http://www.wsls.com/sls/news/national/">National</a>'
menu2[4]='<a href="http://www.wsls.com/sls/news/state_regional/">State</a>'
menu2[5]='<a href="http://www.mywsls.com/">Blogs</a>'
menu2[6]='<a href="http://www.wsls.com/sls/news/opinion/viewers_voice/">Viewer\'s Voice</a>'
menu2[7]='<a href="http://www.wsls.com/sls/news/databasehome/">Databases</a>'
menu2[8]='<a href="http://www.wsls.com/sls/news/politics/">Politics</a>'
menu2[9]='<a href="http://www.wsls.com/sls/news/ga_coverage/">General Assembly</a>'
menu2[10]='<a href="http://www.wsls.com/sls/business/money_matters">Money Matters</a>'

//Contents for menu 3  SPORTS
var menu3=new Array()
menu3[0]='<a href="http://www.nbcolympics.com/wsls/"><img src="http://static.mgnetwork.com/sls/media_path/nav_bar/NBC-o-rings.jpg" align="right">Vancouver Olympics</a>'
menu3[1]='<a href="http://www.wsls.com/sls/sports/high_school/high_school_football/">Friday Football</a>'
menu3[2]='<a href="http://www.wsls.com/sls/sports/high_school/">High School</a>'
menu3[3]='<a href="http://www.wsls.com/sls/sports/motor_sports/">Motor Sports</a>'
menu3[4]='<a href="http://www.wsls.com/sls/sports/college/">College</a>'
menu3[5]='<a href="http://www.wsls.com/sls/sports/professional/">Professional</a>'
menu3[6]='<a href="http://www.wsls.com/sls/sports/professional/professional_football/redskins/">&nbsp;&nbsp;&nbsp;Redskins</a>'
menu3[7]='<a href="http://www.wsls.com/sls/sports/soccer/">Soccer Info</a>'

//Contents for menu 4 - ENTERTAINMENT
var menu4=new Array()
menu4[0]='<a class="zventsItemTitle" href="http://events.wsls.com/">Things To Do</a>'
menu4[1]='<a href="http://events.wsls.com/" class="zventsItemFirst">Events</a>'
menu4[2]='<a href="http://events.wsls.com/movies" class="zventsItem">Movie Listings</a>'
menu4[3]='<a href="http://events.wsls.com/restaurants" class="zventsItem">Dining Out</a>'
menu4[4]='<a href="http://events.wsls.com/venues" class="zventsItem">Find a Venue</a>'
menu4[5]='<a href="http://events.wsls.com/performers" class="zventsItemLast">Performers</a>'
menu4[6]='<a href="http://www.wsls.com/sls/entertainment/contest/">Contests</a>'
menu4[7]='<a href="http://www2.wsls.com/sls/entertainment/contest/vclub">&nbsp;&nbsp;&nbsp;&nbsp;Viewer&#39;s Club</a>'
menu4[8]='<a href="http://www.wsls.com/sls/entertainment/lottery/">Lottery</a>'
menu4[9]='<a href="http://www.wsls.com/sls/entertainment/horoscope/">Horoscope</a>'
menu4[10]='<a href="http://www.wsls.com/sls/entertainment/television/">TV Listings</a>'
menu4[11]='<a href="http://www.wsls.com/sls/entertainment/nbc">NBC Shows</a>'
menu4[12]='<a href="http://www.wsls.com/sls/gaming/index/">Games</a>'
menu4[13]='<a href="http://www.wsls.com/sls/entertainment/holidays/">Holidays</a>'
menu4[14]='<a href="http://www.wsls.com/sls/entertainment/entertainment/">Celebrity News</a>'
menu4[15]='<a href="http://www.wsls.com/sls/entertainment/movies/">Box Office Movies</a>'
menu4[16]='<a href="http://www.wsls.com/sls/entertainment/sudoku/">Sudoku</a>'

//Contents for menu 5 - LIFESTYLES
var menu5=new Array()
menu5[0]='<a href="http://www.wsls.com/sls/lifestyles/green_living/">Go Green</a>'
menu5[1]='<a href="http://healthonyourside.wsls.com/">Health On Your Side</a>'
menu5[2]='<a href="http://www.wsls.com/sls/lifestyles/pets/">Pets</a>'
menu5[3]='<a href="http://www.wsls.com/sls/lifestyles/weddings/">Wedding 101</a>'
menu5[4]='<a href="http://www.schoolandcollegeva.com/">School &amp; College Guide</a>'
menu5[5]='<a href="http://www.wsls.com/sls/lifestyles/home_improvement/">Home Improvement</a>'
menu5[6]='<a href="http://www.wsls.com/sls/lifestyles/flights/">Flight Tracking</a>'
menu5[7]='<a href="http://www.wsls.com/sls/lifestyles/exercise/">Daily Exercise</a>'
menu5[8]='<a href="http://www.wsls.com/sls/lifestyles/recipes/">Cooking Recipes</a>'

//Contents for menu 6  WEATHER
var menu6=new Array()
menu6[0]='<a href="http://weather.wsls.com/?user=SLS&forecast=pass&pass=general&w=vipir">Radar</a>'
menu6[1]='<a href="http://www.wsls.com/sls/weather/closings_and_delays/">Closings</a>'
menu6[2]='<a href="http://weather.wsls.com/wx.php?config=&user=SLS&place=roanoke&state=va&zipcode=24011&country=us&county=51023&zone=vaz022&icao=KROA&cwa=RNK&forecast=pass&pass=general&w=video">Video Forecast</a>'
menu6[3]='<a href="http://www.wsls.com/sls/weather/emergency_resources/">Emergency Resources</a>'
menu6[4]='<a href="http://www.wsls.com/sls/weather/hurricanes">Hurricane Center</a>'

//Contents for menu 13  Community
var menu13=new Array()
menu13[0]='<a href="http://www2.wsls.com/sls/news/community/blacksburg/">Blacksburg</a>'
menu13[1]='<a href="http://www2.wsls.com/sls/news/community/christiansburg/">Christiansburg</a>'
menu13[2]='<a href="http://www2.wsls.com/sls/news/community/lexington/">Lexington</a>'
menu13[3]='<a href="http://www2.wsls.com/sls/news/community/salem/">Salem</a>'
menu13[4]='<a href="http://users.wsls.com/from_you_form">submit news here</a>'

//Contents for menu 7  TOOLS
var menu7=new Array()
menu7[0]='<a href="http://www2.wsls.com/sls/online/">RSS Feeds</a>'
menu7[1]='<a href="http://www2.wsls.com/sls/social_networking/social_media">Social Networking</a>'
menu7[2]='<a href="http://my.textcaster.com/ServePopup.aspx?id=630">Mobile Alerts</a>'
menu7[3]='<a href="http://m.wsls.com">Mobile Site</a>'
menu7[4]='<a href="http://www2.wsls.com/sls/online/">Infolert</a>'
menu7[5]='<a href="http://users.wsls.com/register/">Registration</a>'
menu7[6]='<a href="http://www2.wsls.com/sls/news/databasehome/ ">Databases</a>'
menu7[7]='<a href="http://snap.wsls.com/index.cfm/section/picks/media/photos">Upload Photos</a>'
menu7[8]='<a href="http://users.wsls.com/from_you_form">Upload Stories</a>'
menu7[9]='<a href="http://www2.wsls.com/sls/news/yournews/">Upload Video</a>'
menu7[10]='<a href="http://www2.wsls.com/sls/online/gas/">Gas Prices</a>'
menu7[11]='<a href="http://www2.wsls.com/sls/online/mortgages/">Mortgage Finder</a>'
menu7[12]='<a href="http://www2.wsls.com/sls/online/mpg/">MPG Analysis</a>'

//Contents for menu 8  CLASSIFIEDS
var menu8=new Array()
menu8[0]='<a href="http://www.wsls.com/sls/classifieds/employment/">Jobs</a>'
menu8[1]='<a href="http://www.wsls.com/sls/classifieds/transportation/">Cars</a>'
menu8[2]='<a href="http://www.wsls.com/sls/classifieds/realestate/">Homes</a>'
menu8[3]='<a href="http://wsls.oodle.com/sale/-/-/usa:va:roanoke/%2B60/">Merchandise</a>'
menu8[4]='<a href="http://wsls.oodle.com/sale/pet/-/-/usa:va:roanoke/%2B60/">Pets</a>'
menu8[5]='<a href="http://wsls.oodle.com/service/-/-/usa:va:roanoke/%2B60/">Services</a>'
menu8[6]='<a href="http://wsls.oodle.com/sale/tickets/-/-/usa:va:roanoke/%2B60/">Tickets</a>'
menu8[7]='<a href="http://wsls.oodle.com/personals/-/-/usa:va:roanoke/%2B60/">Personals</a>'

//Contents for menu 10  ABOUT US
var menu10=new Array()
menu10[0]='<a href="http://www.wsls.com/sls/online/site_information/contacts/">WSLS Team</a>'
menu10[1]='<a href="http://www.wsls.com/sls/online/contact_us/">Contact Us</a>'
menu10[2]='<a href="http://www.wsls.com/sls/online/site_information/advertising/">Advertising</a>'
menu10[3]='<a href="http://www.wsls.com/sls/online/site_information/creative/">Video Production</a>'
menu10[4]='<a href="http://media.mgnetwork.com/sls/extras/eeo/EEO607-508.pdf">EEO Info</a>'
menu10[5]='<a href="http://jobs.mediageneral.com/jobsearch.asp">Work Here</a>'
menu10[6]='<a href="http://www.wsls.com/sls/online/site_information">HDTV Center</a>'
menu10[7]='<a href="http://www2.wsls.com/sls/online/7pmshow">WSLS 10 at 7</a>'

//Contents for menu 11  CRIME
var menu11=new Array()
menu11[0]='<a href="http://www.wsls.com/sls/crime/dashcams">Dash Cams</a>'
menu11[1]='<a href="http://www.wsls.com/sls/news/crime_map/">Crime Map</a>'

//Contents for menu 12  SHOPPING
var menu12=new Array()
menu12[0]='<a href="http://www.dealtaker.com">Deals and Coupons</a>'

//Contents for menu 14  VIDEO
var menu14=new Array()
menu14[0]='<a href="http://www2.wsls.com/sls/video/archive/News">News</a>'
menu14[1]='<a href="http://www2.wsls.com/sls/video/archive/Sports">Sports</a>'
menu14[2]='<a href="http://www2.wsls.com/sls/video/archive/Entertainment">Entertainment</a>'
menu14[3]='<a href="http://www2.wsls.com/sls/video/archive/Business">Business</a>'
menu14[4]='<a href="http://www2.wsls.com/sls/video/archive/Lifestyles">Lifestyles</a>'
menu14[5]='<a href="http://www2.wsls.com/sls/video/archive/Weather">Weather</a>'
menu14[6]='<a href="http://www2.wsls.com/sls/video/">All Video</a>'


var menuwidth='165px' //default menu width
var menubgcolor='lightyellow'  //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="-500px"
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=0
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, class_name){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
dropmenuobj.style.zIndex="6000"
dropmenuobj.setAttribute("class", class_name);
dropmenuobj.setAttribute("className", class_name);
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-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
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