
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"/swf/expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return"";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject
var myimages=new Array();function preloadimages(){for(i=0;i<preloadimages.arguments.length;i++){myimages[i]=new Image();myimages[i].src=preloadimages.arguments[i];}}
function scrollContent(scrollContainerID,direction,blockSize){var objScrollContainer=document.getElementById(scrollContainerID);var intNoElements=parseInt(blockSize);if(objScrollContainer==null)
return;var scrollElements=objScrollContainer.getElementsByTagName('div');var intTotalElements=scrollElements.length;var indexFirstElement=0;var indexLastElement=0;for(var i=0;i<intTotalElements;i++){if(scrollElements[i].style.display!='none'){indexFirstElement=i;break;}}
if(direction=='up'){if((indexFirstElement-intNoElements)>=0)
indexFirstElement=indexFirstElement-intNoElements;else
indexFirstElement=0;}else{if((indexFirstElement+intNoElements)<=intTotalElements)
indexFirstElement=indexFirstElement+intNoElements;}
indexLastElement=indexFirstElement+intNoElements-1;if(indexLastElement>=intTotalElements)
indexLastElement=intTotalElements-1;if(indexFirstElement>=intTotalElements){return false;}
for(var i=0;i<intTotalElements&&indexLastElement<intTotalElements;i++){if(i>=indexFirstElement&&i<=indexLastElement){scrollElements[i].style.display='block';}else{scrollElements[i].style.display='none';}}}
function doLoadLastWeekEpisodes(intDay){var url="/ajax/VodAjax.php";var pars="fAction=LastWeekDay&dayNo="+intDay;new ajax(url,{postBody:pars,onComplete:doLoadLastWeekEpisodesComplete});document.getElementById('imgLoader').innerHTML="<div align='center'><img src='http://edge-1.jcctv-cdn.net/ui/010811/vod/"+LayoutSkin+"/ajax-loader.gif' width='16' height='16' vspace=30 /></div>";}
function doLoadLastWeekEpisodesComplete(t){document.getElementById('lastWeekEpisodeContainer').innerHTML=t.responseText;}
function setValue(tSelected,vSelected,vFldID){document.getElementById('selectedValue').innerHTML=trim(tSelected);document.getElementById('selectedValue').title=trim(tSelected);document.getElementById(vFldID).value=vSelected;}
function valSearchForm(){var tSearchKey=trim(document.getElementById('txtSearchWord').value);if(tSearchKey==''){return false;}
document.frmSearch.submit();}
function showlayer(layer){var myLayer=document.getElementById(layer);if(myLayer==null)
return;if(myLayer.style.display=="none"||myLayer.style.display==""){myLayer.style.display="block";document.getElementById('liLayer').className='down';}else{myLayer.style.display="none";document.getElementById('liLayer').className='';}}
function hideLayer(e){var ev=(typeof event!=='undefined')?event.srcElement:e.target;if(document.getElementById('sm_1')&&ev.id!='liLayer'&&ev.id!='selectedValue'){document.getElementById('sm_1').style.display="none";document.getElementById('liLayer').className='';}}
if(window.addEventListener){window.addEventListener("click",hideLayer,true);}else
document.onclick=hideLayer;var trim=function(Val){while(''+Val.charAt(0)==' ')
Val=Val.substring(1,Val.length);return Val;}
function isValidEmailAddress(email){var result=false;var theStr=new String(email);var index=theStr.indexOf("@");if(index>0){var pindex=theStr.indexOf(".",index);if((pindex>index+1)&&(theStr.length>pindex+1))
result=true;}
return result;}
function getMessage(MsgCode){var url="/ajax/VodAjax.php";var pars='fAction=GetMessage&code='+MsgCode;new ajax(url,{postBody:pars,onComplete:getMessageComplete});}
function getMessageComplete(t){showMessage(t.responseText);return;}
var msgTimeout=null;function showMessage(StrMessage,autoclose){StrMessage+='<div class="layerClose"><a href="javascript:;" onclick="showHideContent(false,\'TransparentLayerBox\')"><img src="http://edge-1.jcctv-cdn.net/ui/010811/vod/common/btn-close-div.gif" alt="" title="" border=0 width="44" height="22" /></a></div>';document.getElementById('TransparentLayerBoxContent').innerHTML=StrMessage;objOverlay=document.getElementById('overlay');arrayPageSize=getPageSize();objOverlay.style.display='block';objOverlay.style.height=(arrayPageSize[1]+'px');if(typeof(window.fixHeader)=='function'){window.scroll(0,0);}
initShowHideDivs('TransparentLayerBox');showHideContent(false,'TransparentLayerBox');if(autoclose!=false){msgTimeout=setTimeout("closeMessage()",3000);}}
function getElementHeight(elementID){var divHeight;var obj=document.getElementById(elementID);if(obj.offsetHeight){divHeight=obj.offsetHeight;}else if(obj.style.pixelHeight){divHeight=obj.style.pixelHeight;}else{divHeight=obj.style.height;}
return divHeight;}
function closeMessage(){if(msgTimeout){clearTimeout(msgTimeout);}
showHideContent(false,'TransparentLayerBox');}
function getPageSize(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=document.body.scrollWidth;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;if(self.innerHeight){windowWidth=self.innerWidth;windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=windowWidth;}else{pageWidth=xScroll;}
arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;}
function gotoPage(page){if(page==''){return;}
var intPage=parseInt(page);document.FrmPagination.p.value=intPage;document.FrmPagination.submit();}
function popupWindow(url,Width,Height,Scrollbars){strLeft=(screen.width-Width)/2;strTop=(screen.height-Height)/2;window.open(url,'','status=no,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars='+Scrollbars+',width='+Width+',height='+Height+',top='+strTop+',left='+strLeft+'');}
function showLoader(StrLoaderID,StrAlign){if(StrAlign=='undefined')
StrAlign='center';if(document.getElementById(StrLoaderID)){document.getElementById(StrLoaderID).innerHTML="<div align='"+StrAlign+"'><img src='http://edge-1.jcctv-cdn.net/ui/010811/vod/"+LayoutSkin+"/ajax-loader.gif' width='16' height='16' /></div>";}}
var pollResURL=null;function doVoteProgram(ppCode,resURL){var pCode=document.FrmPoll.pcode.value;var nID=document.FrmPoll.hdnID.value;var vID=document.FrmPoll.hdvID.value;var dPoll=document.FrmPoll.dPoll.value;var tot=document.FrmPoll.pans.length;var vChoice=null;for(var i=0;i<tot;i++){if(document.FrmPoll.pans[i].checked)
vChoice=i+1;}
if(vChoice==null){return false;}
pollResURL=resURL;var url="/ajax/VodAjax.php";var pars='fAction=VoteProgram&pCode='+pCode+'&ppCode='+ppCode+'&nID='+nID+'&vID='+vID+'&dPoll='+dPoll+'&vChoice='+vChoice;new ajax(url,{postBody:pars,onComplete:doVoteProgramComplete});}
function doVoteProgramComplete(t){var arrRes=t.responseText.split('||');if(arrRes[1]=='S'){popupWindow(pollResURL,580,280,'no')}
showMessage(arrRes[0]);pollResURL=null;return;}
function doLoadAllPrograms(arg){var url="/ajax/VodAjax.php";var pars='fAction=LoadPrograms&arg='+arg;new ajax(url,{postBody:pars,onComplete:doLoadAllProgramsComplete});showLoader('viewAllPrograms');}
function doLoadAllProgramsComplete(t){document.getElementById('spanProgramList').innerHTML=t.responseText;}
function showOverlay(obj,show){var show=parseInt(show);var _t=obj.className.split(' ');var _id=_t[1];if(document.getElementById(_id)){if(show){document.getElementById(_id).style.display='block';if(document.getElementById('play_'+_id)){document.getElementById('play_'+_id).className='playVideoOn';}}else{document.getElementById(_id).style.display='none';if(document.getElementById('play_'+_id)){document.getElementById('play_'+_id).className='playVideo';}}}}
var jcctv_slideSpeed=100;var jcctv_timer=1;if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){jcctv_slideSpeed=100;jcctv_timer=1;}
var objectIdToSlideDown=false;var jcctv_activeId=false;var jcctv_slideInProgress=false;function showHideContent(e,inputId){if(jcctv_slideInProgress)return;jcctv_slideInProgress=true;if(!inputId)inputId=this.id;inputId=inputId+'';var contentDiv=document.getElementById(inputId);objectIdToSlideDown=false;if(!contentDiv.style.visibility||contentDiv.style.visibility=='hidden'){if(jcctv_activeId&&jcctv_activeId!=inputId){objectIdToSlideDown=inputId;slideContent(jcctv_activeId,(jcctv_slideSpeed*-1));}else{contentDiv.style.visibility='visible';slideContent(inputId,jcctv_slideSpeed);}}else{slideContent(inputId,(jcctv_slideSpeed*-1));jcctv_activeId=false;}}
function slideContent(inputId,direction){var obj=document.getElementById(inputId);var contentObj=document.getElementById(inputId+'Content');height=obj.clientHeight;if(height==0)height=obj.offsetHeight;height=height+direction;rerunFunction=true;if(height>contentObj.offsetHeight){height=contentObj.offsetHeight;rerunFunction=false;}
if(height<=1){height=1;rerunFunction=false;}
obj.style.height=height+'px';var topPos=height-contentObj.offsetHeight;if(topPos>0)topPos=0;contentObj.style.top=topPos+'px';if(rerunFunction){setTimeout('slideContent("'+inputId+'",'+direction+')',jcctv_timer);}else{if(height<=1){obj.style.visibility='hidden';document.getElementById('overlay').style.display='none';document.getElementById(obj.id+'Content').innerHTML='';if(objectIdToSlideDown&&objectIdToSlideDown!=inputId){document.getElementById(objectIdToSlideDown).style.display='block';document.getElementById(objectIdToSlideDown).style.visibility='visible';slideContent(objectIdToSlideDown,jcctv_slideSpeed);}else{jcctv_slideInProgress=false;}}else{jcctv_activeId=inputId;jcctv_slideInProgress=false;}}}
function initShowHideDivs(inputID){var divSlider=document.getElementById(inputID);var divSlideContent=document.getElementById(inputID+'Content');divSlideContent.style.top=0-divSlideContent.offsetHeight+'px';divSlideContent.className='jcctv_slider_content';divSlider.style.visibility='hidden';divSlider.style.height='1px';}
function characterslength(val,strformfield,SpanId){var textArea=strformfield;if(textArea.value.length>val){textArea.value=textArea.value.substring(0,val);textArea.blur();}
if(textArea.value.length>val){document.getElementById(SpanId).innerHTML=0;}else
document.getElementById(SpanId).innerHTML=(val-textArea.value.length);}
var _url=null;var _type=null;function checkHighlightType(StrUrl,type){_url=StrUrl;_type=type;var url="/ajax/MainAjax.php";var pars='op='+StrUrl+'&Action=HighlightType';new ajax(url,{postBody:pars,onComplete:checkHighlightTypeComplete});showLoader('viewAllPrograms');}
function checkHighlightTypeComplete(t){if((_type!=5&&t.responseText==5)||(_type==5&&t.responseText!=5)){window.location.href=window.location.href;}else{time=5;if(_type==5)
time=1;setTimeout("checkHighlightType('"+_url+"','"+_type+"')",time*60*1000);}}
var intWidth=480;var intHeight=240;function showHighlights(StrPostUrl,strAction){if(strAction=="NewsHighlights"){intHeight=400;}
var url="/ajax/MainAjax.php";var pars='op='+StrPostUrl+'&Action='+strAction;new ajax(url,{postBody:pars,onComplete:showHighlightsComplete});}
function showHighlightsComplete(t){if(t.responseText!=""){openLayer(t.responseText);}}
function openLayer(strContent){var objOverlay=document.getElementById('overlay1');arrayPageSize=getPageSize();objOverlay.style.display='block';objOverlay.style.height=(arrayPageSize[1]+'px');objOverlay.innerHTML='<div id="layerHighlights" style="position:absolute;">'+strContent+'</div>';getViewPort();var objLayer=document.getElementById("layerHighlights");objLayer.style.left=(domclientWidth/2)-(intWidth/2)+6+"px";objLayer.style.top=((docheight/2)-(intHeight/2))+"px";}
var domclientWidth=null;var scroll_top=null;var scroll_left=null;var docwidth=null;var docheight=null;function getViewPort(){var ie=document.all&&!window.opera
domclientWidth=document.documentElement&&parseInt(document.documentElement.clientWidth)||100000
var standardbody=(document.compatMode=="CSS1Compat")?document.documentElement:document.body
scroll_top=(ie)?standardbody.scrollTop:window.pageYOffset
scroll_left=(ie)?standardbody.scrollLeft:window.pageXOffset
docwidth=(ie)?standardbody.clientWidth:(/Safari/i.test(navigator.userAgent))?window.innerWidth:Math.min(domclientWidth,window.innerWidth-16)
docheight=(ie)?standardbody.clientHeight:window.innerHeight}
function doSubmitForm(frmObj){if(frmObj.chbRememberMe&&frmObj.chbRememberMe.checked)
return true;else if(frmObj.chbQuizRememberMe&&frmObj.chbQuizRememberMe.checked)
return true;else if(frmObj.chbSurveyRememberMe&&frmObj.chbSurveyRememberMe.checked)
return true;else{var objOverlay=document.getElementById('overlay1');objOverlay.style.display='none';objOverlay.innerHTML='';return false;}}
var win=null;var myname='JCCTVNET';function openExternal(mypage,w,h){LeftPosition=(screen.width)?(screen.width-w)/2:0;TopPosition=(screen.height)?(screen.height-h)/2:0;settings='resizable=no,maximize=no,scrollbars=no,status=no,copyhistory=no,height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+''
win=window.open(mypage,myname,settings)
if(win.window.focus){win.window.focus();}}
function ___getGrids(lang,date,url,h_type,load_day_grid){if(url!=""){url=url;}else{var gdate="";if(date!="")
gdate="&amp;date="+date;var url='/webservices/get-grid.php?langID='+lang+gdate;}
document.getElementById('events-grid').innerHTML='<img src="http://edge-1.jcctv-cdn.net/ui/010811/vod/'+LayoutSkin+'/ajax-loader.gif" align="center"  />';new ajax(url,{method:'get',onComplete:function(t){___getGridsComplete(t,lang,h_type,load_day_grid)}});}
function ___getGridsComplete(t,lang,h_type,load_day_grid){var aEvents=t.responseXML.getElementsByTagName('Episode');var l=aEvents.length;var x='';var img='';var prgtitle='';var epititle='';var syn_link='';for(var i=0;i<l;i++){img=getNodeValue(aEvents[i],"programGridPic");if(img=='-')
img='';prgtitle=getNodeValue(aEvents[i],"programName");epititle=getNodeValue(aEvents[i],"episodeTitle");syn_link=getNodeValue(aEvents[i],"episodeSynopsis");var x=x+'<div class="grid-list" onclick="___getSynopsis(\''+syn_link+'\',\''+prgtitle+'\',\''+epititle+'\');"><div class="grid-img"><img src="'+img+'" align="center"  /></div><div class="grid-prg-info"><div class="prg-time">'+getNodeValue(aEvents[i],"episodeStart")+'&nbsp;&nbsp;<span class="grid-time-day">'+getAttributeValue(aEvents[i],"eDate")+'</span></div><div class="prg-title">'+prgtitle+' - '+epititle+'</div></div></div>';}
document.getElementById('events-grid').innerHTML=x;if(load_day_grid==1)
___getGridDays(lang);if(h_type!=''){if(h_type==1){___getHighlights(lang);___getGridNowNextLater(lang);}else{var g_NoPlayer='<div style="background:#FFF; height:240px; padding-top:120px;"><div class="VideoAlert" style="border:none;"><div class="VideoAlertLeftIcon"></div>';g_NoPlayer+='<div class="VideoAlertRightContent" align="left"><span>To enjoy watching videos you need flash player and Javascript enabled</span><br>';g_NoPlayer+='<p><a class="Links" href=\"http://get.adobe.com/flashplayer/\" target="_blank">Get the latest Flash Player here</a><a href=\"http://get.adobe.com/flashplayer/\" target="_blank"><br>';g_NoPlayer+='<img src="http://edge-1.jcctv-cdn.net/ui/010811/common/get_flashplayer.gif" width="158" height="39" align="absmiddle" vspace="10" border="0"/></a></p></div></div></div></div>';document.getElementById('highlight-banner').innerHTML=g_NoPlayer;}}}
function ___getGridDays(lang){var url='/webservices/get-grid-days.php?langID='+lang;new ajax(url,{method:'get',onComplete:function(t){___getGridDaysComplete(t,lang)}});}
function ___getGridDaysComplete(t,lang){var aEvents=t.responseXML.getElementsByTagName('Day');var l=aEvents.length;var wday='<select name="selweekday" id="selweekday" onchange="___getGrids('+lang+',\'\',this.value,\'\',\'\');">';for(var i=0;i<l;i++){var wday=wday+'<option value="'+getNodeValue(aEvents[i],"DayLink")+'">'+getNodeValue(aEvents[i],"DayName")+'</option>';}
var wday=wday+'</select>';document.getElementById('grid-day-list').innerHTML=wday;}
function ___getHighlights(lang){var url='/webservices/highlights.php?langID='+lang;new ajax(url,{method:'get',onComplete:function(t){___getHighlightsComplete(t,lang)}});}
function ___getHighlightsComplete(t,lang){var aEvents=t.responseXML.getElementsByTagName('statusInfo');var l=aEvents.length;var h_type=getNodeValue(aEvents[0],"highlightType");var a_images=new Array();if(h_type==1){var aHighlights=t.responseXML.getElementsByTagName('item');var h_evt='',h_l=aHighlights.length;for(var i=0;i<h_l;i++){var h_day_time='<div>'+getNodeValue(aHighlights[i],"prID")+'</div><div class="high-time">'+getNodeValue(aHighlights[i],"day")+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+getNodeValue(aHighlights[i],"time")+'&nbsp;'+labelGMT+'</div>';var t_image='<div><img src="'+getNodeValue(aHighlights[i],"thumb")+'" align="center"  /></div><div class="highlights-time">'+h_day_time+'</div>';a_images[i]=t_image;}
___HighlightSlideShowImage(a_images,0);}}
function ___HighlightSlideShowImage(a_images,index){var totimg=a_images.length;if(totimg==0)
return;document.getElementById('highlight-banner').innerHTML=a_images[index];index++;if(index>=totimg)
index=0;setTimeout(function(){___HighlightSlideShowImage(a_images,index)},30000);}
function ___doPrintGrid(url,lang){if(document.getElementById('selweekday')&&document.getElementById('selweekday').value){var matchs=document.getElementById('selweekday').value.match(/[0-9]{4}-[0-9]{2}-[0-9]{2}/);if(matchs.length==1)
url+='?date='+matchs[0]+'&land='+lang;}
window.open(url,'_blank');}
function ___doChangeTimeZone(newtz){var url='/change-time-zone.php?tz='+newtz;new ajax(url,{method:'get',onComplete:___doChangeTimeZoneComplete});}
function ___doChangeTimeZoneComplete(t){var res=t.responseText;window.location.reload();}
function ___getSynopsis(syn_url,prgtitle,epititle){var url=syn_url;new ajax(url,{method:'get',onComplete:function(t){___getSynopsisComplete(t,prgtitle,epititle)}});}
function ___getSynopsisComplete(t,prgtitle,epititle){var aEvents=t.responseXML.getElementsByTagName('Episode');var l=aEvents.length;var synopsis='';var duration='';var s_time='';synopsis=getNodeValue(aEvents[0],"episodeSynopsis");duration=getNodeValue(aEvents[0],"episodeDuration");s_time=getNodeValue(aEvents[0],"episodeStartTime");document.getElementById('grid-episode-details').style.display="block";document.getElementById('grid-episode-details').innerHTML='<div class="synopsis-outer"><div class="close-img"><img src="http://edge-1.jcctv-cdn.net/ui/010811/vod/'+LayoutSkin+'/close-synopsis.gif" alt="'+altClose+'" title="'+altClose+'" align="right" hspace=4 vspace=4 onclick="___closeSynopsis();"  /></div><div class="synopsis-container"><ul><li></li><li><div class="labels">'+labelProgram+'</div><div class="disp-values">'+prgtitle+'</div></li><li><div class="labels">'+labelEpisode+'</div><div class="disp-values">'+epititle+'</div></li><li><div class="labels-small">'+labelAirtime+'</div><div class="disp-values-small">'+s_time+'</div><div class="labels-small duration-label">'+labelDuration+'</div><div class="disp-values-small" style="width:70px">'+duration+'&nbsp;'+labelMins+'</div></li><li style="height:158px;"><div class="value-synopsis">'+synopsis+'</div></li></ul></div></div>';}
function ___closeSynopsis(){document.getElementById('grid-episode-details').style.display="none";}
function ___getGridNowNextLater(lang){var url='/webservices/get-now.php?langID='+lang;new ajax(url,{method:'get',onComplete:function(t){___getGridNowNextLaterComplete(t,lang)}});}
function ___getGridNowNextLaterComplete(t,lang){var aNow=t.responseXML.getElementsByTagName('now');var aNext=t.responseXML.getElementsByTagName('next');var aLater=t.responseXML.getElementsByTagName('later');var a_NNL=new Array();var a_NNL_Episodes=new Array();if(getNodeValue(aNow[0],"programName")!="-"){a_NNL.push('<div id="now"><div style="width:247px; overflow:hidden; height:26px;">'+getNodeValue(aNow[0],"programName")+'</div></div>');a_NNL_Episodes.push('<div style="width:247px; overflow:hidden; height:26px;">'+getNodeValue(aNow[0],"episodeTitle")+'</div>');}
if(getNodeValue(aNext[0],"programName")!="-"){a_NNL.push('<div id="next"><div style="width:247px; overflow:hidden; height:26px;">'+getNodeValue(aNext[0],"programName")+'</div></div>');a_NNL_Episodes.push('<div style="width:247px; overflow:hidden; height:26px;">'+getNodeValue(aNext[0],"episodeTitle")+'</div>');}
if(getNodeValue(aLater[0],"programName")!="-"){a_NNL.push('<div id="later"><div style="width:247px; overflow:hidden; height:26px;">'+getNodeValue(aLater[0],"programName")+'</div></div>');a_NNL_Episodes.push('<div style="width:247px; overflow:hidden; height:26px;">'+getNodeValue(aLater[0],"episodeTitle")+'</div>');}
___NowNextLaterSlideshow(a_NNL,a_NNL_Episodes,0,lang);}
function ___NowNextLaterSlideshow(a_NNL,a_NNL_Episodes,index,lang){var tot=a_NNL.length;if(tot==0)
return;document.getElementById('now-next-later').style.display="block";document.getElementById('now-next-later').innerHTML=a_NNL[index];if(document.getElementById('now')){var now_val=a_NNL_Episodes[index];setTimeout(function(){document.getElementById("now").innerHTML=now_val;},2000);}else if(document.getElementById('next')){var next_val=a_NNL_Episodes[index];setTimeout(function(){document.getElementById("next").innerHTML=next_val;},2000);}else if(document.getElementById('later')){var lat_val=a_NNL_Episodes[index];setTimeout(function(){document.getElementById("later").innerHTML=lat_val;},2000);}
setTimeout(function(){document.getElementById('now-next-later').style.display="none";},4000);index++;if(index>=tot){setTimeout(function(){___getGridNowNextLater(lang)},20000);setTimeout('document.getElementById("now-next-later").innerHTML = ""',8000);return;}
setTimeout(function(){___NowNextLaterSlideshow(a_NNL,a_NNL_Episodes,index,lang)},8000);}
function getNodeValue(obj,tag){return obj.getElementsByTagName(tag)[0].firstChild.nodeValue;}
function getAttributeValue(obj,attr){return obj.getAttribute(attr);}
var Class={create:function(){return function(){this.initialize.apply(this,arguments);}}}
Object.extend=function(destination,source){for(property in source){destination[property]=source[property];}
return destination;}
Function.prototype.bind=function(object){var __method=this;return function(){return __method.apply(object,arguments);}}
function $(){var elements=new Array();for(var i=0;i<arguments.length;i++){var element=arguments[i];if(typeof element=='string')
element=document.getElementById(element);if(arguments.length==1)
return element;elements.push(element);}
return elements;}
document.getElementsByClassName=function(className){var children=document.getElementsByTagName('*')||document.all;var elements=new Array();for(var i=0;i<children.length;i++){var child=children[i];var classNames=child.className.split(' ');for(var j=0;j<classNames.length;j++){if(classNames[j]==className){elements.push(child);break;}}}
return elements;}
if(!window.Element){var Element=new Object();}
Object.extend(Element,{remove:function(element){element=$(element);element.parentNode.removeChild(element);},hasClassName:function(element,className){element=$(element);if(!element)
return;var a=element.className.split(' ');for(var i=0;i<a.length;i++){if(a[i]==className)
return true;}
return false;},addClassName:function(element,className){element=$(element);Element.removeClassName(element,className);element.className+=' '+className;},removeClassName:function(element,className){element=$(element);if(!element)
return;var newClassName='';var a=element.className.split(' ');for(var i=0;i<a.length;i++){if(a[i]!=className){if(i>0)
newClassName+=' ';newClassName+=a[i];}}
element.className=newClassName;},cleanWhitespace:function(element){element=$(element);for(var i=0;i<element.childNodes.length;i++){var node=element.childNodes[i];if(node.nodeType==3&&!/\S/.test(node.nodeValue))
Element.remove(node);}}});ajax=Class.create();ajax.prototype={initialize:function(url,options){this.transport=this.getTransport();this.postBody=options.postBody||'';this.method=options.method||'post';this.onComplete=options.onComplete||null;this.onError=options.onError||null;this.update=$(options.update)||null;this.request(url);},request:function(url){this.transport.open(this.method,url,true);this.transport.onreadystatechange=this.onStateChange.bind(this);if(this.method=='post'){this.transport.setRequestHeader('Content-type','application/x-www-form-urlencoded');if(this.transport.overrideMimeType)this.transport.setRequestHeader('Connection','close');}
this.transport.send(this.postBody);},onStateChange:function(){if(this.transport.readyState==4&&this.transport.status==200){if(this.transport.responseText=='Bad Request'){window.location.href=window.location.href;}else{if(this.onComplete)
setTimeout(function(){this.onComplete(this.transport);}.bind(this),10);if(this.update)
setTimeout(function(){this.update.innerHTML=this.transport.responseText;}.bind(this),10);}
this.transport.onreadystatechange=function(){};}else if(this.transport.readyState==4&&this.transport.status!=200){if(this.onError)
setTimeout(function(){this.onError(this.transport);}.bind(this),10);}},getTransport:function(){if(window.ActiveXObject)return new ActiveXObject('Microsoft.XMLHTTP');else if(window.XMLHttpRequest)return new XMLHttpRequest();else return false;}};var hexcase=0;var b64pad="";var chrsz=8;function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length*chrsz))}function b64_sha1(s){return binb2b64(core_sha1(str2binb(s),s.length*chrsz))}function str_sha1(s){return binb2str(core_sha1(str2binb(s),s.length*chrsz))}function hex_hmac_sha1(key,data){return binb2hex(core_hmac_sha1(key,data))}function b64_hmac_sha1(key,data){return binb2b64(core_hmac_sha1(key,data))}function str_hmac_sha1(key,data){return binb2str(core_hmac_sha1(key,data))}function core_sha1(x,len){x[len>>5]|=0x80<<(24-len%32);x[((len+64>>9)<<4)+15]=len;var w=Array(80);var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;var e=-1009589776;for(var i=0;i<x.length;i+=16){var olda=a;var oldb=b;var oldc=c;var oldd=d;var olde=e;for(var j=0;j<80;j++){if(j<16)w[j]=x[i+j];else w[j]=rol(w[j-3]^w[j-8]^w[j-14]^w[j-16],1);var t=safe_add(safe_add(rol(a,5),sha1_ft(j,b,c,d)),safe_add(safe_add(e,w[j]),sha1_kt(j)));e=d;d=c;c=rol(b,30);b=a;a=t}a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd);e=safe_add(e,olde)}return Array(a,b,c,d,e)}function sha1_ft(t,b,c,d){if(t<20)return(b&c)|((~b)&d);if(t<40)return b^c^d;if(t<60)return(b&c)|(b&d)|(c&d);return b^c^d}function sha1_kt(t){return(t<20)?1518500249:(t<40)?1859775393:(t<60)?-1894007588:-899497514}function core_hmac_sha1(key,data){var bkey=str2binb(key);if(bkey.length>16)bkey=core_sha1(bkey,key.length*chrsz);var ipad=Array(16),opad=Array(16);for(var i=0;i<16;i++){ipad[i]=bkey[i]^0x36363636;opad[i]=bkey[i]^0x5C5C5C5C}var hash=core_sha1(ipad.concat(str2binb(data)),512+data.length*chrsz);return core_sha1(opad.concat(hash),512+160)}function safe_add(x,y){var lsw=(x&0xFFFF)+(y&0xFFFF);var msw=(x>>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&0xFFFF)}function rol(num,cnt){return(num<<cnt)|(num>>>(32-cnt))}function str2binb(str){var bin=Array();var mask=(1<<chrsz)-1;for(var i=0;i<str.length*chrsz;i+=chrsz)bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<(32-chrsz-i%32);return bin}function binb2str(bin){var str="";var mask=(1<<chrsz)-1;for(var i=0;i<bin.length*32;i+=chrsz)str+=String.fromCharCode((bin[i>>5]>>>(32-chrsz-i%32))&mask);return str}function binb2hex(binarray){var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef";var str="";for(var i=0;i<binarray.length*4;i++){str+=hex_tab.charAt((binarray[i>>2]>>((3-i%4)*8+4))&0xF)+hex_tab.charAt((binarray[i>>2]>>((3-i%4)*8))&0xF)}return str}function binb2b64(binarray){var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var str="";for(var i=0;i<binarray.length*4;i+=3){var triplet=(((binarray[i>>2]>>8*(3-i%4))&0xFF)<<16)|(((binarray[i+1>>2]>>8*(3-(i+1)%4))&0xFF)<<8)|((binarray[i+2>>2]>>8*(3-(i+2)%4))&0xFF);for(var j=0;j<4;j++){if(i*8+j*6>binarray.length*32)str+=b64pad;else str+=tab.charAt((triplet>>6*(3-j))&0x3F)}}return str}
function loadLoginFrm(){if(document.getElementById('TransparentLayerBox').style.visibility=='visible'){showHideContent(false,'TransparentLayerBox');return;}
var url="/ajax/VodAjax.php";var pars="fAction=LoginFrm";new ajax(url,{postBody:pars,onComplete:showLoginFrm});}
function showLoginFrm(t){if(t.responseText==1){window.location.href=window.location.href;}else{showMessage(t.responseText,false);}}
function doSubmitLogin(strSeed){if(LoginboxHighlightValidation()){var FrmObj=document.getElementById('FrmLogin');var strPassword=FrmObj.txtPassword.value;var strHash=hex_sha1(strSeed+strPassword);FrmObj.txtPassword.value='';FrmObj.hdHash.value=strHash;return true;}else{return false;}}
function LoginboxHighlightValidation(){var strErrFlag=0;var FrmObj=document.getElementById('FrmLogin');var strPassword=FrmObj.txtPassword.value;var strEmail=FrmObj.txtEmailAddressLogin.value;if(trim(strEmail)==""||(strEmail==FrmObj.txtEmailAddressLogin.title)||!isValidEmailAddress(strEmail)){FrmObj.txtEmailAddressLogin.className="textBoxError";strErrFlag=1;}
if(trim(strPassword)==""||(strPassword=="Password")){FrmObj.txtPassword.className="textBoxError";strErrFlag=1;}
if(strErrFlag==1){return false;}else{return true;}}
function loadForgetPasswordFrm(){var url="/ajax/VodAjax.php";var pars="fAction=ForgetPasswordFrm";new ajax(url,{postBody:pars,onComplete:showLoginFrm});}
function doSubmitForgetPassword(){if(ForgetPasswordHighlightValidation()){var FormObj=document.getElementById('FrmForgetPass');showLoader('imgLoader-10','right');FormObj.submit();return true;}else{return false;}}
function ForgetPasswordHighlightValidation(){strErrFlag=0;var FormObj=document.getElementById('FrmForgetPass');if(trim(FormObj.FrmForgetPass_txtEmailAddress.value)==""||FormObj.FrmForgetPass_txtEmailAddress.value==FormObj.FrmForgetPass_txtEmailAddress.title||!isValidEmailAddress(FormObj.FrmForgetPass_txtEmailAddress.value)){FormObj.FrmForgetPass_txtEmailAddress.className="textBoxError";document.getElementById('ShowEmailAddressError').style.display="block";strErrFlag=1;}else{document.getElementById('ShowEmailAddressError').style.display="none";}
if(trim(FormObj.FrmForgetPass_txtPasswordCaptcha.value)==""){FormObj.FrmForgetPass_txtPasswordCaptcha.className="textBoxError";document.getElementById('ShowPasswordCaptchaError').style.display="block";strErrFlag=1;}else{document.getElementById('ShowPasswordCaptchaError').style.display="none";}
if(strErrFlag==1)
return false;else
return true;}
var Email='';var imgRegister='http://edge-1.jcctv-cdn.net/ui/010811/vod/'+LayoutSkin+'/ar/r-btn-register-enabled.gif';var imgRegisterDisabled='http://edge-1.jcctv-cdn.net/ui/010811/vod/'+LayoutSkin+'/ar/r-btn-register-disabled.gif';function doCheckEmail(frmObj,StrPostUrl){var StrEmail=trim(document.getElementById('txtEmailAddress').value);document.getElementById('btnGo').src=imgRegisterDisabled;document.getElementById('btnGo').disabled=true;if(StrEmail==''||!isValidEmailAddress(StrEmail)){document.getElementById('txtEmailAddress').className="textBoxError";document.getElementById('ShowEmailAddressError').style.display="block";document.getElementById('hdEmailValidated').value='';document.getElementById('imgLoader').innerHTML="<img src='http://edge-1.jcctv-cdn.net/ui/010811/vod/"+LayoutSkin+"/invalid.gif' />";return;}else if(StrEmail==Email){if(document.getElementById('hdEmailValidated').value=='Yes'){document.getElementById('imgLoader').innerHTML="<img src='http://edge-1.jcctv-cdn.net/ui/010811/vod/"+LayoutSkin+"/valid.gif' />";document.getElementById('btnGo').src=imgRegister;document.getElementById('btnGo').disabled=false;}else{document.getElementById('imgLoader').innerHTML="<img src='http://edge-1.jcctv-cdn.net/ui/010811/vod/"+LayoutSkin+"/invalid.gif' />";}
return;}
document.getElementById('hdEmailValidated').value='';document.getElementById('ShowEmailAddressError').style.display="none";Email=StrEmail;var url="/ajax/MainAjax.php";var pars='op='+StrPostUrl+'&Action=CheckEmail&Email='+StrEmail;document.getElementById('imgLoader').innerHTML="<img src='http://edge-1.jcctv-cdn.net/ui/010811/vod/"+LayoutSkin+"/img-progress.gif' />";document.getElementById('msgVerifying').style.display='block';new ajax(url,{postBody:pars,onComplete:doCheckEmailComplete});}
function doCheckEmailComplete(t){if(document.getElementById('imgLoader')){document.getElementById('imgLoader').innerHTML='';}
document.getElementById('msgVerifying').style.display='none';if(t.responseText=='true'){document.getElementById('hdEmailValidated').value='Yes';document.getElementById('txtEmailAddress').className="textboxType";document.getElementById('ShowEmailAddressError').style.display="none";document.getElementById('imgLoader').innerHTML="<img src='http://edge-1.jcctv-cdn.net/ui/010811/vod/"+LayoutSkin+"/valid.gif' />";document.getElementById('btnGo').src=imgRegister;document.getElementById('btnGo').disabled=false;}else{showMessage(t.responseText,false);document.getElementById('hdEmailValidated').value='';document.getElementById('imgLoader').innerHTML="<img src='http://edge-1.jcctv-cdn.net/ui/010811/vod/"+LayoutSkin+"/invalid.gif' />";document.getElementById('txtEmailAddress').className="textBoxError";}}
function RegistrationHighlightValidation(){strErrFlag=0;var FormObj=document.getElementById('FrmRegistration');if(trim(FormObj.txtName.value)==""||FormObj.txtName.value==trim(FormObj.txtName.title)){FormObj.txtName.className="textBoxError";document.getElementById('ShowNameError').style.display="block";strErrFlag=1;}else{document.getElementById('ShowNameError').style.display="none";}
if(trim(FormObj.txtEmailAddress.value)==""||FormObj.txtEmailAddress.value==trim(FormObj.txtEmailAddress.title)||!isValidEmailAddress(FormObj.txtEmailAddress.value)||FormObj.hdEmailValidated.value!='Yes'){FormObj.txtEmailAddress.className="textBoxError";document.getElementById('ShowEmailAddressError').style.display="block";strErrFlag=1;}else{document.getElementById('ShowEmailAddressError').style.display="none";}
if(trim(FormObj.txtPassword.value)==""){FormObj.txtPassword.className="textBoxError";document.getElementById('ShowPasswordError').style.display="block";strErrFlag=1;}else{document.getElementById('ShowPasswordError').style.display="none";}
if(trim(FormObj.txtTypeCaptcha.value)==""){FormObj.txtTypeCaptcha.className="textBoxError";document.getElementById('ShowTypeCaptchaError').style.display="block";strErrFlag=1;}else{document.getElementById('ShowTypeCaptchaError').style.display="none";}
if(FormObj.txtAgreeTerms.checked==false){document.getElementById('checkBoxErrorId').className="checkboxError";strErrFlag=1;}
if(strErrFlag==1)
return false;else
return true;}
function doSubmitResendActivation(){if(ResendActivationHighlightValidation()){var FormObj=document.getElementById('FrmResendActivationCode');showLoader('imgLoader-11','right');FormObj.submit();return true;}else{return false;}}
function ResendActivationHighlightValidation(){strErrFlag=0;var FormObj=document.getElementById('FrmResendActivationCode');if(trim(FormObj.txtEmailAddress.value)==""||FormObj.txtEmailAddress.value==FormObj.txtEmailAddress.title||!isValidEmailAddress(FormObj.txtEmailAddress.value)){FormObj.txtEmailAddress.className="textBoxError";document.getElementById('ShowResendEmailAddressError').style.display="block";strErrFlag=1;}else{document.getElementById('ShowResendEmailAddressError').style.display="none";}
if(trim(FormObj.txtResendActivationCaptcha.value)==""){FormObj.txtResendActivationCaptcha.className="textBoxError";document.getElementById('ShowResendActivationCaptchaError').style.display="block";strErrFlag=1;}else{document.getElementById('ShowResendActivationCaptchaError').style.display="none";}
if(strErrFlag==1)
return false;else
return true;}
