<html>
<head>
<META http-equiv=Content-Language content=zh-cn>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link href="../CSS/Base.css" rel="stylesheet" type="text/css"/>
<link href="../CSS/Common.css" rel="stylesheet" type="text/css"/>
<link href="../CSS/Tab.css" rel="stylesheet" type="text/css"/>
<link href="../CSS/SurveyList.css" rel="stylesheet" type="text/css"/>
<LINK href="../CSS/Window.css" type=text/css rel=stylesheet>
<LINK href="../CSS/Actions.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/Actions.js.php"></script>
<script language="javascript"> 
var userAgent = navigator.userAgent.toLowerCase();
var is_opera = userAgent.indexOf('opera') != -1 && opera.version();
var is_moz = (navigator.product == 'Gecko') && userAgent.substr(userAgent.indexOf('firefox') + 8, 3);
var is_ie = (userAgent.indexOf('msie') != -1 && !is_opera) && userAgent.substr(userAgent.indexOf('msie') + 5, 3);
var is_mac = userAgent.indexOf('mac') != -1;

function checkall(form) 
{
	if( form.all.checked)
	{
		for(var i = 0;i < form.elements.length-1; i++) 
		{
			var e = form.elements[i];
			e.checked = true;
		}
	}
	else
	{
		for(var i = 0;i < form.elements.length-1; i++) 
		{
			var e = form.elements[i];
			e.checked = false;
		}
    }
}
function refreshParent() {
   //self.location.href = '{listURL}';
   AjaxQtnListRequest("ShowQtnList.php{thisURLStr}"+"&randid="+Math.random());
}
function qtnAddAction()
{ 
	$('menu-div').style.display = "block";
	var x =(document.body.clientWidth-700)/2;		
	var y = 180;
	$('menu-div').style.position = "absolute";
	$('menu-div').style.left = Math.ceil(x) + 'px';
	var scTop = parseInt(getScrollTop(),10);
	$('menu-div').style.top = ( scTop + 140 ) + "px";
	$('menu-div').style.width = '700px';
	//$('menu-div').style.height = height + 'px';
	$('actionContent').innerHTML = "<div id=\"preloading\" style=\"position:absolute;top:0;left:0;z-index:1;background:#FFC;left:0;top:0;width:160px;overflow:hidden;white-space:nowrap;color:black;position:fixed;top:0;left:0;font-weight:bold;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;-khtml-border-bottom-right-radius:5px;border-bottom-right-radius:5px;\">&nbsp;<img src=\"..\/Images\/wait.gif\" width=\"16px\" height=\"16px\">&nbsp;正在加载操作向导&nbsp;<\/div>";
	change_style('select', 'hidden');
	var postStr = '';
	ajax_Post_Action("{addURL}"+"&randid="+Math.random(),postStr);
}
function createNewQtn(returnVal)
{
    AjaxQtnListRequest("ShowQtnList.php{thisURLStr}"+"&randid="+Math.random());
    if( returnVal == 1 )  //保存,下一个
    {
       qtnAddAction();
    }
}
function sendAddQtnAction(qtnType)
{
	closeLog('menu-div');
    var thisProg = '{listURL}&Action=View&questionType='+qtnType;
    showPopWin(thisProg, 760, 430,createNewQtn, null,'新增问卷问题');
}
function sendPageBreakAction(qtnType)
{
	closeLog('menu-div');
    var thisProg = '{listURL}&Action=View&questionType='+qtnType;
    self.location.href = thisProg;
}
function Init()
{
	$('questionlist').innerHTML = "<div id=\"preloading\" style=\"position:absolute;top:0;left:0;z-index:1;background:#FFC;left:0;top:0;width:160px;overflow:hidden;white-space:nowrap;color:black;position:fixed;top:0;left:0;font-weight:bold;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;-khtml-border-bottom-right-radius:5px;border-bottom-right-radius:5px;\">&nbsp;<img src=\"..\/Images\/wait.gif\" width=\"16px\" height=\"16px\">&nbsp;正在加载问卷数据&nbsp;<\/div>";
    AjaxQtnListRequest("ShowQtnList.php{thisURLStr}"+"&randid="+Math.random());
}
var http_request = false;
function AjaxQtnListRequest(url)
{
	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;}
	http_request.onreadystatechange = function() {
	  if( http_request.readyState == 4 && http_request.status == 200) {
			 $('questionlist').innerHTML = http_request.responseText;
		}
	}
	http_request.open('GET', url, true);
	http_request.send(null);
}
</script>
<style>
  .actionsTitle {color:#0099cc;font-size:14px;font-weight:bold;margin-bottom:5px;}
  .actionsInner {font-size:12px;padding-left:10px;margin-bottom:8px;border-bottom:#e5e5e5 1px solid;}
  .classtd { padding:2px 5px 2px 5px;}
</style>

<body oncontextmenu="return false" onload="javascript:Init();" style="margin-top:0px">

<div id="tabs1"> 
    <ul> 
        <li><a href="ShowSurveyList.php"><span>我的问卷</span></a></li> 
        <li id="current"><a href="{questionListURL}"><span>调查问题</span></a></li>
        <li><a href="{logicURL}"><span>逻辑关系</span></a></li>
    </ul> 
</div> 

<div style="line-height:10px">&nbsp;</div>
<div class="wrap q_clear" id=wrap>
<div>
<div>

<a name="top" href="javascript:void(0);"></a>
<div class="datalist">
<form name="form" method="post" action="">
<div class=content id="questionlist"></div>
</form>
</div></div></div></div>

<div id="menu-div">
	<div id="actionInner">
	  <div id="actionTitleBar">
	      <div id="actionTitle">请选择对应调查问题操作</div>
		  <div id="actionControls"><img src="../Images/closewindow.gif" onclick="closeLog('menu-div');" id="actionCloseBox"/></div>
	  </div>
      <div id="actionContent"></div>
	</div>
</div>

</body></html>
