home *** CD-ROM | disk | FTP | other *** search
/ CyberMycha 2003 October / cmycha200310.iso / NHL2004 / NHL2004Demo.exe / fe / COMMON / js / GUI_FrameWork.js < prev    next >
Text File  |  2003-08-20  |  37KB  |  1,018 lines

  1. GUI_FrameWork            = function()
  2. {
  3.     this.isLoaded            = false;
  4.     this.currentScreenObj    = null;
  5.     this.isNavigatingProp        = false;
  6.     this.navTimerID        = 0;
  7.     this.teamId = "";
  8.     this.skinned = false;
  9.     this.skinMainMenu = false;
  10.     this.isInCreatePlayer = false;    
  11.     top.attachEvent("onload", this.OnMainLoad);
  12. };
  13. GUI_FrameWork.prototype.console            = {};
  14. GUI_FrameWork.prototype.console.println    = function(htmlStr) {    htmlStr = null; };
  15. GUI_FrameWork.prototype.general            = {};
  16. GUI_FrameWork.prototype.general.data        = new Array();
  17. GUI_FrameWork.prototype.ticker            = {};
  18. GUI_FrameWork.prototype.ticker.data        = new Array();
  19. GUI_FrameWork.prototype.ticker.loadFromServer = function()
  20. {
  21.     function OnTickerDataComplete(data)
  22.     {
  23.         var xmlDom        = new ActiveXObject("MSXML2.DOMDocument");
  24.              xmlDom.async    = false;
  25.          var bLoaded        = xmlDom.loadXML("<ticker_news>" + data + "</ticker_news>");
  26.         if (bLoaded) {
  27.             var nodes        = xmlDom.selectNodes("ticker_news/line");
  28.  
  29.             if (nodes) {
  30.                 for (var idx=0; idx < nodes.length; idx++)
  31.                 {
  32.                     System.GUI.ticker.data[idx] = nodes[idx].text;
  33.                 };
  34.                 top.document.all.ticker_data.innerHTML         = "<div>" + System.GUI.ticker.data.join("!~^!").replace(/(?:\!\~\^\!)/g, "</div><div>") + "</div>";
  35.                 top.document.all.ticker_sample.innerHTML     = "<div>" + System.GUI.ticker.data[0] + "</div>";
  36.                 System.GUI.ticker._lineHeight                = top.document.all.ticker_sample.offsetHeight;
  37.                 System.GUI.ticker._currentLine            = 0;
  38.                 System.GUI.ticker._startAnimation();
  39.             };
  40.         } else {
  41.         };
  42.         xmlDom = bLoaded = nodes = idx = data = null;
  43.     };
  44.     System.GUI.ticker._stopAnimation();
  45.     getTickerLines("ticker", "public_ticker_en_us", "line", OnTickerDataComplete, true);
  46. };
  47. GUI_FrameWork.prototype.ticker.loadFromString    = function(str)
  48. {
  49.     System.GUI.ticker._stopAnimation();
  50.     System.GUI.data.length     = 0;
  51.     System.GUI.data[0]        = str;
  52.     top.document.all.ticker_data.innerHTML = System.GUI.ticker.data[0];
  53.     System.GUI.ticker._currentLine        = 0;
  54.     System.GUI.ticker._currentLineWidth    = top.document.all.ticker_data.scrollWidth;
  55.     System.GUI.ticker._startAnimation();
  56.     str = null;
  57. };
  58. GUI_FrameWork.prototype.ticker._startPos            = 40;
  59. GUI_FrameWork.prototype.ticker._stopPos            = 0;
  60. GUI_FrameWork.prototype.ticker._moveTimeoutID        = -1;
  61. GUI_FrameWork.prototype.ticker._animTimerID        = -1;
  62. GUI_FrameWork.prototype.ticker._animStarTime        = -1;
  63. GUI_FrameWork.prototype.ticker._currentLine            = -1;
  64. GUI_FrameWork.prototype.ticker._lineHeight            = -12;
  65. GUI_FrameWork.prototype.ticker._stopAnimation        = function()
  66. {
  67.     clearInterval(System.GUI.ticker._moveTimeoutID);
  68.     clearInterval(System.GUI.ticker._animTimerID);
  69.     top.document.all.ticker_data.style.pixelTop        = System.GUI.ticker._startPos;
  70.     System.GUI.ticker._animStartTime = -1;
  71.     System.GUI.ticker._currentLine    = -1;
  72.     System.GUI.ticker._startPos        = 40;
  73.     System.GUI.ticker._stopPos        =0;
  74. };
  75. GUI_FrameWork.prototype.ticker._startAnimation        = function()
  76. {
  77.     top.document.all.ticker_data.style.pixelTop        = System.GUI.ticker._startPos;
  78.     System.GUI.ticker._animStartTime    = (new Date()).getTime();
  79.     System.GUI.ticker._animTimerID    = setInterval(function() { System.GUI.ticker._animate(); }, 55);
  80. };
  81. GUI_FrameWork.prototype.ticker._animate             = function()
  82. {
  83.     var tmpNewLine = System.GUI.ticker._currentLine +1;
  84.     if (top.document.all.ticker_data.style.pixelTop > System.GUI.ticker._stopPos ) {
  85.         top.document.all.ticker_data.style.pixelTop -=2;
  86.     } else {
  87.         var currentTime        = (new Date()).getTime();
  88.         if (currentTime > (System.GUI.ticker._animStartTime + 7000)) {
  89.             clearInterval(System.GUI.ticker._animTimerID);
  90.             System.GUI.ticker._currentLine++;
  91.             if (System.GUI.ticker.data[System.GUI.ticker._currentLine]) {
  92.                 System.GUI.ticker._stopPos += (-1 * System.GUI.ticker._lineHeight);
  93.                 System.GUI.ticker._animStartTime                        = currentTime;
  94.                 System.GUI.ticker._animTimerID                        = setInterval(function() { System.GUI.ticker._animate(); }, 55);
  95.             } else {
  96.                 System.GUI.ticker._stopPos                             = 0;
  97.                 System.GUI.ticker._currentLine                         = 0;
  98.                 top.document.all.ticker_data.style.pixelTop    = System.GUI.ticker._startPos;
  99.                 System.GUI.ticker._animStartTime                        = currentTime;
  100.                 System.GUI.ticker._animTimerID                        = setInterval(function() { System.GUI.ticker._animate(); }, 55);
  101.             };
  102.         };
  103.     };
  104. };
  105.  
  106. GUI_FrameWork.prototype.ticker._rewind        = function()
  107. {
  108.     if (System.GUI.ticker._moveTimeoutID != -1) { clearTimeout(System.GUI.ticker._moveTimeoutID); };
  109.     clearInterval(System.GUI.ticker._animTimerID);
  110.     if (System.GUI.ticker._currentLine >1) {
  111.         System.GUI.ticker._currentLine = System.GUI.ticker._currentLine -1;
  112.     } else {
  113.         System.GUI.ticker._currentLine = 0;
  114.     };
  115.     top.document.all.ticker_data.style.pixelTop  = (-1 * (System.GUI.ticker._currentLine*System.GUI.ticker._lineHeight));
  116.     System.GUI.ticker._stopPos                 = (-1 * ((System.GUI.ticker_currentLine + 1)*System.GUI.ticker._lineHeight));
  117.     if (!System.GUI.ticker._isPaused) {
  118.         System.GUI.ticker._moveTimeoutID           = setTimeout(function() { System.GUI.ticker._animStartTime = (new Date()).getTime(); System.GUI.ticker._currentLine++; System.GUI.ticker._animTimerID = setInterval(function() {System.GUI.ticker._animate(); } , 55); System.GUI.ticker._moveTimeoutID=-1; }, 7000);
  119.     };
  120. };
  121. GUI_FrameWork.prototype.ticker._pause            = function()
  122. {
  123.     if (System.GUI.ticker._moveTimeoutID != -1) { clearTimeout(System.GUI.ticker._moveTimeoutID); };
  124.     if (!System.GUI.ticker._isPaused) {
  125.         clearInterval(System.GUI.ticker._animTimerID);
  126.         System.GUI.ticker._isPaused = true;
  127.     } else {
  128.         System.GUI.ticker._animStartTime        = (new Date()).getTime();
  129.         System.GUI.ticker._animTimerID        = setInterval(function() { System.GUI.ticker._animate(); }, 55);
  130.         System.GUI.ticker._isPaused = false;
  131.     };
  132. };
  133. GUI_FrameWork.prototype.ticker._fastForward    = function()
  134. {
  135.     if (System.GUI.ticker._moveTimeoutID != -1) { clearTimeout(System.GUI.ticker._moveTimeoutID); };
  136.     clearInterval(System.GUI.ticker._animTimerID);
  137.     if (System.GUI.ticker._currentLine < System.GUI.ticker.data.length ) {
  138.         System.GUI.ticker._currentLine = System.GUI.ticker._currentLine +1;
  139.     } else {
  140.         System.GUI.ticker._currentLine = System.GUI.ticker.data.length-1;
  141.     };
  142.     top.document.all.ticker_data.style.pixelTop  = (-1 * (System.GUI.ticker._currentLine*System.GUI.ticker._lineHeight));
  143.     System.GUI.ticker._stopPos                           = (-1 *((System.GUI.ticker._currentLine + 1)*System.GUI.ticker._lineHeight));
  144.     if (!System.GUI.ticker._isPaused) {
  145.         System.GUI.ticker._moveTimeoutID                    = setTimeout(function() { System.GUI.ticker._animStartTime = (new Date()).getTime(); System.GUI.ticker._animTimerID = setInterval(function() {System.GUI.ticker._animate();System.GUI.ticker._moveTimeoutID=-1; } , 55); }, 7000);
  146.     };
  147. };
  148. GUI_FrameWork.prototype.commandBar                = {};
  149. GUI_FrameWork.prototype.debugMenu                = {};
  150. GUI_FrameWork.prototype.loadingDialog                = {};
  151. GUI_FrameWork.prototype.loadingDialog.isOn            = false;
  152. GUI_FrameWork.prototype.loadingDialog.text            = "";
  153. GUI_FrameWork.prototype.loadingDialog.buttonPressed    = false;
  154. GUI_FrameWork.prototype.loadingDialog.onButtonClick     = function()
  155. {
  156.     if (!System.GUI.loadingDialog._bIgnoreCancel) {
  157.         top.document.all.divDialogBox.setCapture(true);
  158.         gblRRManager.doCancel();
  159.         System.GUI.loadingDialog._bIgnoreCancel = false;
  160.     };
  161. };
  162. GUI_FrameWork.prototype.loadingDialog.show        = function()
  163. {
  164.     if (!this.text) { this.text = scMsg("SC_LOADING"); };
  165.     this._bIgnore = false;
  166.     top.document.all.divDialogBox.setCapture(false);
  167.     System.GUI.dialog.innerHTML = "<br><center id='loading_status_text'>" + this.text + "</center><img src='" + System.getInstallFolder() + "fe/nhl/images2/widgets/load_sm.gif'><br><center style='font-size:7pt;font-family:verdana;'>" + scMsg('SC_CANCELING_OUT_OF_EASO') + "</center>";
  168.     System.GUI.dialog.setSize( 400 , 100 );
  169.     System.GUI.dialog.clearButtons();
  170.     System.GUI.dialog.addButton("cancelBtn1", scMsg("SC_CANCEL", true), System.GUI.loadingDialog.onButtonClick, false);
  171.     System.GUI.dialog.setStyle("NONE");
  172.     System.GUI.dialog.show();
  173.     this.isOn    = true;
  174. };
  175. GUI_FrameWork.prototype.loadingDialog.showNoNav    = function()
  176. {
  177.     System.GUI.isNavigatingProp = true;
  178.     System.GUI.loadingDialog.show();
  179. };
  180. GUI_FrameWork.prototype.loadingDialog.hideNoNav    = function()
  181. {
  182.     System.GUI.isNavigatingProp = false;
  183.     System.GUI.loadingDialog.hide();
  184. };
  185. GUI_FrameWork.prototype.loadingDialog.hideCancel     = function()
  186. {
  187.     top.document.all.divBtnBox.style.visbility='hidden';
  188. };
  189. GUI_FrameWork.prototype.loadingDialog.showCancel    = function()
  190. {
  191.     top.document.all.divBtnBox.style.visbility='visible';
  192. };
  193. GUI_FrameWork.prototype.loadingDialog._bIgnore            = false;
  194. GUI_FrameWork.prototype.loadingDialog.ignoreCancel        = function() { this._bIgnore = true; };
  195. GUI_FrameWork.prototype.loadingDialog.dontIgnoreCancel    = function() {this._bIgnore = false; };
  196. GUI_FrameWork.prototype.loadingDialog.getStatusText        = function() { return this.text; };
  197.  
  198. GUI_FrameWork.prototype.loadingDialog.hide                = function()
  199. {
  200.     this.setText(scMsg("SC_LOADING"));
  201.     System.GUI.dialog.hide();
  202.     System.GUI.loadingDialog.buttonPressed    = false;
  203.     this.isOn        = false;
  204.     top.document.releaseCapture();
  205. };
  206. GUI_FrameWork.prototype.loadingDialog.setText    = function(sText)
  207. {
  208.     this.text        = sText;
  209.     if (this.isOn) {
  210.         var status_text_area        = System.GUI.dialog.getElement("loading_status_text");
  211.         if (status_text_area) {
  212.             status_text_area.innerText = sText;
  213.         };
  214.         status_text_area = null;
  215.     };
  216.     sText = null;
  217. };
  218. GUI_FrameWork.prototype.nowBtns                    = {};
  219. GUI_FrameWork.prototype.nowBtns.showPlayAndSim    = function()
  220. {
  221.     top.document.all.frame_b2.style.visibility        = "visible";
  222.     top.document.all.playNow_btn.style.visibility    = "visible";
  223.     top.document.all.sim_btn.style.visibility        = "visible";
  224.     top.document.all.frame_b.style.visibility        = "hidden";
  225.     top.document.all.frame_b1.style.visibility        = "hidden";
  226. };
  227. GUI_FrameWork.prototype.nowBtns.showPlay            = function()
  228. {
  229.     top.document.all.frame_b1.style.visibility        = "visible";
  230.     top.document.all.playNow_btn.style.visibility    = "visible";
  231.     top.document.all.frame_b.style.visibility        = "hidden";
  232.     top.document.all.frame_b2.style.visibility        = "hidden";
  233.     top.document.all.sim_btn.style.visibility        = "hidden";
  234. };
  235. GUI_FrameWork.prototype.nowBtns.hide                = function()
  236. {
  237.     top.document.all.playNow_btn.style.visibility    = "hidden";
  238.     top.document.all.sim_btn.style.visibility        = "hidden";
  239.     top.document.all.frame_b.style.visibility        = "visible";
  240.     top.document.all.frame_b1.style.visibility        = "hidden";
  241.     top.document.all.frame_b2.style.visibility        = "hidden";
  242. };
  243. GUI_FrameWork.prototype.nowBtns.onplayclick    = function(){};
  244. GUI_FrameWork.prototype.nowBtns.onsimclick        = function(){};
  245. GUI_FrameWork.prototype.dialog                = {};
  246. GUI_FrameWork.prototype.profile_viewer        = {};
  247. GUI_FrameWork.prototype.left_nav                = {};
  248. GUI_FrameWork.prototype.Screens                = {};
  249. GUI_FrameWork.prototype.playSFX                = function(sfxID)
  250. {
  251.     var Audio        = window.external.GameInterface.AudioInterface;
  252.     switch (sfxID)
  253.     {
  254.         case 0:
  255.         case "transition":
  256.             Audio.PlayTransitionSFX();
  257.         break;
  258.         case 1:
  259.         case "toggleBtn":
  260.             Audio.PlayToggleSFX();
  261.         break;
  262.         case 2:
  263.         case "ok":
  264.             Audio.PlayAcceptSFX();
  265.         break;
  266.         case 3:
  267.         case "tabClick":
  268.             Audio.PlayTabSelectSFX();
  269.         break;
  270.         case 4:
  271.         case "gridClick":
  272.             Audio.PlayGridSelectSFX();
  273.         break;
  274.         case 5:
  275.         case "alert":
  276.             Audio.PlayWarningSFX();
  277.         break;
  278.         case 6:
  279.         case "navHover":
  280.             Audio.PlayNavRolloverSFX();
  281.         break;
  282.         case 7:
  283.         case "menuOn":
  284.             Audio.PlayMenuOpenSFX();
  285.         break;
  286.         case 8:
  287.         case "menuOff":
  288.             Audio.PlayMenuCloseSFX();
  289.         break;
  290.         case 9:
  291.         case "menuHover":
  292.             Audio.PlayMenuHoverSFX();
  293.         break;
  294.         case 10:
  295.         case "scrollBtn":
  296.             Audio.PlayScrollButtonSFX();
  297.         break;
  298.         case 11:
  299.         case "scroll":
  300.             Audio.PlayScrollSFX();
  301.         break;
  302.         case 12:
  303.         case "dropdownOpen":
  304.             Audio.PlayDropListOpenSFX();
  305.         break;
  306.         case 13:
  307.         case "dropdownClose":
  308.             Audio.PlayDropListCloseSFX();
  309.         break;
  310.         case 14:
  311.         case "joinGame":
  312.             Audio.PlayJoinGameSFX();
  313.         break;
  314.         case 15:
  315.         case "playMatchupGame":
  316.             Audio.PlayCreatedGameSFX();
  317.         break;
  318.         case 16:
  319.         case "newMessage":
  320.             Audio.PlayNewChatMessageSFX();
  321.         break;
  322.         case 17:
  323.         case "messageSent":
  324.             Audio.PlayMessageSentSFX();
  325.         break;
  326.         case 18:
  327.         case "messageWindow":
  328.             Audio.PlayMessageWindowOpenSFX();
  329.         break;
  330.         case 19:
  331.         case "addBuddy":
  332.             Audio.PlayNewBuddyItemSFX();
  333.         break;
  334.         case 20:
  335.         case "deleteBuddy":
  336.             Audio.PlayDeleteBuddyItemSFX();
  337.         break;
  338.         case 21:
  339.         case "messageWaiting":
  340.             Audio.PlayMessageWaitingSFX();
  341.         break;
  342.         case 22:
  343.         case "buyCards":
  344.             Audio.PlayBuyCardsSFX();
  345.         break;
  346.         case 23:
  347.         case "sellCards":
  348.             Audio.PlaySellCardsSFX();
  349.         break;
  350.         case 24:
  351.         case "flipCard":
  352.             Audio.PlayFlipCardSFX();
  353.         break;
  354.         case 25:
  355.         case "login":
  356.             Audio.PlayEASOLoginSFX();
  357.         break;
  358.         case 26:
  359.         case "type":
  360.             Audio.PlayTypingSFX();
  361.         break;
  362.     };
  363.     sfxID = Audio = null;
  364. };
  365.  
  366. GUI_FrameWork.prototype.getActiveLanguage    = function()
  367. {
  368.     var aLanguage = new Array("English", "SWED", "GER", "FINN", "FR");
  369.     return aLanguage[window.external.GameInterface.ActiveLanguage];
  370. }
  371.  
  372. GUI_FrameWork.prototype.setTitleMovie    = function(src)
  373. {
  374.     top.document.all.flashTitleMovie.style.visibility = "hidden";
  375.  
  376.     if (src != "none")
  377.     {
  378.         top.document.all.flashTitleMovie.innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="548" height="59">' +
  379.             '<param name=movie value="../../nhl/images2/flash/' + System.GUI.getActiveLanguage() + '/' + src + '">' +
  380.             '<PARAM NAME=menu VALUE=false>' +
  381.             '<PARAM NAME=wmode VALUE=transparent>' +
  382.             '</object>';
  383.  
  384.         top.document.all.flashTitleMovie.style.visibility = "visible";
  385.     }
  386.     src = null;
  387. };
  388. GUI_FrameWork.prototype.hideTitleMovie    = function()
  389. {
  390.     top.document.all.flashTitleMovie.style.visibility = "hidden";
  391.     /*
  392.     top.document.all.flashTitleMovie.innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="548" height="59">' +
  393.         '<param name=movie value="../../nhl/images2/flash/English/' + src + '">' +
  394.         '<PARAM NAME=menu VALUE=false>' +
  395.         '<PARAM NAME=wmode VALUE=transparent>' +
  396.         '</object>';
  397.  
  398.     top.document.all.flashTitleMovie.style.visibility = "visible";
  399.     src = null;
  400.     */
  401. };
  402. GUI_FrameWork.prototype.setTeamSkin        = function(teamId, bMainMenu)
  403. {
  404.     this.teamId = teamId;
  405.     this.applyTeamSkin(bMainMenu);
  406. };
  407. GUI_FrameWork.prototype.applyTeamSkin    = function(bMainMenu)
  408. {
  409.     if (bMainMenu)
  410.         this.setBackground("fe/NHL/images2/backgrounds/" + this.teamId + "/main_menu_background_right.jpg");
  411.     else
  412.         this.setBackground("fe/NHL/images2/backgrounds/" + this.teamId + "/background_right.jpg");
  413.  
  414.     this.setLeftNavBackground("fe/NHL/images2/backgrounds/" + this.teamId + "/background_left.jpg");
  415.     top.document.all.bg_left_curve.src = System.getInstallFolder() + "fe/NHL/images2/backgrounds/" + this.teamId + "/main_menu_background_left.jpg";
  416.     this.setTickerBackground("fe/NHL/images2/common/" + this.teamId + "/ticker.gif");
  417.     top.document.all.divDialogHeader.src = System.getInstallFolder() + "fe/NHL/images2/common/" + this.teamId + "/1x1_subhead.gif";
  418.     //top.document.all.left_nav_back.src = System.getInstallFolder() + "fe/NHL/images2/common/" + this.teamId + "/1x1_subhead.gif";
  419.  
  420.     System.GUI.Screens["1"]        = new Screen_Hash("1",     "fe/NHL/html/offline_home.html",    "",         "",            "",         "fe/NHL/images2/backgrounds/" + System.GUI.getTeamSkin() + "/main_menu_background_right.jpg",            false);
  421. };
  422. GUI_FrameWork.prototype.getTeamSkin        = function()
  423. {
  424.     return this.teamId;
  425. };
  426.  
  427. GUI_FrameWork.prototype.setBackground        = function(src)
  428. {
  429.     top.document.all.screen_bg.src = top.document.all.slide_trans_img.src = System.getInstallFolder(true) + src;
  430.     src = null;
  431. };
  432. GUI_FrameWork.prototype.setLeftNavBackground        = function(src)
  433. {
  434.     top.document.all.bg_left_curve2.src = System.getInstallFolder() + src;
  435.     src = null;
  436. };
  437. GUI_FrameWork.prototype.setTickerBackground        = function(src)
  438. {
  439.     top.document.all.ticker.src = System.getInstallFolder() + src;
  440.     src = null;
  441. }
  442. GUI_FrameWork.prototype.setLeftNav            = function(leftNavObjName, leftNavArrayName)
  443. {
  444.     if (top[leftNavObjName] && top[leftNavObjName][leftNavArrayName]) {
  445.         top.document.all.left_nav.load(top[leftNavObjName], leftNavArrayName);
  446.     };
  447. };
  448. GUI_FrameWork.prototype.setLocation            = function(src)
  449. {
  450.     this.isNavigatingProp = true;
  451.     if ( __navigatecapturetimer__ != 0) {
  452.         clearInterval(__navigatecapturetimer__);
  453.     };
  454.     //__navigatecapturetimer__ = setInterval(__checkNavTime__, 100);
  455.     //__navigatecapture__ = true;
  456.     //top.document.all.divDialogBox.setCapture(true);
  457.     this.currentScreenObj = null;
  458.     top.document.all.Editorial_Frame.src    = System.getInstallFolder(true) + src;
  459.     src = null;
  460. };
  461. GUI_FrameWork.prototype.playTransition        = function(bForward, bPlayLeftNav, onStopHandler)
  462. {
  463.     if (top.document.all.slide_trans_img) {
  464.         top.document.all.slide_trans_img.style.visibility = "visible";
  465.         window.external.PumpMessages();
  466.     };
  467.     if (onStopHandler) {
  468.         onStopHandler();
  469.     };
  470.     bForward = bPlayLeftNav = onStopHandler = null;
  471. };
  472. GUI_FrameWork.prototype.setTitle    = function(txt)
  473. {
  474.     top.document.all.screen_title_txt.value    = txt;
  475.     txt = null;
  476. };
  477. GUI_FrameWork.prototype.setLeftNavSelection    = function(newNavID)
  478. {
  479.     top.document.all.left_nav.setSelectedItem(newNavID);
  480.     if (this.Screens[newNavID + ""]) {
  481.         this.currentScreenObj = this.Screens[newNavID + ""];
  482.     };
  483.     newNavID = null;
  484. };
  485. GUI_FrameWork.prototype.editLeftNavItem        = function(oldNavID, newNavID, newText)
  486. {
  487.     top.document.all.left_nav.editItem(oldNavID, newNavID, newText);
  488.     oldNavID = newNavID = newText = null;
  489. };
  490. GUI_FrameWork.prototype.clearLeftNav            = function() { top.document.all.left_nav.clear(); };
  491. GUI_FrameWork.prototype.getCurrentScreen        = function() { return this.currentScreenObj;    };
  492. GUI_FrameWork.prototype.isNavigating            = function() { return this.isNavigatingProp;    };
  493. GUI_FrameWork.prototype.setChyronInfo         = function(bandName, songName, albumName)
  494. {
  495.     function doSetInfo(bandName, songName, albumName)
  496.     {
  497.         top.document.all.juke_song_title.innerText = songName;
  498.         top.document.all.juke_song_artist.innerText = bandName;
  499.         top.document.all.juke_song_album.innerText = albumName;
  500.  
  501.         //System.GUI.showChyron();
  502.         //setTimeout(function() { System.GUI._tabSwitch(); }, 4000);
  503.         //bandName = songName = albumName = null;
  504.     };
  505.     if (!System.GUI.isNavigating()) {
  506.         setTimeout(function() { doSetInfo(bandName, songName, albumName); bandName=songName=albumName=null; }, 55);
  507.     } else {
  508.         setTimeout(function() { doSetInfo(bandName, songName, albumName); bandName=songName=albumName=null; }, 1000);
  509.     };
  510. };
  511. GUI_FrameWork.prototype._tabSwitch            = function()
  512. {
  513.     if (System.Session.getProfile()) {
  514.         if (top.document.all.chryonRect.style.visibility != "hidden") {
  515.             System.GUI.showBuddyList();
  516.         };
  517.     };
  518. };
  519. GUI_FrameWork.prototype.showChyron            = function()
  520. {
  521.     System.GUI.playSFX(3);
  522.     top.document.all.blTabs.src ='../images/framework/chyron_on_tab.jpg';
  523.     top.document.all.chryonRect.style.visibility="visible";
  524.     top.hideAllBuddyContextMenus();
  525. };
  526. GUI_FrameWork.prototype.showBuddyList        = function()
  527. {
  528.     System.GUI.playSFX(3);
  529.     top.document.all.blTabs.src ='../images/framework/buddy_on_tab.jpg';
  530.     top.document.all.chryonRect.style.visibility="hidden";
  531. };
  532. GUI_FrameWork.prototype.findMember            = function()
  533. {
  534.     if (!System.GUI.isNavigating()) {
  535.         if (System.Session.getProfile()) {
  536.             if (this.dialog.document_src != "fe/sc/html/find_member.html") {
  537.                 this.dialog.document_src    = "fe/sc/html/find_member.html";
  538.             };
  539.             this.dialog.setSize(520, 400);
  540.             this.dialog.show();
  541.         } else {
  542.             this.showMenuDetour();
  543.         };
  544.     };
  545. };
  546. GUI_FrameWork.prototype.showErrorDialog        = function(msg, width, height, fOnOk)
  547. {
  548.     if (!width) width = 340 ;
  549.     if (!height) height = 147 ;
  550.     this.dialog.innerHTML = msg;
  551.     this.dialog.addButton("okBtn", scMsg("SC_OK", true), fOnOk);
  552.     this.dialog.setSize(width, height);
  553.     this.dialog.show();
  554.     msg = null;
  555. };
  556. GUI_FrameWork.prototype.onLoginFromDetour        = null;
  557. GUI_FrameWork.prototype.showMenuDetour        = function(fOnSignIn)
  558. {
  559.     this.dialog.document_src    ="fe/sc/html/menu_detour.html";
  560.     this.dialog.addButton("closeBtn", scMsg("SC_CLOSE", true), function() { System.GUI.onLoginFromDetour = null; });
  561.     System.GUI.dialog.setSize(520, 396);
  562.     this.onLoginFromDetour    = (fOnSignIn) ? fOnSignIn : null;
  563.     this.dialog.show();
  564. };
  565. GUI_FrameWork.prototype.showHelpDialog        = function()
  566. {
  567.     this.dialog.document_src        = "fe/sc/html/easo_help.html";
  568.     this.dialog.addButton("closeBtn", scMsg("SC_CLOSE", true));
  569.     System.GUI.dialog.setSize(630, 480);
  570.     this.dialog.show();
  571. };
  572. GUI_FrameWork.prototype.setToolTip            = function(sText)
  573. {
  574.     top.document.all.helpText.value    = "  " + sText;
  575.     sText = null;
  576. };
  577. GUI_FrameWork.prototype.navigate                = function(screenID)
  578. {
  579.     if (__navigatecapturetimer__ != 0) { return false; };
  580.     if (!this.isNavigatingProp)         {
  581.         this.isNavigatingProp            = true;
  582.         //__navigatecapture__        = true;
  583.         //__navigatecapturetimer__        = setInterval(__checkNavTime__, 100);
  584.  
  585.         try {
  586.             top.document.all.scrollstopper.focus();
  587.         } catch (e) {};
  588.  
  589.         var contentWindow            = top.document.frames["Editorial_Frame"];
  590.         var contentFrame            = top.document.all["Editorial_Frame"];
  591.         var installFolder            = System.getInstallFolder(true);
  592.         var screenObj                = null;
  593.         var canNavigate            = true;
  594.         if (this.Screens[screenID]) {
  595.             screenObj                = this.Screens[screenID];
  596.         } else {
  597.             canNavigate            = false;
  598.             this.isNavigatingProp        = false;
  599.         };
  600.         if (canNavigate) {
  601.             if (screenObj.getScreenSrc() == "HELP" || screenObj.getScreenSrc() == "PRIZES" || screenObj.getScreenSrc() == "SUBSCRIBE") {
  602.                 canNavigate = false;
  603.                 this.isNavigatingProp = false;
  604.                 screenObj["navigationCallback"](screenID);
  605.                 return canNavigate;
  606.             };
  607.         };
  608.         if (canNavigate) {
  609.             if (this.currentScreenObj) {
  610.                 if (this.currentScreenObj.getScreenSrc() == screenObj.getScreenSrc())  {
  611.                     if (this.currentScreenObj.getLeftNavArrayName() == screenObj.getLeftNavArrayName()) {
  612.                         canNavigate =false;
  613.                         this.isNavigatingProp        = false;
  614.                     } else {
  615.                         canNavigate             = true;
  616.                         this.isNavigatingProp        = true;
  617.                     };
  618.                 } else {
  619.                     canNavigate             = true;
  620.                     this.isNavigatingProp        = true;
  621.                 };
  622.             };
  623.         };
  624.         if(parseInt(screenID) != 2666) { System.ScratchPad.challengeExitPage = screenID; }
  625.         if (canNavigate) {
  626.             if (screenObj.requiresLogin() && !System.Session.getUserLKey()) {
  627.                 this.showMenuDetour(function() { System.GUI.navigate(screenID); });
  628.                 canNavigate            = false;
  629.                 this.isNavigatingProp        = false;
  630.                 return;
  631.             };
  632.             if (contentWindow["canExitScreen"]) {
  633.                 if ("UpdateMusicThread" in window.external.GameInterface.AudioInterface) {
  634.                     window.external.GameInterface.AudioInterface.UpdateMusicThread();
  635.                 };
  636.                 if (contentWindow["canExitScreen"](screenID)) {
  637.                     if ("UpdateMusicThread" in window.external.GameInterface.AudioInterface) {
  638.                         window.external.GameInterface.AudioInterface.UpdateMusicThread();
  639.                     };
  640.                     if (parseInt(screenID) < 1000 || parseInt(screenID) == 2666) {
  641.                         //window.external.GameInterface.RestoreGameState();
  642.                         this.nowBtns.hide();
  643.                     };
  644.                     if (this.Screens[screenID]["navigationCallback"]) {
  645.                         if (screenObj["navigationCallback"](screenID)) {
  646.                             canNavigate             = true;
  647.                             this.isNavigatingProp        = true;
  648.                         } else {
  649.                             canNavigate             = false;
  650.                             this.isNavigatingProp        = false;
  651.                         };
  652.                     } else {
  653.                         canNavigate            = true;
  654.                         this.isNavigatingProp        = true;
  655.                     };
  656.                 } else {
  657.                     canNavigate            = false;
  658.                     this.isNavigatingProp        = false;
  659.                 };
  660.             } else {
  661.                 if (parseInt(screenID) < 1000 || parseInt(screenID) == 2666) {
  662.                     //window.external.GameInterface.RestoreGameState();
  663.                     this.nowBtns.hide();
  664.                 };
  665.                 if (screenObj["navigationCallback"]) {
  666.                     if (screenObj["navigationCallback"](screenID)) {
  667.                         canNavigate            = true;
  668.                         this.isNavigatingProp        = true;
  669.                     } else {
  670.                         canNavigate            = false
  671.                         this.isNavigatingProp        = false;
  672.                     };
  673.                 } else {
  674.                     canNavigate            = true;
  675.                     this.isNavigatingProp        = true;
  676.                 };
  677.             };
  678.         };
  679.         if (canNavigate) {
  680.             this.currentScreenObj    = screenObj;
  681.             //this is where i determine which left nav art to show as well...
  682.             if (parseInt(screenID) < 1000)
  683.             {
  684.                 top.document.all.left_nav.clear();
  685.  
  686.                 //if (screenID == 1)
  687.                 //{
  688.                 //    gui_ShowLeftNavMenuArt();
  689.                 //}
  690.                 //else
  691.                 //{
  692.                     gui_ShowLeftNavArt();
  693.                 //}
  694.             }
  695.             else
  696.             {
  697.                 gui_ShowLeftNavArt();
  698.             }
  699.             System.GUI.setTitle("");
  700.             function ReallyDoNavigate() {
  701.                 if (top.document.all.slide_trans_img) {
  702.                     top.document.all.slide_trans_img.style.visibility = "visible";
  703.                     window.external.PumpMessages();
  704.                 };
  705.                 contentWindow.document.location.href= installFolder + screenObj.getScreenSrc();
  706.                 if (screenObj.getLeftNavObjectName() && screenObj.getLeftNavArrayName()) {
  707.                     top.document.all.left_nav.load(top[screenObj.getLeftNavObjectName()], screenObj.getLeftNavArrayName());
  708.                 };
  709.                 if (screenObj.getTitle() && screenObj.getTitle() != top.document.all.screen_title_txt.innerText) {
  710.                     top.document.all.screen_title_txt.value    = screenObj.getTitle();
  711.                     System.GUI.setTitleMovie(screenObj.getTitle());
  712.                 };
  713.                 if (screenObj.getBackgroundSrc()) {
  714.                     top.document.all.screen_bg.src = installFolder + screenObj.getBackgroundSrc();
  715.                 };
  716.                 contentWindow = installFolder = screenObj = canNavigate = screenID = null;
  717.             };
  718.             if (System.GUI.navTimerID == 0) {
  719.                 System.GUI.navTimerID    = setTimeout(function() { ReallyDoNavigate(); }, 110);
  720.             };
  721.             //alert('play sound 1');
  722.             System.GUI.playSFX(0);
  723.         } else {
  724.             this.isNavigationProp = false;
  725.         };
  726.     };
  727.     return canNavigate;
  728. };
  729. GUI_FrameWork.prototype.OnMainLoad            = function()
  730. {
  731.     var bLoadingFromBrowserState                = false;
  732.     var loginCookie                                = null;
  733.     top.document.body.style.visibility            = "visible";
  734.     GUI_FrameWork.prototype.left_nav            = top.document.all.left_nav;
  735.     GUI_FrameWork.prototype.profile_viewer    = top.document.all.profile_viewer;
  736.     GUI_FrameWork.prototype.dialog            = top.document.all.sys_dialog;
  737.     GUI_FrameWork.prototype.commandBar        = new TopMenuBar();
  738.     GUI_FrameWork.prototype.commandBar.loadMenu(top_menu_arrays, "menu_1", "menu_1_toggler");
  739.     GUI_FrameWork.prototype.commandBar.loadMenu(top_menu_arrays, "menu_2", "menu_2_toggler");
  740.     GUI_FrameWork.prototype.commandBar.loadMenu(top_menu_arrays, "menu_3", "menu_3_toggler");
  741.     GUI_FrameWork.prototype.commandBar.showMyClub    = function()
  742.     {
  743.         top.document.all.menu_2_btn_4.style.display        = "";
  744.         top.document.all.menu_2_bg.style.pixelHeight        = top.document.all.menu_2.offsetHeight - (parseInt(top.document.all.menu_2.style.borderWidth) * 2);
  745.     };
  746.     GUI_FrameWork.prototype.commandBar.hideMyClub        = function()
  747.     {
  748.         top.document.all.menu_2_btn_4.style.display        = "none";
  749.         top.document.all.menu_2_bg.style.pixelHeight        = top.document.all.menu_2.offsetHeight - (parseInt(top.document.all.menu_2.style.borderWidth) * 2);
  750.     };
  751.     GUI_FrameWork.prototype.handleError                = System.handleError;
  752.     System.GUI.commandBar.hideMyClub();
  753.     gui_LoadBrowserState(); //do this first so that state gets loaded for the league check
  754.     try {
  755.         var postGameLeague = System.Session.getPostGameLeague();
  756.         var oGameFace = window.external.GameInterface;
  757.         if (postGameLeague) {
  758.             oGameFace.LeagueServerInterface.LoadLeagueInternal(postGameLeague.leagueType,postGameLeague.leagueID);
  759.             oGameFace.ExecutorServerInterface.LoadExecutorInternal(0);
  760.             oGameFace.LeagueServerInterface.LeagueDispatch.ManagerInterface.ReportGame(oGameFace.ExecutorServerInterface.ExecutorDispatch.GameStatInterface);
  761.         };
  762.     } catch (e) {
  763.         System.handleError(e.description);
  764.     };
  765.  
  766.     try {
  767.         if (System.Session.getPostGameNavigation()) {
  768.             if (gui_IsPostGameNavToOnline(System.Session.getPostGameNavigation())) {
  769.                 if (gui_LoadBrowserState()) {
  770.                     gui_LoadUserProfile(true); //there is a post game nav and it requires login
  771.                 } else {
  772.                     //there is a post game nav, it requires online, but no login info was set
  773.                     //TODO ERROR Condition error, should I load a different league if Login was required for nav?
  774.                     System.GUI.navigate("1");
  775.                     if (top.document.frames['Editorial_Frame'].showLoginInfo) {
  776.                         top.document.frames['Editorial_Frame'].showLoginInfo();
  777.                     } else if  (top.document.frames['Editorial_Frame'].hideLoginInfo) {
  778.                         top.document.frames['Editorial_Frame'].hideLoginInfo();
  779.                     };
  780.                 };
  781.             } else {
  782.                 if (gui_LoadBrowserState()) {
  783.                     gui_LoadUserProfile(true); //there is a post game nav and it does not require login
  784.                 };
  785.             };
  786.         } else {
  787.             if (gui_LoadBrowserState()) {
  788.                 gui_LoadUserProfile(false); //no post game nav but login info exists
  789.             } else {
  790.                 if (gui_LoadLoginCookie()) {
  791.                     gui_AutoLogin();
  792.                 } else {
  793.                     //TODO absolutely nothing set, so go to main, should I clear the league just in case?
  794.                     System.GUI.navigate("1");
  795.                     if (top.document.frames['Editorial_Frame'].showLoginInfo) {
  796.                         top.document.frames['Editorial_Frame'].showLoginInfo();
  797.                     } else if  (top.document.frames['Editorial_Frame'].hideLoginInfo) {
  798.                         top.document.frames['Editorial_Frame'].hideLoginInfo();
  799.                     };
  800.                 };
  801.             };
  802.         };
  803.         System.GUI.ticker.loadFromServer();
  804.         System.GUI.isLoaded    = true;
  805.  
  806.         window.external.GameInterface.MainLoaded();
  807.  
  808.     } catch (e) {
  809.         window.external.GameInterface.MainLoaded();
  810.         System.GUI.navigate("1");
  811.         System.GUI.isLoaded    = true;
  812.     };
  813. };
  814. GUI_FrameWork.prototype.OnContentWindowLoad    = function()
  815. {
  816.     top.document.frames["Editorial_Frame"].document.body.style.backgroundColor        = "transparent";
  817.     top.document.frames["Editorial_Frame"].document.body.style.backgroundImage    = "url(" + System.getInstallFolder(true) + "fe/common/images/framework/transparent.gif)";
  818.     top.document.frames["Editorial_Frame"].document.body.style.zIndex            = -1;
  819.  
  820.     if (top.document.all.slide_trans_img) {
  821.         top.document.all.slide_trans_img.style.visibility = "hidden";
  822.         setTimeout("CollectGarbage()", 1);
  823.     };
  824.     if (System.Session.getProfile()) {
  825.         if (top.document.frames['Editorial_Frame'].showLoginInfo) {
  826.             top.document.frames['Editorial_Frame'].showLoginInfo();
  827.         };
  828.     } else {
  829.         if (top.document.frames['Editorial_Frame'].hideLoginInfo) {
  830.             top.document.frames['Editorial_Frame'].hideLoginInfo();
  831.         };
  832.     };
  833.     System.GUI.playSFX(0);
  834.     System.GUI.isNavigatingProp  = false;
  835.     System.GUI.navTimerID          = 0;
  836. };
  837.  
  838. function gui_LoadPostGameNavigation()
  839. {
  840.     return System.Session.getPostGameNavigation();
  841. };
  842. function gui_IsPostGameNavToOnline(screenID)
  843. {
  844.     if (System.GUI.Screens[screenID]) {
  845.         return System.GUI.Screens[screenID].requiresLogin();
  846.     };
  847.     return false;
  848. };
  849. function gui_LoadBrowserState()
  850. {
  851.     return System.Session.loadState();
  852. };
  853. var gui_MyUserProfile, bNavToPostGameScreen, bPostGameNavNeedsLogin;
  854.  
  855. function gui_OnStartupProfileLoadingCancel()
  856. {
  857. //TODO ERROR Condition error, should I load a different league if Login was required for nav? --profile loading was cancelled
  858. //No alan says it will be fine
  859.     if (bNavToPostGameScreen) {
  860.         if (bPostGameNavNeedsLogin) {
  861.             System.GUI.navigate("1");
  862.         } else {
  863.             System.GUI.navigate(System.Session.getPostGameNavigation());
  864.         };
  865.     } else {
  866.         System.GUI.navigate("1");
  867.     };
  868.     System.GUI.loadingDialog.hide();
  869.     return false;
  870. };
  871.  
  872. function gui_LoadUserProfile(bNavToPostGame)
  873. {
  874.     gui_MyUserProfile    = new User_Profile();
  875.     //System.GUI.loadingDialog.setText(scMsg("SC_RETRIEVING_PROFILE"));
  876.     //System.GUI.loadingDialog.show();
  877.  
  878.     bPostGameNavNeedsLogin        = (gui_IsPostGameNavToOnline(System.Session.getPostGameNavigation()));
  879.     bNavToPostGameScreen         = (bNavToPostGame) ? true : false;
  880.     if (System.Session.getUserName()) {
  881.         gblRRManager.onCancel        = gui_OnStartupProfileLoadingCancel;
  882.         gui_MyUserProfile.load(System.Session.getUserName(), null, gui_OnUserProfileLoaded);
  883.     } else {
  884.         //TODO ERROR Condition error, should I load a different league if Login was required for nav? -- loading profile failed
  885.         if (bPostGameNavNeedsLogin) {
  886.             System.GUI.navigate("1");
  887.         } else {
  888.             System.GUI.navigate(System.Session.getPostGameNavigation());
  889.         };
  890.         System.GUI.loadingDialog.hide();
  891.     };
  892. };
  893. function gui_OnUserProfileLoaded(bLoaded)
  894. {
  895.     if (bLoaded) {
  896.         System.Session.setProfile(gui_MyUserProfile);
  897.         System.GUI.profile_viewer.setLoginInfo(System.Session.getUserName(), System.Session.getPassword());
  898.         System.GUI.profile_viewer.loadProfile(gui_MyUserProfile);
  899.         window.external.PumpMessages();
  900.         bl_connect();
  901.         if (System.Session.getProfile().getClubID()) {
  902.             System.GUI.commandBar.showMyClub();
  903.         };
  904.         if (top.document.frames['Editorial_Frame'].showLoginInfo) {
  905.             top.document.frames['Editorial_Frame'].showLoginInfo();
  906.         };
  907.         System.GUI.showBuddyList();
  908.         System.Session.onlogin = null;
  909.         top.document.all.btn_logout.style.visibility    = 'visible';
  910.  
  911.         if (bNavToPostGameScreen) {
  912.             System.GUI.navigate(System.Session.getPostGameNavigation());
  913.         } else {
  914.             System.GUI.navigate("1");
  915.         };
  916.         System.GUI.loadingDialog.hide();
  917.     } else {
  918.         //TODO ERROR Condition error, should I load a different league if Login was required for nav?--loading profile failed
  919.         //NO according to a
  920.         if (bNavToPostGameScreen) {
  921.             if (bPostGameNavNeedsLogin) {
  922.                 System.GUI.navigate("1");
  923.             } else {
  924.                 System.GUI.navigate(System.Session.getPostGameNavigation());
  925.             };
  926.         } else {
  927.             System.GUI.navigate("1");
  928.         };
  929.         System.GUI.loadingDialog.hide();
  930.     };
  931.     if (top.document.frames['Editorial_Frame'].showLoginInfo) {
  932.         top.document.frames['Editorial_Frame'].showLoginInfo();
  933.     } else if  (top.document.frames['Editorial_Frame'].hideLoginInfo) {
  934.         top.document.frames['Editorial_Frame'].hideLoginInfo();
  935.     };
  936.     System.GUI.loadingDialog.hide();
  937. };
  938. function gui_LoadLoginCookie()
  939. {
  940.     loginCookie        = System.Session.getLoginCookie();
  941.     if (loginCookie) {
  942.         return true;
  943.     } else {
  944.         return false;
  945.     };
  946. };
  947. function gui_AutoLogin()
  948. {
  949.     var loginCookie        = System.Session.getLoginCookie();
  950.     System.GUI.profile_viewer.setLoginInfo(loginCookie.userName, loginCookie.passWord);
  951.     //login will handle it self if there is a cancel or error
  952.     System.Session.onlogin    = gui_OnAutoLoginComplete;
  953.     System.Session.login(loginCookie.userName, loginCookie.passWord);
  954. };
  955. function gui_OnAutoLoginComplete(bool)
  956. {
  957.     if (!bool) {
  958.         //Error on login, handle error will still fire
  959.         System.GUI.navigate("1");
  960.         System.Session.onlogin = null;
  961.     };
  962.     if (System.Session.getProfile()) {
  963.         if (System.Session.getProfile().getClubID()) {
  964.             System.GUI.commandBar.showMyClub();
  965.         } else {
  966.             System.GUI.commandBar.hideMyClub();
  967.         };
  968.         System.GUI.loadingDialog.hide();
  969.         System.GUI.navigate("1");
  970.     } else {
  971.         System.GUI.navigate("1");
  972.     };
  973.     if (top.document.frames['Editorial_Frame'].showLoginInfo) {
  974.         top.document.frames['Editorial_Frame'].showLoginInfo();
  975.     } else if  (top.document.frames['Editorial_Frame'].hideLoginInfo) {
  976.         top.document.frames['Editorial_Frame'].hideLoginInfo();
  977.     };
  978. };
  979.  
  980. var __navigatecapturetimer__ = 0;
  981. var __navigatecapture__        = false;
  982.  
  983. function __checkNavTime__()
  984. {
  985.     //if (__navigatecapturetimer__ != 0 && __navigatecapture__)
  986.     //{
  987.     //    if (top.document.frames["Editorial_Frame"].document.readyState == "complete")
  988.     //    {
  989.     //        clearInterval(__navigatecapturetimer__);
  990.     //        __navigatecapturetimer__ = 0;
  991.     //        __navigatecapture__     = false;
  992.     //        top.document.releaseCapture(true);
  993.     //    };
  994.     //};
  995. };
  996.  
  997. function gui_ShowLeftNavMenuArt()
  998. {
  999.     top.document.all.top_left_logo2.src="../../nhl/images2/screen_images/mainmenu_topleft.gif";
  1000.     top.document.all.top_left_logo.src="../../nhl/images2/common/1x1_transparent.gif";
  1001.     //top.document.all.menu_2.offsetHeight
  1002.     img_sport_logo.style.top = "80px";
  1003.     img_sport_logo.style.left = "30px";
  1004.     bg_left_curve.style.visibility = "visible";
  1005.     bg_left_curve2.style.visibility = "hidden";
  1006.     left_nav_items.style.visibility = "hidden";
  1007. }
  1008.  
  1009. function gui_ShowLeftNavArt()
  1010. {
  1011.     top.document.all.top_left_logo2.src="../../nhl/images2/common/nhl2004_logo.gif";
  1012.     top.document.all.top_left_logo.src="../../nhl/images2/common/logo_idle.gif";
  1013.     img_sport_logo.style.top = "-100px";
  1014.     img_sport_logo.style.left = "-100px";
  1015.     bg_left_curve.style.visibility = "hidden";
  1016.     bg_left_curve2.style.visibility = "visible";
  1017.     left_nav_items.style.visibility = "visible";
  1018. }