<mt:setvarblock name="page_title"><__trans phrase="An error occurred"></mt:setvarblock>
<mt:setvar name="complete" value="1">
<mt:setvar name="error_page" value="1">
<mt:include name="include/chromeless_header.tmpl">

<mtapp:statusmsg
   id="generic-error"
   class="error"
   can_close="0">
<mt:if name="enable_pre">
  <pre>
</mt:if>
    <mt:var name="error" escape="html">
<mt:if name="enable_pre">
  </pre>
</mt:if>
</mtapp:statusmsg>

<mt:setvarblock name="action_buttons">
<mt:unless var="hide_goback_button">
<button
   id="goback-button"
   onclick="<mt:var name="goback">"
   type="submit"
   accesskey="s"
   class="goback action primary button">
  <mt:var name="value">
</button>
</mt:unless>
<mt:if name="button_loop">
<mt:loop name="button_loop">
<button
   type="submit"
<mt:if name="dialog">
   onclick="if ( window.opener ) { window.close(); } else { parent.jQuery.fn.mtDialog.close('<mt:var name="link" escape="js">'); }; return false;"
<mt:elseif name="fs">
   onclick="window.location='<mt:var name="link" escape="js">'; return false;"
<mt:else>
   onclick="if ( window.opener ) { window.opener.location.href='<mt:var name="link" escape="js">'; window.close(); } else { window.open('<mt:var name="link" escape="js">') }; return false;"
</mt:if>
   class="action button">
  <mt:var name="label" escape="html">
</button>
</mt:loop>
</mt:if>
<mt:unless name="dialog">
<button
   id="close-button"
   onclick="if ( window.opener || is_toplevel_new_window() ) { window.close(); } else { parent.jQuery.fn.mtDialog.close(); }"
   type="submit"
   accesskey="x"
   class="close action button hidden"
   title="<__trans phrase="Close (x)">">
  <__trans phrase="Close">
</button>
</mt:unless>
<script type="text/javascript">
    function is_toplevel_new_window() {
        return (window == window.parent)
            && (window == window.top)
            && (! window.opener)
            && (history.length == 1);
    }
    /* <![CDATA[ */
    // show the close button if error is in modal or popup
    if ( window != window.parent || window.opener || is_toplevel_new_window() )
        document.getElementById("close-button").className = "close action button";
    /* ]]> */
</script>
</mt:setvarblock>

<mt:include name="include/actions_bar.tmpl" bar_position="bottom" hide_pager="1" settings_bar="1">

<mt:include name="include/chromeless_footer.tmpl">
