<html>
	<head>
		<script type="text/javascript" language="javascript" src="templates/<%=CurrentTemplateName%>/scripts/common.js"></script>
		<link href="<%=CurrentSkinPath%>style.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" language="javascript" src="templates/scripts/dvajax.js"></script>
		<script type="text/javascript" language="javascript" src="templates/<%=Dvbbs.Utils.TemplateInfo.CurrentTemplateName%>/scripts/message_send.js"></script>
		<script type="text/javascript" language="javascript">
		function chkPost(form)
		{
			var ajax = new DvAjax();
			ajax.SubmitForm(form, function (xmlHttp) {
				var resp_text = xmlHttp.responseText;
				if ('0' === resp_text)
				{
					alert('恭喜您,留言成功!');
					window.parent.TB_remove();
					window.parent.location.reload();
				}
				else if('1'===resp_text)
				{
					alert('恭喜您,回复成功!');
					window.parent.TB_remove();
					window.parent.location.reload();
				}
				else if('2'===resp_text)
				{
					alert('恭喜您,删除成功!');
					window.parent.TB_remove();
					window.parent.location.reload();
				}
				else
				{
					alert('操作失败,错误信息:' + resp_text);
				}
			});
			return false;
		}
		function changbtn()
		{
			var o = document.getElementById("Del");
			if(o.checked==true)
			{
				document.getElementById('msg').value="删除留言";
				document.getElementById('content').disabled=true;
				document.getElementById('verification').disabled=true;	
			}

		}
		function changbtn1(o)
		{
			document.getElementById('msg').value="提交理由";
			document.getElementById('content').disabled=false;
			document.getElementById('verification').disabled=false;
		}
	
function showVerify(obj)
{
	var l = getOffsetLeft(obj);
	var t = getOffsetTop(obj) - 70;	
	$("verifyCode").innerHTML= "<img src='<%=Fetch.ValidateCodeFileName%>?time="+ new Date()+"' alt='看不清图片请点空白处' border='1' style='cursor:hand; margin-top:-1px'>";
	$("verifyCode").style.left = l + "px";
	$("verifyCode").style.top = t + "px";
	$("verifyCode").style.display = 'block';
}
function hiddenVerify()
{	
	$("verifyCode").innerHTML="";
}
		</script>
	</head>
	<body MS_POSITIONING="GridLayout">
		<form name="PostMessage" method="post" action="usermsg_manage.aspx?oweruserid=<%=Get("oweruserid")%>&id=<%=Get("id")%>&Manage=<%=Manage%>" id="PostMessage" onsubmit="chkPost(this);return false;">
			<input name="userName" id="userName" type="hidden" value="<%=base.user.Name%>" />
			<input name="userId" id="userId" type="hidden" value="<%=base.user.UserID%>" />
			<table ID="MsgData" class="tablebox " style="font-size:12px;" width="100%" cellspacing="0"
				cellpadding="0" border="0">
				<!--{if(Get("option")=="delmsg")}-->
				<tr>
					<td>
						&nbsp;&nbsp;模式
					</td>
					<td>
						<input type="radio" name="Del" value="0" onclick="changbtn()" class="checkbox" ID="Radio2">删除信息&nbsp;&nbsp;
						<input type="radio" name="Del" value="1" onclick="changbtn1(this)" class="checkbox" checked
							ID="Radio3">屏蔽信息&nbsp;&nbsp;
					</td>
				</tr>
				<!--{endif}-->
				<tr>
					<td valign='top' width="20%">&nbsp;&nbsp;<!--{if(Get("option")=="delmsg")}-->删除理由<!--{else}-->留言内容<!--{endif}--><br />
						&nbsp;&nbsp;1000字以内</td>
					<td><textarea name="content" id="content" onmouseover="this.className='TextBoxFocus'" onmouseout="this.className='TextBox'"
							style="width:99%" rows="8"></textarea></td>
				</tr>
				<!--{if(isCheckVerifyCode)}-->
				<tr>
					<td>&nbsp;&nbsp;验证码</td>
					<td><input type='text' name='verification' autocomplete="Off" maxlength='6' size="10" ID="verification"
							autocomplete="Off" onFocus="IEvent('focus',this);showVerify(this);" onBlur="IEvent('blur',this);hiddenVerify();"
							onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" />
						<div id="verifyCode" name="verifyCode" style="position:absolute;display:none;"></div>
					</td>
				</tr>
				<!--{endif}-->
				<tr>
					<td colspan="2" align="center">
						<br />
						<!--{if(Get("option")=="Add")}-->
						<input type='submit' id="msg" class="button_off" onmouseover="this.className='button_on'"
							onmouseout="this.className='button_off'" value='我要留言' /> 
						<!--{else if(Get("option")=="remsg")}-->
						<input type='submit' id="msg" class="button_off" onmouseover="this.className='button_on'"
							onmouseout="this.className='button_off'" value='回复留言' /> 
						<!--{else}-->
						<input type='submit' id="msg" class="button_off" onmouseover="this.className='button_on'"
							onmouseout="this.className='button_off'" value='屏 蔽' NAME="Submit1" /> 
						<!--{endif}-->
						&nbsp; <input type='reset' class="button_off" onmouseover="this.className='button_on'" onmouseout="this.className='button_off'"
							value='取 消' onclick="window.parent.TB_remove()" />
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>
