<%Response.Buffer=True
Response.CacheControl="no-cache"   
Response.Expires=0%>
<!--#include file="../../Dbconn.asp" -->
<html>
<head>
<title>添加问卷-盛维在线调查系统v9.0免费版</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords"  content="添加问卷">
<meta name="description" content="在线问卷管理系统，由专业的在线问卷调查软件开发商--盛维中国提供。">
<link rel="stylesheet" href="../../inc/survey.css" type="text/css">
<STYLE type=text/css>
.BgWin {
	FILTER: alpha(opacity=30)
}
#edit_survey_question_answer_div {
	LEFT: 50px; POSITION: absolute; top: 36px; VISIBILITY: visible; WIDTH: 125px; Z-INDEX: 10
}
</STYLE>
</head>
<script language="javascript" type="text/javascript">
function lookSurvey(s_id)
{
	window.open('../../survey.asp?id=' + s_id + "&bo=1",'newwindow','toolbar=yes,location=yes,scrollbars=yes,menubar=yes,resizable=yes,top=0,left=0');
}
function surveyPublish(S_id)
{
	if(confirm("您确定已经编辑好问卷了吗?")){           
          window.location="survey_publish.asp?S_id=" + S_id;
          }
}
function initFace(){
  	document.all.BgWin.style.width=document.body.scrollWidth;   
  	document.all.BgWin.style.height=document.body.scrollHeight;
	document.all.BgWin.style.display='block';
  } 
function openEdit(){  
	document.all.BgWin.style.display='none';
	document.all.BgWin.style.width=document.body.clientWidth; 
	document.all.BgWin.style.height=document.body.clientHeight; 
	return   true;   
}
 
function edit_survey_title_and_exp(s) {                        
	if(s=="hidden"){
	document.all.edit_new_select_div.style.visibility="hidden"; 
	openEdit();
	document.all.edit_new_select_div.style.display='none';
	}
	else{
	initFace();
	document.all.edit_new_select_div.style.visibility="visible";    
	document.all.edit_new_select_div.style.display='block';
	}      
}
function edit_question_answer(s,Q_Page_xiabiao,Q_Page,total_page,s_id,q_id) {                        
	if(s=="hidden"){
	document.all.edit_survey_question_answer_div.style.visibility="hidden"; 
	startRequest_survey_Question_answer(Q_Page_xiabiao,Q_Page,total_page,s_id);//读取问卷问题及选项
	openEdit();
	document.all.edit_survey_question_answer_div.style.display='none';
	}
	else{
	initFace();
	document.all.edit_survey_question_answer_div.style.visibility="visible";    
	document.all.edit_survey_question_answer_div.style.display='block';
	document.all.survey_question_answer_edit.src="survey_question_answer_edit.asp?S_ID="+s_id+"&Q_id="+q_id+"&weizhi=0&Q_Page=" + Q_Page;
	}      
}

function add_question_answer(Q_Page,Q_Order_Max,s_id) {                        
	initFace();
	document.all.edit_survey_question_answer_div.style.visibility="visible";    
	document.all.edit_survey_question_answer_div.style.display='block';
	document.all.survey_question_answer_edit.src="survey_add_new_question_answer.asp?S_id="+s_id+"&weizhi=0&Q_Page=" + Q_Page + "&Order=" + Q_Order_Max;   
}

function edit_question_order(s_id) {                        
	initFace();
	document.all.edit_survey_question_answer_div.style.visibility="visible";    
	document.all.edit_survey_question_answer_div.style.display='block';
	document.all.survey_question_answer_edit.src="survey_add_question_order_edit.asp?S_id="+s_id;   
}

function TurnToPage(page) {                        
	document.all.currentpage.value=page; 
	document.survey_order.submit();
}

//-------ajax----begin------------
var xmlHttp;
function createXMLHttpRequest() {
    if (window.ActiveXObject) {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else if (window.XMLHttpRequest) {
        xmlHttp = new XMLHttpRequest();
    }
}
//------------大标题-----
function startRequest(s_id) {
	edit_survey_title_and_exp("hidden");//关闭打开的窗口
	createXMLHttpRequest();
    xmlHttp.onreadystatechange = handleStateChange;
    xmlHttp.open("GET", "Survey_add_title_b.asp?survey_id="+s_id, true);
    xmlHttp.send(null);
}
function handleStateChange() {
    if(xmlHttp.readyState == 4) {
        if(xmlHttp.status == 200) {
            document.getElementById("results").innerHTML = xmlHttp.responseText;
			//document.getElementById("results").innerHTML = xmlDoc.getAttribute("sss");
        }
    }
}
//-------------读取调查问卷的标题及说明-----------
function startRequest_survey_Question_title(s_id) {
	createXMLHttpRequest();
    xmlHttp.onreadystatechange = handleStateChange_survey_Question_title;
    xmlHttp.open("GET", "Survey_add_readTitle.asp?survey_id="+s_id, true);
    xmlHttp.send(null);
}
function handleStateChange_survey_Question_title() {
    if(xmlHttp.readyState == 4) {
        if(xmlHttp.status == 200) {
            document.getElementById("survey_Question_title").innerHTML = xmlHttp.responseText;
        }
    }
}
//-------------读取调查问卷的所有的问题及说明-----------
function startRequest_survey_Question_answer(Q_Page_xiabiao,Q_Page,total_page,s_id) {
	createXMLHttpRequest();
    xmlHttp.onreadystatechange = handleStateChange_survey_Question_answer;
    xmlHttp.open("GET", "Survey_add_read_Question_answer.asp?read_sort=read&Q_Page_xiabiao=" + Q_Page_xiabiao + "&Q_Page=" + Q_Page + "&total_page=" + total_page + "&survey_id=" + s_id, true);
    xmlHttp.send(null);
}
function handleStateChange_survey_Question_answer() {
    if(xmlHttp.readyState == 4) {
        if(xmlHttp.status == 200) {
            document.getElementById("survey_Question_answer").innerHTML = xmlHttp.responseText;
        }
    }
}
//-------------移动次序并----读取调查问卷的所有的问题及说明-----------
function startRequest_survey_Question_answer_move(Move_Sort,Q_id_p,Q_id_n,Q_id,Q_Page_xiabiao,Q_Page,total_page,s_id) {
	createXMLHttpRequest();
    xmlHttp.onreadystatechange = handleStateChange_survey_Question_answer;
    xmlHttp.open("GET", "Survey_add_read_Question_answer.asp?read_sort=" + Move_Sort + "&Q_id_p=" + Q_id_p + "&Q_id_n=" + Q_id_n + "&Q_id=" + Q_id + "&Q_Page_xiabiao=" + Q_Page_xiabiao + "&Q_Page=" + Q_Page + "&total_page=" + total_page + "&survey_id=" + s_id, true);
    xmlHttp.send(null);
}
//---------删除问卷--问题及选项------
function startRequest_Del_question_answer(Q_Page_xiabiao,Q_Page,total_page,s_id,Q_id) {
	createXMLHttpRequest();
    xmlHttp.onreadystatechange = handleStateChange_survey_Question_answer;
    xmlHttp.open("GET", "Survey_add_read_Question_answer.asp?read_sort=del&Q_Page_xiabiao=" + Q_Page_xiabiao + "&Q_Page=" + Q_Page + "&total_page=" + total_page + "&survey_id=" + s_id + "&Q_id=" + Q_id + "&weizhi=0", true);
    xmlHttp.send(null);
}
//---------复制问卷--问题及选项------
function startRequest_copy_question_answer(Q_Page_xiabiao,Q_Page,total_page,s_id,Q_id) {
	createXMLHttpRequest();
    xmlHttp.onreadystatechange = handleStateChange_survey_Question_answer;
    xmlHttp.open("GET", "Survey_add_read_Question_answer.asp?read_sort=copy&Q_Page_xiabiao=" + Q_Page_xiabiao + "&Q_Page=" + Q_Page + "&total_page=" + total_page + "&survey_id=" + s_id + "&Q_id=" + Q_id, true);
    xmlHttp.send(null);
}

//-------ajax---over----
function GetRadioValue(RadioName){//获取单选按钮(radio)组的值
    var obj; 
    obj=document.getElementsByName(RadioName);
    if(obj!=null){
        var i;
        for(i=0;i<obj.length;i++){
            if(obj[i].checked){
                return obj[i].value;            
            }
        }
    }
    return null;
}
</script>
<body bgcolor="#FFFFFF" leftMargin="0" marginwidth="0" topmargin="0" onLoad="openEdit();">
<DIV class="BgWin" id="BgWin" style="DISPLAY: none; Z-INDEX: 2; LEFT: 0px; POSITION: absolute; TOP: 0px; width:100%; height:100%; BACKGROUND-COLOR: #000000"></DIV>
<!--#include file="../../manage/checkuserflag.asp"-->
<%call CheckUserFlag("01")
Set ObjSurvey = Server.CreateObject("dc_data100_v1_0.survey_add")
ObjSurvey.survey_add WebPath,DataPathFile
'-------------------
%>
</body>
</html>