Joomla=window.Joomla||{},Joomla.editors=Joomla.editors||{},Joomla.editors.instances=Joomla.editors.instances||{},function(e,t){"use strict";e.submitform=function(e,n,i){n||(n=t.getElementById("adminForm")),e&&(n.task.value=e),n.noValidate=!i;var o=t.createElement("input");o.style.display="none",o.type="submit",n.appendChild(o).click(),n.removeChild(o)},e.submitbutton=function(t){e.submitform(t)},e.JText={strings:{},_:function(e,t){return"undefined"!=typeof this.strings[e.toUpperCase()]?this.strings[e.toUpperCase()]:t},load:function(e){for(var t in e)e.hasOwnProperty(t)&&(this.strings[t.toUpperCase()]=e[t]);return this}},e.replaceTokens=function(e){if(/^[0-9A-F]{32}$/i.test(e)){var n,i,o,r=t.getElementsByTagName("input");for(n=0,o=r.length;o>n;n++)i=r[n],"hidden"==i.type&&"1"==i.value&&32==i.name.length&&(i.name=e)}},e.isEmail=function(e){var t=/^[\w.!#$%&‚Äô*+\/=?^`{|}~-]+@[a-z0-9-]+(?:\.[a-z0-9-]{2,})+$/i;return t.test(e)},e.checkAll=function(e,t){if(!e.form)return!1;t=t?t:"cb";var n,i,o,r=0;for(n=0,o=e.form.elements.length;o>n;n++)i=e.form.elements[n],i.type==e.type&&0===i.id.indexOf(t)&&(i.checked=e.checked,r+=i.checked?1:0);return e.form.boxchecked&&(e.form.boxchecked.value=r),!0},e.renderMessages=function(n){e.removeMessages();var i,o,r,a,l,s,c,d=t.getElementById("system-message-container");for(i in n)if(n.hasOwnProperty(i)){for(o=n[i],r=t.createElement("div"),r.className="alert alert-"+i,a=e.JText._(i),"undefined"!=typeof a&&(l=t.createElement("h4"),l.className="alert-heading",l.innerHTML=e.JText._(i),r.appendChild(l)),s=o.length-1;s>=0;s--)c=t.createElement("p"),c.innerHTML=o[s],r.appendChild(c);d.appendChild(r)}},e.removeMessages=function(){for(var e=t.getElementById("system-message-container");e.firstChild;)e.removeChild(e.firstChild);e.style.display="none",e.offsetHeight,e.style.display=""},e.isChecked=function(e,n){if("undefined"==typeof n&&(n=t.getElementById("adminForm")),n.boxchecked.value=e?parseInt(n.boxchecked.value)+1:parseInt(n.boxchecked.value)-1,n.elements["checkall-toggle"]){var i,o,r,a=!0;for(i=0,r=n.elements.length;r>i;i++)if(o=n.elements[i],"checkbox"==o.type&&"checkall-toggle"!=o.name&&!o.checked){a=!1;break}n.elements["checkall-toggle"].checked=a}},e.popupWindow=function(e,t,n,i,o){var r=(screen.width-n)/2,a=(screen.height-i)/2,l="height="+i+",width="+n+",top="+a+",left="+r+",scrollbars="+o+",resizable";window.open(e,t,l).window.focus()},e.tableOrdering=function(n,i,o,r){"undefined"==typeof r&&(r=t.getElementById("adminForm")),r.filter_order.value=n,r.filter_order_Dir.value=i,e.submitform(o,r)},window.writeDynaList=function(e,n,i,o,r){var a,l,s,c="<select "+e+">",d=i==o,u=0;for(l in n)n.hasOwnProperty(l)&&(s=n[l],s[0]==i&&(a="",(d&&r==s[1]||!d&&0===u)&&(a='selected="selected"'),c+='<option value="'+s[1]+'" '+a+">"+s[2]+"</option>",u++));c+="</select>",t.writeln(c)},window.changeDynaList=function(e,n,i,o,r){for(var a,l,s,c,d=t.adminForm[e],u=i==o;d.firstChild;)d.removeChild(d.firstChild);a=0;for(l in n)n.hasOwnProperty(l)&&(s=n[l],s[0]==i&&(c=new Option,c.value=s[1],c.text=s[2],(u&&r==c.value||!u&&0===a)&&(c.selected=!0),d.options[a++]=c));d.length=a},window.radioGetCheckedValue=function(e){if(!e)return"";var t,n=e.length;if(void 0===n)return e.checked?e.value:"";for(t=0;n>t;t++)if(e[t].checked)return e[t].value;return""},window.getSelectedValue=function(e,n){var i=t[e][n],o=i.selectedIndex;return null!==o&&o>-1?i.options[o].value:null},window.listItemTask=function(e,n){var i,o=t.adminForm,r=0,a=o[e];if(!a)return!1;for(;;){if(i=o["cb"+r],!i)break;i.checked=!1,r++}return a.checked=!0,o.boxchecked.value=1,window.submitform(n),!1},window.submitbutton=function(t){e.submitbutton(t)},window.submitform=function(t){e.submitform(t)},window.saveorder=function(e,t){window.checkAll_button(e,t)},window.checkAll_button=function(n,i){i=i?i:"saveorder";var o,r;for(o=0;n>=o;o++){if(r=t.adminForm["cb"+o],!r)return void alert("You cannot change the order of items, as an item in the list is `Checked Out`");r.checked=!0}e.submitform(i)}}(Joomla,document);
