<html>
<head>
<meta http-equiv=content-language content=zh-cn>
<meta http-equiv=content-type content="text/html; charset=gb2312">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
<style>
td { padding:2px 5px 2px 5px;}
table {margin-bottom:4px;}
</style>
<link href="../CSS/Base.css" rel=stylesheet>
<LINK href="../CSS/Window.css" type=text/css rel=stylesheet>
<script type="text/javascript" src="../JS/Common.js.php"></script>
<script type="text/javascript" src="../JS/Window.js.php"></script>
<script type="text/javascript" src="../JS/Jquery.min.js.php"></script>
<script type="text/javascript" src="../JS/Jquery.notification.js.php"></script>
<link type="text/css" rel="stylesheet" href="../CSS/Notification.css" />
<script language=javascript src="../JS/CheckQuestion.js.php"></script>
<script language="javascript"> 
function Check_Form_Validator()
{
	if(!CheckNotNull(Check_Form.startGrade, "评分规则开始分值")) {return false;}
	if(!CheckNoFloat(Check_Form.startGrade,'评分规则开始分值')){return false;} 
	if(!CheckNotNull(Check_Form.endGrade, "评分规则结束分值")) {return false;}
	if(!CheckNoFloat(Check_Form.endGrade,'评分规则结束分值')){return false;} 
	if (Number( Check_Form.endGrade.value ) <= Number(Check_Form.startGrade.value) )
	{
		Check_Form.endGrade.focus();
		$.notification('结束分值必须大于开始分值');
		return false;
	}
	if(!CheckNotNull(Check_Form.conclusion, "评分规则的结论")) {return false;}
}
//检查浮点数
function CheckNoFloat(objField, strText) {
    var objValue = objField.value;
    if (objValue=="") return true;
	var strErr = "“" + strText + "”不是正确的数据格式！";
	var reg=/^-?\d+\.?\d*$/;
	if (!reg.test(objValue)) {
        objField.focus();
		$.notification(strErr);
		return false;
	}
	return true;
}
function refreshWindow() {
   //self.location.replace(self.location.href);
   self.location.href = '{thisURL}';
}
</script> 
<META content="MSHTML 6.00.3790.0" name=GENERATOR></HEAD>
<body oncontextmenu="return false">

<table style="LINE-HEIGHT: 150%;border-collapse:collapse;" cellSpacing=0 cellPadding=0 width="100%" borderColor=#b5cfd9 border=1>
   <div class=position>位置：&nbsp; 我的问卷 &raquo; 设置量表评分规则</div>
   <tr><td bgcolor="#e9e9e9" colspan=3><b>设置量表评分规则</b></td></tr>
   <tr><td width=25% align=center noWrap><b>规则</b></td>
	   <td width=63% align=center noWrap><b>结论</b></td>
	   <td width=12% noWrap align=center><b>操 作</b> </td>
   </tr>
  <!-- BEGIN RULE -->
  <tr onmouseover="this.style.backgroundColor='#DEEFFF'"  onmouseout="this.style.backgroundColor='#ffffff'"> 
	  <td>&nbsp;{ruleText}</td>
	  <td>{conclusion}</td>
	  <td align=center>
		   <a href="javascript:void(0);" onclick="javascript:showPopWin('{editURL}', 660, 250, refreshWindow, null,'修改量表评分规则');">修改</A>&nbsp;
		   <a href="{deleteURL}" onclick="return window.confirm('您真的想删除该条评分规则吗？本操作不可恢复！')">删除</A>
	  </td>
  </tr>
 <!-- END RULE -->
 </table>
  <form name="Check_Form" method="post" action="" onsubmit="return Check_Form_Validator()">
  <table style="LINE-HEIGHT: 150%;border-collapse:collapse;" cellSpacing=0 cellPadding=0 width="100%" borderColor=#b5cfd9 border=1>
   <tr><td bgcolor="#e9e9e9"><b>新增评分规则</b></td></tr>
	   <tr><td>&nbsp;&nbsp;当量表计算得分&nbsp;&nbsp;
		 <select id='startOperator' name='startOperator'>
		   <option value='>='>大于等于</option>
		   <option value='>'>大于</option>
		 </select>
		 <input name='startGrade' id='startGrade' size=8>
		 &nbsp;&nbsp;同时&nbsp;&nbsp;
		 <select id='endOperator' name='endOperator'>
		   <option value='<'>小于</option>
		   <option value='<='>小于等于</option>
		 </select>
		 <input name='endGrade' id='endGrade' size=8><br/>
		 &nbsp;&nbsp;则结论为：<br/>
   		 &nbsp;&nbsp;<textarea name='conclusion' id='conclusion' rows=5 cols=97></textarea>
	</table><table width=100%><tr><td>
	     &nbsp;<input name="surveyID" type="hidden" id="surveyID" value="{surveyID}"> 
    	 <input name="Action" type="hidden" id="Action" value="AddGradeRule"> 
         <input class=inputsubmit type="submit" name="submit" value="确定"> 
	     <input class=inputsubmit type="button" name="close" value="关闭" onClick="javascript:parent.hidePopWin();">
      </td></tr></table>
  </form>
</body></html>