/***********************************************
* 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 2, and so on
var menu2=new Array()

//Contents for menu 3
var menu3=new Array()

//Contents for menu 4 COMMUNITY COLLEGES
var menu4=new Array()
menu4[0]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/blue_ridge_community_college/">Blue Ridge</a>'
menu4[1]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/central_virginia_community_college/">Central Virginia</a>'
menu4[2]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/dabney_s_lancaster_community_college/">Dabney S. Lancaster</a>'
menu4[3]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/danville_community_college/">Danville</a>'
menu4[4]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/eastern_shore_community_college/">Eastern Shore</a>'
menu4[5]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/germanna_community_college/">Germanna</a>'
menu4[6]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/j_sargeant_reynolds_community_college/">J. Sargeant Reynolds</a>'
menu4[7]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/john_tyler_community_college/">John Tyler</a>'
menu4[8]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/lord_fairfax_community_college/">Lord Fairfax</a>'
menu4[9]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/mountain_empire_community_college/">Mountain Empire</a>'
menu4[10]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/new_river_community_college/">New River</a>'
menu4[11]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/northern_virginia_community_college/">Northern Virginia</a>'
menu4[12]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/patrick_henry_community_college/">Patrick Henry</a>'
menu4[13]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/paul_d_camp_community_college/">Paul D. Camp</a>'
menu4[14]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/piedmont_virginia_community_college/">Piedmont Virginia</a>'
menu4[15]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/rappahannock_community_college/">Rappahannock</a>'
menu4[16]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/southside_virginia_community_college/">Southside Virginia</a>'
menu4[17]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/thomas_nelson_community_college/">Thomas Nelson</a>'
menu4[18]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/tidewater_community_college/">Tidewater</a>'
menu4[19]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/virginia_highlands_community_college/">Virginia Highlands</a>'
menu4[20]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/virginia_western_community_college/">Virginia Western</a>'
menu4[21]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/wytheville_community_college/">Wytheville</a>'


//Contents for menu 5 PRIVATE SCHOOLS (A-M)
var menu5=new Array()
menu5[0]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/averett_university/">Averett Univ.</a>'
menu5[1]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/bluefield_college/">Bluefield College</a>'
menu5[2]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/bridgewater_college/">Bridgewater College</a>'
menu5[3]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/bluefield_college/">Bluefield College</a>'
menu5[4]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/christendom_college/">Christendom College</a>'
menu5[5]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/eastern_mennonite_university/">Eastern Mennonite Univ.</a>'
menu5[6]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/emory_and_henry_college/">Emory &amp; Henry College</a>'
menu5[7]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/ferrum_college/">Ferrum College</a>'
menu5[8]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/hampden_sydney_college/">Hampden-Sydney College</a>'
menu5[9]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/hampton_university/">Hampton Univ.</a>'
menu5[10]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/hollins_university/">Hollins Univ.</a>'
menu5[11]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/jefferson_college_of_health_sciences/">Jefferson College of Health Sciences</a>'
menu5[12]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/liberty_university/">Liberty Univ.</a>'
menu5[13]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/lynchburg_college/">Lynchburg College</a>'
menu5[14]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/mary_baldwin_college/">Mary Baldwin College</a>'
menu5[15]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/marymount_university/">Marymount Univ.</a>'

//Contents for menu 6 PRIVATE SCHOOLS (N-Z)
var menu6=new Array()
menu6[0]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/patrick_henry_college/">Patrick Henry College</a>'
menu6[1]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/randolph_college/">Randolph College</a>'
menu6[2]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/randolph_macon_college/">Randolph-Macon College</a>'
menu6[3]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/regent_university/">Regent Univ.</a>'
menu6[4]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/roanoke_college/">Roanoke College</a>'
menu6[5]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/saint_pauls_college/">Saint Paul&#39;s College</a>'
menu6[6]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/shenandoah_university/">Shenandoah Univ.</a>'
menu6[7]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/southern_virginia_university/">Southern Virginia Univ.</a>'
menu6[8]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/sweet_briar_college/">Sweet Briar College</a>'
menu6[9]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/university_of_richmond/">Univ. of Richmond</a>'
menu6[10]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/virginia_intermont_college/">Virginia Intermont College</a>'
menu6[11]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/virginia_union_university/">Virginia Union Univ.</a>'
menu6[12]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/virginia_university_of_lynchburg/">Virginia Univ. of Lynchburg</a>'
menu6[13]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/virginia_wesleyan_college/">Virginia Wesleyan College</a>'
menu6[14]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/washington_and_lee_university/">Washington &amp; Lee Univ.</a>'

//Contents for menu 7 PUBLIC COLLEGE AND UNIVERSITIES (PUBLIC SCHOOLS)
var menu7=new Array()
menu7[0]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/christopher_newport_university/">Christopher Newport Univ.</a>'
menu7[1]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/college_of_william_and_mary/">College of William &amp; Mary</a>'
menu7[2]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/george_mason_university/">George Mason Univ.</a>'
menu7[3]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/james_madison_university/">James Madison Univ.</a>'
menu7[4]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/longwood_university/">Longwood Univ.</a>'
menu7[5]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/norfolk_state_university/">Norfolk State Univ.</a>'
menu7[6]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/old_dominion_university/">Old Dominion Univ.</a>'
menu7[7]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/radford_university/">Radford Univ.</a>'
menu7[8]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/richard_bland_college/">Richard Bland College</a>'
menu7[9]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/university_of_mary_washington/">Univ. of Mary Washington</a>'
menu7[10]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/university_of_virginia/">Univ. of Virginia</a>'
menu7[11]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/university_of_virginias_college_at_wise/">Univ. of Virginia&#39;s College at Wise</a>'
menu7[12]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/virginia_commonwealth_university/">Virginia Commonwealth Univ.</a>'
menu7[13]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/virginia_military_institute/">Virginia Military Institute</a>'
menu7[14]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/virginia_state_university/">Virginia State Univ.</a>'
menu7[15]='<a href="http://www.schoolandcollegeva.com/scv/lifestyles/college/virginia_tech/">Virginia Tech</a>'

//Contents for menu 8  APARTMENTS & HOMES
var menu8=new Array()
menu8[0]='<a href="http://timesdispatch.oodle.com/housing/rent/">Rental Search</a>'
menu8[1]='<a href="http://www2.timesdispatch.com/rtd/classifieds/zillow">For Sale</a>'

//Contents for menu 9 JOBS
var menu9=new Array()
menu9[0]='<a href="http://www.timesdispatch.com/rtd/classifieds/yahoo_hot_jobs">Job Search</a>'
menu9[1]='<a href="http://hotjobs.yahoo.com/create-resume;_ylc=X3oDMTE0N2U4ZWxhBF9TAzM5NjUxMTI1MQRwYXJ0bmVyA3J0ZARzcmMDY29uc29sZQ--?partner=rtd">Post your Resume</a>'
menu9[2]='<a href="http://timesdispatch.oodle.com/housing/rent/">Apartments &amp; Rentals</a>'

//Contents for menu 10 SHOPPING
var menu10=new Array()
menu10[0]='<a href="http://www2.timesdispatch.com/rtd/classifieds/">Classifieds</a>'
menu10[1]='<a href="http://www.dealtaker.com/">Deals</a>'
menu10[2]='<a href="http://directory.richmond.com">Business Search</a>'

//Contents for menu 11
var menu11=new Array()
menu11[0]='<a href="http://www.richmond.com/">Richmond.com</a>'    
menu11[1]='<a href="http://www.schoolandcollegeva.com/scv/online/#email">E-mail Newsletters</a>'
menu11[2]='<a href="http://www.schoolandcollegeva.com/scv/online/#rss">RSS Feeds</a>'
menu11[3]='<a href="http://www.schoolandcollegeva.com/scv/online/#mobile">Text Alerts</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