<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Admin_GmLstHotThumb.aspx.cs" Inherits="TW.UI.Admin.Admin_GmLstHotThumb" %>
<!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>
    <title></title>
<link href="css/default.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../js/jquery-1.10.2.min.js"></script>
    <script src="/js/public.js" type="text/javascript"></script>
    <script src="/js/artDialog/artDialog.js?skin=default" type="text/javascript"></script>
    <script src="/js/artDialog/plugins/iframeTools.js" type="text/javascript"></script>
    <script type="text/javascript">
        var id=<%=id %>;
        var idx=<%=idx %>;
        $(function () {
            var hidThumb = $("#hidThumb").val();
            if (hidThumb != "") {
                UpReturn(hidThumb, "hidThumb");
            }
        });
        function subthumb() {
            var thumb = $("#hidThumb").val();
            if (thumb == "") {
                alert("请上传图片");
                return false;
            }
            if ($("#thumb" + id + " img",window.parent.document).length>0) {
                var orgthumb = $("#thumb" + id + " img",window.parent.document).attr("src");
                var orgthumbval = $("#thumb" + id + " input[type='hidden']",window.parent.document).val();
                $("#thumb" + id + " img",window.parent.document).attr("src",orgthumb.replace(orgthumbval,thumb));
            }
            if (idx>0 && "<%=act %>"=="pplgmpic") {
                $("#thumb"+ id + "[idx='" +idx+"'] input[type='hidden']",window.parent.document).val(thumb);
            }else{
                $("#thumb" + id + " input[type='hidden']",window.parent.document).val(thumb);
            }
            art.dialog.close();
        }
    </script>
</head>
<body style="width:400px;height:300px;">
    <form id="form1" runat="server">
<div class="select clearfix">
    <div>
    </div>
    
    <table class="table2">
        <tr>
		<th>代表图：</th>
        <td>
            建议尺寸：像素 长x宽=120x40<br />
            <asp:HiddenField ID="hidThumb" runat="server" />
			<iframe src="../inc/upload.aspx?dir=image&input=hidThumb" id="Iframe1" 
            width="200" height="25" scrolling="no" frameborder="0" allowtransparency="true"></iframe>
			<span id="hidThumb_Preview"></span>
        </td>
        </tr>

        <tr>
            <th></th>
            <td class="abtn">
                <%--<asp:Button ID="btnAdd" runat="server" Text="提交" onclick="btnAdd_Click" />--%>
                <input value="提交" type="button" onclick="subthumb();" id="btnsub" />
            </td>
        </tr>
    </table>
</div>
    </form>
</body>
</html>
