<!-- fq -->
<script type="text/javascript" language="javascript">
	function clearInfo(id, content) {
		var text = $('#' + id);
		if (text.val() == content) {
			$('#' + id).val('');
		}
	}

	function showInfo(id, content) {
		var text = $('#' + id);
		if (text.val() == '') {
			$('#' + id).val(content);
		}
	}
    function submit1(button)
    {
        $('#jours_submit').parent().submit();
    }
</script>

<%= form_for('bid_message', :id=>"bid_message_form",:remote => true, :method => :post,
:url => {:controller => 'bids',
:action => 'create',
:id => bid,
:sta => sta})  do |f|%>

<div id = 'pre_show'>
	<%= render :partial => 'pre_show', :locals => {:content => @content} %>
</div>

<% if User.current.logged? %>
<table border="0" width="525px" align="center" >
	<tr>
		<% if @bid.reward_type ==3 %>
		<td><%= f.text_area 'message', :rows => 3, :cols => 65, :placeholder => l(:label_max_length), :style => "resize: none;", :class => 'noline'%></td>
	    <% else %>
	    <td><%= f.text_area 'message', :rows => 3, :cols => 65, :placeholder => l(:label_max_length), :style => "resize: none;", :class => 'noline'%></td>
	    <% end %>
	</tr>
  <tr>
    <td><%= f.text_field :reference_user_id, :style=>"display:none"%>
      <a href="javascript:void(0);" class="ping_sub" onclick = "clearMessage('bid_message_message');"><%= l(:button_clear_meassge) %></a>
      <a href="javascript:" class="ping_sub" id="jours_submit" onclick="submit1();"><%= l(:label_responses) %></a></td>
  </tr>
</table>

<!-- modified by bai 525px -->


<!-- end -->

<% else %>
<div style="font-size: 14px;margin:10px;">
	<%= l(:label_user_login_tips) %>
	<%= link_to l(:label_user_login_new), signin_path %>
</div>
<% end %>
<% end %>
