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(f,d,m,g,j,l,n,i,a,e){if(!document.getElementById){return;}this.DETECT_KEY=e?e:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(f){this.setAttribute("swf",f);}if(d){this.setAttribute("id",d);}if(m){this.setAttribute("width",m);}if(g){this.setAttribute("height",g);}if(j){this.setAttribute("version",new deconcept.PlayerVersion(j.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(l){this.addParam("bgcolor",l);}var b=n?n:"high";this.addParam("quality",b);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var k=(i)?i:window.location;this.setAttribute("xiRedirectUrl",k);this.setAttribute("redirectUrl","");if(a){this.setAttribute("redirectUrl",a);}};deconcept.SWFObject.prototype={useExpressInstall:function(a){this.xiSWFPath=!a?"expressinstall.swf":a;this.setAttribute("useExpressInstall",true);},setAttribute:function(a,b){this.attributes[a]=b;},getAttribute:function(a){return this.attributes[a];},addParam:function(a,b){this.params[a]=b;},getParams:function(){return this.params;},addVariable:function(a,b){this.variables[a]=b;},getVariable:function(a){return this.variables[a];},getVariables:function(){return this.variables;},getVariablePairs:function(){var a=new Array();var b;var c=this.getVariables();for(b in c){a[a.length]=b+"="+c[b];}return a;},getSWFHTML:function(){var d="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}d='<embed pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'"';d+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var c=this.getParams();for(var a in c){d+=[a]+'="'+c[a]+'" ';}var b=this.getVariablePairs().join("&");if(b.length>0){d+="flashvars="+b+'&realfull=1&moz=1"';}d+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}d='<object id="'+this.getAttribute("id")+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'">';d+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var c=this.getParams();for(var a in c){d+='<param name="'+a+'" value="'+c[a]+'" />';}var b=this.getVariablePairs().join("&");if(b.length>0){d+='<param name="flashvars" value="'+b+'" />';}d+="</object>";}return d;},write:function(a){if(this.getAttribute("useExpressInstall")){var b=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(b)&&!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"))){}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}var c=(typeof a=="string")?document.getElementById(a):a;c.innerHTML=this.getSWFHTML();return true;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var c=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var a=navigator.plugins["Shockwave Flash"];if(a&&a.description){c=new deconcept.PlayerVersion(a.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 d=1;var b=3;while(d){try{b++;d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+b);c=new deconcept.PlayerVersion([b,0,0]);}catch(f){d=null;}}}else{try{var d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(f){try{var d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");c=new deconcept.PlayerVersion([6,0,21]);d.AllowScriptAccess="always";}catch(f){if(c.major==6){return c;}}try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(f){}}if(d!=null){c=new deconcept.PlayerVersion(d.GetVariable("$version").split(" ")[1].split(","));}}}return c;};deconcept.PlayerVersion=function(a){this.major=a[0]!=null?parseInt(a[0]):0;this.minor=a[1]!=null?parseInt(a[1]):0;this.rev=a[2]!=null?parseInt(a[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(a){if(this.major<a.major){return false;}if(this.major>a.major){return true;}if(this.minor<a.minor){return false;}if(this.minor>a.minor){return true;}if(this.rev<a.rev){return false;}return true;};deconcept.util={getRequestParameter:function(d){var c=document.location.search||document.location.hash;if(d==null){return c;}if(c){var b=c.substring(1).split("&");for(var a=0;a<b.length;a++){if(b[a].substring(0,b[a].indexOf("="))==d){return b[a].substring((b[a].indexOf("=")+1));}}}return"";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var c=document.getElementsByTagName("OBJECT");for(var b=c.length-1;b>=0;b--){c[b].style.display="none";for(var a in c[b]){if(typeof c[b][a]=="function"){c[b][a]=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(a){return document.all[a];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;var t="";var aa;var LowerPid;var LeftRight=0;var CVPL=0;var isScroll=true;var m_Scroll;var m_DivHeight=0;var m_videoWidth=125;var m_className="";var m_NowVideoID=0;var m_NowVideoVID=0;var m_NowVideoOldHtml="";var m_NowVideoOldHtml1="";var m_readNum=0;var m_order="d";var m_tid=0;var m_acount=0;var m_Length=0;var nowvid=1;var m_cid;var m_videocount=0;var m_lower;var m_lowervid;var isH=0;var isWide=0;var cTime=0;var m_videoEnd=false;function getNowVid(a){nowvid=a;}function showPlayer(l,k,i,g,e,m,b,a,d,c,j,h){kb_pid=g;kb_tid=e;kb_starttime=m;kb_action=b;m_tid=l;isH=k;m_cid=i;m_lowervid=a;m_NowVideoVID=d;m_acount=c;isWide=j;cTime=h;var f=new SWFObject("http://client.joy.cn/flvplayer/dbplayer.swf","myplayer","960","462","9","#000000");f.addParam("allowFullScreen","true");f.addParam("allowScriptAccess","always");f.addParam("quality","high");f.addVariable("customreporturl","db.joy.cn");f.addVariable("channelid",i);f.addVariable("programid",l);f.addVariable("ish264",k);f.addVariable("type","vod");f.addVariable("playermode",2);f.addVariable("showad",true);f.addVariable("listmode",0);f.addVariable("iswide",isWide);f.addVariable("ctime",cTime);if(kb_pid!=""){f.addVariable("pid",kb_pid);}if(kb_tid!=""){f.addVariable("tid",kb_tid);}if(kb_starttime!=""){f.addVariable("starttime",kb_starttime);}if(kb_action!=""){f.addVariable("action",kb_action);}if(isH==0){f.addVariable("strvid",m_lowervid);}else{f.addVariable("strvid",m_NowVideoVID);}f.write("video_mid");if(!f){window.setTimeout(showPlayer,100,l,k,i,g,e,m,b,dbchannel,a,d,c,j,h);}}function Refresh(){var a=window.location.href;window.location.href=a;}function GetVideoIdToJs(a){locationUrl(a);}function viewNewsVideo(b){var a=document.getElementById("myplayer");if(a.CloseStream){a.CloseStream();}window.location.href="http://db.joy.cn/tvplay/"+m_tid+"/"+b+"/"+isH+".htm";}function firstflashvidoe(){var a=document.getElementById("myplayer");if(a.GetVideoIdFromJs){if(isH==0){if(m_lowervid!=0){a.GetVideoIdFromJs(m_lowervid);}else{}}else{if(m_NowVideoVID!=0){a.GetVideoIdFromJs(m_NowVideoVID);}else{}}}else{setTimeout(firstflashvidoe,100);}}function LowerflashVideo(){var a=document.getElementById("myplayer");if(a.CloseStream){a.CloseStream();}var b="http://db.joy.cn/tvplay/"+m_tid+"/"+nowvid+"/0.htm";window.location.href=b;}function GaoqingflashVideo(){var a=document.getElementById("myplayer");if(a.CloseStream){a.CloseStream();}var b="http://db.joy.cn/tvplay/"+m_tid+"/"+nowvid+"/1.htm";window.location.href=b;}function SetLower(){LowerflashVideo();}function SetGaoqing(){GaoqingflashVideo();}function GetProgramAmount(b,a){jQuery.ajax({type:"GET",url:"/service/GetContentStatByChannelIdAndProgramId.ashx",data:"cid="+b+"&pid="+encodeURIComponent(a),success:function(c){BulidAmount(c);},error:function(c){}});}function BulidAmount(result){eval("var rs="+result);var i=0;if(jQuery("#headamount").length>0){jQuery("#headamount").html("");}jQuery("#headamount").append(rs[i].PvAmount);}function locationUrl(c){var b;var a;if(c=="next"){a=nowvid+1;if(a>m_acount){a=1;}b="http://db.joy.cn/tvplay/"+m_tid+"/"+a+"/"+isH+".htm";window.location.href=b;}else{if(c=="now"){b="http://db.joy.cn/tvplay/"+m_tid+"/"+nowvid+"/"+isH+".htm";window.location.href=b;}else{a=nowvid-1;if(a==0){a=1;}b="http://db.joy.cn/tvplay/"+m_tid+"/"+a+"/"+isH+".htm";window.location.href=b;}}}function Collect(){MJActionCollect(AppID,245,ContentTypeID,ContentID,ColAuthor,ColCategoryId,ColDescription,ColImageUrl,ColPubDate,ColTitle,ColUrl);var a=jQuery("#CollectObject").position();jQuery("#MJActionLoading").css("left",document.documentElement.clientWidth/2-100);jQuery("#MJActionLoading").css("top",a.top-40);}function anchor(){window.location.href=window.location.href.replace("#gjh","")+"#gjh";}function holdPlayer(){var a="dbplayerpos1";if(!document.all){a="dbplayerpos2";}$("#dbplayer").css({top:$("#"+a).offset().top,left:$("#"+a).offset().left,display:""});}