
var favoriteSubNavItems = null;

var topLevelNavStrings = ["Home","What's on TV","News","Video","Photos","Movies","Spotlight","TV Guide Network"];
var topLevelNavImages = ["new_home","new_whats","new_news","new_video","new_photos","new_movies","new_specials","new_network"];
var topLevelNavServers = ["www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com","www.tvguide.com","movies.tvguide.com","www.tvguide.com","www.tvguide.com"];
var topLevelNavLinks = ["/Home.aspx","/listings/default.aspx","/News-Views/","/Video/","/PhotoGallery/Landing.aspx","/movie-news","/special/redcarpet","/Channel/"];
var subNavItems = [[],["TV Listings","Fall TV Daily Grid","TV Show Recaps","New Tonight","TV Hot List","TV on DVD: On Sale","Most Popular TV Shows","Soaps"],["Today's News","Dancing with the Stars Blog","American Idol Blog","TV Guide Asks","DVD News","Celebrity Blogs"],["Online Video Guide","TV Guide Originals"],["All Photo Galleries"],["Movie News","Movies On DVD: On Sale","Movies on TV","Trailers","Most Popular Movies"],["Red Carpet","Golden Globes","Best of 2008","2008 Holiday Guide","Winter Preview 2009"],["TV Guide Network Home","TV Guide Network On Demand"]];
var subNavLinks = [[],["/Listings/default.aspx","/special/fall-preview-2008/fall-schedule.aspx","/episode-recaps","/new-tonight","/keywords/TV-Hot-List","/news-views/dvd-sales.aspx","/top-tv-shows","/soap-operas"],["/news","/dancing-stars","/american-idol","/Asks","/dvd-news","/celebrity-blogs"],["/","/Video/player.aspx"],["/PhotoGallery/archive.aspx"],["/movie-news","/movies-dvd","/movies-tv","/movies-trailers","/top/movies.aspx"],["/special/redcarpet","/special/golden-globes/","/special/best-of-year-2008/","/special/Holiday-Guide-2008","/special/winter-preview/"],["/Channel/default.aspx","/Channel/TVGOnDemand.aspx"]];
var subNavSrvrs = [[],["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"],["movies.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"]];

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!=null){strWebServer=strWebServer.toLowerCase();if(strWebServer.indexOf("akamai-origin")>=0){strWebServer="www.tvguide.com";}}function initTVGuideNavbar(){if(strWebServer.indexOf('community')==0){isCommunity=true;navImagePrefix="ovg_";}if(strWebServer.indexOf('video')==0){isOnlineVideo=true;navImagePrefix="ovg_";}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>");}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];NavItem.SubNav=new Array();if((n==6)&&(favoriteSubNavItems!=null)){for(var i=0;i<favoriteSubNavItems.length;i++){var SubNavItem=new Object();SubNavItem.Text=favoriteSubNavItems[i][0];SubNavItem.Link=favoriteSubNavItems[i][1];SubNavItem.Srvr="FAVORITE";NavItem.SubNav.push(SubNavItem);}}else{for(var i=0;i<subNavItems[n].length;i++){var SubNavItem=new Object();SubNavItem.Text=subNavItems[n][i];SubNavItem.Link=subNavLinks[n][i];SubNavItem.Srvr=subNavSrvrs[n][i];NavItem.SubNav.push(SubNavItem);}}NavData.push(NavItem);}drawTVGuideNav();}function getFullURL(srvr, href){if(strWebServer!=srvr){if(srvr=="FAVORITE"){return href;}switch(strWebServer){case "community.tvguide.com": case "stage-community.tvguide.com": case "www.tvguide.com": case "tvguide.com": case "video.tvguide.com": case "bbp-pilot.tvguide.com": case "rad1onlsps1.tvguide.com": href="http:\/\/"+srvr+href;break;case "movies-dev.tvguide.com": case "movies-frogserv.tvguide.com": case "movies-qa.tvguide.com": case "movies-qa-beta.tvguide.com": case "movies-beta.tvguide.com": case "movies-tvg01.tvguide.com": case "movies.tvguide.com": if(srvr=="www.tvguide.com") href=WWWBaseUrl+href;else if(srvr=="movies.tvguide.com") href=MoviesBaseUrl+href;else href="http:\/\/"+srvr+href;break;default: switch(srvr){case "www.tvguide.com": break;case "movies.tvguide.com": href=MoviesBaseUrl+href;break;default: href="http:\/\/"+srvr+href;break;}break;}}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!=null){imgObj.src=img;}}function imgDim(nIndex){var img=imageServerPrefix+"\/images\/navigation\/"+navImagePrefix+NavData[nIndex].Image+".gif";var imgObj=document.getElementById("topnavimg"+nIndex);if(imgObj!=null){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!=null){if((e.offsetLeft>0)&&(e.id=="body")){outer=e.offsetLeft;}x+=e.offsetLeft;}e=e.offsetParent;}if( (isOnlineVideo ||isCommunity) && (outer!=null) ){x-=outer;}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!=null){obj.style.display="none";obj.style.visibility="hidden";if((useIFrameBacking)&&(ifr!=null)){ifr.style.display="none";ifr.style.visibility="hidden";}if(useDropShadow){var objShadow=document.getElementById("SubMenuShadow");if(objShadow!=null){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!=null){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!=null)){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!=null){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();