var sSiteChannel='';function fNewsInnerAll(sObj,sPathAPI){var oObj=document.getElementById(sObj),oObjItem="";if(null!=oObj){var oObjLength=eval(sObj+".length");if(void 0===oObjLength)oObjItem=eval(sObj),fNewsInner(oObjItem,sPathAPI);else for(iN=0;iN'+s+"";$("#"+o).html(a)}},error:function(e){console.log(e.responseText)}})}function fMediaChapterLevel_Menu(e,o,t,n){e=t+"/API/GetMediaChapterLevel.ashx?iC="+e;$.ajax({url:e,cache:!1,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a="";for(i=1;i<=t.oItemList.length;i++)s=t.oItemList[i-1].sChapter,a+='
'+s+"
";$("#"+o).html(a)}},error:function(e){console.log(e.responseText)}})}function fMediaChapterLevelMulti(e,n,r,t,l){e=t+"/API/GetMediaChapterLevel.ashx?iC="+e;$.ajax({url:e,cache:!1,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a="",o="";for(i=1;i<=t.oItemList.length;i++)s=t.oItemList[i-1].sChapter,a+='
  • '+s+"
  • ",o+='
    "+s+"
    ";$("#"+n).html(a),$("#"+r).html(o)}},error:function(e){console.log(e.responseText)}})}function fMediaChapterLevel_Siblings_Menu(e,o,t,n){e=t+"/API/GetMediaChapterLevelSiblings.ashx?iC="+e;$.ajax({url:e,cache:!1,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a="";for(i=1;i<=t.oItemList.length;i++)s=t.oItemList[i-1].sChapter,a+='
    '+s+"
    ";$("#"+o).html(a)}},error:function(e){console.log(e.responseText)}})}function fMediaChapterLevel_Siblings_Menu2(e,a,o,n,r,l){e=r+"/API/GetMediaChapterLevelSiblings.ashx?iC="+e;$.ajax({url:e,cache:!1,dataType:"json",success:function(e){var i,t,s=$.parseJSON(JSON.stringify(e));"0"==s.iErrorCode&&(e=t=i="",i+='
    "+s.oItemList[0].sChapter+"
    ",i+="
    ",i+="
    ",fMediaChapterList(s.oItemList[0].iChapter,"C2_"+s.oItemList[0].iChapter,r,l),document.getElementById(a).style.setProperty("order",s.oItemList[0].iOrder),1'+s.oItemList[1].sChapter+"",t+="
    ",t+="",t+="",t+="
      ",t+="
      ",document.getElementById(o).style.setProperty("order",s.oItemList[1].iOrder),2'+s.oItemList[2].sChapter+"",e+="
      ",e+="",e+="",e+="
        ",e+="
        ",document.getElementById(n).style.setProperty("order",s.oItemList[2].iOrder))),$("#"+a).html(i),$("#"+o).html(t),$("#"+n).html(e))},error:function(e){console.log(e.responseText)}})}function fMediaChapterLevelNav(e,o,t,n){e=t+"/API/GetMediaChapterLevelNav.ashx?iC="+e;$.ajax({url:e,cache:!1,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a="";for(i=1;i<=t.oItemList.length-1;i++)s=t.oItemList[i-1].sChapter,a+=''+s+">",i===t.oItemList.length-1&&(a+=">");e=a.lastIndexOf(">");0"),$("#"+o).html(a)}},error:function(e){console.log(e.responseText)}})}function fMediaChapter(e,a,t){e=t+"/API/GetMediaChapter.ashx?iC="+e;$.ajax({url:e,cache:!1,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s="";for(i=1;i<=t.oItemList.length;i++)s+=t.oItemList[i-1].sChapter;$("#"+a).html(s),document.title=s+","+document.title}},error:function(e){console.log(e.responseText)}})}function fMediaChapterList(n,r,e,l){e=e+"/API/GetMediaChapterList.ashx?iC="+n;$.ajax({url:e,cache:!1,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a="";for(i=1;i<=t.oItemList.length;i++)s=t.oItemList[i-1].sChapter,a+="
      • '+s+"
      • ";$("#"+r).html(a),$("#C2_"+n).siblings("label").show().siblings("a").removeClass("noSub").addClass("show-all"),$("#"+actMenu).parent().siblings("input").prop("checked",!0);var o=$("#"+actMenu).closest("ul").attr("id");$(".level3").hover(function(){$(this).find("ul").attr("id")!==o&&$(this).find("input[type='checkbox']").prop("checked",!0)}),$(".level3").mouseleave(function(){var e=$("#"+actMenu).closest("ul").attr("id");$(this).find("ul").attr("id")!==e&&$(this).find("input[type='checkbox']").prop("checked",!1)})}},error:function(e){console.log(e.responseText)}})}function fMediaChapterListParent(e,n,r,l){var t=r+"/API/GetMediaChapterListParent.ashx?iC="+e;$.ajax({url:t,cache:!1,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a="",o=0;for(i=1;i<=t.oItemList.length;i++)s=t.oItemList[i-1].sChapter,a+="
      • '+s+"
      • ",o=t.oItemList[i-1].iParent;fMediaChapter(o,"sChapterListTitle",r),$("#"+n).html(a)}},error:function(e){console.log(e.responseText)}})}function fMediaChapterMenuList(e,r,l,p){var t=l+"/API/GetMediaChapterMenuList.ashx?iC="+e;$.ajax({url:t,cache:!1,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o,n="";for(n+='
        "+t.oItemList[0].sChapter+"
        ",document.getElementById(r).style.setProperty("order",t.oItemList[0].iOrder),i=2;i<=t.oItemList.length;i++)s=t.oItemList[i-1].sChapter,a=t.oItemList[i-1].iNo,o=t.oItemList[i-1].iChapter,n+="
        ",n+="",n+='"+s+"",n+="",n+="
          ",n+="
          ",fMediaChapterList(o,"C2_"+o,l,p);$("#"+r).html(n)}},error:function(e){console.log(e.responseText)}})}function fSearchTopList2(o,n,e,r,t){t=e+"/API/GetMediaSearchTop.ashx?iSite="+t;$.ajax({url:t,cache:!1,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s="",a="";for(i=1;i<=t.oItemList.length;i++){switch(n){case 1:s=t.oItemList[i-1].sKey;break;case 2:s=t.oItemList[i-1].sKeyCN;break;default:s=t.oItemList[i-1].sKey}a+=''+s+"、"}e=a.lastIndexOf("、");0"),$("#"+o).html(a)}},error:function(e){console.log(e.responseText)}})}function fSearchTopList(o,n,e,r){e+="/API/GetMediaSearchTop.ashx?iSite=";$.ajax({url:e,cache:!1,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s="",a="";for(i=1;i<=t.oItemList.length;i++){switch(n){case 1:s=t.oItemList[i-1].sKey;break;case 2:s=t.oItemList[i-1].sKeyCN;break;default:s=t.oItemList[i-1].sKey}a+=''+s+"、"}e=a.lastIndexOf("、");0"),$("#"+o).html(a)}},error:function(e){console.log(e.responseText)}})}function fGroupNewTopListCH5(n,e,r,t,l,p,s){s=t+"/API/GetMediaGroupNewTopCH.ashx?iC="+n+"&iTop="+e+"&sCH="+s;$.ajax({url:s,cache:!0,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o="";for(i=1;i<=t.oItemList.length;i++)s=t.oItemList[i-1].iMediaGroup,a=t.oItemList[i-1].sMediaGroup,o+="
        • ",o+=a+"
          ",o+=""+fSplitReplaceLinkTop(t.oItemList[i-1].sAuthorName,"、",l+"&sFilterType=A&sFilter=",2),o+="
        • ";$("#"+r).html(o)}else $("#"+r).html("");fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fGroupNewTopListCH6(r,e,l,t,p,c,s){s=t+"/API/GetMediaGroupNewTopCH.ashx?iC="+r+"&iTop="+e+"&sCH="+s;$.ajax({url:s,cache:!0,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o,n="";for(i=1;i<=t.oItemList.length;i++)s=t.oItemList[i-1].iMediaGroup,a=t.oItemList[i-1].sMediaGroup,n+="
          ",n+=""+a+"",n+="

          "+a+"

          ",n+="

          "+fSplitReplaceLinkTop(t.oItemList[i-1].sAuthorName,"、",p+"&sFilterType=A&sFilter=",2)+"

          ",n+="
          ",n+="
          ";$("#"+l).html(n)}else $("#"+l).html("");fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fGroupNewTopListShopCH(r,e,l,t,p,c,s,d){s=t+"/API/GetMediaGroupNewTopShopCH.ashx?iC="+r+"&iTop="+e+"&sCH="+s;$.ajax({url:s,cache:!0,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o,n="";for(i=1;i<=t.oItemList.length;i++)s=t.oItemList[i-1].iMediaGroup,a=t.oItemList[i-1].sMediaGroup,sMediaGroupTitle=t.oItemList[i-1].sMediaGroupTitle,n+="";$("#"+l).html(n)}else $("#"+l).html("");fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fGroupNewTopListShopCH2(r,e,l,t,p,c,s,d){s=t+"/API/GetMediaGroupNewTopShopCH.ashx?iC="+r+"&iTop="+e+"&sCH="+s;$.ajax({url:s,cache:!0,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o,n="";for(i=1;i<=t.oItemList.length;i++)s=t.oItemList[i-1].iMediaGroup,a=t.oItemList[i-1].sMediaGroup,sMediaGroupTitle=t.oItemList[i-1].sMediaGroupTitle,n+="";$("#"+l).html(n)}else $("#"+l).html("");fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fGroupNewTopList4(d,m,h,f,u,g,L,I,v){var e=u+"/API/GetMediaGroupNewTop.ashx?iC="+d+"&iTop="+m;$.ajax({url:e,cache:!0,dataType:"json",success:function(e){var i=$.parseJSON(JSON.stringify(e));if("0"==i.iErrorCode){for(var t,s=0,a=0,o="",n="",r="",l=i.oItemList.length,p=l
          ",r+=""+o+"",r+=""+i.oItemList[c-1].sChapter1+"",r+="
          ",r+="
          ",r+="
          ",r+="
          ",r+="
          ",r+="",r+="
          "+fSplitReplaceLinkTop(i.oItemList[c-1].sAuthorTitle,"、",L+"&sFilterType=A&sFilter=",2)+"
          ",r+="

          "+t+"

          ",r+="
          ",fGroupRelationFree2(s,0,"sGroupRelationFree2_"+s,u,v),fMGPriceLink_NewTop(s,"sURL_"+s,u);if(h
            ",c=1+h;c<=l;c++)s=i.oItemList[c-1].iMediaGroup,a=i.oItemList[c-1].iChapter1,o=i.oItemList[c-1].sMediaGroup,n=I+"&iC="+a+"&iMG="+s,26"+o.substring(0,26)+"..":r+="
          • "+o+"
          • ";r+="
          ",l==m&&(r+="

          More>>

          "),r+=""}$("#"+f).html(r)}else $("#"+f).html("");fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fMediaItemShowTopListCH(n,e,r,l,p,c,d,t){t=l+"/API/GetMediaItemShowTopCH.ashx?iC="+n+"&iTop="+e+"&sCH="+t;$.ajax({url:t,cache:!0,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o="";for(i=1;i<=t.oItemList.length;i++)s=t.oItemList[i-1].iSeq,a=t.oItemList[i-1].sTitle,o+="",fMediaItemShowGroupList(s,"sMediaItemShowGroup",l,d);$("#"+r).html(o)}else $("#"+r).html("");fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fGroupPageCH(d,e,t,m,h,s,f,u,g,a){var L=s+"&iC="+d,I=e,a=h+"/API/GetMediaGroupCH.ashx?iC="+d+"&iPNO="+e+"&iPC="+t+"&sCH="+a;$.ajax({url:a,cache:!1,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o,n="",r=0;for(i=1;i<=t.oItemList.length;i++)r=t.oItemList[i-1].iTotalCount,s=t.oItemList[i-1].iMediaGroup,a=t.oItemList[i-1].sMediaGroup,o=u+"&iC="+d+"&iMG="+s,iFileVideoSec=t.oItemList[i-1].iFileVideoSec,n+="
          ",n+="",n+="

          "+a+"

          ",n+="
          "+t.oItemList[i-1].sChapter1+"
          ",8<=t.oItemList[i-1].sDate.length?n+="
          "+fDateWeek(t.oItemList[i-1].sDate)+"
          ":0==t.oItemList[i-1].sDate.length?n+="":n+="
          "+t.oItemList[i-1].sDate+"
          ",n+="
          "+fTimeTransfer("hh",iFileVideoSec)+"",n+="
          ",n+="

          "+fSplitReplaceLinkTop(t.oItemList[i-1].sAuthorName,"、",f+"&sFilterType=A&sFilter=",2)+"

          ",n+="
          ",fMGPriceLinkPage(s,"sPrice_"+s,h,g);$("#"+m).html(n);var l="",p=Math.ceil(r/iPageCount);if($("#"+m+"PageRecord").html(" "+I+" "+p+", "+r+""),p<=5)for(var c=1;c<=p;c++)l+=I==c?""+c+" ":""+c+" ";else if(I<5){for(c=1;c<=5;c++)l+=I==c?""+c+" ":""+c+" ";l+="... ",l+=""+p+" "}else if(p-3<=I){l+="1 ",l+="... ";for(c=p-4;c<=p;c++)l+=I==c?""+c+" ":""+c+" "}else{l+="1 ",l+="... ";for(c=I-1;c<=I+1;c++)l+=I==c?""+c+" ":""+c+" ";l+="... ",l+=""+p+" "}$("#"+m+"Page").html(l),$("#"+m+"Page2").html(l)}else $("#"+m).html("");fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fGroupTypePageCH(e,t,s,m,a,o,h,f,n){var u=t,g=o+"&iGT="+e,n=a+"/API/GetMediaGroupTypeCH.ashx?iGT="+e+"&iPNO="+t+"&iPC="+s+"&sCH="+n;$.ajax({url:n,cache:!1,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o,n,r="",l=0;for(i=1;i<=t.oItemList.length;i++)l=t.oItemList[i-1].iTotalCount,s=t.oItemList[i-1].iMediaGroup,a=t.oItemList[i-1].sMediaGroup,n=t.oItemList[i-1].iChapter,r+="
          ",r+="
          ",r+="

          "+a+"

          ",r+="

          "+fSplitReplaceLinkTop(t.oItemList[i-1].sAuthorName,"、",h+"&sFilterType=A&sFilter=",2)+"

          ",r+="
          ";$("#"+m).html(r);var p="",c=Math.ceil(l/iPageCount);if($("#"+m+"PageRecord").html(" "+u+" "+c+", "+l+""),c<=5)for(var d=1;d<=c;d++)p+=u==d?""+d+" ":""+d+" ";else if(u<5){for(d=1;d<=5;d++)p+=u==d?""+d+" ":""+d+" ";p+="... ",p+=""+c+" "}else if(c-3<=u){p+="1 ",p+="... ";for(d=c-4;d<=c;d++)p+=u==d?""+d+" ":""+d+" "}else{p+="1 ",p+="... ";for(d=u-1;d<=u+1;d++)p+=u==d?""+d+" ":""+d+" ";p+="... ",p+=""+c+" "}$("#"+m+"Page").html(p),$("#"+m+"Page2").html(p)}else $("#"+m).html("");fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fGroupNewPageCH(c,e,t,d,s,a,m,h,o){var f=e,u=a+"&iC="+c,o=s+"/API/GetMediaGroupNewCH.ashx?iC="+c+"&iPNO="+e+"&iPC="+t+"&sCH="+o;$.ajax({url:o,cache:!1,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o="",n=0;for(i=1;i<=t.oItemList.length;i++)n=t.oItemList[i-1].iTotalCount,s=t.oItemList[i-1].iMediaGroup,a=t.oItemList[i-1].sMediaGroup,o+="";$("#"+d).html(o);var r="",l=Math.ceil(n/iPageCount);if($("#"+d+"PageRecord").html(" "+f+" "+l+", "+n+""),l<=5)for(var p=1;p<=l;p++)r+=f==p?""+p+" ":""+p+" ";else if(f<5){for(p=1;p<=5;p++)r+=f==p?""+p+" ":""+p+" ";r+="... ",r+=""+l+" "}else if(l-3<=f){r+="1 ",r+="... ";for(p=l-4;p<=l;p++)r+=f==p?""+p+" ":""+p+" "}else{r+="1 ",r+="... ";for(p=f-1;p<=f+1;p++)r+=f==p?""+p+" ":""+p+" ";r+="... ",r+=""+l+" "}$("#"+d+"Page").html(r),$("#"+d+"Page2").html(r)}else $("#"+d).html("");fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fMediaItemShowPageCH(d,e,t,m,h,s,f,u,g,a){var L=e,I=s+"&iC="+d,a=h+"/API/GetMediaGroupCH.ashx?iC="+d+"&iPNO="+e+"&iPC="+t+"&sCH="+a;$.ajax({url:a,cache:!1,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o,n="",r=0;for(i=1;i<=t.oItemList.length;i++)r=t.oItemList[i-1].iTotalCount,s=t.oItemList[i-1].iSeq,sTitle=t.oItemList[i-1].sTitle,iMediaGroup=t.oItemList[i-1].iMediaGroup,a=t.oItemList[i-1].sMediaGroup,n+="
          ",n+="",n+="

          "+a+"

          ",n+="

          "+fSplitReplaceLinkTop(t.oItemList[i-1].sAuthorName,"、",f+"&sFilterType=A&sFilter=",2)+"

          ",n+="
          ",n+="
          ",fMediaItemShowGroupList(s,"sMediaItemShowGroup",h,g);$("#"+m).html(n);var l="",p=Math.ceil(r/iPageCount);if($("#"+m+"PageRecord").html(" "+L+" "+p+", "+r+""),p<=5)for(var c=1;c<=p;c++)l+=L==c?""+c+" ":""+c+" ";else if(L<5){for(c=1;c<=5;c++)l+=L==c?""+c+" ":""+c+" ";l+="... ",l+=""+p+" "}else if(p-3<=L){l+="1 ",l+="... ";for(c=p-4;c<=p;c++)l+=L==c?""+c+" ":""+c+" "}else{l+="1 ",l+="... ";for(c=L-1;c<=L+1;c++)l+=L==c?""+c+" ":""+c+" ";l+="... ",l+=""+p+" "}$("#"+m+"Page").html(l),$("#"+m+"Page2").html(l)}else $("#"+m).html("");fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fGroupDetail(e,p,c,d,m){e=c+"/API/GetMediaGroupDetail.ashx?iMG="+e;$.ajax({url:e,cache:!1,dataType:"json",success:function(e){var i,t,s,a,o,n,r,l=$.parseJSON(JSON.stringify(e));"0"==l.iErrorCode?(t=0,e=i=o=a=s="",t=l.oItemList[0].iMediaGroup,s=l.oItemList[0].sMediaGroup,a=l.oItemList[0].sAuthorName,o=l.oItemList[0].sKeyword,sDate=l.oItemList[0].sDate,sAuthorRole=l.oItemList[0].sAuthorRole,i+="",1==sAuthorRole?(i+="
          ",i+="
          "):0==sAuthorRole?(i+="
          ",i+=""):2==sAuthorRole&&(i+="
          222",i+="
          "),i+="
          ",i+="
          ",0"+fSplitReplaceLinkTop(a,"、",d+"&sFilterType=A&sFilter=",10)+"
          "),0"+fSplitReplaceLinkTop(o,"、",d+"&sFilterType=K&sFilter=",10)+"
          "),i+="
          "+fTimeTransfer("hh",l.oItemList[0].iFileVideoSec)+"
          ",8<=sDate.length&&(i+=""+fDateWeek2(sDate)+" "),i+="
          ",e+=""+l.oItemList[0].sDescription,fMGPriceLink_GroupDetail(t,"sMGShopLink","sMGShopLink2",c,m),document.title=s+document.title,$("#"+p+"Title").html(s+" "),$("#"+p).html(i),$("#"+p+"Desc").html(e),n=$(""),r=$(location).attr("href"),$(".btn-share").on("click",function(){$("body").append(n),n.val(r).select(),document.execCommand("copy"),n.remove(),alert("已複製此講座的網址!")})):$("#"+p).hide()},error:function(e){console.log(e.responseText)}}).done(function(e){fNewsInnerAll("NewsInner","../../")})}function fGroupDetailCH(e,p,c,d,m,i){i=c+"/API/GetMediaGroupDetailCH.ashx?iMG="+e+"&sCH="+i;$.ajax({url:i,cache:!1,dataType:"json",success:function(e){var i,t,s,a,o,n,r,l=$.parseJSON(JSON.stringify(e));"1"==l.iErrorCode&&window.location.replace("../"),"0"==l.iErrorCode?(t=0,e=i=o=a=s="",t=l.oItemList[0].iMediaGroup,s=l.oItemList[0].sMediaGroup,a=l.oItemList[0].sAuthorName,o=l.oItemList[0].sKeyword,sDate=l.oItemList[0].sDate,sAuthorRole=l.oItemList[0].sAuthorRole,i+="",1==sAuthorRole?(i+="
          ",i+="
          "):0==sAuthorRole?(i+="
          ",i+=""):2==sAuthorRole&&(i+="
          222",i+="
          "),i+="
          ",i+="
          ",0"+fSplitReplaceLinkTop(a,"、",d+"&sFilterType=A&sFilter=",10)+"
          "),0"+fSplitReplaceLinkTop(o,"、",d+"&sFilterType=K&sFilter=",10)+"
          "),i+="
          "+fTimeTransfer("hh",l.oItemList[0].iFileVideoSec)+"
          ",8<=sDate.length&&(i+=""+fDateWeek2(sDate)+" "),i+="
          ",e+=""+l.oItemList[0].sDescription,fMGPriceLink_GroupDetail(t,"sMGShopLink","sMGShopLink2",c,m),document.title=s+document.title,$("#"+p+"Title").html(s+" "),$("#"+p).html(i),$("#"+p+"Desc").html(e),n=$(""),r=$(location).attr("href"),$(".btn-share").on("click",function(){$("body").append(n),n.val(r).select(),document.execCommand("copy"),n.remove(),alert("已複製此講座的網址!")})):$("#"+p).hide()},error:function(e){console.log(e.responseText)}}).done(function(e){fNewsInnerAll("NewsInner","../../")})}function fMGLinkRMGChapter(e,t,n,s,r){t=s+"/API/GetMediaGroupNewTop.ashx?iC="+e+"&iTop="+t;$.ajax({url:t,cache:!0,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o="";for(o+="",$("#"+n).html(o)}else $("#"+n).hide(),$("#"+n+"Zone").hide();fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fMGLinkRMG(e,t,r,s,l,p){t=s+"/API/GetMediaGroupLinkGroupTop.ashx?iMG="+e+"&iTop="+t;$.ajax({url:t,cache:!0,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o,n="";for(i=1;i<=t.oItemList.length;i++)s=t.oItemList[i-1].iId,a=t.oItemList[i-1].sMediaGroup,n+="
          ",n+="",n+="",n+="

          "+a+"

          ",n+="

          "+fSplitReplaceLinkTop(t.oItemList[i-1].sAuthorName,"、",l+"&sFilterType=A&sFilter=",2)+"

          ",n+="
          ";$("#"+r).html(n),$("#"+r+"Zone").show(),$("#"+r+"Tab").show()}else $("#"+r+"Zone").hide(),$("#"+r+"Tab").hide();fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fMGLinkRMGItemShow(e,t,n,s,r){t=s+"/API/GetMediaGroupLinkItemShowTop.ashx?iMG="+e+"&iTop="+t;$.ajax({url:t,cache:!0,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o="";for(o+="",$("#"+n).html(o),$("#"+n+"Zone").show(),$("#"+n+"Tab").show()}else $("#"+n+"Zone").hide(),$("#"+n+"Tab").hide();fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fMGLinkBook(e,t,n,s,r,l){t=s+"/API/GetMediaGroupLinkBookTop.ashx?iMG="+e+"&iTop="+t;$.ajax({url:t,cache:!0,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a=0,o="";for(i=1;i<=t.oItemList.length;i++)a=t.oItemList[i-1].iBook,s=t.oItemList[i-1].sBook,o+="
          "+s+"
          ",o+="
          "+s+"
          ";0",i=1;i<=t.oItemList.length;i++)a=t.oItemList[i-1].iJournalItem,s=t.oItemList[i-1].sJournalItem,o+="
          "+s+""+fSplitReplace(t.oItemList[i-1].sAuthorName,"、")+""+t.oItemList[i-1].sJournal+", "+t.oItemList[i-1].sJournalPeriodList+"
          ";o+="",0more";$("#"+o+"13").html(a[13]),$("#"+o+"11").html(a[11]),$("#"+o+"7").html(a[7])}else $("#"+o+"13").hide(),$("#"+o+"11").hide(),$("#"+o+"7").hide();fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fMGLink15(e,o,t,n,r){e=t+"/API/GetMediaGroupLink.ashx?iMG="+e+"&iF=15";$.ajax({url:e,cache:!0,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a="";for(i=1;i<=t.oItemList.length;i++)s=t.oItemList[i-1].iId,a+="
        • ",a+=t.oItemList[i-1].sMediaGroup+"
          ",a+=""+fSplitReplaceLinkTop(t.oItemList[i-1].sAuthorName,"、",n+"&sFilterType=A&sFilter=",2),a+="
        • ";$("#"+o).html(a),$("#"+o+"Zone").show()}else $("#"+o).hide(),$("#"+o+"Zone").hide();fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fMGPriceLink(e,o,t,n){e=t+"/API/GetMediaGroupPriceLink.ashx?iMG="+e;$.ajax({url:e,cache:!0,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a="";for(i=1;i<=t.oItemList.length;i++)s=t.oItemList[i-1].iId,t.oItemList[i-1].rPriceList,a+=" ";$("#"+o).html(a),$("#"+o+"Zone").show()}else $("#"+o).hide();fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fMGLink9_GroupDetail(e,a,o,t){e=t+"/API/GetMediaGroupLink.ashx?iMG="+e+"&iF=9";$.ajax({url:e,cache:!0,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s="";for(i=1;i<=t.oItemList.length;i++)s+=" ";$("#"+a).html(s),$("#"+o).html(s)}else $("#"+a).hide(),$("#"+o).hide();fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fMGPriceLink_GroupDetail(e,o,n,t,r){e=t+"/API/GetMediaGroupPriceLink.ashx?iMG="+e;$.ajax({url:e,cache:!0,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a="";for(i=1;i<=t.oItemList.length;i++)s=t.oItemList[i-1].iId,t.oItemList[i-1].rPriceList,a+=" ";$("#"+o).html(a),$("#"+n).html(a)}else $("#"+o).hide(),$("#"+n).hide();fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fMGPriceLinkPage(e,n,t,r){e=t+"/API/GetMediaGroupPriceLink.ashx?iMG="+e;$.ajax({url:e,cache:!0,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o="";for(i=1;i<=t.oItemList.length;i++)s=t.oItemList[i-1].iId,a=t.oItemList[i-1].rPriceList,o+=""+a+"";$("#"+n).html(o),$("#"+n+"Zone").show()}else $("#"+n).html(' 免費');fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fMediaGroupLinkStopTime(e,c,t,d){e=t+"/API/GetMediaGroupLinkStopTime.ashx?iMG="+e;$.ajax({url:e,cache:!1,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o,n,r="",l="",p="";for(i=1;i<=t.oItemList.length;i++)s=t.oItemList[i-1].iMediaGroup,a=t.oItemList[i-1].iSeq,o=t.oItemList[i-1].iChapter,t.oItemList[i-1].iOrderGroup,r=t.oItemList[i-1].sTitle,sTitleMediaItem=t.oItemList[i-1].sTitleMediaItem,n=t.oItemList[i-1].sTime,sTitleMediaItem==p?l+="":l+="

          "+sTitleMediaItem+"

          ",l+="
          ",l+=""+n+""+r+"",l+="
          ",p=sTitleMediaItem;""",o+="
          "+s+"
          ",o+=""+s+"
          ",o+="";01789",i=1;i<=t.oItemList.length;i++)a=t.oItemList[i-1].iId,s=t.oItemList[i-1].sMediaGroup,o+="
        • "+s+""+fSplitReplace(t.oItemList[i-1].sAuthorName,"、")+"
        • ";o+="",0",i=1;i<=t.oItemList.length;i++)o=t.oItemList[i-1].iSeq,s=t.oItemList[i-1].iChapter,a=t.oItemList[i-1].sTitle,n+="
        • "+a+""+fSplitReplace(t.oItemList[i-1].sAuthorName,"、")+"
        • ";n+="",01885",i=1;i<=t.oItemList.length;i++)a=t.oItemList[i-1].iJournalItem,s=t.oItemList[i-1].sJournalItem,o+="
        • "+s+""+fSplitReplace(t.oItemList[i-1].sAuthorName,"、")+""+t.oItemList[i-1].sJournal+" "+t.oItemList[i-1].sJournalPeriodList+"
        • ";o+="",0more";$("#"+o+"13").html(a[13]),$("#"+o+"11").html(a[11]),$("#"+o+"7").html(a[7])}else $("#"+o+"13").hide(),$("#"+o+"11").hide(),$("#"+o+"7").hide();fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fGroupRelationCH(l,e,p,t,c,s){s=t+"/API/GetMediaGroupRelationCH.ashx?iMG="+l+"&iFlag="+e+"&sCH="+s;$.ajax({url:s,cache:!0,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o,n,r="";for(i=1;i<=t.oItemList.length;i++)s=t.oItemList[i-1].iSeq,o=t.oItemList[i-1].sTitle,a=t.oItemList[i-1].iFileVideoSec,t.oItemList[i-1].sDescriptionShow,n=c+"&iS="+s+"&iMG="+l,r+="
          ",r+=""+o+""+fSplitReplace(t.oItemList[i-1].sAuthorRole,"、")+":"+fSplitReplace(t.oItemList[i-1].sAuthorName,"、")+"",0有講義資料可下載"),r+=""+fTimeTransfer("hh",a)+"",r+="
          ";$("#"+p).html(r),$(function(){$("a:contains('試聽')").html(function(e,i){return i.replace("(試聽)","").replace("(試聽)","")})})}else $("#"+p).hide();fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fGroupRelationCH2(p,e,c,t,d,s){s=t+"/API/GetMediaGroupRelationCH.ashx?iMG="+p+"&iFlag="+e+"&sCH="+s;$.ajax({url:s,cache:!0,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o,n,r,l="";for(i=1;i<=t.oItemList.length;i++)s=t.oItemList[i-1].iSeq,o=t.oItemList[i-1].sTitle,a=t.oItemList[i-1].iFileVideoSec,n=t.oItemList[i-1].sDescriptionShow,r=d+"&iS="+s+"&iMG="+p,l+="
          ",l+=""+o+""+fSplitReplace(t.oItemList[i-1].sAuthorRole,"、")+":"+fSplitReplace(t.oItemList[i-1].sAuthorName,"、")+"",0有講義資料可下載"),l+=""+fTimeTransfer("hh",a)+"",0
          ",l+="
          "+n+"
          "):l+="";$("#"+c).html(l)}else $("#"+c).hide();fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fCardOrderFormItemFileMediaGroupRelationCH(r,l,p,e,c,t,d,s){s=t+"/API/GetCardOrderFormItemFileDetailMediaGroupRelationCH.ashx?iOF="+r+"&iP="+l+"&iMG="+p+"&iFlag="+e+"&sCH="+s;$.ajax({url:s,cache:!1,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o,n="";for(i=1;i<=t.oItemList.length;i++)s=t.oItemList[i-1].iSeq,a=t.oItemList[i-1].sTitle,iFileVideoSec=t.oItemList[i-1].iFileVideoSec,sDescriptionShow=t.oItemList[i-1].sDescriptionShow,o=d+"&iOF="+r+"&iP="+l+"&iMG="+p+"&iS="+s,n+="
          ",n+=""+a+""+fSplitReplace(t.oItemList[i-1].sAuthorRole,"、")+":"+fSplitReplace(t.oItemList[i-1].sAuthorName,"、")+"",0有講義資料可下載"),n+=""+fTimeTransfer("hh",iFileVideoSec)+"",0"+sDescriptionShow+""),n+="
          ";$("#"+c).html(n)}else $("#"+c).hide()},error:function(e){console.log(e.responseText)}})}function fMediaItemShowStopTime(e,n,t){e=t+"/API/GetMediaItemShowStopTime.ashx?iS="+e;$.ajax({url:e,cache:!1,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o="";for(i=1;i<=t.oItemList.length;i++)t.oItemList[i-1].iSeq,s=t.oItemList[i-1].sTitle,o+="
          ",o+=""+a+""+s+"",o+="
          ";$("#"+n).html(o),$("#"+n+"Title").show(),$("#"+n+"Title").parent().show()}else $("#"+n).hide(),$("#"+n+"Title").hide(),$("#"+n+"Title").parent().hide();fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fCardOrderFormItemFileMediaItemShowCH(m,h,f,e,t,u,s,a,g,o){var L=e,I=a+"&iOF="+m+"&iP="+h+"&iC="+f,o=s+"/API/GetCardOrderFormItemFileMediaItemShowCH.ashx?iOF="+m+"&iP="+h+"&iC="+ +f+"&iPNO="+e+"&iPC="+t+"&sCH="+o;$.ajax({url:o,cache:!1,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o,n=0,r="",l="";for(r+="
          序號標題觀看
          ",i=1;i<=t.oItemList.length;i++)n=t.oItemList[i-1].iTotalCount,s=t.oItemList[i-1].iNo,a=t.oItemList[i-1].iSeq,o=t.oItemList[i-1].sTitle,iFileVideoSec=t.oItemList[i-1].iFileVideoSec,sDescription=t.oItemList[i-1].sDescription,r+="",r+="
          ",r+=""+s+"",r+=""+o+"",r+="觀看",r+="
          ",l=t.oItemList[0].sProductName;$("#"+u).html(r),$("#"+u+"Title").html(l);var p="",c=Math.ceil(n/iPageCount);if($("#"+u+"PageRecord").html(" "+L+" "+c+", "+n+""),c<=5)for(var d=1;d<=c;d++)p+=L==d?""+d+" ":""+d+" ";else if(L<5){for(d=1;d<=5;d++)p+=L==d?""+d+" ":""+d+" ";p+="... ",p+=""+c+" "}else if(c-3<=L){p+="1 ",p+="... ";for(d=c-4;d<=c;d++)p+=L==d?""+d+" ":""+d+" "}else{p+="1 ",p+="... ";for(d=L-1;d<=L+1;d++)p+=L==d?""+d+" ":""+d+" ";p+="... ",p+=""+c+" "}$("#"+u+"Page").html(p),$("#"+u+"Page2").html(p)}else $("#"+u).html("");fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}function fCardOrderFormItemFileMediaGroupCH(m,h,f,e,t,u,s,a,g,o){var L=e,I=a+"&iOF="+m+"&iP="+h+"&iC="+f,o=s+"/API/GetCardOrderFormItemFileMediaGroupCH.ashx?iOF="+m+"&iP="+h+"&iC="+ +f+"&iPNO="+e+"&iPC="+t+"&sCH="+o;$.ajax({url:o,cache:!1,dataType:"json",success:function(e){var t=$.parseJSON(JSON.stringify(e));if("0"==t.iErrorCode){var s,a,o,n=0,r="",l="";for(r+="
          序號標題觀看
          ",i=1;i<=t.oItemList.length;i++)n=t.oItemList[i-1].iTotalCount,s=t.oItemList[i-1].iNo,a=t.oItemList[i-1].iMediaGroup,o=t.oItemList[i-1].sMediaGroup,iFileVideoSec=t.oItemList[i-1].iFileVideoSec,sDescription=t.oItemList[i-1].sDescription,r+="",r+="
          ",r+=""+s+"",r+=""+o+"",r+="觀看",r+="
          ",l=t.oItemList[0].sProductName;$("#"+u).html(r),$("#"+u+"Title").html(l);var p="",c=Math.ceil(n/iPageCount);if($("#"+u+"PageRecord").html(" "+L+" "+c+", "+n+""),c<=5)for(var d=1;d<=c;d++)p+=L==d?""+d+" ":""+d+" ";else if(L<5){for(d=1;d<=5;d++)p+=L==d?""+d+" ":""+d+" ";p+="... ",p+=""+c+" "}else if(c-3<=L){p+="1 ",p+="... ";for(d=c-4;d<=c;d++)p+=L==d?""+d+" ":""+d+" "}else{p+="1 ",p+="... ";for(d=L-1;d<=L+1;d++)p+=L==d?""+d+" ":""+d+" ";p+="... ",p+=""+c+" "}$("#"+u+"Page").html(p),$("#"+u+"Page2").html(p)}else $("#"+u).html("");fLangSystem(document.getElementById("LangSelect").value)},error:function(e){console.log(e.responseText)}})}