
var favoriteSubNavItems = null;

var topLevelNavStrings = ["Home","What's on TV","Watchlist","News","Sports","Full Episodes","Photos","Movies","TV Guide Network","TV Guide Magazine"];
var topLevelNavImages = ["www_home","www_whats","www_mytvguide","www_news","www_specials","www_video","www_photos","www_movies","www_network",""];
var topLevelNavServers = ["www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com","video.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com"];
var topLevelNavLinks = ["/","/Listings/","/watchlist","/news","/sports/watch-live","/episodes.aspx","/PhotoGallery/","/keywords/movie-scoop","/channel","/keywords/tv-guide-magazine"];
var subNavItems = [[],["TV Listings","New Tonight","Today's Live Sports","Sports Listings","Winter TV Schedule","Movies on Demand","Soaps"],["Your Watchlist","Celebrity Watchlists","Friends' Facebook Favorites","Latest Tweets","What is a Watchlist?"],["Today's News","Winter Preview","TV Guide Video Exclusives","TV Show Recaps","Jump The Shark"],["Today's Live Sports","Sports Listings","NFL Schedule","MLB","NBA","NHL"],["Your Watchlist","Online Video Guide"],["Grammys","Oscars","Red Carpet","SAG Awards","Winter Preview","It's a No Brainer!"],["Movies on TV","Movies On Demand","Trailers"],["TV Guide Network","TV Guide Network Channel Locator","TV Guide Network On Demand","Top Infomercial Products "],["Matt Roush","Keck's Exclusives","The Biz","Cheers &amp; Jeers","Photos","Videos","Subscribe","Media Kit"]];
var subNavLinks = [[],["/Listings/","/new-tonight","/sports/watch-live","/sports/listings","/special/winter-preview/winter-schedule.aspx","/movies-on-demand","/soap-operas"],["/watchlist","/watchlist/celebrities/","/watchlist/friends-favorites/","/watchlist/tweets/","/special/watchlist/watchlist-video.aspx"],["/news","/special/winter-preview/","/video/player.aspx","/episode-recaps","/jumptheshark"],["/sports/watch-live","/sports/listings","/special/nfl-schedule/","/sports/baseball","/sports/nba","/sports/nhl"],["/watchlist","/"],["/special/Grammys/","/special/oscars/","/special/redcarpet/","/special/SAG/","/special/winter-preview/","/special/no-brainer/"],["/movies-tv","/movies-on-demand","/movies-trailers"],["/channel","/channel/locator.aspx","/Channel/TVGOnDemand.aspx","/top-products/ "],["/keywords/matt-roush","/keywords/kecks-exclusives","/keywords/the-biz","/keywords/cheers-jeers","/keywords/tv-guide-magazine-photos","/keywords/tv-guide-magazine-videos","w1.buysub.com/loc/TVM/dropdown","www.tvguidemagsales.com/"]];
var subNavSrvrs = [[],["www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com","movies.tvguide.com","www.tvguide.com"],["www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com"],["www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com"],["www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com"],["www.tvguide.com","video.tvguide.com"],["www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com"],["movies.tvguide.com","movies.tvguide.com","movies.tvguide.com"],["www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com"],["www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com","",""]];

var NavData=new Array();var iCurrentSubNav=0;var oHideTimeout=null;var iExitDelayMSecs=75;var strHighlightColor="#CDCBBC";var strBorderColor="#CDCBBC";var isInternetExplorer=navigator.userAgent.indexOf("MSIE")>0;var isSafariBrowser=navigator.userAgent.indexOf("Safari")>0;var isCommunity=false;var isOnlineVideo=false;var useIFrameBacking=false;var useDropShadow=true;var iDropShadowOffset=4;var strWebServer=document.location.hostname;var strNavTxt="";var imageServerPrefix="http://www.tvguide.com";var navImagePrefix="";if(strWebServer){strWebServer=strWebServer.toLowerCase();if(strWebServer.indexOf("akamai-origin")>=0){strWebServer="www.tvguide.com";}}function initTVGuideNavbar(){document.write("<div id='TopNavSubMenu' style='background-color:#FFFFFF;display:none;visibility:hidden;left:0;top:0;position:absolute;padding:0px 0px 0px 0px;width:auto;'></div>");document.write("<div id='SubMenuShadow' style='background-color:#333333;color:#333333;display:none;visibility:hidden;left:0;top:0;position:absolute;padding:0px 0px 0px 0px;'></div>");if(isInternetExplorer){useIFrameBacking=true;document.write("<iframe id='SubNavIFrame' style='left:0;top:0;position:absolute;display:none;border:none;' frameborder=no scrolling=no></iframe>");}var bUseBetaGridNav=false;for(var n=0;n<topLevelNavImages.length;n++){var NavItem=new Object();NavItem.Srvr=topLevelNavServers[n];NavItem.Text=topLevelNavStrings[n];NavItem.Link=topLevelNavLinks[n];NavItem.Image=topLevelNavImages[n];if ((bUseBetaGridNav) && (NavItem.Link.match(/^\/listings\/default/i))){NavItem.Link="/Listings/betagrid.aspx";}var i=0;var SubNavItem=null;NavItem.SubNav=new Array();if((n==6)&&(favoriteSubNavItems)){for(i=0;i<favoriteSubNavItems.length;i++){SubNavItem=new Object();SubNavItem.Text=favoriteSubNavItems[i][0];SubNavItem.Link=favoriteSubNavItems[i][1];SubNavItem.Srvr="FAVORITE";NavItem.SubNav.push(SubNavItem);}}else{for(i=0;i<subNavItems[n].length;i++){SubNavItem=new Object();SubNavItem.Text=subNavItems[n][i];SubNavItem.Link=subNavLinks[n][i];SubNavItem.Srvr=subNavSrvrs[n][i];if ((bUseBetaGridNav) &&(SubNavItem.Link.match(/^\/listings\/default/i))){SubNavItem.Link="/Listings/betagrid.aspx";}NavItem.SubNav.push(SubNavItem);}}NavData.push(NavItem);}drawTVGuideNav();}function getFullURL(srvr, href){if(strWebServer!=srvr){if (srvr=="www.tvguide.com") href=WWWBaseUrl+href;else if (srvr=="movies.tvguide.com") href=MoviesBaseUrl+href;else if (srvr=="sports.tvguide.com") href=SportsBaseUrl+href;else if (srvr=="video.tvguide.com") href=OvgBaseUrl+href;else href="http:\/\/"+srvr+href;}return href;}function clickTopMenu(nIndex){if(nIndex==1){try{countHPGridClick("Nav-TopLink");}catch(e){}}document.location=getFullURL(NavData[nIndex].Srvr,NavData[nIndex].Link);}function clickSubMenu(nIndex, nSubIndex){if((nIndex==1)&&(nSubIndex===0)){try{countHPGridClick("Nav-SubMenu");}catch(e){}}document.location=getFullURL(NavData[nIndex].SubNav[nSubIndex].Srvr,NavData[nIndex].SubNav[nSubIndex].Link);}function drawTVGuideNav(){var strNavBar="<div style=\"padding:0px 0px 0px 0px;clear:both;\"><table cellpadding=0 cellspacing=0 border=0><tr>";for(var n=0;n<NavData.length;n++){var hrf="";var img=imageServerPrefix+"\/images\/navigation\/"+navImagePrefix+NavData[n].Image+".gif";if(NavData[n].Link.indexOf("javascript")>=0){hrf+="onclick=\""+NavData[n].Link+"\"";}else{hrf+="onclick=\"javascript:clickTopMenu("+n+")\"";}strNavBar+="<td><div "+hrf+" onmouseover=\"javascript:navOver("+n+")\" onmouseout=\"javascript:navOut("+n+")\" style=\"cursor:pointer;\">";strNavBar+="<img src='"+img+"' id='topnavimg"+n+"'></div><\/td>";}strNavBar+="<\/tr><\/table></div>";document.write(strNavBar);}function imgHighlight(nIndex){var img=imageServerPrefix+"\/images\/navigation\/"+navImagePrefix+NavData[nIndex].Image+"On.gif";var imgObj=document.getElementById("topnavimg"+nIndex);if(imgObj){imgObj.src=img;}}function imgDim(nIndex){var img=imageServerPrefix+"\/images\/navigation\/"+navImagePrefix+NavData[nIndex].Image+".gif";var imgObj=document.getElementById("topnavimg"+nIndex);if(imgObj){imgObj.src=img;}}function navOver(nIndex){imgDim(iCurrentSubNav);clearTimeout(oHideTimeout);window.status=NavData[nIndex].Text;imgHighlight(nIndex);navSubMenu(nIndex);}function navOut(nIndex){imgDim(nIndex);oHideTimeout=setTimeout("hideSubMenu()",iExitDelayMSecs);}function getX(e){var x=0;var outer;while(e){if(e.offsetLeft){if((e.offsetLeft>0)&&(e.id=="body")){outer=e.offsetLeft;}x+=e.offsetLeft;}e=e.offsetParent;}return x;}function getY(e){var x=0;while(e){x+=e.offsetTop;e=e.offsetParent;}return x;}function hideSubMenu(){var obj=document.getElementById("TopNavSubMenu");var ifr=document.getElementById("SubNavIFrame");if(obj){obj.style.display="none";obj.style.visibility="hidden";if((useIFrameBacking)&&(ifr)){ifr.style.display="none";ifr.style.visibility="hidden";}if(useDropShadow){var objShadow=document.getElementById("SubMenuShadow");if(objShadow){objShadow.style.display="none";objShadow.style.visibility="hidden";}}imgDim(iCurrentSubNav);}}function navSubMenu(nIndex){var iZindex=getMaxZindex();if(NavData[nIndex].SubNav.length>0){var obj=document.getElementById("TopNavSubMenu");var ifr=document.getElementById("SubNavIFrame");if(obj){obj.innerHTML=getSubMenuHTML(nIndex);var imgObj=document.getElementById("topnavimg"+nIndex);var iL=parseInt(getX(imgObj),10);var iT=parseInt(getY(imgObj),10)+parseInt(imgObj.offsetHeight,10)-1;obj.style.left=iL+"px";obj.style.top=iT+"px";obj.style.display="block";if((useIFrameBacking)&&(ifr)){ifr.style.left=iL+"px";ifr.style.top=iT+"px";ifr.style.width=obj.offsetWidth+"px";ifr.style.height=obj.offsetHeight+"px";ifr.style.zIndex=iZindex;ifr.style.display="block";ifr.style.visibility="visible";iZindex++;}if(useDropShadow){var objShadow=document.getElementById("SubMenuShadow");if(objShadow){objShadow.style.left=iL+iDropShadowOffset+"px";objShadow.style.top=iT+iDropShadowOffset+"px";objShadow.style.width=obj.offsetWidth+"px";objShadow.style.height=obj.offsetHeight+"px";objShadow.style.display="block";objShadow.style.zIndex=iZindex;objShadow.style.visibility="visible";iZindex++;}}obj.style.zIndex=iZindex;obj.style.visibility="visible";iCurrentSubNav=nIndex;}}else{oHideTimeout=setTimeout("hideSubMenu()",iExitDelayMSecs);}}function rowEnter(theDiv, nIndex, nSubIndex){clearTimeout(oHideTimeout);imgHighlight(nIndex);if(!isSafariBrowser){theDiv.style.backgroundColor=strHighlightColor;}window.status=NavData[nIndex].SubNav[nSubIndex].Text;}function rowExit(theDiv){if(!isSafariBrowser){theDiv.style.backgroundColor="#FFFFFF";}oHideTimeout=setTimeout("hideSubMenu()",iExitDelayMSecs);window.status="";}function getSubMenuHTML(nIndex){var strHTML="<table id=tvgSubNavTable cellpadding=0 cellspacing=0 style='width:120px;background-color:#FFFFFF;overflow:visible;border-left:solid 1px "+strBorderColor+";border-right:solid 1px "+strBorderColor+";border-top:solid 1px "+strBorderColor+";'>";for(var n=0;n<NavData[nIndex].SubNav.length;n++){var strText=NavData[nIndex].SubNav[n].Text;var strLink=NavData[nIndex].SubNav[n].Link;strHTML+="<tr><td style='background-color:#FFFFFF;border-bottom:solid 1px "+strBorderColor+";text-align:left;cursor:pointer;padding:3px 9px 3px 9px;font-size:11px;'";if(NavData[nIndex].SubNav[n].Link.indexOf("javascript")>=0){strHTML+="onclick=\""+strLink+"\" ";}else{strHTML+="onclick=\"javascript:clickSubMenu("+nIndex+","+n+")\" ";}strHTML+="onmouseover='javascript:rowEnter(this,"+nIndex+","+n+")' onmouseout='javascript:rowExit(this)' NOWRAP>";strHTML+=strText;strHTML+="<\/td><\/tr>";}strHTML+="<\/table>";return strHTML;}function getMaxZindex(){if (document.getElementsByTagName){return document.getElementsByTagName("DIV").length+1000;}else if (document.all){return document.body.all.tags("DIV").length+1000;}else if (document.layers){return document.layers.length+1000;}return 999999999;}initTVGuideNavbar();
