<title>Gossamer FileMan - File Manager</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link type="text/css" rel="stylesheet" href="<%cfg.static_url%>/<%cfg.template%>/luna.css" />
<link type="text/css" rel="stylesheet" href="<%cfg.static_url%>/<%cfg.template%>/cluetip.css" />
<link type="text/css" rel="stylesheet" href="<%cfg.static_url%>/<%cfg.template%>/datePicker.css" />
<script type="text/javascript" src="<%cfg.static_url%>/js/fileman.js"></script>
<script type="text/javascript" src="<%cfg.static_url%>/js/jquery.min.js"></script>
<script type="text/javascript" src="<%cfg.static_url%>/js/jquery.form.js"></script>
<script type="text/javascript" src="<%cfg.static_url%>/js/jquery.timers.js"></script>
<%~if noauth or $session.user%>
<script type="text/javascript" src="<%cfg.static_url%>/js/jquery.hoverIntent.js"></script>
<script type="text/javascript" src="<%cfg.static_url%>/js/jquery.cluetip.js"></script>
<script type="text/javascript" src="<%cfg.static_url%>/js/jquery.jqModal.js"></script>
<script type="text/javascript" src="<%cfg.static_url%>/js/jquery.datePicker.js"></script>
<script type="text/javascript" src="<%cfg.static_url%>/tinymce/tiny_mce.js"></script>
<script type="text/javascript" src="<%cfg.static_url%>/js/date.js"></script>
<%endif~%>
<script type="text/javascript">
    //<![CDATA[

    $(document).ready(function() {
      var fm = new FileMan();
      fm.config.version     = "<%if cfg.version%>Version <%cfg.version%> (<%if cfg.fversion eq 'multiple'%>Multiple Users<%else%>Single User<%endif%>)<%else%>Single User Version<%endif%>";
      fm.config.image_url   = "<%escape_js cfg.static_url%>\/<%escape_js cfg.template%>\/images";
      fm.config.cgi_url     = "<%escape_js cfg.cgi_url%>";
      fm.config.root_path   = "<%escape_js cfg.root_path%>";
      <%~if noauth or $session.user%>
      fm.config.max_upload  = <%if cfg.max_upload%><%cfg.max_upload%><%else%>10<%endif%>;
      fm.config.effect      = <%if default.effect == 2%>false<%else%>true<%endif%>;
      fm.config.readme      = <%if default.readme%><%default.readme%><%else%>0<%endif%>;
      fm.config.date_format = '<%if cfg.date_input%><%cfg.date_input%><%else%>yyyy-mm-dd<%endif%>';
      fm.config.serial      = randomString();
      fm.config.is_ie       = <%if browser.is_ie%>true<%else%>false<%endif%>
      fm.config.is_win      = <%if mswin%>true<%else%>false<%endif%>;

      fm.paging.max_hits = <%if default.maxhits%><%default.maxhits%><%else%>25<%endif%>;
      fm.paging.sb       = "<%if default.sb%><%escape_js default.sb%><%else%>name<%endif%>";
      fm.paging.so       = "<%if default.so%><%escape_js default.so%><%else%>asc<%endif%>";

      fm.hiddens.hidden_query   = "<%escape_js hidden_query%>";
      fm.hiddens.hidden_objects = "<%escape_js hidden_objects%>";

      fm.init();
      <%~if error%>fm.showMessage({ success : false, message : "<%escape_js error%>" });<%~endif%>
      <%~else%>
      fm.login();
      <%endif~%>
    });
    //]]>
</script>
