<% @nav_dispaly_home_path_label = 1
   @nav_dispaly_main_course_label = 1
   @nav_dispaly_main_project_label = 1
   @nav_dispaly_main_contest_label = 1 %>
<% @nav_dispaly_forum_label = 1%>
<%= call_hook :view_account_login_top %>

<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);
        }
    }
</script>
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=9">
  <meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
</head>
<div id="login-form">
<%= form_tag(signin_path) do %>
<%= back_url_hidden_field_tag %>
<table>
<tr>
    <td align="right">
      <label for="username">
        <%=l(:lable_user_name)%>:
      </label>
    </td>
    <td align="left">
      <%= text_field_tag 'username', params[:username], :tabindex => '1' , :value => "#{l(:label_login_prompt)}",
                         :onfocus => "clearInfo('username','#{l(:label_login_prompt)}')",
                         :onblur => "showInfo('username','#{l(:label_login_prompt)}')",
                         :style => "resize: none;font-size: 12px;color: #818283;"%>
    </td>
</tr>
<tr>
    <td align="right">
      <label for="password">
        <%=l(:field_password)%>:
      </label>
    </td>
    <td align="left">
      <%= password_field_tag 'password', nil, :tabindex => '2' %>
    </td>
</tr>
<% if Setting.openid? %>
<tr>
  <td align="right">
    <label for="openid_url">
      <%=l(:field_identity_url)%>
    </label>
  </td>
  <td align="left">
    <%= text_field_tag "openid_url", nil, :tabindex => '3' %>
  </td>
</tr>
<% end %>
<tr>
    <td></td>
    <td align="left">
        <% if Setting.autologin? %>
        <label for="autologin">
          <%= check_box_tag 'autologin', 1, false, :tabindex => 4 %>
          <%= l(:label_stay_logged_in) %>
        </label>
        <% end %>
    </td>
</tr>
<tr>
    <td colspan="2" >
    	
       <span style="float: left">
         <% if Setting.lost_password? %>
            <%= link_to l(:label_password_lost), lost_password_path %>
        <% end %></span>
   
    <span style="float: right">
        <input type="submit" class="small" name="login" value="<%=l(:button_login)%> &#187;" tabindex="5"/></span>
    </td>
</tr>
</table>
<% end %>
</div>
<%= call_hook :view_account_login_bottom %>

<% if params[:username].present? %>
<%= javascript_tag "$('#password').focus();" %>
<% else %>
<%= javascript_tag "$('#username').focus();" %>
<% end %>
