/***********************************************
* 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
***********************************************/

function openplaceadwindow(){window.open("https://placeads.mediageneral.com/webbaseCIS/en/std/jsp/WebBaseMain.do?NextURL=/jsp/SetAdType.jsp&comp=CHAR","Place_an_Ad","height=768,width=950,status=yes,toolbar=no,menubar=no,location=no,fullscreen=no,resizable=yes,scrollbars=yes");}

//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://www2.timesdispatch.com/rtd/news/columnists_news/">Columnists</a>'

menu2[1]='<a href="http://www2.timesdispatch.com/rtd/news/local/crime/">Crime</a>'
menu2[2]='<a href="http://www2.timesdispatch.com/rtd/online/database_center/">Databases</a>'
menu2[3]='<a href="http://www2.timesdispatch.com/rtd/news/local/education/">Education</a>'
menu2[4]='<a href="http://www2.timesdispatch.com/rtd/news/local/">Local News</a>'

menu2[5]='<a href="http://customwire.ap.org/dynamic/fronts/US?SITE=VARIT&SECTION=NATIONAL" >National News</a>'

menu2[6]='<a href="http://hosted.ap.org/dynamic/fronts/STRANGE?SITE=VARIT&SECTION=STRANGE" >Strange News</a>'
menu2[7]='<a href="http://customwire.ap.org/dynamic/fronts/TECHNOLOGY?SITE=VARIT&SECTION=TECHNOLOGY" >Technology</a>'
menu2[8]='<a href="http://www2.timesdispatch.com/rtd/news/local/traffic/">Traffic &amp; Transportation</a>'
menu2[9]='<a href="http://www2.timesdispatch.com/rtd/news/state_regional/">Virginia News</a>'
menu2[10]='<a href="http://www2.timesdispatch.com/rtd/news/politics/">Virginia Politics</a>'
menu2[11]='<a href="http://customwire.ap.org/dynamic/fronts/WORLD?SITE=VARIT&SECTION=INTERNATIONAL" >World News</a>'

//Contents for menu 3  SPORTS
var menu3=new Array()
menu3[0]='<a href="http://www2.timesdispatch.com/rtd/sports/baseball/">Baseball</a>'
menu3[1]='<a href="http://www2.timesdispatch.com/rtd/sports/college/">College Sports</a>'
menu3[2]='<a href="http://www2.timesdispatch.com/rtd/sports/columnists/">Columnists</a>'
menu3[3]='<a href="http://www2.timesdispatch.com/rtd/sports/community_sports">Community Sports</a>'
menu3[4]='<a href="http://www2.timesdispatch.com/rtd/sports/golf/">Golf</a>'
menu3[5]='<a href="http://www2.timesdispatch.com/rtd/sports/high_school_prep/">High School Sports</a>'
menu3[6]='<a href="http://www2.timesdispatch.com/rtd/sports/motor_sports/">Motor Sports</a>'
menu3[7]='<a href="http://hosted.ap.org/dynamic/fronts/SPORTS?SITE=VARIT&SECTION=SPORTS">National Sports</a>'
menu3[8]='<a href="http://www2.timesdispatch.com/rtd/sports/outdoors/">Outdoors</a>'
menu3[9]='<a href="http://www2.timesdispatch.com/rtd/sports/professional/">Professional Sports</a>'
menu3[10]='<a href="http://www.mytimesdispatch.com/index.php/sports/index/">Sports Blogs</a>'
menu3[11]='<a href="http://www2.timesdispatch.com/rtd/sports/soccer/">Soccer Info</a>'

//Contents for menu 4  ENTERTAINMENT
var menu4=new Array()
menu4[0]='<a href="http://www2.timesdispatch.com/rtd/entertainment/books_literature/" >Books &amp; Authors</a>'
menu4[1]='<a href="http://thingstodo.timesdispatch.com/" >Events Calendar</a>'
menu4[2]='<a href="http://thingstodo.timesdispatch.com/restaurants" >Restaurant Search</a>'
menu4[3]='<a href="http://www2.timesdispatch.com/rtd/lifestyles/contests/" >Contests &amp; Promotions</a>'
menu4[4]='<a href="http://games.yahoo.com/daily-games/dailycrosswords">Crossword</a>'
menu4[5]='<a href="http://www.timesdispatch.com/rtd/entertainment/horoscopes/" >Horoscope</a>'
menu4[6]='<a href="http://www.timesdispatch.com/rtd/entertainment/lottery/" >Lottery</a>'
menu4[7]='<a href="http://www2.timesdispatch.com/rtd/entertainment/movies/">Movies</a>'
menu4[8]='<a href="http://www.udigtv.com/privatelabel2/timesdispatch/">TV Listings</a>'
menu4[9]='<a href="http://www2.timesdispatch.com/rtd/entertainment/music/">Music</a>'
menu4[10]='<a href="http://www2.timesdispatch.com/rtd/entertainment/weekend/">Weekend</a>'
menu4[11]='<a href="http://www2.timesdispatch.com/rtd/entertainment/entertainment/">Celebrity News</a>'
menu4[12]='<a href="http://www2.timesdispatch.com/rtd/entertainment/sudoku/">Sudoku</a>'
menu4[13]='<a href="http://www2.timesdispatch.com/rtd/entertainment/box_office_movies/">Box Office Movies</a>'

//Contents for menu 5 - Lifestyles
var menu5=new Array()
menu5[0]='<a href=" http://www.timesdispatch.com/rtd/online/celebrations/">Celebrations</a>'
menu5[1]='<a href="http://www2.timesdispatch.com/rtd/lifestyles/faith_values/">Faith &amp; Values</a>'
menu5[2]='<a href="http://www2.timesdispatch.com/rtd/lifestyles/food_cooking/">Food &amp; Cooking</a>'
menu5[3]='<a href="http://www2.timesdispatch.com/rtd/lifestyles/home_garden/">Home &amp; Garden</a>'
menu5[4]='<a href="http://www.schoolandcollegeva.com/" class="site_icon_subnav">Schooland CollegeVA.com<img src="http://static.mgnetwork.com/scv/core/media_path/icons/favicon.gif" /></a>'
menu5[5]='<a href="http://www2.timesdispatch.com/rtd/lifestyles/specialty_magazines/">Specialty Magazines</a>'
menu5[6]='<a href="http://www2.timesdispatch.com/rtd/travel/">Travel</a>'
menu5[7]='<a href="http://www2.timesdispatch.com/rtd/lifestyles/health_med_fit/your_health/">Health</a>'
menu5[8]='<a href="http://www2.timesdispatch.com/rtd/lifestyles/flights/">Flight Tracking</a>'
menu5[9]='<a href="http://www2.timesdispatch.com/rtd/lifestyles/exercise/">Daily Exercise</a>'
menu5[10]='<a href="http://www2.timesdispatch.com/rtd/lifestyles/recipes/">Cooking Recipes</a>'

//Contents for menu 6  OBITUARIES
var menu6=new Array()
menu6[0]='<a href="http://www2.timesdispatch.com/rtd/lifestyles/announcements/obituaries/">News Obituaries</a>'

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

//Contents for menu 7  TOOLS
var menu7=new Array()
menu7[0]='<a href="http://advertise.timesdispatch.com">Advertise With Us</a>'
menu7[1]='<a href="http://pqasb.pqarchiver.com/timesdispatch/search.html">Archives</a>'
menu7[2]='<a href="http://www2.timesdispatch.com/rtd/online/site_information/contacts/">Contact Us</a>'
menu7[3]='<a href="http://www2.timesdispatch.com/rtd/online/database_center/">Database Center</a>'
menu7[4]='<a href="http://www2.timesdispatch.com/rtd/online/#email">E-mail Alerts &amp; Newsletters</a>'
menu7[5]='<a href="http://www2.timesdispatch.com/rtd/online/#mobile">Mobile Updates</a>'
menu7[6]='<a href="http://www2.timesdispatch.com/rtd/online/press_pass_coupon/">Press Pass</a>'
menu7[7]='<a href="http://www2.timesdispatch.com/rtd/online/#rss">RSS</a>'
menu7[8]='<a href="http://www2.timesdispatch.com/rtd/online/site_information/circulation/">Subscriber Services</a>'
menu7[9]='<a href="http://www.td-digital.com">TD-Digital</a>'
menu7[10]='<a href="http://timesdispatch.mycapture.com/mycapture/index.asp">View &amp; Purchase Photos</a>'
menu7[11]='<a href="https://subscribe.timesdispatch.com/authenticate.htm">Manage Subscription</a>'
menu7[12]='<a href="http://www2.timesdispatch.com/rtd/online/gas/">Gas Prices</a>'
menu7[13]='<a href="http://www2.timesdispatch.com/rtd/online/mortgages/">Mortgage Finder</a>'
menu7[13]='<a href="http://www2.timesdispatch.com/rtd/online/mpg/">MPG Analysis</a>'

//Contents for menu 8  CLASSIFIEDS
var menu8=new Array()
menu8[0]='<a href="http://www2.timesdispatch.com/rtd/classifieds/" >All Classifieds</a>'
menu8[1]='<a href="http://www2.timesdispatch.com/rtd/classifieds/autos/" >Cars</a>'
menu8[2]='<a href="http://www.timesdispatch.com/rtd/classifieds/zillow" >Homes</a>'
menu8[3]='<a href="http://www.timesdispatch.com/rtd/classifieds/yahoo_hot_jobs" >Jobs</a>'
menu8[4]='<a href="http://timesdispatch.oodle.com/sale/" >Merchandise</a>'
menu8[5]='<a href="http://timesdispatch.oodle.com/sale/pet/" >Pets</a>'
menu8[6]='<a href="http://marketplace.timesdispatch.com/ROP/Categories.aspx" >Search All Ads</a>'
menu8[7]='<a href="http://placeads.timesdispatch.com/" >Sell Stuff</a>'
menu8[8]='<a href="http://marketplace.timesdispatch.com/ROP/Categories.aspx" >Virtual Marketplace</a>'

//Contents for menu 9  JOBS
var menu9=new Array()
menu9[0]='<a href="http://www.timesdispatch.com/rtd/classifieds/yahoo_hot_jobs" >Find a Job</a>'
menu9[1]='<a href="http://www.timesdispatch.com/rtd/classifieds/post_jobs/" >Post a Job</a>'
menu9[2]='<a href="http://hotjobs.yahoo.com/create-resume;_ylc=X3oDMTE0N2U4ZWxhBF9TAzM5NjUxMTI1MQRwYXJ0bmVyA3J0ZARzcmMDY29uc29sZQ--?partner=rtd" >Post Your Resume</a>'
menu9[3]='<a href="http://topads.mgnetwork.com/index.cfm?event=win_prvTemplate_Local&GroupCategory_ID=1&LocalCategory_ID=165&siteid=ric&TemplateID=40" >Top Jobs</a>'



//Contents for menu 10  REAL ESTATE
var menu10=new Array()
menu10[0]='<a href="http://timesdispatch.oodle.com/housing/rent" >Apartments/Rentals</a>'
menu10[1]='<a href="http://www.cityfeet.com/TimesDispatch/" >Commercial</a>'
menu10[2]='<a href="http://www.timesdispatch.com/rtd/classifieds/zillow" >HomeSeeker</a>'
menu10[3]='<a href="http://timesdispatch.interest.com/index.asp" >Mortgage Center</a>'
menu10[4]='<a href="https://placeads.timesdispatch.com/webbase/en/std/jsp/WebBaseMain.do;jsessionid=DB5BAF4EC450F4293181366A40272D0D" >Sell Your Home</a>'
menu10[5]='<a href="http://topads.mgnetwork.com/index.cfm?event=win_prvTemplate_Local&GroupCategory_ID=3&LocalCategory_ID=166&siteid=ric&TemplateID=41" >Top Homes</a>'
menu10[6]='<a href="http://topads.mgnetwork.com/index.cfm?event=win_prvTemplate_Local&GroupCategory_ID=30&LocalCategory_ID=202&siteid=rtd&TemplateID=69" >Top Rentals</a>'
menu10[7]='<a href="http://www.landsofamerica.com/landsconnector/richmond-times-dispatch/">Farms &#38; Land</a>'

//Contents for menu 11  SHOPPING
var menu11=new Array()
menu11[0]='<a href="http://directory.richmond.com/" >Business Directory</a>'
menu11[1]='<a href="http://timesdispatch.mycapture.com/mycapture/index.asp">Buy Pictures</a>'
menu11[2]='<a href="http://www.dealtaker.com" class="site_icon_subnav" target="_blank">Deals and Coupons</a>'
menu11[3]='<a href="http://timesdispatch.oodle.com/sale/" >Merchandise</a>'
menu11[4]='<a href="http://www.timesdispatch.com/rtd/business/videomarketplace/" >Video Marketplace</a>'
menu11[5]='<a href="http://marketplace.timesdispatch.com/ROP/Categories.aspx" >Virtual Marketplace</a>'


//Contents for menu 12  CARS
var menu12=new Array()
menu12[0]='<a href="http://www2.timesdispatch.com/rtd/classifieds/autos/" >Find a Car</a>'
menu12[1]='<a href="https://placeads.timesdispatch.com/webbase/en/net47/jsp/WebBaseMain.do;jsessionid=995EF273BB991C452A9DE357E8FDDA09" >Sell Your Car</a>'
menu12[2]='<a href="http://marketplace.timesdispatch.com/ROP/Subcat.aspx?cat=3330" >Virtual Marketplace</a>'

//Contents for menu 13 - Business
var menu13=new Array()
menu13[0]='<a href="http://www2.timesdispatch.com/rtd/business/local/" class="site_icon_subnav">Local Business</a>'
menu13[1]='<a href="http://www2.timesdispatch.com/rtd/business/local/metrobusiness/" class="site_icon_subnav">Metro Business</a>'
menu13[2]='<a href="http://www2.timesdispatch.com/rtd/business/moneywise/" class="site_icon_subnav">Moneywise</a>'
menu13[3]='<a href="http://www2.timesdispatch.com/rtd/business/economy/" class="site_icon_subnav">Economy</a>'
menu13[4]='<a href="http://www2.timesdispatch.com/rtd/business/companies/" class="site_icon_subnav">Companies</a>'
menu13[5]='<a href="http://www2.timesdispatch.com/rtd/business/people/" class="site_icon_subnav">People</a>'
menu13[6]='<a href="http://www2.timesdispatch.com/rtd/business/markets/" class="site_icon_subnav">Markets</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