YUI.add("moodle-core-popuphelp",function(p,e){function o(){o.superclass.constructor.apply(this,arguments)}var t="span.helptooltip > a",l="div.moodle-dialogue-ft",i="icon",n="icon-pre";o.NAME="moodle-core-popuphelp",o.ATTRS={},p.extend(o,p.Base,{panel:null,initializer:function(){p.one("body").delegate("click",this.display_panel,t,this)},display_panel:function(e){this.panel||(this.panel=new M.core.tooltip({bodyhandler:this.set_body_content,footerhandler:this.set_footer,initialheadertext:M.util.get_string("loadinghelp","moodle"),initialfootertext:""})),this.panel.display_panel(e)},set_footer:function(e){var o,t;e.doclink?(o=p.Node.create("<a />").setAttrs({href:e.doclink.link}).addClass(e.doclink["class"]),t=p.Node.create("<img />").setAttrs({src:M.util.image_url("docs","core")}).addClass(i).addClass(n),o.appendChild(t),o.appendChild(e.doclink.linktext),this.set("footerContent",o),this.bb.one(l).show()):this.bb.one(l).hide()}}),M.core=M.core||{},M.core.popuphelp=M.core.popuphelp||null,M.core.init_popuphelp=M.core.init_popuphelp||function(e){return M.core.popuphelp||(M.core.popuphelp=new o(e)),M.core.popuphelp}},"@VERSION@",{requires:["moodle-core-tooltip"]});