<%@ page language="C#" autoeventwireup="true" inherits="HL_Admin_Admin_attachment, WebApp_deploy" %>

<!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 runat="server">
    <title>上传</title>
    <style type="text/css">
    body{font-size:12px;}
    </style>
    <script type="text/javascript">
var imageObject;
function ResizeImage(obj, MaxW, MaxH)
{
    if (obj != null) imageObject = obj;
    var state=imageObject.readyState;
	if(state!='complete') {
        setTimeout("ResizeImage(null,"+MaxW+","+MaxH+")",50);
		return;
    }
    var oldImage = new Image();
    oldImage.src = imageObject.src;
    var dW=oldImage.width; var dH=oldImage.height;
    if(dW>MaxW || dH>MaxH) {
        a=dW/MaxW; b=dH/MaxH;
        if(b>a) a=b;
        dW=dW/a; dH=dH/a;
    }
    if(dW > 0 && dH > 0) {
        imageObject.width=dW;
		imageObject.height=dH;
	}
}
</script>
</head>
<body bgcolor="#F0F0F0" style="PADDING: 0px; MARGIN: 0px;">
    <form id="form1" runat="server">
    <asp:Panel ID="upload_photo_panel" runat="server">
    <table width="100%">
       <tr>
          <td align="left"><asp:FileUpload id="uploadPhoto" runat="server" Width="294px"></asp:FileUpload><asp:Button id="ButUpLoadimage" onclick="ButUpLoadimage_Click" runat="server" Text="上传" CausesValidation="False"></asp:Button></td>
          <td>
             <div id="previewImage" style="border:solid 1px white; height:112px; width:92px; ">
                 <asp:Image ID="imgPreview" alt="缩微图"  Width="90px" Height="110px" 
                     runat="server" ImageUrl="~/Skin/CommStyle/images/noneimg.jpg" />
             </div>
          </td>
       </tr>
    </table>
       
      
    </asp:Panel>
    </form>
</body>
</html>
