function SelectedDir(n){__doPostBack("selectDir",n)}function setSubOptions(){$("#divSubDir").css("display",$f("cbDir").checked?"block":"none");tryFitParent()}function selectDir(){return $f("cbDir").checked=!0,setSubOptions(),showDirTree()}function delSc(n){return confirm("确定删除吗？")&&__doPostBack("btnDelSc",n),!1}function delInfoFav(n){return confirm("确定删除吗？")&&__doPostBack("btnDelFav",n),!1}function InitDdl(){tbKey==null&&(tbKey=$("#kw"));AutoWidth("#search select").change(ddlChanged).each(ddlChanged)}function ddlChanged(){var r,t,i,n;if(this.id=="ddlfs"&&($("#modes").css("display",$("#ddlfs").val()==""?"none":""),r=$("option:selected",this).attr("type"),t=r=="DateTime",$("#dtPicker").css("display",t?"":"none").attr("My97",t?"1":""),i=$(this).val(),i==""?tbKey.removeAttr("acfid").attr("autocomplete","on"):tbKey.attr("acfid",$("#ddlts").val()+"|"+i)),this.id=="ddlts"&&(n=$("#ddlts").val(),(n=="Data"||n=="Info"||n=="Google"||n=="Baidu"||n=="File")&&($("#ddlfs,#modes").css("display","none"),tbKey.removeAttr("acfid").attr("autocomplete","on")),n=="Info"||n=="Google"||n=="Baidu"||n=="File"?$("#divDir").addClass("hidden"):$("#divDir").removeClass("hidden"),$("#dtPicker").css("display","none").attr("My97","")),tbKey.is("[acfid]"))AC(tbKey);else try{tbKey.autocomplete("destroy").unbind("click")}catch(u){}try{tbKey.click().select()[0].focus()}catch(u){}}function kwKeyup(){var n=$("#ddlfs option:selected").attr("type"),t=$.trim(tbKey.val());t!=""&&(n=="DateTime"||n=="Boolean"||n=="Double")?tbKey.attr("disac","1"):tbKey.removeAttr("disac");setCleaner()}function setCleaner(){$.browser.msie||(tbKey.val()==""?$("#cleaner").addClass("hidden"):$("#cleaner").removeClass("hidden"))}function doClean(){tbKey.val("").click().focus();setCleaner()}function picking(n){if($("#modes option:selected").val()=="介于"){var t=$.trim(this.value);if(t!="")return this.value=t+" "+n.cal.getNewDateStr(),n.hide(),!0}}function AC(n){if(n.attr("disac")!="1"){var t=" ",i={source:function(i,r){var u=n.attr("acfid"),f,e;if(IsVoid(u))return!1;f=lastIndexOf(i.term,t);e=i.term.substr(f+1);$.getJSON("ajax.aspx?action=ac&acfid="+u+"&count=24",{term:e},r)},minLength:0,position:{at:"left bottom",my:"left top+1"},focus:function(){return!1},create:function(){$(this).bind("click",function(){$(this).autocomplete("search",$(this).val())})},select:function(n,i){var r=lastIndexOf(this.value,t);return this.value=this.value.substr(0,r+1)+i.item.value,$("#btnDo").click(),!1}};$.browser.oldie&&!pageLoaded?setTimeout(function(){n.autocomplete(i)},0):n.autocomplete(i)}}LoadDatePicker();var tbKey=null;$(function(){var n=0;location.href.indexOf("Area=shortcuts")>-1?n=1:location.href.indexOf("Area=favs")>-1&&(n=2);$(".ui-tabs").tabs({active:n,activate:tryFitParent}).fadeIn(350);tbKey=$("#kw").select().focus().on("click focus",function(){$(this).attr("My97")!="1"&&setTimeout("$dp.hide();",0)});setCleaner();$.browser.msie||$("#cleaner").attr({alt:"清空",title:"清空"})})