<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head>
   <meta name="description" content="<%= @page.meta_descs if @page %>" />
   <meta name="keywords" content="<%= @page.meta_tags if @page %>" />
      <title><%= @page_title || config_value('site_title') %></title>
      <%= theme_stylesheet_link_tag 'style' %>
      <%= stylesheet_link_tag "overlay" %>
      <%= javascript_include_tag :defaults %>
      <%= javascript_include_tag "behaviour", "weed", "overlay" %>
      <% if @page %>
      <script type="text/javascript">
      <%= @page.behaviour %>
      </script>
      <% end %>
      <%= auto_discovery_link_tag(:rss, {:controller => "admin/feeds", :action => "rss"}) %>
      <%= auto_discovery_link_tag(:atom, {:controller => "admin/feeds", :action => "atom"}) %>
  </head>

<body>
  <div id="main">

    <div id="topmenu">
    <%= render_component :action => "menu" %>
	</div>

    <div id="header">
      <span class="title">sim<span class="darktitle">plex</span></span><br/>
    </div>


    <div id="content">
      
	  <%= @content_for_layout %>
	  
	  <div id="footer">
       &copy; 2005 Your Company. All rights reserved.
      </div>
    </div>

  <div id="lefty">
    <div id="menu">
       <% if session[:user_id] %>
	  	   	
	  	   	<h3>Admin</h3>
	  	   	<%= link_to_remote('Overlay', { :update => "boxcontent", :loading => "showLoader()", :complete => "showBox()", :url => {:controller => 'admin/page', :action => 'overlay', :id => @page.id } }, { :href => url_for(:action => 'show', :id => @page.id ) } ) if @page %>
			<%= link_to_remote('Overlay', { :update => "boxcontent", :loading => "showLoader()", :complete => "showBox()", :url => {:controller => 'admin/tags', :action => 'overlay', :id => @tag.id } }, { :href => url_for(:action => 'show', :id => @tag.id ) } ) if @tag %>
	  	   	<%= link_to("Edit this", :controller => "admin/page", :action => "fedit", :id => @page.id) if @page %>
	  	   	<%= link_to("Admin", :controller => "admin") %>
	  	   	<%= link_to("Logout", :controller => "admin/login", :action => "logout") %>
	  	   	
	 <% end %>
	 <h3>Feeds</h3>
	  	   	
	  	   	<a href="<%= url_for :controller => 'admin/feeds', :action => 'rss' %>"><%= theme_image_tag('feed-icon', :border => 0) %> RSS</a>
			<a href="<%= url_for :controller => 'admin/feeds', :action => 'atom' %>"><%= theme_image_tag('feed-icon', :border => 0) %> Atom</a>
   	        	
   	        	<h3>Tags</h3>
   	        	<%= render_component :action => "tags" %>
    </div>
  </div>
</div>

</body>
</html>
