$("#error_explanation_for_sale").html("")
<% if @sale.errors.any? %>
	$('#error_explanation_for_sale').removeClass('hidden');
    <% @sale.errors.values.each do |message| %>
        $("#error_explanation_for_sale").append($("<li />").html("<%= message.first.to_s %>"));
    <% end %>
    window.scrollTo(0,0);
<% else %>
  	window.location = "<%= new_sale_path %>";
	$("#notice").html("<%= flash[:notice] %>");
<% end %>
