var sSiteChannel='';function fDictionaryItem(a,s,e,n,t,c,o,r,l){var A=n,f=r+"&sA="+s+"&sFilter="+e,e=o+"/API/GetDictionaryItem.ashx?iDC="+a+"&iPNO="+n+"&iPC="+t+"&sA="+s+"&sFilter="+e;$.ajax({url:e,cache:!1,dataType:"json",success:function(a){var s=$.parseJSON(JSON.stringify(a));if("0"==s.iErrorCode){var e,n,t,o=0,r="";for(i=1;i<=s.oItemList.length;i++)o=s.oItemList[i-1].iTotalCount,t=s.oItemList[i-1].iId,e=s.oItemList[i-1].sDictionaryItem1,n=s.oItemList[i-1].sDictionaryItem2,sLink=l+"?no="+t,r+="
";$("#"+c).html(r);var b="",p=Math.ceil(o/iPageCount);if($("#"+c+"PageRecord").html("第 "+A+" 頁,共 "+p+"頁 "+o+"筆資料"),p<=5)for(var d=1;d<=p;d++)b+=A==d?""+d+" ":""+d+" ";else if(A<5){for(d=1;d<=5;d++)b+=A==d?""+d+" ":""+d+" ";b+="... ",b+=""+p+" "}else if(p-3<=A){b+="1 ",b+="... ";for(d=p-4;d<=p;d++)b+=A==d?""+d+" ":""+d+" "}else{b+="1 ",b+="... ";for(d=A-1;d<=A+1;d++)b+=A==d?""+d+" ":""+d+" ";b+="... ",b+=""+p+" "}$("#"+c+"Page").html(b),$("#"+c+"Page2").html(b)}else $("#"+c).html("目前無資料!"),$("#"+c+"Page").hide,$("#"+c+"Page2").hide},error:function(a){console.log(a.responseText)}})}function fDictionaryItemJSON(a,s,e,n,c,t,o,l){var A=e,f=o+"&sA="+a+"&sFilter="+s,e=t+"/Dic/File/LinkDic/L-"+a+"-"+s+"-"+e+".json";$.ajax({url:e,cache:!1,dataType:"json",success:function(a){var s=$.parseJSON(JSON.stringify(a));if("0"==s.iErrorCode){var e,n,t,o=0,r="";for(i=1;i<=s.oItemList.length;i++)o=s.oItemList[i-1].iTotalCount,t=s.oItemList[i-1].iId,e=s.oItemList[i-1].sDictionaryItem1,n=s.oItemList[i-1].sDictionaryItem2,sLink=l+"?no="+t,r+="";$("#"+c).html(r);var b="",p=Math.ceil(o/iPageCount);if($("#"+c+"PageRecord").html("第 "+A+" 頁,共 "+p+"頁 "+o+"筆資料"),p<=5)for(var d=1;d<=p;d++)b+=A==d?""+d+" ":""+d+" ";else if(A<5){for(d=1;d<=5;d++)b+=A==d?""+d+" ":""+d+" ";b+="... ",b+=""+p+" "}else if(p-3<=A){b+="1 ",b+="... ";for(d=p-4;d<=p;d++)b+=A==d?""+d+" ":""+d+" "}else{b+="1 ",b+="... ";for(d=A-1;d<=A+1;d++)b+=A==d?""+d+" ":""+d+" ";b+="... ",b+=""+p+" "}$("#"+c+"Page").html(b),$("#"+c+"Page2").html(b)}else $("#"+c).html("目前無資料!"),$("#"+c+"Page").hide,$("#"+c+"Page2").hide},error:function(a){console.log(a.responseText)}})}