function showPageUrl(){var r=$f("currentUrl"),u,n,t,i;if(r){try{u=window.dialogArguments||opener;n=u.parent.mainFrame.location.href}catch(r){$("#faq .pCurrentUrl").hide();return}t=n;t.indexOf("?")>-1&&(t=t.substr(0,t.indexOf("?")));i=t.lastIndexOf("/");switch($("#urlMode").val()){case"Full":n=n.substr(0,i+1)+"default.aspx?src="+$.url.encode(n.substr(i+1));break;default:n=appendUrlParam(n,"alone","1")}$(r).attr("href",n).text(n)}}function setHeight(){$("#mainDiv").height(document.documentElement.clientHeight-$("#header").outerHeight(!0))}function MaximizeWindow(){moveTo(0,0);resizeTo(screen.availWidth,screen.availHeight)}function setBtnFullWin(){var n=window.name=="fullWin";n&&$("#guide,#about").hide();$("#fullWindow").toggleClass("hide",n)}function setAnchorBack(){$("#aBack").css("display",referrerIs("help.aspx")?"":"none")}function to(n){if(window.name=="mainFrame")location=n;else{var t=window.dialogArguments||opener;try{t.parent.mainFrame.location=n;top.close()}catch(i){}}}function bindCoping(n,t){var i=$("#"+n),r=t?$("#"+t):i;new ClipboardJS("#"+n,{text:function(){return getEleValue(r)}}).on("success",function(n){winalert("已复制到剪贴板！");n.clearSelection()})}function toCloseWin(){inPopup()?setTimeout(parent.$.colorbox.close,0):closeWin()}function toFind(){var n=$("#tbKey").val();n?n.length<2?alert("关键字至少两个字符！"):(showLoading(),location="help.aspx?key="+$.url.encode(n)):alert("请输入关键字！")}$(function(){var t=getUrlParam("key"),i,n;t&&(i=new RegExp("<.*?>","i"),$(".searchItem").each(function(){for(var u,o,f=$(this),n=f.html(),e=[],r=0;;r++){if(u=i.exec(n),u)e[r]=u;else break;n=n.replace(u,"{[("+r+")]}")}for(words=unescape(t.replace(/\+/g," ")).split(/\s+/),w=0;w<words.length;w++)o=new RegExp("("+words[w].replace(/[(){}.+*?^$|\\\[\]]/g,"\\$&")+")","ig"),n=n.replace(o,"<span class='keyword'>"+words[w]+"<\/span>");for(r=0;r<e.length;r++)n=n.replace("{[("+r+")]}",e[r]);n="<div class='btitle'><span>"+f.attr("subject")+"<\/span><\/div>"+n;f.html(n)}));n=$("#indexNav");n.length>0?n.find("a").each(function(){$(this).attr("href",$(this).attr("href")+"&showpath=1")}):getUrlParam("showpath")=="1"&&$("#mainDiv .path").show();$("#cmdtext").length>0&&bindCoping("cmdtext");setHeight();setAnchorBack();showPageUrl();setBtnFullWin();window.onresize=setHeight;window.onload=setHeight;window.name=="mainFrame"&&($("body").css("background-color","#fafafa"),$("#mainDiv").css("padding","0 8px 6px"))})