$_STATICPAGES_INIT=function(e){document.getElementsByClassName?getElementsByClass=function(e,t){return(t||document).getElementsByClassName(e)}:getElementsByClass=function(e,t){var n,s,a=(t=t||document).getElementsByTagName("*"),o=a.length,i=e.split(/\s+/),l=i.length,d=[];for(n=0;n<o;n++)for(s=0;s<l;s++)if(-1!=a[n].className.search("\\b"+i[s]+"\\b")){d.push(a[n]);break}return d};var t=!1,n=function(){if(!t){t=!0;var n=document.getElementById(e.prefix+"_body"),s=getElementsByClass("edit",document.getElementById(e.prefix+"_header"))[0],a=getElementsByClass("save",document.getElementById(e.prefix+"_header"))[0],o=getElementsByClass("cancel",document.getElementById(e.prefix+"_header"))[0],i=getElementsByClass("attachments")[0],l=parseInt(document.getElementById(e.prefix+"_page_id").value,10);a.onclick=function(){var t=new function(){var e=["Msxml2.XMLHTTP","Microsoft.XMLHTTP"];if(window.ActiveXObject)for(var t=0;t<e.length;t++)try{return new ActiveXObject(e[t])}catch(e){}else if(window.XMLHttpRequest)return new XMLHttpRequest;return!1};t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(n.innerHTML=t.responseText,tinyMCE.activeEditor.remove(),n.style.display="block",s.style.display="inline",a.style.display="none",o.style.display="none",i.style.display="none"):alert(e.error_message))};var d=tinyMCE.activeEditor.getContent(),r="id="+l+"&content="+encodeURIComponent(d)+"&csrfmiddlewaretoken="+encodeURIComponent(e.csrf_token);return t.open("POST",e.url,!0),t.setRequestHeader("Content-type","application/x-www-form-urlencoded"),t.setRequestHeader("Content-length",r.length),t.setRequestHeader("Connection","close"),t.send(r),!1},o.onclick=function(){return tinyMCE.activeEditor.remove(),n.style.display="block",s.style.display="inline",a.style.display="none",o.style.display="none",i.style.display="none",!1},s.onclick=function(){return n.innerHTML,s.style.display="none",a.style.display="inline",o.style.display="inline",i.style.display="inline",tinyMCE.init(e.tinymce_config),!1}}},s=function(){"complete"===document.readyState&&(document.detachEvent("onreadystatechange",s),n())};"complete"===document.readyState&&setTimeout(n,1),document.addEventListener?(document.addEventListener("DOMContentLoaded",s,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",s),window.attachEvent("onload",n))};