<!--#include file="../inc/Secure.htm"-->
<!--#include file="../Inc/Conn.htm"-->
<%
ID=trim(request("ID"))
if ID="" then response.end
set rs=server.createobject("adodb.recordset")
sql="select * from tblMailout where id="& ID
rs.open sql,oConn
if not rs.eof then
	ToName=trim(rs("ToName"))
	Subject=trim(rs("subject"))
	body=trim(rs("body"))
	attachFile=trim(rs("Attachfile"))
	copyToName=trim(rs("copyToName"))
end if
%>
<html>
<head>
<title>Folders</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../CSS/main.css">
</head>
<script src="../inc/Popup.js"></script>
<body bgcolor="#FFFFFF">
<form name="MailForm" method="post" action="SaveDraft.htm"><BR>
<table border=0 cellpadding=3 cellspacing=0 bgcolor=#FFFFFF width="100%">
<tr>
	<td align=right>收件人</td><td><input class="input" type="text" name="sendto" size=40 maxlength=50 value="<%=toName%>"></td>
	<td>可直接输入人名，或<a href=# onClick="fPopUpDlg('SelectUsers.htm', document.MailForm.sendto, 'winpop', 250, 250);return false"><u>点此选择>></u></a></td>
</tr>

<tr>
	<td align=right>抄送</td>
	<td><input class="input" type="text" name="copyto" size=40 maxlength=80 value="<%=copytoName%>"></td>
	<td>之间用半角逗号 , 分开</td>
</tr>
<tr>
	<td align=right>主题</td>
	<td><input class="input" type="text" name="Subject" size=40 maxlength=50 value="<%=subject%>"></td>
	<td></td>
</tr>
<tr>
	<td align=right>附件</td>
	<td><input class="input" type="text" name="attachfile" size=40 maxlength=50 readonly value="<%=attachfile%>"></td>
	<td></td>
</tr>


<tr>
	<td colspan=2>
	<INPUT TYPE="submit" name="cmdSend" value="发 送" onclick="return CheckData();" class="boldwhite">
	<INPUT TYPE="submit" name="cmdSave" value="保 存" onclick="return CheckData();" class="boldwhite">
	<INPUT TYPE="button" name="cmdAttach" value="附 件" onclick="OpenWindow1('AddFileForm.htm','filewindow')" class="boldwhite">
	</td>
	<td>
	<INPUT TYPE="button" name="cmdCancel" value="取 消" onclick="javascript:window.location.href='draftbox.htm'" class="boldwhite">
	</td>
</tr>
<tr>
	<td colspan=3>
	<textarea name="body" rows=15 cols=55><%=body%></textarea>
	</td>
</tr>
</table>
<INPUT TYPE="hidden" name="id" value="<%=ID%>">
</form>
</body>

</html>

<script language="JavaScript">
function OpenWindow(url,windowname)
{
window.open(url,windowname,'left=100,top=50,height=350,width=650,toolbar=no,menubar=no,scrollbars=yes')
}
function OpenWindow1(url,windowname)
{
window.open(url,windowname,'left=150,top=100,height=80,width=420,toolbar=no,menubar=no,scrollbars=yes')
}
function CheckData()
{
	if(jtrim(document.MailForm.sendto.value)=="")
	{
		alert("您必须选择收件人。")
		document.MailForm.sendto.focus();
		return false;
	}
			
	return true;
}
</script>
<script language=javascript src="../inc/jtrim.js"></script>
