function fQAChapterList(e,s,a,t,o){s=t+"/API/GetQAChapterList.ashx?iC="+e+"&iW="+s;$.ajax({url:s,cache:!1,dataType:"json",success:function(e){var s=$.parseJSON(JSON.stringify(e));if("0"==s.iErrorCode){var t,r="",r="
  • 全部
  • ";for(i=1;i<=s.oItemList.length;i++)t=s.oItemList[i-1].sChapter,r+='
  • '+t+"
  • ";$("#"+a).html(r)}},error:function(i){console.log(i.responseText)}})}function fQAChapterList2(e,s,a,t,o){s=t+"/API/GetQAChapterList.ashx?iC="+e+"&iW="+s;$.ajax({url:s,cache:!1,dataType:"json",success:function(e){var s=$.parseJSON(JSON.stringify(e));if("0"==s.iErrorCode){var t,r="";for(i=1;i<=s.oItemList.length;i++)t=s.oItemList[i-1].sChapter,r+="'+t+"";$("#"+a).html(r)}},error:function(i){console.log(i.responseText)}})}function fQAChapterLevel(e,a,s,o){e=s+"/API/GetQAChapterLevel.ashx?iC="+e;$.ajax({url:e,cache:!1,dataType:"json",success:function(e){var s=$.parseJSON(JSON.stringify(e));if("0"==s.iErrorCode){var t,r="";for(i=1;i<=s.oItemList.length;i++)t=s.oItemList[i-1].sChapter,r+=''+t+"";$("#"+a).html(r)}},error:function(i){console.log(i.responseText)}})}function fQAChapterLevelList(e,a,o,n){e=o+"/API/GetQAChapterLevel.ashx?iC="+e;$.ajax({url:e,cache:!1,dataType:"json",success:function(e){var s=$.parseJSON(JSON.stringify(e));if("0"==s.iErrorCode){var t,r="";for(i=1;i<=s.oItemList.length;i++)t=s.oItemList[i-1].sChapter,r+="'+t+"",r+="",fQAChapterList2(s.oItemList[i-1].iChapter,5,"submenu",o,n);$("#"+a).html(r)}},error:function(i){console.log(i.responseText)}})}function fQAPage(e,s,h,t,r,c,a,o,f){var A=t,C=o+"&iC="+e,s=a+"/API/GetQAPage.ashx?iC="+e+"&iPNO="+t+"&iPC="+r+"&iW="+s+"&sFilter="+h;$.ajax({url:s,cache:!1,dataType:"json",success:function(e){var s=$.parseJSON(JSON.stringify(e));if("0"==s.iErrorCode){var t,r,a="",o=0;for(i=1;i<=s.oItemList.length;i++)o=s.oItemList[i-1].iTotalCount,s.oItemList[i-1].iChapter1,t=s.oItemList[i-1].iKM,r=s.oItemList[i-1].sKM,s.oItemList[i-1].sKeyword,s.oItemList[i-1].sChapter,a+="
    ",a+="
    "+t+"
    ",a+="
    "+r+"
    ",a+="
    ";$("#"+c).html(a);var n="",p=Math.ceil(o/iPageCount);if($("#"+c+"PageRecord").html("第 "+A+" 頁,共 "+p+"頁 "+o+"筆資料"),p<=5)for(var l=1;l<=p;l++)n+=A==l?""+l+" ":""+l+" ";else if(A<5){for(l=1;l<=5;l++)n+=A==l?""+l+" ":""+l+" ";n+="... ",n+=""+p+" "}else if(p-3<=A){n+="1 ",n+="... ";for(l=p-4;l<=p;l++)n+=A==l?""+l+" ":""+l+" "}else{n+="1 ",n+="... ";for(l=A-1;l<=A+1;l++)n+=A==l?""+l+" ":""+l+" ";n+="... ",n+=""+p+" "}$("#"+c+"Page").html(n),$("#"+c+"Page2").html(n)}else $("#"+c).hide},error:function(i){console.log(i.responseText)}})}