String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"")};function $(a){return document.getElementById(a)}function WinOpen(b,k,a,d){var i=(screen.width-a)/2;var g=(screen.height-d)/2;var e="width="+a+",height="+d+",top="+g+",left="+i;var j=window.open(b,k,e);return j}function WinOpenDialog(b,a,d){var c="dialogWidth:"+a+"px;dialogHeight:"+d+"px;center:yes;status:no;help:no";showModalDialog(b,window,c)}function showlist(e,b,f,d,a){var c=escape(d);if(a.toLowerCase()=="blank"){window.open(e+"/list.aspx?chid="+b+"&fieldname="+f+"&keyword="+c)}else{location.href(e+"/list.aspx?chid="+b+"&fieldname="+f+"&keyword="+c)}}function ReviewPadding(d,c,f,b,a){var e=XmlHttpGetMethodText(d+"/sys_template/MoreReviewList.aspx?ModelType="+c+"&Id="+f+"&PageSize="+b+"&P="+a);document.getElementById("review_morelist_"+c+"_"+f).innerHTML=e}function SetSearchField(a,b){if(b.value!=0){document.getElementById("src_field_list").src=a+"/common/getsearchform.aspx?id="+b.value+"&flag=1"}else{document.getElementById("src_field_list").src=a+"/common/getsearchform.aspx?id="+b.value+"&flag=0"}}function GoSearch(c){var a=document.getElementById("search_channel_list").value;var d=document.getElementById("search_field_list").value;var b=document.getElementById("search_txt_keyword").value.trim();if(b.length==0){alert("\u641c\u7d22\u5185\u5bb9\u5fc5\u987b\u586b\u5199");return}if(a!=0&&d!=0){window.open(c+"/List.aspx?chid="+a+"&fieldname="+d+"&keyword="+escape(b)+"&Search=1")}else{alert("\u9891\u9053\u548c\u5b57\u6bb5\u5fc5\u987b\u9009\u62e9")}}function CheckNumber(b){var a=/^\d+$/;return a.test(b)}function go(a,d,e){var h=$("txtPageNav"+e).value;if(!CheckNumber(h)){alert("\u9875\u7d22\u5f15\u53ea\u80fd\u662f\u6570\u5b57");return}if(h<1||h>d){alert("\u9875\u7d22\u5f15\u8d85\u51fa\u8303\u56f4");return}if(h==1){location.href(a);return}var c=a.lastIndexOf(".");var b=a.substr(0,c);var f=a.substr(c,a.length-c);var g=/.*(\..*?)\?.*/i;if(a.replace(g,"$1").toLowerCase()!=".aspx"){location.href(b+"_"+h+f)}else{location.href(a.setQuery("p",h))}}String.prototype.setQuery=function(a,d){var b=new RegExp("(^|&|\\?)("+a+"=)([^&]*)(&|$)");var c=this.substr(this.indexOf("?")+1).match(b);if(c!=null){return this.replace(b,"$1$2"+d+"$4")}else{return this+(this.indexOf("?")>-1?"&":"?")+a+"="+d}};function SetDig(b,d,e){if($("dig_"+d+"_"+e)!=null&&$("click_dig_"+d+"_"+e)!=null){var a='<img src="'+b+'/images/dig_loading.gif">';$("click_dig_"+d+"_"+e).innerHTML=a;var c=XmlHttpGetMethodText(b+"/common/dig.aspx?type=set&modelid="+d+"&id="+e);if(c!="-1"){$("dig_"+d+"_"+e).innerHTML=c}$("click_dig_"+d+"_"+e).innerHTML="\u6210&nbsp;&nbsp;\u529f";$("click_dig_"+d+"_"+e).style.removeAttribute("cursor");$("click_dig_"+d+"_"+e).removeAttribute("onclick")}return false}function SuperLabelPage(a,c){var b=XmlHttpGetMethodText(a);document.getElementById(c).innerHTML=b}function GetAjaxLabel(a,d,c,b){var e=XmlHttpPostMethodText(a,"paramStr="+d+"&currId="+c+"&type="+b);document.write(e)}function GetHiddenContent(d,f,e,a,c,b){var g=XmlHttpPostMethodText(d,"paramstr="+f+"&id="+e+"&pageindex="+a+"&pagecount="+c+"&tablename="+b);document.write(g)};
