{template "phpcms","header"}
<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.mail_to.value)==false)
   {
   		alert("请输入有效的收件人邮件地址!");
		myform.mail_to.focus();
		return false ;
   }
   if (myform.subject.value == "")
   {
   		alert("请输入邮件主题!");
		myform.subject.focus();
		return false ;
   }
   return true;     
 }
</script>
<table cellspacing="0" cellpadding="0" width="980">
  <tr>
    <td valign="top" class="left">
    {template "member","left"}
    </td>
    <td width="10" valign="top"></td>
    <td class="right" valign="top">
      <div class="memberborder_1">
      <div class="memberborder_2">
        <h1>{$mailmessage}</h1>
      <form name="myform" method="post" action="{$MOD[linkurl]}sendmail.php" onSubmit="javascript:return check();">
	  <table cellpadding="2" cellspacing="1" class="righttable">
        <tr>
          <td width="22%" height="25" class="td_right">收件人Email：</td>
          <td class="td_left"><input name="mailto" type="text" id="mail_to" size="30" value="{$mailto}">
          <font color="red">*</font></td>
        </tr>
        <tr>
          <td class="td_right">邮件主题：</td>
          <td class="td_left"><input name="title" type="text" id="title" size="50" value="{$title}"><font color="red">*</font></td>
        </tr>
        <tr>
          <td class="td_right">邮件内容：</td>
          <td class="td_left">
        <textarea name="content" rows="10" cols="50">{$content}</textarea>{$editor("content","phpcms",550,350)}<font color="red">*</font>
          </td>
        </tr>
		<!--{if $MOD["ischeckcode"] }-->
		<tr>
          <td class="td_right">验证码：</td>
          <td class="td_left"><input name="checkcodestr" type="text" id="checkcodestr" size="6" value="">
		  <img src="{PHPCMS_PATH}checkcode.php"  onclick="this.src='{PHPCMS_PATH}checkcode.php?id='+Math.random()*5;" style="cursor:pointer;" alt="验证码,看不清楚?请点击刷新验证码" />
          <font color="red">*</font></td>
        </tr>
		<!--{/if}-->
        <tr>
          <td height="35" class="td_right">&nbsp;</td>
          <td class="td_left"><input name="dosubmit" type="submit" class="button" value=" 发送 ">
            <input name="Reset" type="reset" class="button" value=" 重置 "> </td>
        </tr>		
</table></form>

</div></div>
    </td>
  </tr>		
</table>
{template "phpcms","footer"}