<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>{$mailmessage}</title>
<script language="javascript">

	function validEmail(emailV) {
	if (emailV.length < 6) return false;
   	if (emailV.indexOf("@") < 1) return false;
   	if (emailV.indexOf("@") > (emailV.length-4)) return false;
	for (var i=0; i < emailV.length; i++) {
		var tempV = emailV.substring(i, i+1)
		if (tempV == " " || tempV == "'" || tempV == '"' || tempV == ";" || tempV == "`" || tempV == "<" || tempV == ">") { 
			return false;
		}
	}
	return true;
}

function check()
{
   if (validEmail(myform.fromemail.value)==false) {
		alert('请输入有效的发件人邮件地址!');
		myform.fromemail.focus();
		return false;
   }
   if (validEmail(myform.toemail.value)==false)
   {
   		alert("请输入有效的收件人邮件地址!");
		myform.toemail.focus();
		return false ;
   }
   if (myform.subject.value == "")
   {
   		alert("请输入邮件主题!");
		myform.subject.focus();
		return false ;
   }
   if (myform.content.value == "")
   {
   		alert("请输入邮件内容!");
		myform.content.focus();
		return false ;
   }
   return true;     
 }
</script>
<style>
BODY {
	BACKGROUND-POSITION: center 50%; SCROLLBAR-FACE-COLOR: #f2f5f7; FONT-SIZE: 12px; BACKGROUND-IMAGE: url(bg2.gif); MARGIN: 0px; SCROLLBAR-HIGHLIGHT-COLOR: #b2c3d0; SCROLLBAR-SHADOW-COLOR: #b2c3d0; SCROLLBAR-3DLIGHT-COLOR: #ffffff; SCROLLBAR-ARROW-COLOR: #97aaba; SCROLLBAR-TRACK-COLOR: #ffffff; FONT-FAMILY: tahoma, verdana; SCROLLBAR-DARKSHADOW-COLOR: #ffffff
}
TD {
	TABLE-LAYOUT: fixed; FONT-SIZE: 12px; WORD-BREAK: break-all; LINE-HEIGHT: 18px; FONT-FAMILY: 宋体
}
TABLE {
	FONT-SIZE: 12px; LINE-HEIGHT: 20px
}

</style>
</head>
<body>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="5" class="white">
  <tr>
    <td bgcolor="#FFFFFF">
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
      <form name="myform" method="post" action="sendmail.php?id={$id}&type={$type}" onsubmit="javascript:return check();">
        <tr  bgcolor="#f9f9f9">
          <td width="114" height="25" align="center">发件人</td>
          <td><input name="fromemail" type="text" id="fromemail" size="30" value="{$fromemail}"></td>
        </tr>
        <tr  bgcolor="#f9f9f9">
          <td height="25" align="center">收件人</td>
          <td><input name="toemail" type="text" id="toemail" size="30" value="{$toemail}"> <font color=red>多个收件人,用半角','分开</font></td>
        </tr>
        <tr  bgcolor="#f9f9f9">
          <td height="25" align="center">主　题</td>
          <td ><input name="subject" type="text" id="subject" size="50" value="{$subject}"></td>
        </tr>
        <tr  bgcolor="#f9f9f9"{if $content} style="display:none"{/if}>
          <td align="center">邮件内容</td>
          <td><textarea name="content" cols="70" rows="20">{$content}</textarea></td>
        </tr>
        <tr  bgcolor="#f9f9f9">
          <td align="center" height="35">&nbsp;</td>
          <td><input name="submit" type="submit" class="button" value=" 确定 ">
            <input name="reset" type="reset" class="button" value=" 重置 "> </td>
        </tr>
      </form>
    </table></td>
  </tr>
</table>
</body>
</html>
