<% if not request.xhr? %>
<table class="ajax-scaffold" cellpadding="0" cellspacing="0">
  <tbody>
<% end %>
<tr id="create-tag-<%= @temp_id %>" class="create" <%= "style=\"display: none;\"" if request.xhr? %>>
  <td colspan="<%= num_columns %>">
    <%= form_remote_tag :url => { :controller => 'Tags', :action => 'create' }, 
    			:loading => "AjaxScaffold.createOnLoading(request,'tag',#{@temp_id});",
    			:success => "AjaxScaffold.createOnSuccess(request,'tag',#{@temp_id});",
    			:failure => "AjaxScaffold.createOnFailure(request,'tag',#{@temp_id});",
    			:html => { :action => url_for(:controller => 'Tags', :action => 'create'),
                     :id => "create-tag-#{@temp_id}-form" } %>
      
    
      <% # Its actually okay to leave both of these elements (ex: form_errors will only generate HTML when in fallback mode) %>
      <% if request.xhr? %>
        <div id="<%= "create-tag-#{@temp_id}-errors" %>" style="display: none;" ></div>
      <% else %>
        <%= render :partial => 'form_errors' %>
      <% end %>
      
      <div class="red">New Page</div>
        	
      <div class="articles">
  	
      <%= render :partial => 'form' %>
      
      <p>
      	<%= submit_tag "Create", :class => "submit" %>
      	<%= link_to_function "Cancel", "AjaxScaffold.createOnCancel('tag',#{@temp_id});",
	                      :href => url_for(:controller => 'Tags', :action => 'return_to_main') %>
      	<%= loading_indicator_tag 'tag', "create-#{@temp_id}" %>
    	</p>
    <%= end_form_tag %>
    </div>
  </td>
</tr>
