window.insertEngageBoxhortcode=function(e,t){var o=document.getElementById("jform_boxid").value,n=document.getElementById("jform_type").value,a=document.getElementById("jform_label").value,r=document.getElementById("jform_cmd").value,d="";switch(n){case"button":(d=document.createElement("button")).setAttribute("type","button");break;case"a":var m=document.getElementById("jform_href").value;(d=document.createElement("a")).setAttribute("href",m);break;case"div":d=document.createElement("div")}return d.innerHTML=a,d.setAttribute("data-ebox",o),"toggle"!==r&&d.setAttribute("data-ebox-cmd",r),window.parent.Joomla.editors.instances[e].replaceSelection(d.outerHTML),t?window.parent.Joomla.Modal.getCurrent().close():window.parent.jModalClose(),!1};

