function InitList(){var n=$("#icon"),t;n.length==0&&(n=$("<img src='images/gear_hover.png' id='icon' />").poshytip({content:"设置版式"}).appendTo("#up").click(function(){var n=$(this).data("tid");n&&($("#curTempletId").val(n),__doPostBack("btnChgFormat",n))}));n.hide();$("#up div[class^='item'][tid]").hover(function(){if(HasPanelShowing())return!1;var t=$(this).offset();n.css({display:"block",left:t.left+$(this).width()-20,top:t.top+3}).data("tid",$(this).attr("tid"))},function(){within(this,getEvent())||n.hide()});$("#up .item a[pict]").poshytip({content:function(){return"<img src='Thumb.ashx?src="+this.getAttribute("pict")+"' />"}});t=$("#up a[rel='cb']").poshytip({content:function(){return"<img src='"+this.href+"' />"}});ColorBoxPhoto(t);$(".echart").each(showChart);$(".ui-tabs").tabs({activate:function(n,t){$(".echart",t.newPanel).each(showChart)}}).show();tryFitParent()}function InitEditor(){MakeEditor("textarea.ck","Lesser","210px",!1,!1)}function updateEditor(){var n=$("#fmt_rblMode :radio[value='Custom']").is(":checked");n&&UpdateEditorElement()}function setHtmlArea(){var n=$("#fmt_rblMode :radio[value='Custom']").is(":checked");n?($("#fmt_divHtml").css("display","block"),$("#fmt_popup").width(595),$("#rtd").removeClass("hidden"),bindCopy("fieldTag"),$("#fieldTag").mouseover(function(){selectText(this)}).poshytip({content:"点击复制，或选中后拖入编辑区"})):($("#fmt_divHtml").css("display","none"),$("#fmt_popup").width(500),$("#rtd").addClass("hidden"));$("#fmt_ddlLayouts").click(function(){$("#fmt_rblMode_3").click()})}function fmtsChanged(){switch($("#ddlFmts").val()){case"BarCode_1D":$(".forBarcode,#ddlSize").removeClass("hide");break;case"BarCode_2D":$(".forBarcode").addClass("hide");$("#ddlSize").removeClass("hide");break;default:$(".forBarcode,#ddlSize").addClass("hide")}showTag()}function rangeChanged(n){var t=$(n).val();t=="Field"?($("#fmt_ddlVars,#spanQuery").addClass("hide"),$("#fmt_ddlfs,#ddlFmts").removeClass("hide"),fmtsChanged()):t=="Variable"?($("#fmt_ddlVars").removeClass("hide"),$("#fmt_ddlfs,#ddlFmts,#spanQuery").addClass("hide")):($("#spanQuery").removeClass("hide"),$("#fmt_ddlfs,#ddlFmts,#fmt_ddlVars").addClass("hide"));fsChanged()}function fsChanged(){$("#ddlFmts").val("");fmtsChanged()}function showTag(){var t,r=$("#range").val(),i,n;if($("#range").val()=="Field"){i=$("#fmt_ddlfs").val();switch($("#ddlFmts").val()){case"":t="["+i+"]";break;case"BarCode_1D":n=$("#ddlSize").val();n=n=="medium"?"":"|"+n;t="[_{"+$("#ddlBarCodes").val()+n+($("#cbLabel").is(":checked")?"|1":"")+"}"+i+"]";break;case"BarCode_2D":n=$("#ddlSize").val();n=n=="medium"?"":"|"+n;t="[_{QrCode"+n+"}"+i+"]";break;default:t="[_"+i+"]"}}else t=r=="Variable"?$("#fmt_ddlVars").val():$("#fmt_ddlQuerys").val();$("#fieldTag").text(t).fadeOut(100).fadeIn(300)}function setBtnExport(n,t){$("#btnExport").css("display",n?"none":"");$("#btnPrint").css("display",t?"none":"")}function toPrint(){$("#up").printIt()}LoadEditor();$(function(){var n=getTop(),t;n.needRefreshOverview==!0&&(n.needRefreshOverview=null,location.reload(!0));document.onkeydown=function(){var t=getEvent(),i,n;if(t.ctrlKey||$(t.srcElement||t.target).is("input"))return!0;i=t.keyCode||t.which;n=null;switch(i){case 37:case 33:n=$f("btnPrevious");break;case 39:case 34:n=$f("btnNext");break;case 36:n=$f("btnFirst");break;case 35:n=$f("btnLast")}return n&&!n.disabled?(__doPostBack(n.id,""),!1):!0};$("#loading").show();InitScroller();t=Sys.WebForms.PageRequestManager.getInstance();fixEditor(t)})