<%@ page language="C#" autoeventwireup="true" inherits="Edit_editor_resurm_upfile, zhifakaohe_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, td, span, div, input {
				font-size: 12px;
				font-family: "宋体", "Courier New", Courier, monospace;
				margin: 0px;
			}
		.style1
        {
            height: 30px;
        }
		</style>
		<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();
			$("imgpath").select();
		}
		function chk_imgpath () {
		    var editor = window.dialogArguments.EDiaryEditor;
		    if (editor == null) {
		        editor = window.opener;
		    }
			var oRTE = editor.iframe.contentWindow;
			if($("imgpath").value == "http://" || $("imgpath").value == "") {
				window.close();
				return;
			}
			var html = "<img src='" + $("imgpath").value + "'>";
			if(window.isIE) {
				try{
					oRTE.focus();
					var oRng = oRTE.document.selection.createRange();
					oRng.pasteHTML(html);
					oRng.collapse(false);
					oRng.select();
				}
				catch(e){}
			}
			else {
				editor.runCMD('insertHTML', html);
			}
			window.close();
		}
		document.onkeydown = function (el) {
			var event = window.event || el;
			if(event.keyCode == 13) {
				chk_imgpath();
			}
		}

	//-->
        </script>
        <base target="_self">
</head>
<body runat="server">
    <form id="form1" runat="server">
    <div>
    
        <table id="tabDialogSize" border="0" cellpadding="0" cellspacing="0" 
            height="100%" width="100%">
            <tr>
                <td bgcolor="#DDE7EE" height="24" style="padding-left: 10px;">
                    插入图片</td>
            </tr>
            <tr>
                <td height="50">
                    &nbsp;图片地址:
                    <input id="imgpath" name="imgpath" runat="server" 
                        style="border: 1px solid #cccccc; width: 235px;" type="text" value="http://" /></td>
            </tr>
            <tr>
                <td id="upid" align="left" width="400" class="style1">
                    &nbsp;上传图片:
                    <asp:FileUpload ID="FileUpload1" runat="server" />
                    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
                        Text="上 传" />
                </td>
            </tr>
            <tr>
                <td style="padding: 10px;">
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="center" height="40" style="padding-bottom: 10px;">
                    <img alt="确定" border="0" runat="server" src="../images/dilog_bt_ok.gif" 
                        style="margin-right: 10px;" onclick="chk_imgpath()"/><a href="#" onclick="window.close();"><img 
                        alt="取消" border="0" src="../images/dilog_bt_cancel.gif" /></a></td>
            </tr>
            <tr>
                <td bgcolor="#DDE7EE" height="5">
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
