var favChanged=false;var favCursor=0;var favCurrent=0;var favMax=4;var favTotal=0;var topFav=0;var bottomFav=0;var favoriteClicks=0;function launchFavoritePanel(){var D="";favTotal=channelOrderCache.length-1;favCursor=0;favCurrent=0;var C;for(C=0;(channelOrderCache.length>5&&C<5)||(channelOrderCache.length<=5&&C<channelOrderCache.length);++C){var G="";if((!mnemonicCache[C])){G=records.key413}else{var H=getGuideIndexStart(C);var A=guideCache[C].split("-$#-");var F=A[H];var E=F.split("|");var B=E[6];if(B.length>18){B=B.substring(0,15)+"..."}G=records.key415+": "+B}document.getElementById("favoriteTag").innerHTML=records.key338;D+='<tr><td height="40px" nowrap valign="middle" class="favoritePanel" id="selectedFavorite'+C+'" '+(statusInfo==1?'onmouseover="selCurrFav('+C+');" onmouseout="hideSelFav('+C+');" onclick="openSelFav('+C+');" style="cursor:pointer;"':"")+'><table width="100%" align="center" valign="top" cellspacing="0" cellpadding="0"><tr><td id="favoriteScrollImage'+C+'" style="width:50px;text-align:center">'+(favoriteCache[C]==1?'<img alt="" src="/view/tv/images/hotIcons/unSel1.png">':'<img alt="" src="/view/tv/images/hotIcons/unSel1.png" style="visibility:hidden;">')+'</td><td id="favoriteScrollOrder'+C+'" style="width:75px;text-align:left">&nbsp;&nbsp;&nbsp;'+channelOrderCache[C]+'</td><td id="favoriteScrollName'+C+'" style="width:100px;text-align:left">'+channelNameCache[C]+'</td><td id="favoriteScrollNumber'+C+'" style="width:325x;text-align:left">&nbsp;&nbsp;&nbsp;'+G+"</td></table></td></tr>"}document.getElementById("favoriteEditPanel").innerHTML='<table width="570px" border="0px" align="left" valign="middle" style="margin-top:10px;margin-left:12px;" cellspacing="10" cellpadding="0">'+D+"</table>";changeFavoriteCursor()}function scrollFavoritePage(B,E){var N=0;var H;for(H=B;H<=E;++H){var G="";if((!mnemonicCache[H])){G=records.key413}else{var C=getGuideIndexStart(H);var K=guideCache[H].split("-$#-");var M=K[C];var A=M.split("|");var D=A[6];if(D.length>18){D=D.substring(0,15)+"..."}G=records.key415+": "+D}var J="favoriteScrollImage"+N;var F="favoriteScrollOrder"+N;var I="favoriteScrollName"+N;var O="favoriteScrollNumber"+N;var L="favoriteScrollWatch"+N;document.getElementById(J).innerHTML=(favoriteCache[H]==1?'<img alt="" src="/view/tv/images/hotIcons/unSel1.png">':'<img alt="" src="/view/tv/images/hotIcons/unSel1.png" style="visibility:hidden;">');document.getElementById(F).innerHTML="&nbsp;&nbsp;&nbsp;"+channelOrderCache[H];document.getElementById(I).innerHTML=channelNameCache[H];document.getElementById(O).innerHTML="&nbsp;&nbsp;&nbsp;"+G;N++}countFav()}function changeFavoriteCursor(){if(document.getElementsByTagName){var A=(favTotal+1)<5?(favTotal+1):5;for(i=0;i<A;i++){var B="selectedFavorite"+i;if(i==favCursor){document.getElementById(B).className="favSelPanel"}else{document.getElementById(B).className="favUnSelPanel"}}countFav()}}function changeFavoriteCursorUp(){if(document.getElementsByTagName){var B="selectedFavorite"+favCursor;var A="selectedFavorite"+(favCursor+1);document.getElementById(B).className="favSelPanel";document.getElementById(A).className="favUnSelPanel"}countFav()}function changeFavoriteCursorDown(){if(document.getElementsByTagName){var B="selectedFavorite"+favCursor;var A="selectedFavorite"+(favCursor-1);document.getElementById(B).className="favSelPanel";document.getElementById(A).className="favUnSelPanel"}countFav()}function countFav(){var B="";var C=favCurrent+1;var A=favTotal+1;B+='<tr><td height="10" nowrap valign=center class="favoritePanel"><span style="display:inline-block;width:100;text-align:center">'+records.key360+" "+C+" of "+A+"</span></td></tr>";document.getElementById("bottomPanelFavorite").innerHTML='<table width="350" border=0 align=left valign="middle" style="margin-top:1px;margin-left:12px;" cellspacing="0" cellpadding="0">'+B+"</table>"}function updateFavoriteImage(){document.getElementById("favoriteScrollImage"+favCursor).innerHTML=(favoriteCache[favCurrent]==1?'<img alt="" src="/view/tv/images/hotIcons/unSel1.png">':'<img alt="" src="/view/tv/images/hotIcons/unSel1.png" style="visibility:hidden;">')}function saveFavoriteChannelPreferences(){var C=favoriteCache.join("|");var B="method=savefav&serial="+serial+"&data="+C;var A={success:saveFavoriteChannelPreferencesSuccessHandler,failure:saveFavoriteChannelPreferencesFailureHandler,argument:{}};request=YAHOO.util.Connect.asyncRequest("POST",serverUrl,A,B);return false}var saveFavoriteChannelPreferencesSuccessHandler=function(A){};var saveFavoriteChannelPreferencesFailureHandler=function(A){showStatusPanel();document.getElementById("statusMessagePanel").innerHTML="";document.getElementById("statusMessagePanel").innerHTML=records.key270+". <br>"+((companyName!=null&&companyPhoneNum!=null)?""+records.key271+" "+companyName+" "+records.key272+" "+companyPhoneNum+".":"");window.setTimeout("hideStatusPanel();",20000)};function selCurrFav(A){if(document.getElementsByTagName){var B="selectedFavorite"+favCursor;if(document.getElementById(B)!=null){document.getElementById(B).className="favUnSelPanel"}var C="selectedFavorite"+A;favCursor=A;favCurrent=A+favoriteClicks;document.getElementById(C).className="favSelPanel"}}function hideSelFav(A){return ;if(document.getElementsByTagName){var B="selectedFavorite"+A;favCursor=A;document.getElementById(B).className="favUnSelPanel"}}function openSelFav(A){keyActionHandler(rcOK)}function gotoFullguide(){keyActionHandler(rcMENU)}function highLightHome(){if(document.getElementById("favHome")!=null){document.getElementById("favHome").style.background="#fcf3b8"}if(document.getElementById("pcHome")!=null){document.getElementById("pcHome").style.background="#fcf3b8"}if(document.getElementById("vodHome")!=null){document.getElementById("vodHome").style.background="#fcf3b8"}if(document.getElementById("controlPanelHome")!=null){document.getElementById("controlPanelHome").style.background="#fcf3b8"}}function hideHome(){if(document.getElementById("favHome")!=null){document.getElementById("favHome").style.background="none"}if(document.getElementById("pcHome")!=null){document.getElementById("pcHome").style.background="none"}if(document.getElementById("vodHome")!=null){document.getElementById("vodHome").style.background="none"}if(document.getElementById("controlPanelHome")!=null){document.getElementById("controlPanelHome").style.background="none"}}function moveFavPageUp(){keyActionHandler(rcUP)}function moveFavPageDown(){keyActionHandler(rcDOWN)}function showFavUp(){document.getElementById("favMoveUp").style.background="yellow"}function hideFavUp(){document.getElementById("favMoveUp").style.background="none"}function showFavDown(){document.getElementById("favMoveDown").style.background="yellow"}function hideFavDown(){document.getElementById("favMoveDown").style.background="none"}