var videoRowIndex=0;var videoColumnIndex=0;var videoCursorIndex=0;var videoClickIndex=0;var videoTitleTotal=0;var videoStartIndex=0;var videoTitleMax=3;var videoRowClick=0;var videoColumnClick=0;var videoGenreCache=new Array();var videoTitleIdCache=new Array();var videoFullTitleCache=new Array();var videoAssetCache=new Array();var videoActorCache=new Array();var videoDirCache=new Array();var videoMedSumCache=new Array();var videoUseGraphic=new Array();var videoPatternCache=new Array();var videoRatingCache=new Array();var videoSubtitleCache=new Array();var videoAudioType=new Array();videoYearCache=new Array();var videoServer="";var curVideoStatusIndex=new Array();function resetVideoParams(){videoRowIndex=0;videoColumnIndex=0;videoCursorIndex=0;videoClickIndex=0;videoTitleTotal=0;videoStartIndex=0;videoTitleMax=3;videoRowClick=0;videoColumnClick=0;videoGenreCache=new Array();videoTitleIdCache=new Array();videoFullTitleCache=new Array();videoActorCache=new Array();videoDirCache=new Array();videoMedSumCache=new Array();videoUseGraphic=new Array();videoPatternCache=new Array();videoRatingCache=new Array();videoSubtitleCache=new Array();videoAudioType=new Array();videoYearCache=new Array();curVideoStatusIndex=new Array()}function getVideoCache(C){resetVideoParams();try{for(var B=0;B<C.jsonArray.length;++B){videoTitleIdCache[B]=C.jsonArray[B].sTitleId;videoFullTitleCache[B]=C.jsonArray[B].sFullTitle;videoAssetCache[B]=C.jsonArray[B].sAssetName;videoActorCache[B]=C.jsonArray[B].sActor;videoMedSumCache[B]=C.jsonArray[B].sMediumSummary;videoYearCache[B]=C.jsonArray[B].sYear;videoUseGraphic[B]=C.jsonArray[B].sVodUseGraphic;videoPatternCache[B]=C.jsonArray[B].sGenrePattern;videoRatingCache[B]=C.jsonArray[B].sRatingPattern;videoSubtitleCache[B]=C.jsonArray[B].sSubtitlePattern;videoAudioType[B]=C.jsonArray[B].sAudioTypePattern;videoDirCache[B]=C.jsonArray[B].sDirector}videoTitleTotal=videoTitleIdCache.length-1;playVidStream(videoFullTitleCache[0]);for(var B=0;B<C.jsonGenreArray.length;++B){videoGenreCache[B]=C.jsonGenreArray[B].genre}updateVideoPanel()}catch(A){}}function launchVideoPanel(A){vodActive=false;getVideoCache(A);resetItemVars();videoActive=true;document.getElementById("videoPanel").style.visibility="visible"}function updateVideoPanel(){if(document.getElementById("vodTitlePanel")==null){return }if(videoTitleIdCache.length==0){document.getElementById("videoContentPanel").innerHTML='<table width="100%" height="100%" align="center" valign="middle" style="text-align:center;vertical-align:bottom;background:darkolivegreen;"><tr><td style="font-size:20px;font-sweight:bold;">No data available</td></tr><table>';return }var A="";var H=1;var G;var C=0;var A='<tr><td colspan="7" width="400px" height="10px">&nbsp;</td></tr><tr><td width="15px" height="80px">&nbsp;</td>';for(var E=0;E<4;E++){curVideoStatusIndex[E]=new Array(3);for(var D=0;D<3;D++){curVideoStatusIndex[E][D]=0}}for(G=0;(videoTitleIdCache.length>=12&&G<12)||(videoTitleIdCache.length<12&&G<videoTitleIdCache.length);++G){var J=parseInt(G/3);var I=parseInt(G%3);if(G%3==0&&G!=0){A+='</tr><tr><td colspan="7" width="400px" height="10px">&nbsp;</td></tr><tr><td width="15px" height="80px">&nbsp;</td>'}curVideoStatusIndex[J][I]=1;var B=videoFullTitleCache[G];B=(B.indexOf(".")>=0?B.substring(0,B.indexOf(".")):B);A+='<td align="center" valign="middle" nowrap style="width:100px;height:75px;cursor:pointer;" onmouseover="selVideoAsset('+G+","+C+');" onmouseout="unSelVideoAsset('+G+');" onclick="openVideoAsset('+G+');" ><img id="videoTitleId'+J+""+I+'" style="border:1px solid gray;width:75px;height:75px;" alt="'+B+'" src='+(videoUseGraphic[G]==1?'"/ImageHandler?value='+videoTitleIdCache[G]+'&icon=-1&imageType=3"':'"./view/online/images/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){A+='</tr><tr><td colspan="7" width="400px" height="10px">&nbsp;</td></tr><tr><td width="15px" height="80px">&nbsp;</td>'}A+='<td align="center" valign="middle" nowrap style="width:75px;height:80px;">&nbsp;</td><td width="15px" height="80px" >&nbsp;</td>'}}A+='</tr><tr><td colspan="7" width="400px" height="10px" >&nbsp;</td></tr>';document.getElementById("vodTitlePanel").innerHTML='<table width="100%" align="left" valign="top" cellspacing="0" cellpadding="0" >'+(A?A:'<tr><td height="28" width="100%" align="center" valign="middle"><span style="width:100%;text-align:center;vertical-align:middle;background-repeat:no-repeat;">No options avaliable</span></td></tr>')+"</table>";selVideoTitle(videoRowIndex,videoColumnIndex)}function scrollVideoTitle(A,G){try{var B="";var J=1;var I;var D=0;var B='<tr><td colspan="7" width="400px" height="10px">&nbsp;</td></tr><tr><td width="15px" height="80px">&nbsp;</td>';for(var F=0;F<4;F++){curVideoStatusIndex[F]=new Array(3);for(var E=0;E<3;E++){curVideoStatusIndex[F][E]=0}}for(I=A;I<=G;++I){var L=parseInt(I/3);var K=parseInt(I%3);if(I%3==0&&I!=0&&D!=0){B+='</tr><tr><td colspan="7" width="400px" height="10px">&nbsp;</td></tr><tr><td width="15px" height="80px">&nbsp;</td>'}curVideoStatusIndex[parseInt(D/3)][parseInt(D%3)]=1;var C=videoFullTitleCache[I];C=(C.indexOf(".")>=0?C.substring(0,C.indexOf(".")):C);B+='<td align="center" valign="middle" nowrap style="width:100px;height:75px;cursor:pointer;" onmouseover="selVideoAsset('+I+", "+D+');" onmouseout="unSelVideoAsset('+I+');" onclick="openVideoAsset('+I+');" ><img id="videoTitleId'+L+""+K+'" style="border:1px solid gray;width:75px;height:75px;" alt="'+C+'" src='+(videoUseGraphic[I]==1?'"/ImageHandler?value='+videoTitleIdCache[I]+'&icon=-1&imageType=3"':'"./view/online/images/logo_none.png"')+'/></td><td width="15px" height="80px" >&nbsp;</td>';D++}if(D>0){for(var H=0;H<(12-D);++H){if((D+H)%3==0){B+='</tr><tr><td colspan="7" width="400px" height="10px">&nbsp;</td></tr><tr><td width="15px" height="80px">&nbsp;</td>'}B+='<td align="center" valign="middle" nowrap style="width:75px;height:80px;">&nbsp;</td><td width="15px" height="80px" >&nbsp;</td>'}}B+='</tr><tr><td colspan="7" width="400px" height="10px" >&nbsp;</td></tr>';document.getElementById("vodTitlePanel").innerHTML='<table width="100%" align="left" valign="top" cellspacing="0" cellpadding="0" >'+(B?B:'<tr><td height="28" width="100%" align="center" valign="middle"><span style="width:100%;text-align:center;vertical-align:middle;background-repeat:no-repeat;">No options avaliable</span></td></tr>')+"</table>"}catch(M){}selVideoTitle(videoRowIndex,videoColumnIndex)}function updateVideoFooter(B){try{showVideoDetails();var C=videoFullTitleCache[B].substring(0,videoFullTitleCache[B].indexOf("."));var D=videoFullTitleCache[B].substring(videoFullTitleCache[B].indexOf(".")+1,videoFullTitleCache[B].length).toUpperCase();document.getElementById("titleContent").innerHTML=(C?((C.length>23)?(C.substring(0,20)+"..."):C):" ");document.getElementById("ratingPanel").innerHTML=(videoRatingCache[B]?" "+videoRatingCache[B].replace(/#/,"")+"":"&nbsp;");if(videoRatingCache[B]){document.getElementById("ratingTagPanel").innerHTML="Rating: "}else{document.getElementById("ratingTagPanel").innerHTML=""}if(videoYearCache[B]!=0){document.getElementById("yearTagPanel").innerHTML=records.key455+":"}else{document.getElementById("yearTagPanel").innerHTML=""}document.getElementById("yearPanel").innerHTML=(videoYearCache[B]?videoYearCache[B]:" ")}catch(A){hideVidDetails()}}function selVideoTitle(F,C){var D="videoTitleId"+F+""+C;var B=3*parseInt(F)+parseInt(C);updateVideoFooter(B);try{document.getElementById(D).style.border="1px solid white"}catch(A){try{videoRowIndex-=1;videoCursorIndex-=1;selVideoTitle(videoRowIndex,videoColumnIndex)}catch(E){return }}}function unSelVideoTitle(C,A){var B="videoTitleId"+C+""+A;if(document.getElementById(B)!=null){document.getElementById(B).style.border="1px solid gray"}}function selVideoAsset(A,D){unSelVideoTitle(videoRowIndex,videoColumnIndex);var C=parseInt(A/3);var B=parseInt(A%3);videoRowIndex=C;videoColumnIndex=B;videoCursorIndex=parseInt(D/3);selVideoTitle(videoRowIndex,videoColumnIndex)}function unSelVideoAsset(A){}function openVideoAsset(A){videoKeyHandler(rcOK)}function videoKeyHandler(E){if(videoTitleIdCache.length==0){return }switch(E){case rcRIGHT:var C=3*videoRowIndex+videoColumnIndex;if(C==videoTitleTotal||videoColumnIndex==2){return }if(videoColumnIndex>=0){unSelVideoTitle(videoRowIndex,videoColumnIndex);++videoColumnIndex;selVideoTitle(videoRowIndex,videoColumnIndex);return }break;case rcLEFT:if(videoColumnIndex==0){return }if(videoColumnIndex>=0){unSelVideoTitle(videoRowIndex,videoColumnIndex);--videoColumnIndex;selVideoTitle(videoRowIndex,videoColumnIndex);return }break;case rcUP:if(videoRowIndex==0){return }unSelVideoTitle(videoRowIndex,videoColumnIndex);--videoRowIndex;if(videoCursorIndex!=0){videoCursorIndex--;selVideoTitle(videoRowIndex,videoColumnIndex)}else{var G=0;G=(videoStartIndex<4?0:videoStartIndex-4);videoStartIndex=G;var B=((videoTitleTotal-G)>11?(G+11):videoTitleTotal);scrollVideoTitle(G,B)}--videoRowClick;break;case rcDOWN:var F=videoCursorIndex+1;var D=videoColumnIndex;if(F<4){if(curVideoStatusIndex[F][D]==0){return }}var A=(videoTitleTotal/3);if(videoRowIndex==parseInt(A)){return }unSelVideoTitle(videoRowIndex,videoColumnIndex);videoRowIndex++;if(videoCursorIndex<videoTitleMax){videoCursorIndex++;selVideoTitle(videoRowIndex,videoColumnIndex)}else{var G=0;if(videoRowIndex<4){G=videoRowIndex;videoStartIndex=G}else{G=videoStartIndex+3;videoStartIndex=G}var B=((videoTitleTotal-G)>11?(G+11):videoTitleTotal);scrollVideoTitle(G,B)}++videoRowClick;break;case rcOK:var C=3*videoRowIndex+videoColumnIndex;playVidStream(videoAssetCache[C]);break}}var genreVideoCache=new Array();var titleIdVideoCache=new Array();var fullTitleVideoCache=new Array();var assetNameVideoCache=new Array();var actorVideoCache=new Array();var videoDirCache=new Array();var mediumSummaryVidCache=new Array();var yearVidCache=new Array();var videoUseGraphicCache=new Array();var genrePatternVidCache=new Array();var ratingPatternVidCache=new Array();var subtitlePatternVidCache=new Array();var audioTypePatternVidCache=new Array();var curVidPosition=0;var curColVidPosition=0;var vidServer="";var currentVidClick=0;var vidGenreClicks=0;var vidVisible=false;var vidGenreCursor=0;var vidTitleCursor=0;var vidGenreCurrent=0;var vidTitleCurrent=0;var vidGenreSelected=0;var vidTitleSelected=0;var curVidAssetIndex=0;var vidCurCursor=0;var startIndexVid=0;var vidGenreMax=9;var vidTitleMax=2;var vidGenreTotal=0;var vidTitleTotal=0;var titleIndexVid=0;var selectedTitleVidCache=new Array();var selfullTitleVideoCache=new Array();var selassetNameVideoCache=new Array();var seltitleIdVideoCache=new Array();var curVidIndex=new Array();var selVidUseGraphic=new Array();var selyearVidCache=new Array();var vidClickCounts=0;var vidPage=1;var trickPlayVid=false;var trickPlayVidHandle=null;var trickPlayVidFrameHandle=null;function hideVidDetails(){document.getElementById("titleContent").style.visibility="hidden";document.getElementById("ratingPanel").style.visibility="hidden";document.getElementById("ratingTagPanel").style.visibility="hidden";document.getElementById("yearPanel").style.visibility="hidden";document.getElementById("yearTagPanel").style.visibility="hidden"}function showVideoDetails(){document.getElementById("titleContent").style.visibility="visible";document.getElementById("ratingPanel").style.visibility="visible";document.getElementById("ratingTagPanel").style.visibility="visible";document.getElementById("yearPanel").style.visibility="visible";document.getElementById("yearTagPanel").style.visibility="visible"}function updateTitleVidNYear(B){alert(videoFullTitleCache.length+" : "+B);try{var C=videoFullTitleCache[B].substring(0,videoFullTitleCache[B].indexOf("."));var D=videoFullTitleCache[B].substring(videoFullTitleCache[B].indexOf(".")+1,videoFullTitleCache[B].length).toUpperCase();document.getElementById("titleContent").innerHTML=(C?((C.length>23)?(C.substring(0,20)+"..."):C):" ");document.getElementById("ratingPanel").innerHTML=(videoRatingCache[curIndex]?" "+videoRatingCache[curIndex].replace(/#/,"")+"":"&nbsp;");if(videoRatingCache[curIndex]){document.getElementById("ratingTagPanel").innerHTML="Rating: "}else{document.getElementById("ratingTagPanel").innerHTML=""}if(videoYearCache[B]!=0){document.getElementById("yearTagPanel").innerHTML=records.key455+":"}else{document.getElementById("yearTagPanel").innerHTML=""}document.getElementById("yearPanel").innerHTML=(videoYearCache[B]?videoYearCache[B]:" ")}catch(A){alert(A)}}function emptyAssetVidContent(){document.getElementById("yearPanel").innerHTML="";document.getElementById("yearTagPanel").innerHTML="";document.getElementById("ratingTagPanel").innerHTML="";document.getElementById("ratingPanel").innerHTML="";document.getElementById("titleContent").innerHTML=""}function scrollGenreVidPage(D,A){var B="";var C;for(C=D;C<=A;++C){B+='<tr><td style="cursor:pointer;" id="genreId'+C+'" onmouseover="selGenreVid('+C+');" onmouseout="unselGenreVid('+C+');" onclick="openGenreAssetVid('+C+');" width="155px" height="30px" valign="middle" nowrap>&nbsp;&nbsp;&nbsp;'+genreVideoCache[C]+"</td></tr>"}document.getElementById("vodGenrePanel").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?"155px":"190px")+' height="28px" valign="middle" align="center" nowrap>'+records.key372+"</td></tr>")+"</table>";highlightVidGenre()}function scrollTitleVidPage(F,B){vidPage=1;document.getElementById("vodTitlePanel").innerHTML="";var D='<tr><td colspan="7" width="375px" height="10px">&nbsp;</td></tr><tr><td width="15px" height="80px">&nbsp;</td>';var E=0;if(document.getElementById("vodTitlePanel")!=null){for(i=F;i<=B;++i){if(i%3==0&&i!=0&&E!=0){D+='</tr><tr><td colspan="7" width="375px" height="10px">&nbsp;</td></tr><tr><td width="15px" height="80px">&nbsp;</td>'}E++;D+='<td align="center" valign="middle" nowrap style="width:100px;height:75px;cursor:pointer;" onmouseover="selVidAsset('+i+');" onmouseout="unSelVidAsset('+i+');" onclick="openVidAsset('+i+');" ><img id="videoTitleId'+i+'" style="width:75px;height:75px;" alt="'+selfullTitleVideoCache[i]+'" src='+(selVidUseGraphic[i]==1?'"/ImageHandler?value='+seltitleIdVideoCache[i]+'&icon=-1&imageType=3"':'"./view/online/images/logo_none.png"')+'/></td><td width="15px" height="80px" >&nbsp;</td>'}if(E>0){for(var C=0;C<(9-E);++C){if((E+C)%3==0){D+='</tr><tr><td colspan="7" width="375px" height="10px">&nbsp;</td></tr><tr><td width="15px" height="80px">&nbsp;</td>'}D+='<td align="center" valign="middle" nowrap style="width:100px;height:80px;">&nbsp;</td><td width="15px" height="80px" >&nbsp;</td>'}}D+='</tr><tr><td colspan="7" width="375px" height="10px">&nbsp;</td></tr>';document.getElementById("vodTitlePanel").innerHTML='<table width="375px"  height="310px" border=0 align="center" valign="middle" cellspacing="0" cellpadding="0" class="item">'+(seltitleIdVideoCache.length>0?D:'<tr><td width="375px" height="30" valign="middle" align="center" nowrap>'+records.key373+"</td></tr>")+"</table>";var A=(seltitleIdVideoCache[curVidPosition-1]?updateTitleVidNYear(curVidPosition-1):hideVidDetails());if(document.getElementById("videoTitleId"+(curVidPosition-1))!=null){document.getElementById("videoTitleId"+(curVidPosition-1)).style.border="1px solid #ff7700"}}}function resetGenreVidPanel(){vidGenreTotal=(genreVideoCache.length==0?0:genreVideoCache.length-1);vidGenreCursor=0;vidGenreCurrent=0;vidGenreSelected=0;vidGenreClicks=0}function resetTitleVidPanel(){var A;for(A=0;A<assetNameVideoCache.length;++A){selectedTitleVidCache[A]=true}vidTitleTotal=assetNameVideoCache.length-1;vidPage=1;curVidPosition=0;vidCurCursor=0;vidTitleCursor=0;vidTitleCurrent=0;vidTitleSelected=0;curColVidPosition=0;startIndexVid=0}function changeGenreVidCursor(){if(document.getElementsByTagName){var B=document.getElementById("vodGenrePanel");var C=B.getElementsByTagName("tr");var A;for(A=0;A<C.length;A++){if(A==vidGenreCursor){C[A].style.backgroundImage='url("/view/online/images/rowGenre.png")';C[A].style.backgroundRepeat="no-repeat"}else{C[A].style.backgroundImage="none"}}}}function changeTitleVidCursor(){return ;if(document.getElementsByTagName){var B=document.getElementById("vodTitlePanel");var C=B.getElementsByTagName("tr");var A;for(A=0;A<C.length;A++){if(A==vidTitleCursor){C[A].style.backgroundImage='url("/view/online/images/rowTitle.png")'}else{C[A].style.backgroundImage="none"}}}}function highlightVidGenre(){if(document.getElementsByTagName){var B=document.getElementById("vodGenrePanel");var C=B.getElementsByTagName("tr");C[vidGenreCursor].style.backgroundImage='url("/view/online/images/rowGenre.png")';C[vidGenreCursor].style.backgroundRepeat="no-repeat";if(document.getElementById("vodTitlePanel")!=null){var A=document.getElementById("vodTitlePanel");var D=A.getElementsByTagName("tr");D[vidTitleCursor].style.backgroundImage="none"}}}function highlightTitleVid(){}function startVidStream(){feedType="rtsp";videoActive=true;if(!selassetNameVideoCache[vidTitleSelected]){return }var A="src=rtsp://"+vidServer+"/"+selassetNameVideoCache[vidTitleSelected]+";servertype=ncube";document.getElementById("waitPanel").style.backgroundImage="none";playStream(A)}function fastForward(){setSpeedStream(6);trickPlayVidHandle=window.setInterval("getFwdVideoFrames()",4000)}function getFwdVideoFrames(){continueStream();trickPlayVidFrameHandle=window.setTimeout("setSpeedStream(6)",500)}function getRwrVideoFrames(){continueStream();trickPlayVidFrameHandle=window.setTimeout("setSpeedStream(-6)",500)}function rewind(){setSpeedStream(-6);trickPlayVidHandle=window.setInterval("getRwrVideoFrames()",4000)}function vidKeyNvg(B){if(selfullTitleVideoCache.length==0){return }if(vidPage==0){return }switch(B){case rcRIGHT:if(curVidPosition%3==0){return }if(curVidPosition==selfullTitleVideoCache.length){vidPage=1;if(document.getElementById("videoTitleId"+(curVidPosition-1))!=null){document.getElementById("videoTitleId"+(curVidPosition-1)).style.border="0px solid #ff7700"}curVidPosition=curVidPosition-vidCurCursor;vidCurCursor=0;return }vidCurCursor++;if(vidCurCursor>3&&curVidPosition!=0){if(document.getElementById("videoTitleId"+(curVidPosition-1))!=null){document.getElementById("videoTitleId"+(curVidPosition-1)).style.border="0px solid #ff7700"}emptyAssetVidContent();vidPage=1;curVidPosition=curVidPosition-3;vidCurCursor=0;return }if(curVidPosition>=0){if(document.getElementById("videoTitleId"+(curVidPosition-1))!=null){document.getElementById("videoTitleId"+(curVidPosition-1)).style.border="0px solid #ff7700"}if(document.getElementById("videoTitleId"+curVidPosition)!=null){document.getElementById("videoTitleId"+curVidPosition).style.border="1px solid #ff7700"}updateTitleVidNYear(curVidPosition);curVidPosition++;return }break;case rcLEFT:if(curVidPosition%3==1){return }vidCurCursor--;curVidPosition--;if(vidCurCursor==0){if(document.getElementById("videoTitleId"+curVidPosition)!=null){document.getElementById("videoTitleId"+curVidPosition).style.border="0px solid #ff7700"}emptyAssetVidContent();vidPage=1;vidCurCursor=0;return }if(curVidPosition>=0){if(document.getElementById("videoTitleId"+curVidPosition)!=null){document.getElementById("videoTitleId"+curVidPosition).style.border="0px solid #ff7700"}if(document.getElementById("videoTitleId"+(curVidPosition-1))!=null){document.getElementById("videoTitleId"+(curVidPosition-1)).style.border="1px solid #ff7700"}updateTitleVidNYear(curVidPosition-1);return }break;case rcUP:if(vidPage==1){vidTitleCurrent--;vidTitleCurrent=(vidTitleCurrent<0?++vidTitleCurrent:vidTitleCurrent);if((curVidPosition>=1&&curVidPosition<=3)){vidTitleCurrent=0;vidTitleCursor=0;return }if(vidTitleCursor!=0){vidTitleCursor--;if(document.getElementById("videoTitleId"+(curVidPosition-1))!=null){document.getElementById("videoTitleId"+(curVidPosition-1)).style.border="0px solid #ff7700"}curVidPosition-=3;if(document.getElementById("videoTitleId"+(curVidPosition-1))!=null){document.getElementById("videoTitleId"+(curVidPosition-1)).style.border="1px solid #ff7700"}updateTitleVidNYear(curVidPosition-1)}else{--curColVidPosition;vidTitleCursor=0;var D=0;D=(startIndexVid<3?0:startIndexVid-3);startIndexVid=D;var A=((vidTitleTotal-D)>8?(D+8):vidTitleTotal);curVidPosition-=3;--vidClickCounts;scrollTitleVidPage(D,A)}}break;case rcDOWN:if(vidPage==1){var C=(vidTitleTotal/3)+1;if((vidTitleCurrent==parseInt(C))){--vidTitleCurrent;return }++vidTitleCurrent;if(vidTitleCursor<vidTitleMax){if(document.getElementById("videoTitleId"+(curVidPosition-1))!=null){document.getElementById("videoTitleId"+(curVidPosition-1)).style.border="0px solid #ff7700"}curVidPosition+=3;if(document.getElementById("videoTitleId"+(curVidPosition-1))!=null){document.getElementById("videoTitleId"+(curVidPosition-1)).style.border="1px solid #ff7700";updateTitleVidNYear(curVidPosition-1);vidTitleCursor++}else{curVidPosition-=3;if(document.getElementById("videoTitleId"+(curVidPosition-1))!=null){document.getElementById("videoTitleId"+(curVidPosition-1)).style.border="1px solid #ff7700"}updateTitleVidNYear(curVidPosition-1);vidTitleCurrent--}}else{if((parseInt(C)-3)==curColVidPosition){return }curVidPosition+=3;var D=0;if(vidTitleCurrent<3){D=vidTitleCurrent;startIndexVid=D}else{D=startIndexVid+3;startIndexVid=D}vidTitleCursor=2;var A=((vidTitleTotal-D)>8?(D+8):vidTitleTotal);if(curVidPosition>seltitleIdVideoCache.length){curVidPosition-=3;vidTitleCursor-=1}++curColVidPosition;++vidClickCounts;scrollTitleVidPage(D,A)}}break;case rcOK:if(curVidPosition>=0){vidTitleSelected=curVidPosition-1;curVidAssetIndex=vidTitleSelected}break}}function resetVid(){if(videoActive){vidPage=1;curVidPosition=0;launchVidPanel();hideStatusPanel();document.getElementById("statusMessagePanel").innerHTML="";fadeAll();document.getElementById("layer8").style.visibility="visible"}}function vidKeyHandler(B){videoKeyHandler(B);return ;switch(B){case rcRIGHT:if(videoActive){if(vidPage==0){vidPage=1;highlightTitleVid()}vidKeyNvg(B);return 0}break;case rcLEFT:if(videoActive){if(vidPage==1){vidKeyNvg(B);return 0}}break;case rcUP:if(videoActive){if(vidPage==0){if(vidGenreCurrent==0){break}vidGenreCurrent--;if(vidGenreCursor!=0){vidGenreCursor--;changeGenreVidCursor()}else{var C=vidGenreCurrent;var A=vidGenreCurrent+9;--vidGenreClicks;scrollGenreVidPage(C,A)}vidGenreSelected=vidGenreCurrent;buildTitleVidCache()}else{vidKeyNvg(B);return }}break;case rcDOWN:if(videoActive){if(vidPage==0){if(vidGenreCurrent==vidGenreTotal){break}vidGenreCurrent++;if(vidGenreCursor<vidGenreMax){vidGenreCursor++;changeGenreVidCursor()}else{var C=vidGenreCurrent-9;var A=vidGenreCurrent;++vidGenreClicks;scrollGenreVidPage(C,A)}vidGenreSelected=vidGenreCurrent;buildTitleVidCache()}else{vidKeyNvg(B);return }}break;case rcOK:if(videoActive){if(vidPage==0){vidPage=1}else{playVidStream(selassetNameVideoCache[(curVidPosition-1)]);return ;vidKeyNvg(B);if(curVidPosition>0){if(!selassetNameVideoCache[curVidAssetIndex]){return }vidPage=1;startVidStream()}}}break}}var countVidDown=100;var countVidUp=0;var downVidFlag=1;function scrollVidToTop(){}function scrollVidContentUp(){try{vidKeyNvg(rcUP)}catch(A){}}function scrollVidContentDown(){try{vidKeyNvg(rcDOWN)}catch(A){}}function showVidAsset(A){vidPage=1;vidTitleCurrent=(A/3)-1;vidTitleCursor=(vidTitleCurrent>2?2:vidTitleCurrent);if(A%3==0){vidCurCursor=0}else{if((A-1)%3==0){vidCurCursor=1}else{if((A-2)%3==0){vidCurCursor=2}}}if(document.getElementById("videoTitleId"+curVidPosition-1)!=null){document.getElementById("videoTitleId"+curVidPosition-1).style.border="0px solid #ff7700"}curVidPosition=A+1;if(document.getElementById("videoTitleId"+A)!=null){document.getElementById("videoTitleId"+A).style.border="1px solid #ff7700";updateTitleVidNYear(A)}}function hideVidAsset(A){vidPage=1;if(document.getElementById("videoTitleId"+A)!=null){document.getElementById("videoTitleId"+A).style.border="0px solid #ff7700"}}function backVid(){document.getElementById("paging").innerHTML="";onDemand();return }var fileValVid=null;function playVidStream(E){document.getElementById("whySign").style.visibility="visible";document.getElementById("showImage").style.background="#fffae7";var B=E.substring(0,E.indexOf("."));var C=E.substring(E.indexOf(".")+1,E.length).toUpperCase();var A=DetectFlashVer(10,0,0);if(document.getElementById("playerTitle")){document.getElementById("playerTitle").innerHTML=records.key1626+"&nbsp;"+((B.length>60)?(B.substring(0,55)+"..."):B)}if(!A){document.getElementById("showImage").innerHTML='<a href="http://www.adobe.com/go/getflashplayer/" style="color:black"><img src="./view/online/embed/msg.jpg" width="400" height="300" /></a>'}else{if(odTypeStatus==2){if(C!="FLV"){document.getElementById("showImage").innerHTML='<!-- Alternate content --><div id="" valign="middle" style="background:#000000;height:300px;text-align:center;valign:top;width:400px;"><p style="padding-top:100px;color:#ffffff;font-size:15px;"><b><br/><br/><em>'+records.key1623+"</em></b></p></div><!-- End alternate content -->";return false}else{E=E}}else{if(odTypeStatus==1){if(C=="JPEG"||C=="JPG"||C=="GIF"||C=="PNG"||C=="BMP"||C=="EXE"||C=="TIF"||C=="ICO"||C=="ZIP"||C=="TXT"||C=="DOC"||C=="DOCX"){document.getElementById("showImage").innerHTML='<!-- Alternate content --><div id="" valign="middle" style="background:#000000;height:300px;text-align:center;valign:top;width:400px;"><p style="padding-top:100px;color:#ffffff;font-size:15px;"><b><br/><br/><em>'+records.key1623+"</em></b></p></div><!-- End alternate content -->";return false}else{if(C=="MP4"||C=="MOV"||C=="F4V"){E="mp4:"+E}else{E=B}}}}fileValVid=E;if(document.getElementById("urlTxt")){}if(document.getElementById("embedTxt")){}if(odTypeStatus==1){document.getElementById("showImage").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="760" height="512" id="mediacasterstreammanagerLive" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><param name="movie" value="/view/online/embed/player/videoplayer.prt1.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="opaque"><param name="FlashVars" value="streamName='+E+'" /><embed src="/view/online/embed/player/videoplayer.prt1.swf" FlashVars="streamName='+E+'" wmode="opaque" quality="high" bgcolor="#000000" width="760" height="512" name="mediacasterstreammanagerLive" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';document.getElementById("odHomeImage").style.visibility="visible";document.getElementById("videoName").style.visibility="visible";document.getElementById("videoName").innerHTML=B}else{if(odTypeStatus==2){var D=3*videoRowIndex+videoColumnIndex;if(C=="MP3"){E=E}else{E=B+".mp3"}document.getElementById("showImage").innerHTML='<table style="text-align:center;" align="center"><tr><td style="padding-top:60px;"><img style="width:300px;height:250px;margin-bottom:20px;" alt="'+videoFullTitleCache[D]+'" src='+(videoUseGraphic[D]==1?'"/ImageHandler?value='+videoTitleIdCache[D]+'&icon=-1&imageType=3"':'"./view/online/images/logo_none.png"')+'/></td></tr><tr><td ><embed height="27" width="400" flashvars="mp3=./content/'+E+'&amp;effect=false&amp;backcolor=000000&amp;frontcolor=ffffff&amp;fullscreen=false&amp;autoplay=true" allowfullscreen="true" quality="high" bgcolor="#FFFFFF" name="swfplayer" id="swfplayer" style="" src="./view/online/embed/player/other/audio/mpw_player.swf" type="application/x-shockwave-flash"/>';+"</td></tr></table>"}}}return false}function selVidAsset(A){vidPage=1;vidTitleCurrent=parseInt(A/3);vidTitleCursor=vidTitleCurrent-vidClickCounts;vidCurCursor=parseInt(A%3)+1;if(document.getElementById("videoTitleId"+(curVidPosition-1))!=null){document.getElementById("videoTitleId"+(curVidPosition-1)).style.border="0px solid #ff7700"}if(document.getElementById("videoTitleId"+A)!=null){document.getElementById("videoTitleId"+A).style.border="1px solid #ff7700"}curVidPosition=A+1;updateTitleVidNYear(curVidPosition-1)}function unSelVidAsset(A){vidPage=1;return ;if(document.getElementById("videoTitleId"+A)!=null){document.getElementById("videoTitleId"+A).style.border="0px solid #ff7700"}}function openVidAsset(A){curVidPosition=A+1;vidPage=1;keyHandler(rcOK)}function escapeVidPanel(){keyHandler(rcMENU)}function moveVidPageUp(){if(vidPage==0){keyHandler(rcUP);return }vidPage=1;keyHandler(rcUP);return }function moveVidPageDown(){if(vidPage==0){keyHandler(rcDOWN);return }vidPage=1;keyHandler(rcDOWN);return }function showVid(A){}function hideVid(A){document.getElementById("vodMove"+A).style.background="none"}function selGenreVid(A){vidPage=1;vidGenreCursor=A-vidGenreClicks;vidGenreSelected=vidGenreCurrent=A;changeGenreVidCursor();buildTitleVidCache()}function unselGenreVid(A){return ;document.getElementById("genreId"+A).style.background="none"}function openGenreAssetVid(A){keyHandler(rcOK)}function callFullGuideVid(){keyHandler(rcMENU)}function playAudioStream(G,F,A){var C=F.substring(0,F.indexOf("."));var D=F.substring(F.indexOf(".")+1,F.length).toUpperCase();var B=DetectFlashVer(10,0,0);if(!B){document.getElementById("showImage").innerHTML='<a href="http://www.adobe.com/go/getflashplayer/" style="color:black"><img src="./view/online/embed/msg.jpg" width="400" height="300" /></a>'}else{if(D=="JPEG"||D=="JPG"||D=="GIF"||D=="PNG"||D=="BMP"||D=="EXE"||D=="TIF"||D=="ICO"||D=="ZIP"||D=="TXT"||D=="DOC"||D=="DOCX"){document.getElementById("showImage").innerHTML='<!-- Alternate content --><div id="" valign="middle" style="background:#000000;height:300px;text-align:center;valign:top;width:400px;"><p style="padding-top:100px;color:#ffffff;font-size:15px;"><b><br/><br/><em>'+records.key1623+"</em></b></p></div><!-- End alternate content -->";return false}else{var E=3*videoRowIndex+videoColumnIndex;F=C;if(A){document.getElementById("showImage").innerHTML='<table valign="top" style="text-align:center;height:350px;" align="center"><tr><td style="padding-top:10px;">'+C+'</td></tr><tr><td style="padding-top:10px;"><img style="width:300px;height:250px;margin-bottom:20px;" alt='+F+" src=/ShowPhoto?id="+G+"&status="+2+' /></td></tr><tr><td ><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="360" height="40" id="audio" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><param name="movie" value="./view/online/embed/player/audio.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#556D6E" /><param name="FlashVars" value="streamName=mp3:'+F+'" /><embed src="./view/online/embed/player/audio.swf" FlashVars="streamName=mp3:'+F+'" quality="high" bgcolor="#556D6E" width="480" height="27" name="audio" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></td></tr></table>'}else{document.getElementById("showImage").innerHTML='<table valign="top" style="text-align:center;height:410px;" align="center"><tr><td style="padding-top:10px;">'+C+'</td></tr><tr><td style="padding-top:10px;"><img style="width:300px;height:250px;margin-bottom:20px;" alt='+F+" src=/ShowPhoto?id="+G+"&status="+2+' /></td></tr><tr><td ><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="360" height="40" id="audio" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><param name="movie" value="./view/online/embed/player/audio.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#556D6E" /><param name="FlashVars" value="streamName=mp3:'+F+'" /><embed src="./view/online/embed/player/audio.swf" FlashVars="streamName=mp3:'+F+'" quality="high" bgcolor="#556D6E" width="350" height="27" name="audio" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></td></tr></table>'}}}}