anchor.diff:  		<div class="button_with_label" id="show_element_window">
   			<%= link_to_function(
   				render_icon('element_window'),
  -				"Alchemy.openElementsWindow('#{list_admin_elements_path(:page_id => @page.id)}', {title: '#{ _('Elements') }', dirtyTitle: '#{ _("Warning!") }', dirtyMessage: '#{ _("You have unsaved elements. Do you really want to close the elements window?") }', okLabel: '#{ _("Yes") }', cancelLabel: '#{ _("No") }'})",
  +				"openElementsWindow()",
   				{
   					:title => _('Show Elements Window'),
   					:class => 'icon_button'
  
positive.code: <%- end -%>
  <%- content_for(:toolbar) do -%>
  <div id="toolbar">
    <div id="toolbar_buttons">
      <div class="button_with_label">
        <% form_tag(
        	unlock_admin_page_path(
        		@page,
        		:redirect_to => admin_mailings_path
        	)
        ) do %>
        	<button class="icon_button" title="<%= _('explain_unlocking') %>">
        		<%= render_icon('close') %>
        	</button><br />
        	<label>Mailing schließen</label>
        <% end %>
      </div>
      <div class="button_with_label">
  		<%= link_to_overlay_window(
  			render_icon('mailing_edit'),
  		    edit_admin_mailing_path(@mailing),
  		    {
  		        :title => 'Mailing bearbeiten',
  		        :size => '450x260'
  		    },
  		    {
  		        :class => 'icon_button',
  		        :title => 'Mailing bearbeiten'
  		    }
  		) -%><br />
  		<label>Mailing bearbeiten</label>
  	</div>
      <div class="button_with_label">
      	<%= link_to_overlay_window(
      		render_icon('send_mailing'),
      		deliver_admin_mailing_path(@mailing),
      		{
      			:title => _('Send Mailing'),
      			:size => '450x200'
      		},
      		{
      			:title => _('Send Mailing'),
      			:class => 'icon_button'
      		}
      	) %><br />
      	<label><%= _('Send Mailing') %></label>
      </div>
    </div>
  	<div id="toolbar_buttons_right">
  		<div class="button_with_label" id="show_preview_window">
  			<%= link_to_function(
  				render_icon('preview_window'),
  				"Alchemy.openPreviewWindow('#{admin_page_url(@page)}', '#{_('Page Preview')}')",
  				{
  					:title => _('Show Preview Window'),
  					:class => 'icon_button'
  
negative.code: <%- end -%>
  <%- content_for :javascripts do -%>
  <script type="text/javascript" charset="utf-8">
  	
  	function openPreviewWindow() {
  		Alchemy.openPreviewWindow('<%= admin_page_url(@page) %>', '<%= _("Page Preview") %>');
  	}
  	
  	function openElementsWindow() {
  		Alchemy.openElementsWindow('<%= list_admin_elements_path(:page_id => @page.id) %>', {
  			texts: {
  				title: '<%= _("Elements") %>',
  				dirtyTitle: '<%= _("Warning!") %>',
  				dirtyMessage: '<%= _("You have unsaved elements. Do you really want to close the elements window?") %>',
  				okLabel: '<%= _("Yes") %>',
  				cancelLabel: '<%= _("No") %>'
  			},
  			toolbarButtons: [
  				{
  					title: '<%= _("New Element") %>',
  					label: '<%= _("New Element") %>',
  					iconClass: 'new_element',
  					onClick: function() {
  						Alchemy.openWindow(
  							'<%= new_admin_element_path(:page_id => @page.id) %>',
  							'<%= _("New Element") %>',
  							'410',
  							'50',
  							false,
  							true,
  							true
  						);
  					}
  				},
  				{
  					title: '<%= _("Clipboard") %>',
  					label: '<%= _("Show clipboard") %>',
  					iconClass: 'clipboard<%= clipboard_empty?("elements") ? "" : " full" %>',
  					buttonId: 'clipboard_button',
  					onClick: function() {
  						Alchemy.openWindow(
  							'<%= admin_clipboard_index_path(:remarkable_type => "element") %>',
  							'<%= _("Clipboard") %>',
  							'380',
  							'270',
  							false,
  							true,
  							true
  						);
  					}
  				}
  			]
  		});
  	}
  	
  	jQuery(document).ready(function() {
  		openElementsWindow();
  		openPreviewWindow();
  	});
  	
  	Alchemy.PageLeaveObserver({
  		title: '<%= _("Warning!") %>',
  		message: '<%=  _("You have unsaved elements on this page. Do you really want to leave this page?") %>',
  		okLabel: '<%= _("Yes") %>',
  		cancelLabel: '<%= _("No") %>'
  	});
  	
  </script>
  <%- end -%>
  