document.write("	<table width='189' border='0' cellpadding='0' cellspacing='0'>");
document.write("	<tr>");
document.write("	<td  height='5' bgcolor='#CC0000'>");
document.write("	</td>");
document.write("	</tr>");
document.write("	<tr>");
document.write("	<td  height='30' bgcolor='#F4EAEA'>");
document.write("	<span class='a' style='margin-left:40px'>网上调查</span>");
document.write("	</td>");
document.write("	</tr>");
document.write("	</table>");
document.writeln("	<table width='189' border='0' align='center' cellpadding='0' cellspacing='0'>");
document.writeln("		<tr valign='top'>");
document.writeln("	          <td colspan='2' align='center'>&nbsp;&nbsp;&nbsp;&nbsp;您目前最希望人口和计划生育部门为您提供哪方面服务?<br>");
document.writeln("	<table width='100%' height='150' border='0' cellspacing='0' cellpadding='0'>");
document.writeln("	 <form name='form11' method='post' action='/surveyAction.do?operation=submitSurvey'>");
document.writeln("		 <input type='hidden' name='surveyId' value='ff8080811c020217011c02045cdb0002'>");
document.writeln("		 <input type='hidden' name='problemNum' value='1'>");

	 	 	 	 	 
document.writeln("			 <input type='hidden' name='problemId0' value='ff8080811c020217011c0205764f0003'>");
document.writeln("			 <!--//判断调查是单选题还是多选题-->");
			 			 			 
document.writeln("			<!--//生成问题-->");
document.writeln("			<tr> ");

						
document.writeln("			<!--//选项列表-->");

						
document.writeln("				<tr>");
document.writeln("				<td width='100%' class='linestyle' align='left'>");
document.writeln("				<input name='options0' type='checkbox' value='ff8080811c020217011c020576670004' >&nbsp;&nbsp;");
document.writeln("				生育政策");
document.writeln("				</td> ");
document.writeln("				</tr>");

								
document.writeln("				<tr>");
document.writeln("				<td width='100%' class='linestyle' align='left'>");
document.writeln("				<input name='options0' type='checkbox' value='ff8080811c020217011c0205766c0005' >&nbsp;&nbsp;");
document.writeln("				生殖健康知识");
document.writeln("				</td> ");
document.writeln("				</tr>");

								
document.writeln("				<tr>");
document.writeln("				<td width='100%' class='linestyle' align='left'>");
document.writeln("				<input name='options0' type='checkbox' value='ff8080811c020217011c0205766f0006' >&nbsp;&nbsp;");
document.writeln("				优生优育知识 ");
document.writeln("				</td> ");
document.writeln("				</tr>");

								
document.writeln("				<tr>");
document.writeln("				<td width='100%' class='linestyle' align='left'>");
document.writeln("				<input name='options0' type='checkbox' value='ff8080811c020217011c020576720007' >&nbsp;&nbsp;");
document.writeln("				避孕节育知识 ");
document.writeln("				</td> ");
document.writeln("				</tr>");

								
document.writeln("				<tr>");
document.writeln("				<td width='100%' class='linestyle' align='left'>");
document.writeln("				<input name='options0' type='checkbox' value='ff8080811c020217011c02094b0e0008' >&nbsp;&nbsp;");
document.writeln("				男性健康知识");
document.writeln("				</td> ");
document.writeln("				</tr>");

							
document.writeln("	<tr>");
document.writeln("             <td align='center' height='28' class='linestyle'>");
document.writeln("                     <input name='button' type='button' class='butt_survey'  onClick='javascript:tijiao()' value='提 交'> <input name='reset' type='reset' class='butt_survey' value='重 填'>");
document.writeln("               <input name='button' type='button' class='butt_survey' onClick='javascript:lookResult()' value='查 看'>");
document.writeln("             </td>            </tr>");
document.writeln("     </form>          </table></td>");
document.write("     </tr>    </table>");

function lookResult(){
 	window.location='/surveyAction.do?operation=getSurveyResult&surveyId='+document.form11.surveyId.value; 
}

function isSelectCheckbox(ids)                           //校验多选框的选择
{
if(ids.length=="-1" || typeof(ids.length)=="undefined")        return ids.checked;
 for(i=0;i<ids.length;i++)
  {
    if (ids[i].checked)
    {
	   return true;
    }
  }
  return false;     
}

function tijiao(){	
	var question =new Array();
	var count =document.form11.problemNum.value;
	for(ii=0;ii<count;ii++)	
	{ question=document.getElementsByName("options"+ii);	
		
		if(question.length==1)	
		 {if(!question.checked ){alert("必须回答所有的问题!"); return ;break;}}
		else {
	    if (!(isSelectCheckbox(question)))				
         {alert("必须回答所有的问题!"); return ;break;}		
		}		
	}	
	document.form11.action='/surveyAction.do?operation=submitSurvey';
	document.form11.submit();			 
}
