<HTML>
<HEAD>
	<TITLE>{siteTitle}</TITLE>
	<meta http-equiv=content-type content="text/html; charset=gb2312">
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<LINK href="../CSS/Android.css" type=text/css rel=stylesheet>
	<LINK href="../Offline/resources/phone.css" type=text/css rel=stylesheet>
	<SCRIPT language=javascript src="../JS/CheckQuestion.js.php"></SCRIPT>
	<SCRIPT type=text/javascript>
		window.onRexseeReady = function(){
			//设置横屏
			if( rexseeScreen.getScreenHeight() < 500 || rexseeScreen.getScreenWidth() < 500 )
			{
				rexseeScreen.setScreenOrientation('landscape');
			}
			rexseeMenu.setOptionsMenuId("mainOptionsMenu1");
			rexseeTitleBar.setStyle('visibility:hidden;');
			rexseeStatusBar.setStyle('visibility:hidden;');
			rexseeSpecialKey.enableBackKeyListener(false);
		}
		function ajaxSurveySubmit(url,postStr) {
			var ajax=false; 
			try { ajax = new ActiveXObject("Msxml2.XMLHTTP"); }
			catch (e) { try { ajax = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { ajax = false; } }
			if (!ajax && typeof XMLHttpRequest!='undefined') ajax = new XMLHttpRequest(); 

			ajax.open("POST", url, true); 
			ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); 
			ajax.send(postStr);
			ajax.onreadystatechange = function(){
				if( ajax.readyState == 4 && ajax.status == 200)
				{
					var theRtnText = ajax.responseText;
					document.getElementById("dataAnalysisMapTable").style.display = '';
					document.getElementById("dataAnalysisMap").innerHTML = theRtnText;
					scroll(0,0);
				} 
		    }
		}
		function DataAnalysisSubmit()
		{
			//得到defineID的值
			var theDefineIDValue = "{theDefineIDValue}";
			if( Trim(theDefineIDValue) == '')
			{
				document.getElementById("dataAnalysisMapTable").style.display = '';
				document.getElementById("dataAnalysisMap").innerHTML = "<b><font color=red>您尚未在服务器端定义查看问卷的自定义报告的类型</font></b>";
			}
			else
			{
				var ParamString = "Action=DataAnalysisSubmit";
				ParamString += "&defineID="+theDefineIDValue;
				ParamString += "&surveyID="+{surveyID};
				ParamString += "&dataSource=" + getRadioCheckBoxValue(document.Check_Form.dataSource);
				ParamString += "&defineReportType=1";
				document.getElementById("dataAnalysisMapTable").style.display = '';
				document.getElementById("dataAnalysisMap").innerHTML = "<img src=\"..\/Images\/wait.gif\" width=\"16px\" height=\"16px\">&nbsp;正在加载数据分析";
				ajaxSurveySubmit('../Analytics/DefineReport.php',ParamString);
			}
}
</script>
<style>
  .classtd { padding:2px 5px 2px 5px;}
  table {margin-bottom:4px;}
</style>
</head>
<BODY style="background:#e5e5e5;color:#666" oncontextmenu="return false" onload="javascript:DataAnalysisSubmit();">

<div class="titlebar">
 <table width=100%>
   <tr>
   <td width=85><a href="../Monitor/index.php"><img src="../Images/return.png" width=85 height=30 border=0></a></td>
   <td align=center width=* class="pageTitle">数据报告定制</td>
   <td width=85>&nbsp;</td>
   </tr>
 </table>
</div>

<div class="notesInfo">【问卷】{surveyTitle}</div>

<div class="invertedshiftdown">
	<ul>
	<li><a href="../Analytics/DataOverview.php?surveyID={surveyID}&surveyTitle={survey_URLTitle}">数据概览</a></li>
	<li style="display:{isProjectType1}"><a href="../Monitor/TaskResult.php?surveyID={surveyID}&surveyTitle={survey_URLTitle}">计划任务</a></li>
	<li class="current"><a href="../Monitor/DefineReport.php?surveyID={surveyID}&surveyTitle={survey_URLTitle}">定制报告</a></li>
	</ul>
</div>


<div id="androidList" style="padding-left:10px;padding-right:10px;padding-top:5px;background: #e5e5e5;">

<form name="Check_Form" id="Check_Form" method="POST" action="" style="margin:0px;padding:0px">
  <table style="LINE-HEIGHT: 150%;border-collapse:collapse;margin-bottom:0px;" cellSpacing=0 cellPadding=0 width="100%" borderColor=#ccc border=0>
  <tr><td class="classtd" align=right style="font-size:14px;border-top:#ccc 1px solid">
    选择分析的数据源：
	<select name="dataSource" id="dataSource" style="font-size:14px" onchange="javascript:DataAnalysisSubmit();">
		{dataSourceList}
	</select> 
  </td></tr></table>
</form>

<div style="margin-bottom:10px;">
  
 <table id="dataAnalysisMapTable" style="LINE-HEIGHT: 150%;border-collapse:collapse;display:none;" cellSpacing=0 cellPadding=0 width="100%" borderColor=#ccc border=1>
   <tr><td id="dataAnalysisMapInner" align=left style="padding-top:5px;padding-bottom:5px"><div id="dataAnalysisMap" style="padding:15px"></div></td></tr>
 </table>

</div>
</div>

</body></html>
