var aodRowIndex=0;var aodColumnIndex=0;var aodStartIndex=0;var aodCursorIndex=0;var aodTitleTotal=0;var aodTitleIndexArr=new Array();var curAodIndex=new Array();var curGenreCache=new Array();var aodPlayStatus=false;var currAodIndex=-1;var aodTitleClick=0;var aodVisible=false;var curAodPosition=0;var aodGenreCursor=0;var aodTitleCursor=0;var aodGenreCurrent=0;var aodTitleCurrent=0;var aodGenreSelected=0;var aodTitleSelected=0;var aodCurCursor=0;var curAodPosition=0;var aodGenreMax=9;var aodTitleMax=2;var aodGenreTotal=0;var aodTitleTotal=0;var titleIndex=0;var keyPanelActive=false;var playStatus=false;var aodStartIndex=0;var aodCurColPosition=0;var aodGenreClicks=0;var aodPage=0;var aodClickCounts=0;var trickPlay=false;var trickPlayHandle=null;var trickPlayFrameHandle=null;var cBtnPosition=0;var currentAodClick=0;var aodTitleIdCache=new Array();var aodTitleNameCache=new Array();var aodTitleCache=new Array();var aodCustName=new Array();var curAodGenreIndexAr=new Array();var sharedAodActive=false;var sharedAodIndex=0;function launchMusicPanel(){currAodIndex=-1;aodPage=0;updateAodPanel();if(document.getElementById("aodTag")!=null){document.getElementById("aodTag").innerHTML=records.key444}if(document.getElementById("aodPlayerPanel")!=null){document.getElementById("aodPlayerPanel").style.visibility="hidden"}}function createAodGenre(){var A=0;for(i=0;i<audioTypePatternCache.length;++i){if(audioTypePatternCache[i]!=null&&audioTypePatternCache[i]=="audio"){curAodGenreIndexAr[A]=i;++A}}}function resetAodPanel(){aodGenreCursor=0;aodGenreCurrent=0;aodGenreSelected=0}function updateAodPanel(){createAodGenre();resetAodPanel();document.getElementById("aodGenrePanel").innerHTML="";var A="";var B;var E=new Array("Personal","Shared");aodGenreTotal=E.length-1;for(B=0;(E.length>10&&B<10)||(E.length<=10&&B<E.length);++B){A+="<tr><td "+(statusInfo==1?'style="cursor:pointer;"':"")+' id="genreAodId'+B+'"'+(statusInfo==1?' onmouseover="selAodGenre('+B+');" onmouseout="unSelAodGenre('+B+');" onclick="openAodGenreAsset('+B+');"':"")+' width="155px" height="30px" valign="middle" nowrap>&nbsp;&nbsp;&nbsp;'+E[B]+"</td></tr>"}document.getElementById("aodGenrePanel").innerHTML="<table width="+(A?"165px":"190px")+' align="left" border="0px" style="margin-top:10px;margin-left:5px;" cellspacing="0" cellpadding="0">'+(A?A:"<tr><td width="+(A?"165px":"190px")+' height="30px" valign="middle" align="center" nowrap>'+records.key372+"</td></tr>")+"</table>";if(document.getElementsByTagName){var C=document.getElementById("aodGenrePanel");var D=C.getElementsByTagName("tr");D[0].style.backgroundImage=(A?'url("/view/tv/images/rowGenre.png")':'url("/view/tv/images/rowGenreBig.png")');D[0].style.backgroundRepeat="no-repeat"}buildAodCache()}function changeAodGenreCursor(){if(document.getElementsByTagName){var B=document.getElementById("aodGenrePanel");var C=B.getElementsByTagName("tr");var A;for(A=0;A<C.length;A++){if(A==aodGenreCursor){C[A].style.backgroundImage='url("/view/tv/images/rowGenre.png")';C[A].style.backgroundRepeat="no-repeat"}else{C[A].style.backgroundImage="none"}}}}function resetAodTitlePanel(){curAodIndex=new Array();aodTitleIndexArr=new Array();aodRowIndex=0;aodColumnIndex=0;aodStartIndex=0;aodCursorIndex=0;aodTitleTotal=0;sharedAodIndex=0}function buildAodCache(){createAodCache();resetAodTitlePanel();if(aodGenreCurrent==0){curAodIndex=new Array();for(var A=0;A<curAodGenreIndexAr.length;A++){curAodIndex[A]=curAodGenreIndexAr[A]}var B=curAodIndex.length;for(var A=0;A<aodTitleIdCache.length;A++){curAodIndex[B]=A;++B}}else{curAodIndex=new Array();for(var A=0;A<aodCustName.length;A++){curAodIndex[A]=A}}aodTitleTotal=curAodIndex.length==0?0:curAodIndex.length-1;updateAodTitlePanel()}function createAodCache(){aodTitleIdCache=new Array();aodTitleNameCache=new Array();aodTitleCache=new Array();aodCustName=new Array();if(aodGenreCurrent==0){var C=(audioInfoCache[0]).split("-*$-");if((C[0]).length){aodTitleIdCache=C[0].split("-@#-");aodTitleNameCache=C[1].split("-@#-");aodTitleCache=C[2].split("-@#-")}}else{var C=(audioInfoCache[1]).split("-*$-");if((C[0]).length){aodCustName=C[0].split("-@#-");for(var A=0;A<aodCustName.length;A++){if((C[1]).length){var B=(C[1]).split("$@$");if(B[A].length){aodTitleIdCache[A]=B[A].split("-@#-");B=C[2].split("$@$");aodTitleNameCache[A]=B[A].split("-@#-");B=C[3].split("$@$");aodTitleCache[A]=B[A].split("-@#-")}}}}}}function updateAodTitlePanel(){if(aodGenreCurrent==1){reDesignAodPanel();return }var G;var C=0;for(var E=0;E<3;E++){aodTitleIndexArr[E]=new Array(3);for(var D=0;D<3;D++){aodTitleIndexArr[E][D]=0}}var B='<tr><td colspan="7" width="425px" height="10px">&nbsp;</td></tr><tr><td width="15px" height="80px">&nbsp;</td>';if(document.getElementById("aodTitlePanel")!=null){for(G=0;(curAodIndex.length>=9&&G<9)||(curAodIndex.length<9&&G<curAodIndex.length);++G){var A=curAodIndex[G];if(G%3==0&&G!=0){B+='</tr><tr><td colspan="7" width="425px" height="10px">&nbsp;</td></tr><tr><td width="15px" height="80px">&nbsp;</td>'}var J=parseInt(G/3);var I=parseInt(G%3);aodTitleIndexArr[J][I]=1;var H=aodTitleIdCache.length;var K=curAodIndex.length;if(H>=(K-G)){B+='<td id="aodTitle'+J+""+I+'" align="center" valign="middle" nowrap style="width:100px;height:75px;cursor:pointer;"  ><img id="aodTitleId'+J+""+I+'" '+(statusInfo==1?' onmouseover="selAodAsset('+G+", "+C+');" onmouseout="unSelAodAsset('+G+');" onclick="openAodAsset('+G+');" style="width:75px;height:75px;border:2px solid gray;cursor:pointer;" ':' style="background:gray;width:75px;height:75px;border:2px solid gray;" ')+'  alt="'+aodTitleCache[A]+'" src="/ImageHandler?value='+aodTitleIdCache[A]+'&icon=-1&imageType=8" /></td><td width="15px" height="80px" >&nbsp;</td>'}else{B+='<td id="aodTitle'+J+""+I+'" align="center" valign="middle" nowrap style="width:100px;height:75px;cursor:pointer;"  ><img id="aodTitleId'+J+""+I+'" '+(statusInfo==1?' onmouseover="selAodAsset('+G+", "+C+');" onmouseout="unSelAodAsset('+G+');" onclick="openAodAsset('+G+');" style="width:75px;height:75px;border:2px solid gray;cursor:pointer;" ':' style="background:gray;width:75px;height:75px;border:2px solid gray;" ')+'  alt="'+fullTitleCache[A]+'" src='+(vodUseGraphicCache[A]==1?'"/ImageHandler?value='+titleIdCache[A]+'&icon=-1&imageType=3"':'"./view/tv/images/vod/logo_none.png"')+' /></td><td width="15px" height="80px" >&nbsp;</td>'}C++}if(C>0){for(var F=0;F<(9-C);++F){if((C+F)%3==0){B+='</tr><tr><td colspan="7" width="425px" height="10px">&nbsp;</td></tr><tr><td width="15px" height="80px">&nbsp;</td>'}B+='<td align="center" valign="middle" nowrap style="width:100px;height:80px;">&nbsp;</td><td width="15px" height="80px" >&nbsp;</td>'}}B+='</tr><tr><td colspan="7" width="425px" height="10px">&nbsp;</td></tr>';document.getElementById("aodTitlePanel").innerHTML='<table width="425px"  height="300px" border=0 align="center" valign="middle" cellspacing="0" cellpadding="0" class="item">'+(curAodIndex.length>0?B:'<tr><td width="425px" height="30" valign="middle" align="center" nowrap>'+records.key373+" </td></tr>")+"</table>"}}function reDesignAodPanel(){document.getElementById("aodDPanel").innerHTML="";document.getElementById("aodSPanel").innerHTML="";document.getElementById("aodSHeader").innerHTML="";document.getElementById("aodDHeader").innerHTML="";for(var C=0;C<3;C++){aodTitleIndexArr[C]=new Array(3);for(var B=0;B<3;B++){aodTitleIndexArr[C][B]=0}}document.getElementById("aodTitlePanel").innerHTML="";var E="";var A=0;for(var F=0;F<2;F++){E+="<tr>";for(var D=0;D<3;D++){E+="<td "+(statusInfo==1?' onmouseover="selAodTitle('+F+","+D+", "+A+');" onclick="openAodTitle();" ':"")+'  id="aodTitle'+F+""+D+'" width="120px" height="120px" align="center" valign="middle" nowrap >';E+="&nbsp;";E+="</td>";++A}E+="</tr>"}document.getElementById("aodTitlePanel").innerHTML='<table width="400px" height="300px" align="center" valign="middle" border="0" cellspacing="0" cellpadding="0">'+E+"</table>";var G=0;for(var F=0;(aodCustName.length>=9&&F<9)||(aodCustName.length<9&&F<aodCustName.length);++F){var I=parseInt(F/3);var H=parseInt(F%3);aodTitleIndexArr[I][H]=1;var J='<table id="aodTitleId'+I+""+H+'" style="background:darkkhaki;border:2px solid gray;cursor:pointer;"><tr>';var A=0;for(var D=0;(aodTitleIdCache[F].length>=4&&D<4)||(aodTitleIdCache[F].length<4&&D<aodTitleIdCache[F].length);++D){if(D%2==0&&D!=0){J+="</tr><tr>"}J+='<td width="50px" height="50px" align="center" valign="middle" nowrap >';J+='<img style="width:50px;height:50px;border:2px solid transparent;background:darkolivegreen;" alt="" src="/ImageHandler?value='+aodTitleIdCache[F][D]+'&icon=-1&imageType=8" />';J+="</td>";++A}if(A>0){for(var D=0;D<(4-A);++D){if((A+D)%2==0){J+="</tr><tr>"}J+='<td width="50px" height="50px" align="center" valign="middle" nowrap >';J+="&nbsp;";J+="</td>"}}J+="</tr></table>";document.getElementById("aodTitle"+I+""+H).innerHTML=J;++G}if(aodCustName.length==0){document.getElementById("aodTitlePanel").innerHTML='<table width="425px" height="300px" align="center" valign="middle" border="0" cellspacing="0" cellpadding="0"><tr><td width="425px" height="300px" align="center" style="text-align:center;">no titles available</td></tr></table>'}aodTitleTotal=aodCustName.length==0?0:aodCustName.length-1}function scrollAodTitlePage(B,F){aodTitleCursor=1;aodPage=1;for(var E=0;E<3;E++){aodTitleIndexArr[E]=new Array(3);for(var D=0;D<3;D++){aodTitleIndexArr[E][D]=0}}document.getElementById("aodTitlePanel").innerHTML="";if(aodGenreCurrent==1){reScrollMusicPanel(B,F);return }var C='<tr><td colspan="7" width="425px" height="10px">&nbsp;</td></tr><tr><td width="15px" height="80px">&nbsp;</td>';var J=0;try{if(document.getElementById("aodTitlePanel")!=null){for(var H=B;H<=F;++H){var L=parseInt(H/3);var K=parseInt(H%3);var A=curAodIndex[H];if(H%3==0&&H!=0&&J!=0){C+='</tr><tr><td colspan="7" width="425px" height="10px">&nbsp;</td></tr><tr><td width="15px" height="80px">&nbsp;</td>'}aodTitleIndexArr[parseInt(J/3)][parseInt(J%3)]=1;var I=aodTitleIdCache.length;var N=curAodIndex.length;if(I>=(N-H)){C+='<td align="center" valign="middle" nowrap style="width:100px;height:75px;cursor:pointer;"><span class="aodKeyPanel" style="z-index:200;position:absolute;"><table><tr><td id="aodKeyPanel'+H+'"'+(statusInfo==1?'onclick="openAodAsset('+H+');"':"")+' ></td></tr></table></span><img id="aodTitleId'+L+""+K+'"'+(statusInfo==1?' onmouseover="selAodAsset('+H+", "+J+');" onmouseout="unSelAodAsset('+H+');" onclick="openAodAsset('+H+');" style="width:75px;height:75px;border:2px solid gray;cursor:pointer;" ':' style="background:gray;width:75px;height:75px;border:2px solid gray;" ')+'  alt="'+aodTitleCache[A]+'" src="/ImageHandler?value='+aodTitleIdCache[A]+'&icon=-1&imageType=8" /></td><td width="15px" height="80px" >&nbsp;</td>'}else{C+='<td align="center" valign="middle" nowrap style="width:100px;height:75px;cursor:pointer;"  ><span class="aodKeyPanel" id="aodKeyPanel'+H+'" ></span><img id="aodTitleId'+L+""+K+'"'+(statusInfo==1?' style="background:gray;width:75px;height:75px;border:2px solid gray;cursor:pointer;" onmouseover="selAodAsset('+H+", "+J+');" onmouseout="unSelAodAsset('+H+');" onclick="openAodAsset('+H+');"':' style="background:gray;width:75px;height:75px;border:2px solid gray;" ')+' alt="'+fullTitleCache[A]+'" src='+(vodUseGraphicCache[A]==1?'"/ImageHandler?value='+titleIdCache[A]+'&icon=-1&imageType=3"':'"./view/tv/images/vod/logo_none.png"')+' /></td><td width="15px" height="80px" >&nbsp;</td>'}J++}if(J>0){for(var G=0;G<(9-J);++G){if((J+G)%3==0){C+='</tr><tr><td colspan="7" width="425px" height="10px">&nbsp;</td></tr><tr><td width="15px" height="80px">&nbsp;</td>'}C+='<td align="center" valign="middle" nowrap style="width:100px;height:80px;">&nbsp;</td><td width="15px" height="80px" >&nbsp;</td>'}}C+='</tr><tr><td colspan="7" width="425px" height="10px">&nbsp;</td></tr>';document.getElementById("aodTitlePanel").innerHTML='<table width="425px"  height="310px" border=0 align="center" valign="middle" cellspacing="0" cellpadding="0" class="item">'+(curAodIndex.length>0?C:'<tr><td width="425px" height="30" valign="middle" align="center" nowrap>'+records.key373+" </td></tr>")+"</table>";selAodTitle(aodRowIndex,aodColumnIndex)}}catch(M){}}function reScrollMusicPanel(B,D){var C=0;document.getElementById("aodTitlePanel").innerHTML="";var J="<tr>";for(var F=B;F<=D;++F){var I=parseInt(F/3);var G=parseInt(F%3);if(F%3==0&&F!=0&&C!=0){J+="</tr><tr>"}aodTitleIndexArr[parseInt(C/3)][parseInt(C%3)]=1;var H=3*I+G;var A=0;J+="<td "+(statusInfo==1?' onmouseover="selAodAsset('+F+", "+C+');" onclick="openAodAsset('+F+');" ':"")+'  id="aodTitle'+I+""+G+'" width="120px" height="120px" align="center" valign="middle" nowrap >';J+='<table id="aodTitleId'+I+""+G+'" style="background:darkkhaki;border:2px solid gray;cursor:pointer;"><tr>';J+="<tr>";for(var E=0;(aodTitleIdCache[F].length>=4&&E<4)||(aodTitleIdCache[F].length<4&&E<aodTitleIdCache[F].length);++E){if(E%2==0&&E!=0){J+="</tr><tr>"}J+='<td width="50px" height="50px" align="center" valign="middle" nowrap >';J+='<img style="width:50px;height:50px;border:2px solid transparent;background:darkolivegreen;" alt="" src="/ImageHandler?value='+aodTitleIdCache[F][E]+'&icon=-1&imageType=7" />';J+="</td>";++A}if(A>0){for(var E=0;E<(4-A);++E){if((A+E)%2==0){J+="</tr><tr>"}J+='<td width="50px" height="50px" align="center" valign="middle" nowrap >';J+="&nbsp;";J+="</td>"}}J+="</tr></table>";J+="</td>";C++}if(C>0){for(var E=0;E<(6-count);++E){var I=parseInt((E+count)/3);var G=parseInt((E+count)%3);if((count+E)%3==0){J+="</tr><tr>"}J+='<td id="aodTitle'+I+""+G+'" width="120px" height="120px" align="center" valign="middle" nowrap >';J+="&nbsp;";J+="</td>"}}J+="</tr>";document.getElementById("aodTitlePanel").innerHTML='<table width="400px" height="300px" align="center" valign="middle" border="0" cellspacing="0" cellpadding="0">'+J+"</table>";selAodTitle(aodRowIndex,aodColumnIndex)}function hideAodDetails(){document.getElementById("aodDPanel").innerHTML="";document.getElementById("aodSPanel").innerHTML="";document.getElementById("aodSHeader").innerHTML="";document.getElementById("aodDHeader").innerHTML=""}function updateAodInfo(B){if(aodGenreCurrent==1){document.getElementById("aodDPanel").innerHTML="";document.getElementById("aodSPanel").innerHTML="";document.getElementById("aodSHeader").innerHTML="";document.getElementById("aodDHeader").innerHTML="";document.getElementById("aodDPanel").innerHTML=aodCustName[B];document.getElementById("aodSPanel").innerHTML=aodTitleIdCache[B].length+" assets are shared.";return }document.getElementById("aodSHeader").innerHTML=curAodIndex.length==0?"":"current: ";document.getElementById("aodDHeader").innerHTML=curAodIndex.length==0?"":"now: ";var E=curAodIndex.length==0?0:curAodIndex[B];if(curAodIndex.length==0){return }var G="";var F="";if(B>(curAodGenreIndexAr.length-1)){G=(currAodIndex!=-1?aodTitleNameCache[currAodIndex]:aodTitleNameCache[E]);F=aodTitleNameCache[E]}else{G=(currAodIndex!=-1?assetNameCache[currAodIndex]:assetNameCache[E]);F=assetNameCache[E]}try{var D=G.substring(0,G.indexOf("."));var C=F.substring(0,F.indexOf("."));D=(D.length>15?D.substring(0,15)+"..":D);C=(C.length>15?C.substring(0,15)+"..":C);document.getElementById("aodDPanel").innerHTML=D;document.getElementById("aodSPanel").innerHTML=C}catch(A){}}function scrollAodPage(D,A){var B="";var C;for(C=D;C<=A;++C){B+="<tr><td "+(statusInfo==1?'style="cursor:pointer;" id="genreAodId'+C+'" onmouseover="selAodGenre('+C+');" onmouseout="unSelAodGenre('+C+');" onclick="openAodGenreAsset('+C+');"':"")+' width="155px" height="30px" valign="middle" nowrap>&nbsp;&nbsp;&nbsp;'+curGenreCache[C]+"</td></tr>"}document.getElementById("aodGenrePanel").innerHTML="<table width="+(B?"165px":"190px")+' align="left" border="0px" style="margin-top:10px;margin-left:5px;" cellspacing="0" cellpadding="0">'+(B?B:"<tr><td width="+(B?"165px":"190px")+' height="28px" valign="middle" align="center" nowrap>'+records.key372+"</td></tr>")+"</table>";highlightAodGenre()}function startAodStream(){if(aodGenreCurrent==1){sharedAodActie=true;var F=3*aodRowIndex+aodColumnIndex;updateSharedInfo(F);var G=aodTitleNameCache[F][sharedAodIndex];var C=G.substring(0,G.lastIndexOf("."));var E=G.substring(G.lastIndexOf(".")+1,G.length).toUpperCase();if(E!="MP3"){G=C+".mp3"}currAodIndex=sharedAodIndex;document.getElementById("aodDPanel").innerHTML=aodTitleCache[F][sharedAodIndex];aodPlayStatus=true;if(stbTypeId!=7){var A="src=rtsp://"+vodServer+"/"+aodTitleCache[F][sharedAodIndex]+";servertype=ncube";playStream(A);return }document.getElementById("epgPlayer").innerHTML="";if(document.getElementById("aodPlayerPanel")!=null){document.getElementById("aodPlayerPanel").style.visibility="visible"}document.getElementById("aodImage").innerHTML='<img style="width:300px;height:200px;" alt="'+aodTitleCache[F][sharedAodIndex]+'" src="/ImageHandler?value='+aodTitleIdCache[F][sharedAodIndex]+'&icon=-1&imageType=8" />';document.getElementById("musicPlayer").innerHTML='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="400" height="27" id="audio" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><param name="movie" value="./view/tv/flash/audio.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#2E7281" /><param name="FlashVars" value="streamName='+G+'" /><embed src="./view/tv/flash/audio.swf" FlashVars="streamName='+G+'" quality="high" bgcolor="#2E7281" width="400" height="27" name="audio" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>'}else{feedType="rtsp";var F=3*aodRowIndex+aodColumnIndex;var D="";if(F>(curAodGenreIndexAr.length-1)){F=curAodIndex.length==0?0:curAodIndex[F];D=aodTitleNameCache[F];if(stbTypeId!=7){var A="src=rtsp://"+vodServer+"/"+D+";servertype=ncube";playStream(A);return }document.getElementById("aodImage").innerHTML='<img style="width:300px;height:200px;" alt="'+aodTitleCache[F]+'" src="/ImageHandler?value='+aodTitleIdCache[F]+'&icon=-1&imageType=8" />'}else{F=curAodIndex.length==0?0:curAodIndex[F];D=assetNameCache[F];if(stbTypeId!=7){var A="src=rtsp://"+vodServer+"/"+assetNameCache[F]+";servertype=ncube";playStream(A);return }document.getElementById("aodImage").innerHTML='<img style="width:300px;height:200px;" alt="'+fullTitleCache[F]+'" src='+(vodUseGraphicCache[F]==1?'"/ImageHandler?value='+titleIdCache[F]+'&icon=-1&imageType=3"':'"./view/tv/images/vod/logo_none.png"')+" />"}currAodIndex=F;if(D==""){return }var B=D.substring(0,D.lastIndexOf("."));B=(B.length>15?B.substring(0,15)+"..":B);document.getElementById("aodDPanel").innerHTML=B;aodPlayStatus=true;var G=D;var C=G.substring(0,G.lastIndexOf("."));var E=G.substring(G.lastIndexOf(".")+1,G.length).toUpperCase();if(E!="MP3"){G=C+".mp3"}document.getElementById("epgPlayer").innerHTML="";if(document.getElementById("aodPlayerPanel")!=null){document.getElementById("aodPlayerPanel").style.visibility="visible"}document.getElementById("musicPlayer").innerHTML='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="400" height="27" id="audio" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><param name="movie" value="./view/tv/flash/audio.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#2E7281" /><param name="FlashVars" value="streamName='+G+'" /><embed src="./view/tv/flash/audio.swf" FlashVars="streamName='+G+'" quality="high" bgcolor="#2E7281" width="400" height="27" name="audio" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>'}}function fastForward(){setSpeedStream(6);trickPlayHandle=window.setInterval("getFwdVideoFrames()",4000)}function getFwdVideoFrames(){continueStream();trickPlayFrameHandle=window.setTimeout("setSpeedStream(6)",500)}function getRwrVideoFrames(){continueStream();trickPlayFrameHandle=window.setTimeout("setSpeedStream(-6)",500)}function rewind(){setSpeedStream(-6);trickPlayHandle=window.setInterval("getRwrVideoFrames()",4000)}function selAodTitle(H,E){if(aodGenreCurrent==1){var C=3*H+E;if(aodCustName.length==0){return }}else{if(curAodIndex.length==0){return }}var F="aodTitleId"+H+""+E;var C=3*H+E;try{var D=curAodIndex.length==0?0:curAodIndex[C];updateAodInfo(C)}catch(B){}try{document.getElementById(F).style.border="2px solid paleGoldenRod"}catch(A){try{aodRowIndex-=1;aodRowIndex=(aodRowIndex<0?aodRowIndex+1:aodRowIndex);aodCursorIndex-=1;aodCursorIndex=(aodCursorIndex<0?aodCursorIndex+1:aodCursorIndex);selAodTitle(aodRowIndex,aodColumnIndex)}catch(G){return }}}function unSelAodTitle(E,C){var D="aodTitleId"+E+""+C;var B=3*E+C;document.getElementById("aodSHeader").innerHTML="";document.getElementById("aodDHeader").innerHTML="";document.getElementById("aodSPanel").innerHTML="";document.getElementById("aodDPanel").innerHTML="";try{document.getElementById(D).style.border="2px solid gray"}catch(A){}}function onAodTitlePanel(A){unSelAodTitle(aodRowIndex,aodColumnIndex);var C=parseInt(A/3);var B=A%3;aodRowIndex=C;aodColumnIndex=B;selAodTitle(aodRowIndex,aodColumnIndex)}function updateSharedInfo(A){document.getElementById("aodSHeader").innerHTML="";document.getElementById("aodDHeader").innerHTML="";document.getElementById("aodDPanel").innerHTML="";document.getElementById("aodSPanel").innerHTML="";document.getElementById("aodSHeader").innerHTML=(aodTitleCache[A][sharedAodIndex]).length==0?"":"current: ";document.getElementById("aodDHeader").innerHTML=(aodTitleCache[A][sharedAodIndex]).length==0?"":"now: ";document.getElementById("aodDPanel").innerHTML=aodTitleCache[A][currAodIndex];document.getElementById("aodSPanel").innerHTML=aodTitleCache[A][sharedAodIndex]}function aodKeyHandler(F){switch(F){case rcRIGHT:if(sharedAodActive){++sharedAodIndex;var B=3*aodRowIndex+aodColumnIndex;sharedAodIndex=sharedAodIndex>=aodTitleIdCache[B].length?0:sharedAodIndex;updateSharedInfo(B);return }sharedAodIndex=0;if(aodPage==0){aodPage=1;selAodTitle(aodRowIndex,aodColumnIndex);return }else{var D=aodRowIndex*3+aodColumnIndex;if(D==aodTitleTotal||aodColumnIndex==2){return }if(aodColumnIndex>=0){unSelAodTitle(aodRowIndex,aodColumnIndex);++aodColumnIndex;selAodTitle(aodRowIndex,aodColumnIndex);return }}break;case rcLEFT:if(sharedAodActive){--sharedAodIndex;var B=3*aodRowIndex+aodColumnIndex;sharedAodIndex=sharedAodIndex<0?aodTitleIdCache[B].length-1:sharedAodIndex;updateSharedInfo(B);return }sharedAodIndex=0;if(aodColumnIndex==0){unSelAodTitle(aodRowIndex,aodColumnIndex);aodPage=0;return }if(aodColumnIndex>=0){unSelAodTitle(aodRowIndex,aodColumnIndex);--aodColumnIndex;selAodTitle(aodRowIndex,aodColumnIndex);return }break;case rcUP:if(sharedAodActive){return }sharedAodIndex=0;if(aodRowIndex==0){return }unSelAodTitle(aodRowIndex,aodColumnIndex);aodRowIndex--;if(aodCursorIndex!=0){aodCursorIndex--;selAodTitle(aodRowIndex,aodColumnIndex)}else{aodCursorIndex=0;var H=0;H=(aodStartIndex<3?0:aodStartIndex-3);aodStartIndex=H;var A=((aodTitleTotal-H)>8?(H+8):aodTitleTotal);scrollAodTitlePage(H,A)}break;case rcDOWN:if(sharedAodActive){return }sharedAodIndex=0;var G=aodCursorIndex+1;var E=aodColumnIndex;if(G<3){if(aodTitleIndexArr[G][E]==0){return }}var C=(aodTitleTotal/3);if(aodRowIndex==parseInt(C)){return }unSelAodTitle(aodRowIndex,aodColumnIndex);aodRowIndex++;if(aodCursorIndex<2){aodCursorIndex++;selAodTitle(aodRowIndex,aodColumnIndex)}else{var H=0;if(aodRowIndex<3){H=aodRowIndex;aodStartIndex=H}else{H=aodStartIndex+3;aodStartIndex=H}aodCursorIndex=2;var A=((aodTitleTotal-H)>8?(H+8):aodTitleTotal);scrollAodTitlePage(H,A)}break;case rcOK:if(aodGenreCurrent==1){sharedAodActive=true;startAodStream();return }if(currAodIndex!=-1){var D=3*aodRowIndex+aodColumnIndex;D=curAodIndex.length==0?0:curAodIndex[D];if(D==currAodIndex){if(document.getElementById("aodPlayerPanel")!=null){aodPlayStatus=true;document.getElementById("aodPlayerPanel").style.visibility="visible"}}else{feedType="rtsp";keyAodAction()}}else{feedType="rtsp";keyAodAction()}break;case rcMENU:sharedAodActive=false;if(aodPlayStatus){aodPlayStatus=false;if(document.getElementById("aodPlayerPanel")!=null){document.getElementById("aodPlayerPanel").style.visibility="hidden"}}else{if(document.getElementById("aodPlayerPanel")!=null){document.getElementById("aodPlayerPanel").style.visibility="hidden"}document.getElementById("musicPlayer").innerHTML="";aodPlayStatus=false;showGoPanel();feedType="igmp";startStream();musicActive=false;showGuidePanel()}break}}function aodKeyNvg(A){if(aodGenreCurrent==1){if(aodCustName.length==0){return }}else{if(curAodIndex.length==0){return }}aodKeyHandler(A)}function keyPanelNvg(A){switch(A){case rcOK:feedType="rtsp";keyAodAction();break}}function keyAodAction(){var A=3*aodRowIndex+aodColumnIndex;if(pauseFlag==1){if(playStatus){startAodStream();playStatus=false}else{playStatus=true;startAodStream()}}else{stopStream();playStatus=true;pauseFlag=1;startAodStream()}}function highLightKeyPanel(A){document.getElementById("aodKeyPanel"+aodTitleSelected).style.background="#fcf3b8"}function hideKeyPanel(A){document.getElementById("aodKeyPanel"+aodTitleSelected).style.background=""}function hideAod(A){document.getElementById("aodMove"+A).style.background="none"}function showAod(A){document.getElementById("aodMove"+A).style.background="#fcf3b8"}function escapeAodPanel(){keyActionHandler(rcMENU)}function highLightAodHome(){document.getElementById("aodHome").style.background="#fcf3b8"}function hideAodHome(){document.getElementById("aodHome").style.background="none"}function selAodAsset(A,B){aodPage=1;unSelAodTitle(aodRowIndex,aodColumnIndex);aodRowIndex=parseInt(A/3);aodColumnIndex=parseInt(A%3);aodCursorIndex=parseInt(B/3);selAodTitle(aodRowIndex,aodColumnIndex)}function unSelAodAsset(A){return ;if(document.getElementById("aodTitleId"+A)!=null){document.getElementById("aodTitleId"+A).style.border="0px solid #ff7700"}}function openAodAsset(A){aodKeyHandler(rcOK)}function moveAodPageUp(){keyActionHandler(rcUP)}function moveAodPageDown(){keyActionHandler(rcDOWN)}function selAodGenre(A){aodPage=0;aodGenreCursor=A-aodGenreClicks;aodGenreSelected=aodGenreCurrent=A;changeAodGenreCursor();buildAodCache()}function unSelAodGenre(A){return ;document.getElementById("genreAodId"+A).style.background="none"}function openAodGenreAsset(A){keyActionHandler(rcOK)}