/***********************************************
* 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://www2.wspa.com/spa/news/state_regional/">State</a>'
menu2[1]='<a href="http://hosted.ap.org/dynamic/fronts/US?SITE=WSPATV&SECTION=US">National</a>'
menu2[2]='<a href="http://hosted.ap.org/dynamic/fronts/INTERNATIONAL?SITE=WSPATV&SECTION=INTERNATIONAL">World</a>'
menu2[3]='<a href="http://www2.wspa.com/spa/news/politics/">Politics</a>'
menu2[4]='<a href="http://www2.wspa.com/spa/news/special_reports/">Special Reports</a>'
menu2[5]='<a href="http://hosted.ap.org/dynamic/fronts/BUSINESS?SITE=WSPATV&SECTION=BUSINESS">Business</a>'
menu2[6]='<a href="http://hosted.ap.org/dynamic/files/specials/today-in-history/index.html?SITE=WSPATV&SECTION=HISTORY">Today in History</a>'
menu2[7]='<a href="http://hosted.ap.org/dynamic/files/specials/homepage/index2.html?SITE=WSPATV&SECTION=NATIONAL">Multimedia</a>'
menu2[8]='<a href="http://hosted.ap.org/dynamic/files/specials/interactives/photoweek/flash.html?SITE=WSPATV&SECTION=NATIONAL">Photos</a>'
menu2[9]='<a href="http://www2.wspa.com/spa/you_write_it/">You Write It</a>'
menu2[10]='<a href="http://www.wspa.com/spa/social_networking/share_your_video/">U-Report Video Upload</a>'
menu2[11]='<a href="http://www.wspa.com/spa/business/holiday_gear/?widgetClass=IDG&destination=1366">Technology News</a>'
menu2[12]='<a href="http://www2.wspa.com/spa/business/markets">Stock Market</a>'
menu2[13]='<a href="http://www2.wspa.com/spa/news/live_stream/">Live Stream</a>'
menu2[14]='<a href="http://www2.wspa.com/spa/news/h1n1/">H1N1</a>'

//Contents for menu 3  WEATHER
var menu3=new Array()
menu3[0]='<a href="http://www.wspa.com/spa/weather/hurricane_tips/">Hurricane Center</a>'
menu3[1]='<a href="http://www2.wspa.com/spa/weather/school_and_business_closings/">School and Business Closings</a>'
menu3[2]='<a href="http://my.textcaster.com/ServePopup.aspx?id=1305">Get Closings Alerts</a>'
menu3[3]='<a href="http://www2.wspa.com/spa/weather/severe_weather_alerts/">Severe Weather Alerts</a>'
menu3[4]='<a href="http://www2.wspa.com/spa/weather/hurricane_tips/">Severe Weather Tips</a>'
menu3[5]='<a href="http://www2.wspa.com/spa/weather/interactive_radar/">VIPIR Interactive</a>'


//Contents for menu 4  SPORTS
var menu4=new Array()
menu4[0]='<a href="http://hosted.ap.org/dynamic/fronts/SPORTS?SITE=WSPATV&SECTION=SPORTS">National</a>'
menu4[1]='<a href="http://www2.wspa.com/spa/sports/motor_sports/">Auto Racing</a>'
menu4[2]='<a href="http://hosted.ap.org/dynamic/files/specials/interactives/sportsweek_pix/flash.html?SITE=WSPATV&SECTION=SPORTS">Sports Week</a>'
menu4[3]='<a href="http://www2.wspa.com/spa/sports/professional/professional_football/">NFL</a>'
menu4[4]='<a href="http://www2.wspa.com/spa/sports/professional/professional_baseball/">MLB</a>'
menu4[5]='<a href="http://www2.wspa.com/spa/sports/professional/professional_basketball/">NBA</a>'
menu4[6]='<a href="http://www2.wspa.com/spa/sports/olympics/">2008 Olympic Games</a>'
menu4[7]='<a href="http://www.wspa.com/spa/sports/high_school_friday_night/">High School Friday Night</a>'
menu4[8]='<a href="http://www.wspa.com/spa/sports/high_school_prep/">High School Sports</a>'
menu4[9]='<a href="http://www.wspa.com/spa/sports/college/usc/">USC</a>'
menu4[10]='<a href="http://www.wspa.com/spa/sports/college/clemson/">Clemson</a>'
menu4[11]='<a href="http://www2.wspa.com/spa/sports/college/">College Sports</a>'
menu4[12]='<a href="http://www2.wspa.com/spa/sports/secmediadays/">SEC Media Days</a>'
menu4[13]='<a href="http://www2.wspa.com/spa/sports/soccer/">Soccer Info</a>'
menu4[13]='<a href="http://wintergames.ap.org/?site=wspa-tv">2010 Winter Games</a>'

//Contents for menu 5  ON YOUR SIDE
var menu5=new Array()
menu5[0]='<a href="http://www2.wspa.com/spa/news/consumer/">Consumer Watch</a>'
menu5[1]='<a href="http://www2.wspa.com/spa/news/crime/">Crime Tracker</a>'
menu5[2]='<a href="http://www2.wspa.com/spa/news/investigation/">Investigation</a>'
menu5[3]='<a href="http://www2.wspa.com/spa/lifestyles/health_med_fit/">Medical Watch</a>'
menu5[4]='<a href="http://www2.wspa.com/spa/news/problem_solver/">Problem Solver</a>'
menu5[5]='<a href="http://www2.wspa.com/spa/news/state_regional/state_regional_govtpolitics/">Statehouse Watch</a>'
menu5[6]='<a href="http://www2.wspa.com/spa/news/local/education/">School Watch</a>'
menu5[7]='<a href="http://www2.wspa.com/spa/news/voice_of_the_viewer/">Voice of the Viewer</a>'

//Contents for menu 6  ENTERTAINMENT
var menu6=new Array()
menu6[0]='<a href="http://www2.wspa.com/spa/entertainment/cbs/">CBS Full Episodes</a>'
menu6[1]='<a href="http://www2.wspa.com/spa/entertainment/television/">CBS TV Schedule</a>'
menu6[2]='<a href="http://static.mgnetwork.com/spa/pdf/rtv_schedule.pdf">Retro TV Schedule</a>'
menu6[3]='<a href="http://events.wspa.com/movies">Movies</a>'
menu6[4]='<a href="http://www2.wspa.com/spa/entertainment/horoscope/">Horoscopes</a>'
menu6[5]='<a href="http://www2.wspa.com/spa/entertainment/lottery/">Lottery</a>'
menu6[6]='<a href="http://hosted.ap.org/dynamic/fronts/ENTERTAINMENT?SITE=WSPATV&SECTION=ENTERTAINMENT">Entertainment</a>'
menu6[7]='<a href="http://www2.sceneon7.com/viralvideo/">Viral Video</a>'
menu6[8]='<a href="http://www2.wspa.com/spa/entertainment/question_of_the_day/">Question of the Day</a>'
menu6[9]='<a href="http://www.yourcarolina.tv/">Your Carolina</a>'
menu6[10]='<a href="http://www2.wspa.com/spa/entertainment/youre_the_critic/">You\'re the Critic</a>'
menu6[11]='<a href="http://www.wspa.com/spa/lifestyles/contests/">Contests</a>'
menu6[12]='<a href="http://www.carolinascw.com">Carolinas\'s CW</a>'
menu6[13]='<a href="http://www.wspa.com/spa/gaming/index/">Games</a>'
menu6[14]='<a href="http://www.wspa.com/spa/scene_on_7/">Scene On 7</a>'
menu6[15]='<a href="http://media.mgnetwork.com/creativeservices/wspa/wild_wing_cafe/">Local Bands</a>'
menu6[16]='<a href="http://www2.wspa.com/spa/entertainment/entertainment/">Celebrity News</a>'
menu6[17]='<a href="http://www2.wspa.com/spa/entertainment/movies/">Box Office Movies</a>'
menu6[18]='<a href="http://www2.wspa.com/spa/entertainment/sudoku/">Sudoku</a>'


//Contents for menu 7  LIFESTYLES
var menu7=new Array()
menu7[0]='<a href="http://www2.wspa.com/spa/social_networking/blogs/">Blogs</a>'
menu7[1]='<a href="http://www2.wspa.com/spa/lifestyles/caring_for_the_carolinas/">Caring for the Carolinas</a>'
menu7[2]='<a href="http://www2.wspa.com/spa/lifestyles/faith_values/">Faith and Values</a>'
menu7[3]='<a href="http://www2.wspa.com/spa/you_write_it/">You Write It</a>'
menu7[4]='<a href="http://www2.wspa.com/spa/classifieds/travel_splash_page/">Travel</a>'
menu7[5]='<a href="http://www2.wspa.com/spa/lifestyles/go_green_save_green/">Go Green Save Green</a>'
menu7[6]='<a href="http://www2.wspa.com/spa/lifestyles/weddings/">Wedding 101</a>'
menu7[7]='<a href="http://www2.wspa.com/spa/lifestyles/flights/">Flight Tracking</a>'
menu7[8]='<a href="http://www2.wspa.com/spa/lifestyles/exercise/">Daily Exercise</a>'
menu7[9]='<a href="http://www2.wspa.com/spa/lifestyles/recipes/">Cooking Recipes</a>'
menu7[10]='<a href="http://media.mgnetwork.com/creativeservices/wspa/carolina_seniors/index.html">Carolina Seniors</a>'
menu7[11]='<a href="http://www2.wspa.com/spa/supper_swap_girls/">Supper Swap Girls</a>'

//Contents for menu 8  TOOLS
var menu8=new Array()
menu8[0]='<a href="http://www2.wspa.com/spa/online/#rss">RSS</a>'
menu8[1]='<a href="http://www2.wspa.com/spa/special_sections/">Database Center</a>'
menu8[2]='<a href="http://www2.wspa.com/spa/online/#email">Email Alerts</a>'
menu8[3]='<a href="http://www2.wspa.com/spa/online/#mobile">Text Alerts</a>'
menu8[4]='<a href="http://www2.wspa.com/spa/online/news_over_wireless/">Mobile Video</a>'
menu8[5]='<a href="http://www2.wspa.com/spa/online/gas/">Gas Prices</a>'
menu8[6]='<a href="http://www2.wspa.com/spa/online/mortgages/">Mortgage Finder</a>'
menu8[7]='<a href="http://www2.wspa.com/spa/online/mpg/">MPG Analysis</a>'

//Contents for menu 9  CLASSIFIEDS
var menu9=new Array()
menu9[0]='<a href="http://www2.wspa.com/spa/classifieds/auto_splash_page/">Autos</a>'
menu9[1]='<a href="http://ww2.wspa.com/Global/category.asp?C=120076">Health</a>'
menu9[2]='<a href="http://www2.wspa.com/spa/classifieds/jobs_splash_page/">Jobs</a>'
menu9[3]='<a href="http://www2.wspa.com/spa/classifieds/real_estate_splash_page/">Real Estate</a>'
menu9[4]='<a href="http://wspa.oodle.com/housing/rent/">Rentals</a>'
menu9[5]='<a href="http://wspa.oodle.com/sale/pet/">Pets</a>'
menu9[6]='<a href="http://wspa.oodle.com/sale/">Merchandise</a>'
menu9[7]='<a href="http://wspa.oodle.com/sale/tickets/">Tickets</a>'
menu9[8]='<a href="http://wspa.oodle.com/service/">Services</a>'


//Contents for menu 10  CONTACT US
var menu10=new Array()
menu10[0]='<a href="http://www2.wspa.com/spa/online/site_information/contacts/">Contact Us</a>'
menu10[1]='<a href="http://www2.wspa.com/spa/online/site_information/news_team/">News Team Bios</a>'
menu10[2]='<a href="http://www2.wspa.com/spa/online/childrens_programming/">Children\'s Programming</a>'
menu10[3]='<a href="http://www2.wspa.com/spa/site/terms_and_conditions/">Terms and Conditions</a>'
menu10[4]='<a href="http://jobs.mediageneral.com/jobsearch.asp">Jobs</a>'

//Contents for menu 11  SOCIAL NETWORKING
var menu11=new Array()
menu11[0]='<a href="http://www.wspa.com/spa/social_networking/blogs">Blogs</a>'
menu11[1]='<a href="http://www.myspace.com/wspatv">WSPA Myspace</a>'
menu11[2]='<a href="http://www.myspace.com/carolinascw">CW Myspace</a>'
menu11[3]='<a href="http://www.twitter.com/news_channel_7">Twitter</a>'
menu11[4]='<a href="http://snap.wspa.com/">Snap! Photo Gallery</a>'
menu11[5]='<a href="http://www.carolinascw.com/theribbit/">The Ribbit</a>'
menu11[6]='<a href="http://www.facebook.com/wspatv">Facebook</a>'


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

//Contents for menu 12  THINGS TO DO
var menu12=new Array()
menu12[0]='<a href="http://events.wspa.com">Events</a>'
menu12[1]='<a href="http://events.wspa.com/movies">Movies</a>'
menu12[2]='<a href="http://events.wspa.com/venues">Venues</a>'
menu12[3]='<a href="http://events.wspa.com/restaurants">Restaurants</a>'
menu12[4]='<a href="http://events.wspa.com/performers">Performers</a>'
menu12[5]='<a href="http://users.wspa.com/login?url=http%3A%2F%2Fevents.wspa.com%2F">Add Event</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