function toInit(){var t,n,i,r,u;if(setIframe(),t=$("#conds span.fname"),t.length>1&&(n=0,t.each(function(){i=$(this).width();i>n&&(n=i)}).each(function(){r=n-$(this).width();r>0&&$(this).css("padding-left",r)})),$("#conds .dateTrigger").each(function(){BindDateMenu(this,$(this).closest("li"),function(){$("#conds li.actived").length==1&&doSearch()})}),fixWidth(),u=AutoComplete("#conds :text[acfid]"),u.length==1&&$("#conds li.actived").length==1)u.on("autocompleteselect",function(n,t){return this.value=t.item.value,this.value!=""&&doSearch(),!1});switchArea(!0);pageLoaded?setTimeout(focusFirst,0):$(window).load(focusFirst);getFrame().is("#ifr_main")&&$("#reswin").load(function(){autoHeight(this)})}function fixWidth(){var n=$("#header").width()-2;if($("#main").css({width:n}),$("#btnSearch").is(".big")){var t=$("#conds"),i=!$("#main").is(".float"),r=t.outerWidth(!0)+$("#btnSearch").outerWidth(!0)>n;$("#btns").toggleClass("wraped",i||r)}}function focusFirst(){$("#conds :text:first").select().focus()}function setIframe(){$.browser.oldie&&$("#tdIfr").height($(window).height()-$("#tdSearch").height())}function doSearch(){var n,t,f=$(getEventSrc()),r,u,i;if(f.is("#conds .btn"))t=new Array(1),n=new Array(1),n[0]=f.val(),t[0]=n;else if(r=null,u=$("#conds li.actived"),t=new Array(u.length),u.each(function(u){if(i=$(":text, span:has(:radio), select",this),i.length==0||i.length>2)return r="意外错误：输入元素的数量不符合预期，请与软件开发商联系。",!1;n=new Array(i.length);i.each(function(t){n[t]=$(this).is("span")?$(":radio:checked:first",this).val():$(this).val()});t[u]=n}),r)return showAndExit(r);return __doPostBack("btnSearch",$.toJSON(t)),showLoading(),$("#reswin").css("visibility","visible").attr("src","about:blank"),!1}function blured(){var n=$("#reswin").attr("src");/\.aspx|to\.htm/ig.test(n)&&switchArea(!1);hideDates();try{getTop().mainFrame.CloseFinder();getTop().mainFrame.CloseAcHelper()}catch(t){}}function searched(n,t){hideLoading();var i=$("#reswin");IsVoid(n)?($("#main").is(".float")||($("#main").addClass("float"),$.browser.msie||$.browser.ie11?i.focus(blured):i.load(function(){$(i[0].contentWindow).focus(blured)}),fixWidth(),$("#header").addClass("pointer").poshytip({content:function(){return $("#main").is(".hidden")?"点击展开搜索区":"点击隐藏搜索区"}}).click(toSwitch),$("#tdHeader").addClass("down")),switchArea(!1),i[0].contentWindow.location.replace(t),hideAlert()):(alert(n),i.attr("src","about:blank"))}function toSwitch(){if(!$(getEventSrc()).is("select")){var n=$("#main").is(".hidden");switchArea(n)}}function switchArea(n){$("#main").toggleClass("hidden",!n);$("#main").is(".float")&&$("#tdHeader").toggleClass("down",!n).toggleClass("up",n)}function focusNext(){var n=$(this).next(":text");n.length>0?n.focus():$("#conds li").length==1&&doSearch()}function rblClicking(){var n=$(getEventSrc());n.is("label")&&(n=$("#"+n.attr("for")));n.is(":radio:checked")&&setTimeout(function(){n.prop("checked",!1).closest("[onmouseup^='rblClicking']").trigger("click")},0)}LoadDatePicker();$(function(){$(window).resize(function(){fixWidth();setIframe()});getFrame().is("#ifr_main")&&($("html").addClass("inflow"),$("#reswin").attr("onload","autoHeight(this);"));toInit();setFinder(getUrlParam("tid"))})