function InitFlows(n){$(".ui-tabs").find(".ui-tabs-active .hide").css("display",n?"inline":"none");$("#myArea tr.dr").hover(function(){$(this).toggleClass("RowMouseOver")}).dblclick(function(){toPopup($(this).find("a:first").attr("href"))}).attr("title","双击该行空白处弹出流程详情窗口").find("a[href='#']").attr("title","点击查看详情").click(function(){var n=$(this).closest("tr.dr");return title=n.find("a:first").html(),__doPostBack("btnOpera","ShowCurrent|"+n.attr("flowid")),!1});$("#upPager").show();tryFitParent()}function InitTasks(n){$(".ui-tabs").find(".ui-tabs-active .hide").css("display",n?"inline":"none");$("#taskArea tr.dr").hover(function(){$(this).toggleClass("RowMouseOver")}).dblclick(function(){$(this).find("img[onclick^='showTask']").click()}).attr("title","双击该行空白处查看任务详情");$("#upPager").show();tryFitParent()}function sortBy(n){return __doPostBack("btnOpera","Sort|"+n),!1}function showTask(n){return __doPostBack("btnOpera","ShowTask|"+n),!1}function bindCollapse(){IsVoid(title)?$("#steps_upPop .head div.title").text("事务进度"):$("#steps_upPop .head div.title").html(title);$("#steps_dlSteps .collapse").click(function(){var t=$(this).parent().next(),n;t.is("dd")&&(n=$(this).attr("src"),n.indexOf("plus.gif")>-1?$(this).attr({src:n.replace("plus.gif","minus.gif"),title:"隐藏处理者"}):$(this).attr({src:n.replace("minus.gif","plus.gif"),title:"显示处理者"}),t.slideToggle(300))}).each(function(){var n=$(this).attr("src");n.indexOf("plus.gif")>-1?$(this).attr({title:"显示处理者"}):$(this).attr({title:"隐藏处理者"})})}function setAc(n){AutoComplete($("#tbExerName").attr("taskid",n),!0)}function getAcContext(n){return n.attr("taskid")}function findExer(){$("#step_upExers").html("<div class='querying'><img src='images/loading_ov.gif' align='absMiddle' /> 正在查询 …<\/div>");__doPostBack("btnOpera","FindExer|"+$("#tbExerName").attr("taskid")+":"+$("#tbExerName").val())}function operaTran(n){if(n=="Delete"&&!confirm("确定要删除该流程吗？"))return!1;var t=$(getEventSrc()),i=t.closest("tr").attr("flowid");__doPostBack("btnOpera",n+"|"+i)}function viewFlow(n,t){toPopup("flow.aspx?tid="+n+"&rid="+t)}function toView(){AutoComplete("#toView_tbUser");ShowPop("toView_popup")}function toFind(){var t=$(".ui-tabs").tabs("option","active"),n;t==0?($("#findFlows_popup .head .title").text("查找"+$("#flows span:first").text()),ShowPop("findFlows_popup"),n=$("#findFlows_rbInput").offset().left-$("#findFlows_cbTime").offset().left,$("#findFlows_rbSelect").css("margin-left",n)):($("#liState_Tasks").css("display",t==2?"":"none"),$("#findTasks_popup .head .title").text("查找"+$(".ui-tabs").find(".ui-tabs-active span:first").text()),AutoComplete("#findTasks_tbUsers"),ShowPop("findTasks_popup"),n=$("#findTasks_rbInput_Tasks").offset().left-$("#findTasks_cbTime_Tasks").offset().left,$("#findTasks_rbSelect_Tasks").css("margin-left",n))}LoadDatePicker();var title,tabIndex=0;$(function(){$(".ui-tabs").tabs({active:tabIndex,activate:function(n,t){$("#upPager,div.pop").hide();var i=t.newTab.find("a").attr("id");t.newPanel.html("<div class='footBtnArea'><img src='images/loading.gif' style='vertical-align:middle' />　正在加载 …<\/div>");t.newTab.closest("ul").find("span.hide").removeAttr("style");__doPostBack("btnOpera","ChangeTab|"+i);tryFitParent()}}).fadeIn(300);$("ul.conds li :input[type!='checkbox']").click(function(){var n=$(this);n.closest("li").find(":checkbox:first").prop("checked",!0);n.isIn(".times")&&!n.is(":radio")&&n.prevAll(":radio:first").prop("checked",!0)});$(document).keydown(function(){var t=getEvent(),i=t.keyCode||t.which,n=null;switch(i){case 37:case 33:n="btnPrevious";break;case 39:case 34:n="btnNext";break;case 36:n="btnFirst";break;case 35:n="btnLast"}return $("#"+n+":not(:disabled)").length>0?(__doPostBack(n,""),!1):!0})})