var hmWebHelp={},hmxtoggle=true;hmWebHelp.extFuncs=function(c,b){var a="";if(typeof hmWebHelp.funcs!="object"){hmWebHelp.funcs={}}if(typeof hmWebHelp.funcs[c]=="function"){hmWebHelp.funcs[c](b)}else{a="./js/"+c+".js";$.getScript(a,function(e,g,f){if(g==="success"&&typeof hmWebHelp.funcs[c]=="function"){try{hmWebHelp.funcs[c](b)}catch(d){alert(d)}}else{alert("External function script "+c+".js failed to load as a function")}})}};function HMTrackTopiclink(){return false}$(document).ready(function(){$("div#hmxpopupbody").on("click","a.topiclink,a.weblink,a.topichotspot,a.webhotspot",function(b){$(this).attr("target","_blank");if($(this).attr("class").indexOf("topiclink")>-1){$(this).attr("href",$(this).attr("href").replace(/\#/,"?anchor="))}});$textpopup=$("div#textpopup");$textpopup.attr("title","点击外部弹窗进行关闭。字段级别主题中的弹窗仅以纯文本显示。");var a=function(b){if(b){$textpopup.html("").attr("style","")}else{$textpopup.fadeOut("fast",function(){$textpopup.html("").attr("style","")})}};$textpopup.on("click",function(b){b.stopPropagation()});$(document).on("click",function(){if($textpopup.is(":visible")){a(false)}});hmLoadPopup=function(l){var f=l.hmBody,c=$(window).height(),d=$(window).width(),g,e,h,i,k,b,j;f=f.replace(/<p.*?>(.*?)<\/p>/ig,"[[$$$]]$1[[%%]]");f=f.replace(/<\/??.*?>/ig,"");f=f.replace(/\[\[\$\$]](.*?)\[\[\%\%]]/ig,'<p class="ppara">$1</p>');a(true);$textpopup.html(f).show();if($textpopup.width()>$textpopup.height()){j=($textpopup.width()+$textpopup.height())/2;$textpopup.css({width:j+"px"});if($textpopup.height()>(c-20)){$textpopup.css({width:"95%"})}}e=$textpopup.width();g=$textpopup.height();h=hmWebHelp.popY-50;i=c-(hmWebHelp.popY);if(h>g+15){$textpopup.css("top",(hmWebHelp.popY-(g+12))+"px")}else{if(i>g+15){$textpopup.css("top",(hmWebHelp.popY+10)+"px")}else{$textpopup.css("top","2em")}}k=d-(hmWebHelp.popX);b=hmWebHelp.popX;if(k>e+15){$textpopup.css("left",(hmWebHelp.popX+12)+"px")}else{$textpopup.css("left",(d-e+12)+"px")}};$("div#hmxpopupbody").on("click","a.popuplink,a.popuphotspot,a.topichotspot[href^='javascript:void']",function(b){b.preventDefault();var c=$(this).attr("data-target");hmWebHelp.popX=b.clientX;hmWebHelp.popY=b.clientY;$.getScript("./jspopups/"+c,function(d,f,e){})});$("div#hmxpopupbody").on("click","a.dropdown-toggle",function(c){c.preventDefault();var b={method:"HMToggle",obj:$(this)};hmWebHelp.extFuncs("hmDoToggle",b)});$("div#hmxpopupbody").on("click","img.dropdown-toggle-icon",function(c){c.preventDefault();var b={method:"HMToggleIcon",obj:$(this)};hmWebHelp.extFuncs("hmDoToggle",b)});$("div#hmxpopupbody").on("click","a.inline-toggle",function(b){b.preventDefault();hmWebHelp.extFuncs("hmDoInlineToggle",$(this))});$("div#hmxpopupbody").on("click","div.video-lightbox",function(b){b.preventDefault();b.stopPropagation();alert("在字段级别的模式下不支持视频弹窗。您必须在帮助中打开此页面来查看这个视频。")})});
