<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UpPic.aspx.cs" Inherits="Forum.Web.Admin.UpPic" %>

<%@ Register Assembly="Brettle.Web.NeatUpload" Namespace="Brettle.Web.NeatUpload"
    TagPrefix="Upload" %>
<%@ Register assembly="Forum.Control" namespace="Forum.Control" tagprefix="cc1" %>
<html>
<head id="Head1" runat="server">
    <title>上传图片</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <style type="text/css">
        body, td, span, div, input, select, form
        {
            font-size: 12px;
            font-family: "宋体" , "Courier New" , Courier, monospace;
            margin: 0px;
            padding: 0px;
        }
        .input
        {
            border: 1px solid #7E9DB9;
            width: 180px;
            margin-left: 4px;
            height: 18px;
        }
    </style>
    <link href="../../styles/modelpopup.css" rel="stylesheet" type="text/css" />
    <script src="../../js/modalpopup.js" type="text/javascript"></script>
</head>

<script language="JavaScript">
window.isIE = (navigator.appName == "Microsoft Internet Explorer");
if(window.isIE) {
	if(navigator.userAgent.indexOf("Opera")>-1) window.isIE = null;
}
else {
	if(navigator.userAgent.indexOf("Gecko")==-1) window.isIE = null;
}
function $(sID) {
	return document.getElementById(sID);
}
function adjustDialog(){
	var w = $("tabDialogSize").offsetWidth + 6;
	var h = $("tabDialogSize").offsetHeight + 25;
	window.dialogLeft = (screen.availWidth - w) / 2;
	window.dialogTop = (screen.availHeight - h) / 2;
}
window.onload = init;
function init() {
	adjustDialog();
}
</script>

<body>

    <form id="form1" runat="server">
<cc1:Hint ID="Hint1" runat="server" HintImageUrl="../../" />

    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" id="tabDialogSize_0" style="display:none;">
    <tr>
    <td align="center">
    <Upload:ProgressBar ID="ProgressBar1" runat="server" Inline="true" Width="300px" Height="40px" />
    </td>
    </tr>
    </table>
    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" id="tabDialogSize">
        <tr>
            <td height="24" bgcolor="#DDE7EE" style="padding-left: 10px;">
                上传图片
            </td>
        </tr>
        <tr>
            <td align="center">
                <table border="0" cellpadding="0" cellspacing="0" >
                    <tr>
                        <td width="70" height="28" align="right" valign="bottom">
                            选择图片:
                        </td>
                        <td valign="bottom">
                            <Upload:InputFile ID="InputFile1" CssClass="input" runat="server" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td height="40" align="center" style="padding-bottom: 10px;">
                <a href="#" onclick="chk_link()">
                    <img border="0" src="../images/dilog_bt_ok.gif" alt="确定" style="margin-right: 10px;" /></a><a
                        href="#" onclick="showclose();"><img border="0" src="../images/dilog_bt_cancel.gif"
                            alt="取消" /></a>
            </td>
        </tr>
        <tr>
            <td bgcolor="#DDE7EE" height="5">
    <span style="display: none;">
        <script type="text/javascript">
function cl(img_) {

    parent.cl(img_);
    
//    window.returnValue = img_;
//    //window.close();
//    top.close();
}
function showclose() {
    parent.showclose();
}

function chk_link() {
    if ($("InputFile1").value.length < 7) {
        alert("请选择您要上传的文件");
        return;
    }
    $("tabDialogSize").style.display = "none";
    $("tabDialogSize_0").style.display = "";
    $("Button1").click();
}
        </script>
        <asp:Label ID="Label1" runat="server"></asp:Label>
        <asp:Button ID="Button1" runat="server" Text="上  传" OnClick="Button1_Click" />
    </span></td>
        </tr>
    </table>
    </form>
</body>
</html>
