<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/CheckQuestion.js.php"></script>
<script language=javascript>
function Check_Form_Validator()
{
	if (!CheckNotNull(document.Check_Form.survey_ID, "源评教主题")) {return false;}
	if (!CheckNotNull(document.Check_Form.assess_ID, "源评教类问卷")) {return false;}
	if (!CheckNotNull(document.getElementById("indicatorsID"), "选定要复制的源问卷中的指标")) {return false;}
}
var http_request = false;
function AjaxRequest(url,cond)
{
	http_request = false;
	if(window.ActiveXObject){
		try {
			http_request = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			try	{
				http_request = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) {}
		}
	}
	else if(window.XMLHttpRequest){
		http_request = new XMLHttpRequest();
		if (http_request.overrideMimeType){
			http_request.overrideMimeType('text/xml');
		}
	}
	
	if (!http_request) {
		alert("Cannot create an XMLHTTP instance");
		return false;
	}
	if( cond == 1 ) {
		http_request.onreadystatechange = AlertQuestion;
	}
	else {
		http_request.onreadystatechange = AlertIndex;
	}
  	http_request.open('GET', url, true);
	http_request.send(null);
}

function AlertQuestion()
{
	if (http_request.readyState == 4){
		if(http_request.status == 200){
	        var resText = http_request.responseText;
		    document.getElementById("indicatorsOnHTML").innerHTML = resText;
		}
		else{
			alert('网络传输问题');
		}
	}
}
function AlertIndex()
{
	if (http_request.readyState == 4){
		if(http_request.status == 200){
	        var resText = http_request.responseText;
		    document.getElementById("assessOnHTML").innerHTML = resText;
		}
		else{
			alert('网络传输问题');
		}
	}
}
function ChangeQtn()
{
	var URL = 'AjaxChangeIndexs.php?surveyID='+document.getElementById("survey_ID").value+'&selectedID=' + document.getElementById("assess_ID").value;
	AjaxRequest(URL,1);
}
</script>
<meta content="mshtml 6.00.3790.0" name=generator></head>
<body oncontextmenu="return false" style="margin-top:0px">
  
  <form style="margin:0px" name="Check_Form" method="post" action="" 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; 新增指标 &raquo; 从现有问卷指标体系复制新增</div>
     <tr><td colspan="2" bgcolor="#f5f5f5" height="25"><b>从现有问卷指标体系复制新增</b></td></tr>
     <tr>
      <td width=14% nowrap>&nbsp;可复制评教主题</td>
	  <td><select name="survey_ID" id="survey_ID" onChange="AjaxRequest('AjaxChangeAssess.php?surveyID={surveyID}&selectedID='+document.Check_Form.survey_ID.options[document.Check_Form.survey_ID.selectedIndex].value,2);" size=6 style="width:600px;">
	     <option value='' selected>请选择...</option>
		 {surveyIDList}
		 </select>
	  </td>
     </tr>
     <tr>
      <td width=14% nowrap>&nbsp;评教类问卷</td>	  
	  <td width=86% nowrap><span id="assessOnHTML">
	      <select name="assess_ID" id="assess_ID" size=6 style="width:600px;">
		  <option selected value="{m_assessID}">{m_assessName}</option> 
		  </select></span>
	  </td></tr>
     <tr>
      <td width=14% nowrap>&nbsp;复制问卷指标</td>	  
	  <td width=86% nowrap><span id="indicatorsOnHTML">
	      <select name="indicatorsID[]" id="indicatorsID" size=7 multiple style="width:600px;">
		  <option selected value="{m_indicatorsID}">{m_indicatorsName}</option> 
		  </select></span><br/>
		  <span class=red>*</span> 按住Ctrl键点击鼠标进行多重选择
	  </td>
   </tr></table><table width=100%>
   <tr>
     <td width=14%></td>
  	 <td>
		 <input name="Action" type="hidden" value="CopyIndicatorsSubmit">
		 <input name="surveyID" type="hidden" value="{surveyID}">
		 <input name="assessID" type="hidden" value="{assessID}">
	     <input type=submit class=inputsubmit id="fileSubmit" name="fileSubmit" value="确定">&nbsp;<input class=inputsubmit type="button" name="close" value="关闭" onClick="javascript:parent.hidePopWin();">
      </td>
    </tr>
  </form>
 </table>
</body></html>