<html>
<head>
<meta http-equiv=content-language content=zh-cn>
<meta http-equiv=content-type content="text/html; charset=gb2312">
<style>
  td { padding:2px 5px 2px 5px;}
</style>
<link href="../CSS/Base.css" rel=stylesheet>
<script language=javascript src="../JS/Textarea.js.php"></script>
<script type="text/javascript" src="../JS/TableRows.js.php"></script>
<script language=javascript src="../JS/HighLight.js.php"></script>
<script language=javascript src="../JS/CheckQuestion.js.php"></script>
<script language=javascript>
function Check_Form_Validator()
{
	if (!CheckNotNull(Check_Form.questionName, "评价指标名称")) {return false;}
	if (!CheckSpecicalChar(Check_Form.questionName, "评价指标名称")) {return false;}
	var theLength = document.getElementById('theOptionTable').rows.length;
	var theIndexsNameNum = 0;
	for( k=0;k<theLength;k++)
	{
		var u = k+1;
		var theIndexsName = eval("document.getElementById(\"indexsName_" + u + "\")");
		if( theIndexsName != null && Trim(theIndexsName.value) != '' )
		{
		   theIndexsNameNum++;
		}
	}
	if( theIndexsNameNum == 0 )
	{
		alert("必须有一个指标所属评价问题");
		document.getElementById("indexsName_1").focus();
		return false;
	}

	var theLength = document.getElementById('theAnswerTable').rows.length;
	var theAnswerNum = 0;
	for( k=0;k<theLength;k++)
	{
		var u = k+1;
		var theAnswersName = eval("document.getElementById(\"answersName_" + u + "\")");
		var theWeight = eval("document.getElementById(\"weight_" + u + "\")");
  	    if( theAnswersName != null && Trim(theAnswersName.value) != '' )
		{
		    theAnswerNum++;
			if( !CheckNotNull(theWeight,"分值数据") ) { return false;}
			if( !CheckNoFloat(theWeight,"填写的分值数据") ) { return false;}
		}
	}
	if( theAnswerNum == 0 )
	{
		alert("必须有一个问题对应评价选项");
		document.getElementById("answersName_1").focus();
		return false;
	}
}
function CheckNoFloat(objField, strText) {
    var objValue = objField.value;
    if (objValue=="") return true;
	var strErr = "“" + strText + "”不是正确的分值数据格式！";
	var reg=/^(\d+)(.{0,1})(\d{0,2})$/;
	if (!reg.test(objValue)) {
		alert(strErr);
        objField.focus();
		return false;
	}
	return true;
}
function CheckSpecicalChar(objField, strText)
{
	var strErr = "“" + strText + "”不能包含单引号、双引号、反斜线、小于号、大于号、和符号等非法字符！";
	var Re = /[\x22\x27\x5C\x3C\x3E\x26]+/ig;
	if ( Re.test(objField.value))
	{
		alert(strErr);
        objField.focus();
		return false;
	}
	return true;
}
</script>

<meta content="mshtml 6.00.3790.0" name=generator></head>
<body oncontextmenu="return false" style="margin-top:0px">
<form style="margin:0px" method="post" action="" name="Check_Form" enctype="multipart/form-data" onsubmit="return Check_Form_Validator()">
  <table class=datatable style="line-height: 150%;border-collapse:collapse;" cellspacing=0 cellpadding=0 bordercolor=#b5cfd9 border=1 width=100%>
   <div class=position>位置：&nbsp; 我的问卷 &raquo; 评教问卷评价指标</div>
   <tr><td colspan="2" bgcolor="#e9e9e9"><b>编辑评教问卷评价指标</b></td></tr>
   <tr><td>
     <span style="float:left">&nbsp;<span style="font-size:12px;">{assessTitle}</span></span>	 
  </td></tr>
   <tr bgcolor="#f5f5f5" height=25><td><b>&nbsp;评价指标</b>&nbsp;<img src="../Images/info.gif" border=0>
   </td></tr>
   <tr><td><textarea rows=3 cols=128 name="questionName" id="questionName" tabIndex=1>{indicatorsName}</textarea>  <a href="javascript:resizeTextHeight('questionName',1);"><img src="../Images/jia.gif"></a><a href="javascript:resizeTextHeight('questionName',-1);"><img src="../Images/jian.gif"></a></td></tr>
   <tr bgcolor="#f5f5f5" height=25><td>&nbsp;有关评价指标的说明或回复提示&nbsp;<img src="../Images/info.gif" border=0></td></tr>
   <tr><td><textarea rows=5 cols=128 name="questionNotes" id="questionNotes" tabIndex=1>{indicatorsNotes}</textarea>  <a href="javascript:resizeTextHeight('questionNotes',1);"><img src="../Images/jia.gif"></a><a href="javascript:resizeTextHeight('questionNotes',-1);"><img src="../Images/jian.gif"></a></td></tr>
   <tr bgcolor="#f5f5f5" height=25><td><b>&nbsp;指标所属评价问题</b>&nbsp;<img src="../Images/info.gif" border=0></td></tr>
   <tr><td>
    <table id="theOptionTable" style="LINE-HEIGHT: 150%;border-collapse:collapse;" cellSpacing=0 cellPadding=0 width="100%" borderColor=#999999 border=1>
	 <tr bgcolor="#cccccc">
	     <td width=5% nowrap>&nbsp;<a href="javascript:void(0)" onclick="insertIndexRow(document.getElementById('theOptionTable').rows.length)" title="增加问题"><img src="../Images/jia.gif" border=0></a>&nbsp;<a href="javascript:void(0)" onclick="deleteIndexRow()" title="减少问题"><img src="../Images/jian.gif" border=0></a></td>
	     <td width=95%>&nbsp;<b>评价问题</b></td>
	 <!-- BEGIN INDEXS -->
	<tr> <td align=center>&nbsp;{optionOrderID}：</td>
	     <td>&nbsp;<input size=102 name="indexsName[{optionOrderID}]" id="indexsName_{optionOrderID}" value="{indexsName}">&nbsp;</td>
	</tr>
	 <!-- END INDEXS -->
     </table></td>
   </tr>
   <tr bgcolor="#f5f5f5" height=25><td><b>&nbsp;问题对应评价选项</b>&nbsp;<img src="../Images/info.gif" border=0></td></tr>
   <tr><td>
    <table id="theAnswerTable" style="LINE-HEIGHT: 150%;border-collapse:collapse;" cellSpacing=0 cellPadding=0 width="100%" borderColor=#999999 border=1>
	 <tr bgcolor="#cccccc">
	     <td width=5% nowrap>&nbsp;<a href="javascript:void(0)" onclick="insertAnswerRow(document.getElementById('theAnswerTable').rows.length)" title="增加标准"><img src="../Images/jia.gif" border=0></a>&nbsp;<a href="javascript:void(0)" onclick="deleteAnswerRow()" title="减少标准"><img src="../Images/jian.gif" border=0></a></td>
	     <td width=40%>&nbsp;<b>评价选项</b></td>
		 <td width=10% align=center>&nbsp;<b>选项分值</b></td>
		 <td width=45%>&nbsp;</td>
	 <!-- BEGIN ANSWERS -->
	<tr> <td align=center>&nbsp;{optionOrderById}：</td>
	     <td>&nbsp;<input size=45 name="answersName[{optionOrderById}]" id="answersName_{optionOrderById}" value="{answersName}">&nbsp;</td>
		 <td>&nbsp;<input size=10 name="weight[{optionOrderById}]" id="weight_{optionOrderById}" value="{weight}"></td>
		 <td>&nbsp;</td>
	</tr>
	 <!-- END ANSWERS -->
     </table></td>
   </tr>
   </table><table width=100%>
   <tr> 
  	 <td height="15">
         <input name="surveyID" type="hidden" id="surveyID" value="{surveyID}"> 
         <input name="assessID" type="hidden" id="assessID" value="{assessID}"> 
	     <input name="indicatorsID" type="hidden" id="indicatorsID" value="{indicatorsID}"> 
         <input name="orderByID" type="hidden" id="orderByID" value="{orderByID}"> 
         <input class=inputsubmit name="AddIndicatorsSubmit" type="submit" id="AddIndicatorsSubmit" value="保存，下一个"> 
         <input class=inputsubmit name="AddIndicatorsOver" type="submit" id="AddIndicatorsOver" value="保存，结束" > 
         <input class=inputsubmit type="button" name="close" value="  关闭  " onClick="javascript:parent.hidePopWin();">
		</span>
      </td>
    </tr>
  </form>
 </table>
 <script type="text/javascript">initInputHighlightScript();</script> 
</body></html>
