<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="Book.Register" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title></title>
    <link href="style/style.css" type=text/css rel=stylesheet>
<style>
.tdwkey{ width:120px; text-align:right;background-color: #F1F6FB;}
.tdwvalue{ width:120px; text-align:left;background-color: #ffffff;}
.reg{  margin:0 auto; width:900px; font-family:Verdana; font-size:12px }
.reg input{ height:14px}
.red{ color:Red; display:none}
</style>
</head>
<body style=" margin:0 auto; ">
    <form id="form1" runat="server">
   <div>
    
    
 
    
    
    <div  class="reg" >
       
    </div>
 
      <table border="0" cellSpacing="1"  cellPadding="8"  class="reg table"      >
        <tbody>
           
         
        <tr>     
          <td class="tdwkey">用户名</td>
          <td  class="tdwvalue"> 
             <asp:TextBox   ID="username"   runat="server"></asp:TextBox><span class=red>*</span>  
            <asp:RequiredFieldValidator ControlToValidate="username" ID="RequiredFieldValidator2" runat="server" ErrorMessage="用户名不能够为空" Display="Dynamic"></asp:RequiredFieldValidator>
        </td>
           
        <td class="tdwkey">密码</td>
        <td class="tdwvalue"> 
             <asp:TextBox ID="password"     runat="server" TextMode="Password"></asp:TextBox><span class=red>*</span>  
             <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="密码不能够为空" ControlToValidate="password" Display="Dynamic"></asp:RequiredFieldValidator>
         </td>
         
        <td class="tdwkey">确认密码</td>
          <td class="tdwvalue"> 
               <asp:TextBox ID="confirmpassword"    TextMode="Password"   runat="server"></asp:TextBox><span class=red>*</span> 
                          <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="确认密码不能够为空" ControlToValidate="confirmpassword" Display="Dynamic"></asp:RequiredFieldValidator>
                      <asp:CompareValidator ID="cv_confirmpassword" runat="server" ControlToCompare="password"
        ControlToValidate="confirmpassword"  Display="dynamic" ErrorMessage="两次密码输入不一致"></asp:CompareValidator> 
        
        </td>
           
           </tr>
           
           <tr>
           
     <td class="tdwkey">邮件</TD>
         <td class="tdwvalue"> 
                <asp:TextBox ID="email"      runat="server"></asp:TextBox><span class=red>*</span>  
      <asp:RequiredFieldValidator ControlToValidate="email" ID="RequiredFieldValidator1" runat="server" ErrorMessage="邮件不能够为空" Display="Dynamic"></asp:RequiredFieldValidator>
                  
 <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="邮件格式不正确"
        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"　 Display="Dynamic"
         ControlToValidate="email"></asp:RegularExpressionValidator> 

  </td>
          
          
          
          
          
            <td class="tdwkey">部门</td>
           <td class="tdwvalue"> 
               <asp:TextBox ID="txt_department"  onclick="showMenu()" runat="server"></asp:TextBox>
            </td>  
          
            <td class="tdwkey">显示名</td>
            <td class="tdwvalue"> 
              <asp:TextBox ID="txt_displayname" runat="server"></asp:TextBox>
             </td>
           </tr>
          
          
      
          
  <tr>    
      <td class="tdwkey">电话</TD>
      <td class="tdwvalue">  
              <asp:TextBox ID="tel"  runat="server"></asp:TextBox>  
      </td>
         
                
       <td class="tdwkey">传真</td>
        <td class="tdwvalue"> 
          <asp:TextBox ID="fax"  runat="server"></asp:TextBox>  
       </td>
            
     
             <td class="tdwkey">办公室</TD>
             <td class="tdwvalue">
             <asp:TextBox ID="office"   runat="server"></asp:TextBox> 
            </td>
       </tr>
          
          
          <tr>
          
          <td class="tdwkey">职务</TD>
          <td class="tdwvalue">  
              <asp:TextBox ID="txt_title"  runat="server"></asp:TextBox>   
           </td>
           
           
           
            
          <td class="tdwkey">员工号</TD>
      <td class="tdwvalue">  
              <asp:TextBox ID="txt_staffcode"  runat="server"></asp:TextBox>   
           </td>
           
           
                
         <td class="tdwkey"  ></td>
        <td class="tdwvalue" >  
         <div style=" display:none">
       <asp:textbox id="image_small"   Runat="server"></asp:textbox>
        	 <asp:textbox id="image_big"   Runat="server" Visible="false"></asp:textbox>
        	
        		<a href="#" onclick="window.open('Upload.aspx'); return false;"></a>
        		<a href="#" onclick="ope(); return false;"></a>

                </div>

           </td>
          </tr>
          <script>

              function ope() {
                  var p = document.getElementById('<%=image_small.ClientID %>').value;
                  window.open(p);
              }
          
          </script>
          
          
          
          
          
          
          
          
          
           <tr>
          
          <td class="tdwkey">性别</TD>
          <td class="tdwvalue" colspan="10">  
              <asp:DropDownList ID="ddl_sex" runat="server">
              <asp:ListItem Text="" Value=""></asp:ListItem>
              <asp:ListItem Text="男" Value="男"></asp:ListItem>
              <asp:ListItem Text="女" Value="女"></asp:ListItem>
              </asp:DropDownList> 
           </td>
          </tr>
          
          
          
          
          
          
          
          
          
          
          
          
          
           <tr class="tdwvalue">
          <td colspan="6" style=" padding-left:80px;">
          自我简介<br />
           
              <asp:TextBox ID="txt_intro" Width="600" Height=60 TextMode=MultiLine  runat="server"></asp:TextBox>
         
          </td>
          </tr>   
          
          
          
         <tr class="tdwvalue">
          <td colspan="6" align="center">
              
               
              <br />
              <asp:Button ID="submit" runat="server" OnClick="submit_Click"   style=" height:22px; width:100px"   class="btn" Text="注册" />
             &nbsp;   &nbsp;
               <a href="login.aspx">登陆</a> &nbsp;   &nbsp; <a href="getpassword.aspx">获取密码</a> 
                                                <br />
              <br />
              <br />
          </td></tr>
          
          
        
 
</tbody>
</table>
        
        
    </div>



























    
 <!-- popup -->
 
 <style>
 
 .menuItem{ background-color:#ffffff; cursor:pointer}
 .highlightItem{ background-color:#888888; cursor:pointer}
 </style>

<div id="menu1" 
onclick="clickMenu()" 
onmouseover="toggleMenu()" 
onmouseout="toggleMenu()"    
 
style=" position:absolute;display:none; 
    overflow:scroll;  
     width:200px; height:200px;  font-size:12px;
     background-Color:#f6f6f6;
     border:solid 1px #6593cf; 
     z-index:200; 
     margin:5px; 
     padding:5px; 
     line-height:20px"
   >
  
  
  
   <asp:Literal runat="server" ID="lt_dept"></asp:Literal> 
   
 
  
  
  </div>

<script>



    function showMenu() {
        whichDiv = event.srcElement;
        menu1.style.posLeft = event.clientX + document.body.scrollLeft;
        menu1.style.posTop = event.clientY + document.body.scrollTop;
        menu1.style.display = "";

    }

    function toggleMenu() {
        el = event.srcElement;
        if (el.className == "menuItem") {
            el.className = "highlightItem";
        } else if (el.className == "highlightItem") {
            el.className = "menuItem";
        }
    }

    function clickMenu() {

        menu1.style.display = "none";
        el = event.srcElement;
        if (el.id != "") {
            document.getElementById('<%=txt_department.ClientID %>').value = document.getElementById(el.id).innerHTML;
        }

    }


 
   
</script>
 
 
<!-- /popup -->
    </form>
</body>
</html>