[% site_settings = c.cfg('settings') %]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">	
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>[% site_settings.application_name %]</title>
      [% IF not_using_composite.css # 'IF NOT' to generate css dynamically in /src/css %]
 		<style type="text/css">
            [% # PROCESS css/lims.css %]
            [% # PROCESS default.css %]
            [% # PROCESS overrides.css %]
            [% # PROCESS querylog.css %]
            [% # PROCESS rollover.css %]
        </style>
      [% ELSE %]

        <link rel="stylesheet" type="text/css" href="[% c.query.url(base=1)
			# loads css for test suite %]/css/lims.css?v1" />
        <link rel="stylesheet" type="text/css" href="/css/autosuggest_inquisitor.css"
			media="screen" charset="utf-8" />
		<link type="text/css" media="print" rel="stylesheet" href="/css/print.css" />
        <link rel="stylesheet" type="text/css" href="/css/local.css" />
		[% FOREACH css IN addcss # if local css required %]
		  <link rel="stylesheet" type="text/css" href="/css/[% css %]" />
		[% END %]
      [% END %]

        <script type="text/javascript" src="/js/common.js"></script>
        <script type="text/javascript" src="/js/FormValidator.min.js"></script>
        [% PROCESS site/js/jquery.tt # ensures loaded just once %]
    
        [% IF c.config('use_cgi_ajax'); INCLUDE site/js/ajax.tt; END %]
     </head>

    <body[% IF body_attr; ' ' _ body_attr; END # optionally passed by caller %]>
    
	[% UNLESS skip_wrappers %]
		<div id="header">[% PROCESS site/header.tt %]</div>
	[% END %]

    [% # PROCESS dumper.tt dump = c.flash %]
    [% # PROCESS dumper.tt dump = c.query.param('destination') %]
    [% # PROCESS dumper.tt dump = c.query.self_url %]
    [% # PROCESS dumper.tt dump = destination_url %]

    <div id="wrapper">
        <div id="content">
            [% PROCESS site/status.tt # error, warning & info msgs %]
            [% content %]
        </div>
    </div>

	[% UNLESS skip_wrappers %]
		<div id="footer">[% PROCESS site/footer.tt %]</div>
	[% END %]
	
    [% IF c.user_can('do_admin') %]
        <div id='pjxdebugrequest'></div>
    [% END %]
    </body>
</html>
