ulTRAX'S ARCHIVE
WTV SOURCE CODE
WTV-HOME:/HOME
Created: 9-13-2000. Source code © WNI. Page design and Entire Site © ulTRAX@webtv.net.
Press "PREVIEW" to see actual page.
~ WTV SOURCE CODE INDEX ~
JAVASCRIPT ERROR!! RELOAD
<html> <head> <script language="JavaScript"> var gEmbedTag; var gLinkTag; var gNumCategories = 6; // how many categories does the user like? var gCurrentIndex; // index of current teaser var gEmbedURL; // prefix of URL to point embed to (minus category name) var gLinkURL; // prefix of URL that embed should link to (minus category name) var gCategories = new Array(); // Names of info categories var gTeaserBlacklisted = new Array(); // 1 iff we've tried to load this teaser and timed out var gTimeoutHandle; // handle to timer for timeout so we can cancel it if we succeed var gRotateTimerHandle; // handle to timer for rotation so we can cancel it when going to generic teaser var gStale; // 1 iff we've reverted to generic teaser var gWeather = new Array(); // array of weather predictions to rotate through var gWeatherIndex; // index of which weather prediction we're showing var gFirstWeatherIndex; // index of first slot in weather rotation var gWeatherTimeout; var gNumLoaded=0; // 1 for home page, 1 for loading teaser; 2 required to start rotation // --------------------------------------------------------- // --------------------------------------------------------- function Initialize() { ++gNumLoaded; if (gNumLoaded 2) return; var i; gEmbedURL = "wtv-partner:/custom-info-teaser?info="; gLinkURL = "wtv-partner:/custom-info-page#"; gCategories[0] = "News"; gCategories[1] = "Weather"; gCategories[2] = "Stocks"; gCategories[3] = "Sports"; gCategories[4] = "Entertainment"; gCategories[5] = "Intro"; <for (i=0; i=5; ++i) gTeaserBlacklisted[i] = 0; gCurrentIndex = -1; // so when we first increment it, it points to the first teaser gStale = 0; gEmbedTag = document.customInfoEmbed; gLinkTag = document.customInfoLink; if (typeof gEmbedTag.document == "undefined") { setTimeout(Initialize, 100); // wait 0.1 seconds and try again return; } gRotateTimerHandle = setTimeout(RotateToNextTeaser, 4000); setTimeout(CheckConnectionStatus, 600000); } // --------------------------------------------------------- // Checks to see if the box is connected or not. If we're disconnected, // we should run our generic "evergreen" teaser... if connected, we // should rotate. // --------------------------------------------------------- function CheckConnectionStatus() { var nextPoll; // Did we just reconnect? if (navigator.networkOnline() && gStale == 1) { ResumeRotation(); nextPoll = 600000; } // Are we disconnected? else if (!navigator.networkOnline()) { // Did we just disconnect recently? if (gStale == 0) RevertToGenericTeaser(); nextPoll = 1000; } // We're still connected... else { nextPoll = 60000; } setTimeout(CheckConnectionStatus, nextPoll); } // --------------------------------------------------------- // If box disconnects, replace information with long-shelf-life teaser // so user doesn't see old information. // --------------------------------------------------------- function RevertToGenericTeaser() { gStale = 1; gCurrentIndex = -1; clearTimeout(gTimeoutHandle); clearTimeout(gRotateTimerHandle); WriteEvergreenTeaser(); } // --------------------------------------------------------- // This HTML is a duplicate of CustomInfoEvergreen. // --------------------------------------------------------- function WriteEvergreenTeaser() { gEmbedTag.document.open(); <gEmbedTag.document.write( "<html><body bgcolor=13142e><table cellspacing=0 cellpadding=0>" + "<tr><td width=422 height=22>table cellspacing=0 cellpadding=0 " + <"bgcolor=313657 gradcolor=13142e gradangle=90><tr>td width=422 height=2 " + <"colspan=2 bgcolor=FFFFFF transparency=80%>" + "<img src=wtv-home:/ROMCache/PromotionLeftEdge.gif width=7 height=2>" + "<tr>td width=7 height=20 rowspan=2 " + <"background=wtv-home:/ROMCache/PromotionLeftEdge.gif><td width=7 height=2>" + "<tr><td width=415 height=18 align=left valign=center><font color=bdbd8d>" + "<blackface>My WebTV</blackface></font></table><tr><td width=422 height=44>" + "<table cellspacing=0 cellpadding=0><tr>td width=7 height=44 " + <"background=wtv-home:/ROMCache/PromotionLeftEdge.gif>td width=415 height=44 " + <"align=left valign=center><font color=bdbdbd size=-1>Choose the news and entertainment topics, sports,<br>and " + "stocks that you want to see here.</font></table></table></body></html>"); gEmbedTag.document.close(); gLinkTag.href = "wtv-partner:/custom-info-page"; } // --------------------------------------------------------- // --------------------------------------------------------- function ResumeRotation() { gStale = 0; RotateToNextTeaser(); } // --------------------------------------------------------- // --------------------------------------------------------- function RotateToNextTeaser() { if (gStale == 0) { ++gCurrentIndex; gCurrentIndex = gCurrentIndex % gNumCategories; // If the next teaser is blacklisted, write out our standard sorry message if (gTeaserBlacklisted[gCurrentIndex] == 1) { PostSorryMessage(); } // Otherwise, point the embed to the proper URL else { if (gNumCategories > 1) { gTimeoutHandle = setTimeout(Timeout, 40000); } if (gCategories[gCurrentIndex] == "Intro") { WriteEvergreenTeaser(); CustomEmbedLoaded(); gLinkTag.href = gLinkURL; } else { gEmbedTag.src = gEmbedURL + gCategories[gCurrentIndex]; // This code made the My WebTV page scroll automatically // to the category that was showing when you hit the teaser. // gLinkTag.href = gLinkURL + gCategories[gCurrentIndex]; } } } } // --------------------------------------------------------- // The HTML that this function writes out must be kept in synch with // the framework in CustomCellEmbedded and the text in TeaserMessage. // --------------------------------------------------------- function PostSorryMessage() { gEmbedTag.document.open(); gEmbedTag.document.write( "<html><body bgcolor=13142e><table border=0 cellspacing=0 cellpadding=0>" + "<tr><td width=422 height=22>table border=0 cellspacing=0 cellpadding=0 " + <"bgcolor=313657 gradcolor=13142e gradangle=90><tr>td width=422 height=2 " + <"colspan=2 bgcolor=FFFFFF transparency=80%>img src=/ROMCache/PromotionLeftEdge.gif " + <"width=7 height=2><tr>td width=7 height=20 rowspan=2 " + <"background=/ROMCache/PromotionLeftEdge.gif><td width=7 height=2>" + "<tr><td width=415 height=18 align=left valign=center><font color=bdbd8d>" + "<blackface>" + gCategories[gCurrentIndex] + "</blackface></font></table><tr>" + "<td width=422 height=44>" + "<table border=0 cellspacing=0 cellpadding=0><tr>td width=7 height=44 " + <"background=/ROMCache/PromotionLeftEdge.gif>td width=415 height=44 " + <"align=left valign=center><font color=bdbdbd size=-1>" + gCategories[gCurrentIndex] + " information is temporarily unavailable.</font></table></table></body></html>"); gEmbedTag.document.close(); gLinkTag.href = "wtv-partner:/custom-info-page"; SetRotateTimer(); } // --------------------------------------------------------- // This gets called if we fail to load a particular teaser after a // timeout period. If we load it successfully, we cancel the timer // timer so this doesn't get called. // --------------------------------------------------------- function Timeout() { if (!navigator.networkOnline()) { RevertToGenericTeaser(); } else { gTeaserBlacklisted[gCurrentIndex] = 1; PostSorryMessage(); } } // --------------------------------------------------------- // --------------------------------------------------------- function SetRotateTimer() { var delay; if (gCategories[gCurrentIndex] == "Weather") delay = 8600; else if (gCategories[gCurrentIndex] == "News") delay = 7000; else if (gCategories[gCurrentIndex] == "Stocks") delay = 7000; else if (gCategories[gCurrentIndex] == "Sports") delay = 5000; else if (gCategories[gCurrentIndex] == "Entertainment") delay = 5000; else if (gCategories[gCurrentIndex] == "Intro") delay = 7000; else delay = 6000; if (gNumCategories > 1) gRotateTimerHandle = setTimeout(RotateToNextTeaser, delay); } // --------------------------------------------------------- // --------------------------------------------------------- function CustomEmbedLoaded() { var doc; clearTimeout(gWeatherTimeout); if (gStale == 0) { clearTimeout(gTimeoutHandle); SetRotateTimer(); } doc = document.customInfoEmbed.document; if (gCategories[gCurrentIndex] == "Weather" && doc.weatherForm == nil) { setTimeout(CustomEmbedLoaded, 100); return; } if (gCategories[gCurrentIndex] == "Weather" && typeof doc.weatherForm == "object") { doc.weatherForm.disp1a.value = doc.weatherForm.disp1.value; doc.weatherForm.disp2a.value = doc.weatherForm.disp2.value; gFirstWeatherIndex = 0; gWeatherIndex = gFirstWeatherIndex; gWeatherTimeout = setTimeout(RotateWeather, 2900); } } // --------------------------------------------------------- // --------------------------------------------------------- function RotateWeather() { var doc; var str1, str2; doc = document.customInfoEmbed.document; if (gCategories[gCurrentIndex] == "Weather" && doc.weatherForm != nil && typeof doc.weatherForm == "object") { ++gWeatherIndex; if (gWeatherIndex > 2) gWeatherIndex = gFirstWeatherIndex; if (gWeatherIndex == 1) { str1 = doc.weatherForm.disp1b.value; str2 = doc.weatherForm.disp2b.value; } else if (gWeatherIndex == 2) { str1 = doc.weatherForm.disp1c.value; str2 = doc.weatherForm.disp2c.value; } else { str1 = doc.weatherForm.disp1a.value; str2 = doc.weatherForm.disp2a.value; } doc.weatherForm.disp1.value = str1; doc.weatherForm.disp2.value = str2; if (gWeatherIndex != 2 || gNumCategories == 1) gWeatherTimeout = setTimeout(RotateWeather, 2900); } } </script> <display hspace=0 vspace=0 fontsize=medium noscroll showwhencomplete> <title> Home for Flog-Our-Mink </title> </head> <sidebar width=138> <table cellspacing=0 cellpadding=0 bgcolor=30364d> <tr><td valign=top colspan=3> <table cellspacing=0 cellpadding=0 height=110> <tr> <td height=7> <tr> <td colspan=3 valign=top align=center> <spacer type=block width=10> <a href="wtv-home:/Credits-Introduction"> <spacer type=block height=3><img src="wtv-home:/ROMCache/WebTVLogoJewel.gif" width=127 height=98> </a> </table> <tr> <td height=2 colspan=3 bgcolor=252834> <spacer> <tr> <td height=1 colspan=3> <spacer> <tr> <td height=2 colspan=3 bgcolor=4d5573> <spacer> <tr><td valign=top> <tr> <td abswidth=7> <td abswidth=125 height=24> <table cellspacing=0 cellpadding=0 href="wtv-setup:/setup"> <tr><td height=4> <tr><td valign=middle> <table cellspacing=0 cellpadding=0> <tr><td valign=middle><shadow><font size=3 color=e7d694> Setup</font></shadow> </table> <tr><td height=1> </table> <td abswidth=6> <tr> <td height=2 colspan=3 bgcolor=252834> <spacer> <tr> <td height=1 colspan=3> <spacer> <tr> <td height=2 colspan=3 bgcolor=4d5573> <spacer> <tr> <td abswidth=7> <td abswidth=125 height=24> <table cellspacing=0 cellpadding=0 href="wtv-guide:/guide"> <tr><td height=4> <tr><td valign=middle> <table cellspacing=0 cellpadding=0> <tr><td valign=middle><shadow><font size=3 color=e7d694> Using WebTV</font></shadow> </table> <tr><td height=1> </table> <td abswidth=6> <tr> <td height=2 colspan=3 bgcolor=252834> <spacer> <tr> <td height=1 colspan=3> <spacer> <tr> <td height=2 colspan=3 bgcolor=4d5573> <spacer> <tr> <td abswidth=7> <td abswidth=125 height=24> <table cellspacing=0 cellpadding=0 href="wtv-home:/community"> <tr><td height=4> <tr><td valign=middle> <table cellspacing=0 cellpadding=0> <tr><td valign=middle><shadow><font size=3 color=e7d694> Community</font></shadow> </table> <tr><td height=1> </table> <td abswidth=6> <tr> <td height=2 colspan=3 bgcolor=252834> <spacer> <tr> <td height=1 colspan=3> <spacer> <tr> <td height=2 colspan=3 bgcolor=4d5573> <spacer> <tr> <td abswidth=7> <td abswidth=125 height=24> <table cellspacing=0 cellpadding=0 href="wtv-content:/redirect?req-id=tvguide"> <tr><td height=4> <tr><td valign=middle> <table cellspacing=0 cellpadding=0> <tr><td valign=middle><shadow><font size=3 color=e7d694> What's on TV</font></shadow> </table> <tr><td height=1> </table> <td abswidth=6> <tr> <td height=2 colspan=3 bgcolor=252834> <spacer> <tr> <td height=1 colspan=3> <spacer> <tr> <td height=2 colspan=3 bgcolor=4d5573> <spacer> <tr><td valign=bottom align=right height=153 colspan=3> <img src="wtv-home:/ROMCache/HomeBanner.gif"> </table> </sidebar> <body onLoad="Initialize()" bgcolor=13142e> <table cellspacing=0 cellpadding=0 border=0 abswidth=422 absheight=384> <tr> <td colspan=2> <table cellspacing=0 cellpadding=0 border=0 background=wtv-home:/ROMCache/TopRowGradient.gif> <tr> <td abswidth=95 absheight=110> <table cellspacing=0 cellpadding=0 width="95" href="wtv-mail:/listmail" transition=light selected insetSelection> <tr><td width=95> <table border=0 cellspacing=0 cellpadding=0> <tr> <td height=16> <tr> <td align=left abswidth=80 absheight=57> <spacer type=block width=12><embed src=wtv-mail:/mailbox-image?mailbox-icon=true border=0 width=68 height=57 nobackground> <tr> <td height=6> </table> <tr><td width=95> <table border=0 cellspacing=0 cellpadding=0> <tr> <td height=5> <tr> <td width=32> <td align=center> <font color=000000>Mail</font> <tr> <td height=8> </table> </table> <td abswidth=103 absheight=110> <table cellspacing=0 cellpadding=0 width="103" href="wtv-favorite:/favorite" transition=light insetSelection> <tr><td width=103> <table border=0 cellspacing=0 cellpadding=0> <tr> <td height=22> <tr> <td align=left> <spacer type=block width=6><img src=wtv-home:/ROMCache/TreasureChest1.gif border=0 width=92 height=52> <tr> <td height=5> </table> <tr><td width=103> <table border=0 cellspacing=0 cellpadding=0> <tr> <td height=5> <tr> <td width=11> <td align=center> <font color=000000>Favorites</font> <tr> <td height=8> </table> </table> <td abswidth=95 absheight=110> <table cellspacing=0 cellpadding=0 width="95" href="wtv-explore2:/top" transition=light insetSelection> <tr><td width=95> <table border=0 cellspacing=0 cellpadding=0> <tr> <td height=15> <tr> <td align=left> <spacer type=block width=9><img src=wtv-home:/ROMCache/NavigationGlobe0.gif border=0 width=68 height=59> <tr> <td height=5> </table> <tr><td width=95> <table border=0 cellspacing=0 cellpadding=0> <tr> <td height=5> <tr> <td width=16> <td align=center> <font color=000000>Explore</font> <tr> <td height=8> </table> </table> <td abswidth=108 absheight=110> <table cellspacing=0 cellpadding=0 width="108" href="http://www.infoseek.com/?sv=W1" transition=light insetSelection> <tr><td width=108> <table border=0 cellspacing=0 cellpadding=0> <tr> <td height=19> <tr> <td align=left> <spacer type=block width=8><img src=wtv-home:/ROMCache/Binoculars0.gif width=86 height=54> <tr> <td height=6> </table> <tr><td width=108> <table border=0 cellspacing=0 cellpadding=0> <tr> <td height=5> <tr> <td width=22> <td align=center> <font color=000000>Search</font> <tr> <td height=8> </table> </table> <td abswidth=21 absheight=110> <table cellspacing=0 cellpadding=0 width="21" transition=light insetSelection> <tr><td width=21> <table border=0 cellspacing=0 cellpadding=0> <tr> <td height=16> <tr> <td align=left> <spacer type=block width=14><spacer type=block height=52> <tr> <td height=11> </table> <tr><td width=21> <table border=0 cellspacing=0 cellpadding=0> <tr> <td height=5> <tr> <td width=22> <td align=center> <font color=000000> </font> <tr> <td height=8> </table> </table> </table> <tr> <td abswidth=280 absheight=208> <embed src="wtv-home:/promo-tile?preview-date=" width=280 height=208> <td abswidth=142 absheight=208> <embed src="wtv-home:/partner-tile?preview-date=" width=142 height=208> <tr> <td colspan=2> <table border=0 cellspacing=0 cellpadding=0 bgcolor=13142e> <tr> <td width=422 absheight=66> <a name="customInfoLink" href="wtv-partner:/custom-info-page" insetselection> <embed name="customInfoEmbed" src="/templates/en-US/CustomInfoLoading.html" width=422 absheight=66> </a> </table> </table> </body> <LINK href="/ROMCache/teaser-News.gif" rel=next> <LINK href="wtv-partner:/custom-info-teaser?info=News" rel=next> </html>