#set($title = "アンケート結果速報")
<!-- preHeader -->
#parse( "/WEB-INF/view/common/preHeader.vm" )
##<!-- JAVASCRIPTはここに記載 -->
<body bgcolor="#B3C9E1" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>
<!-- header -->


<table width="1024"  cellspacing="0" cellpadding="0">
	<tr> 
		<TD>#parse( "/WEB-INF/view/common/header.vm" )</TD>
	</tr>
	<tr>
		<TD>
			<table width="1024" border="0" cellspacing="0" cellpadding="0">
				<tr>
			   <td width="25" ><img src="/em/images/spacer.gif" width="25" height="1" border="0"></td>
				    <td width="1024" bgcolor="#FFFFFF">
				    <table width="100%" border="0" cellspacing="5" cellpadding="0">
					    <tr>
					        <td align="center" bgcolor="#FFFFFF" align="center" >
##CONTENT START 各ページコンテンツ
							<!-- Contents Title Table Start -->
		
    <BR>
        <font color="#666666" size="4"><B>$!enqueteSumBatchForm.enquete.enqueteName</B></font>
    <BR>
        <table width="950">
          <tr><td align="right">$date.format("yyyy年MM月dd日 HH:mm",$date.getDate())  現在</td></tr>
        </table>
    #set($totalCnt = 0 )
    #foreach($age in $enqueteSumBatchForm.ageList)
    	#set($totalCnt = $totalCnt + $age.cnt)
    #end
      
      <table width="950">
        <tr>
          <td class=""><font color="#000099">設問: 年代</font></td>
          <td nowrap class="" align="right" width="20%"><font color="#000099">有効回答者数: ${totalCnt}名</font></td>
        </tr>
      </table>

      <table width="950" border="0" cellspacing="0" cellpadding="2" bgcolor="#FFFFFF">
        <tr>
          <td class="listmenu" align="left"><font color="#FFA500">選択項目</font></td>
          <td class="listmenu" align="right"><font color="#FFA500">回答件数</font></td>
          <td class="listmenu" align="right"><font color="#FFA500">割合</font></td>
          <td class="listmenu" >&nbsp;</th>
        </tr>

	#foreach($age in $enqueteSumBatchForm.ageList)
	    ##パーセント計算
		#set($percent = $math.toInteger($math.mul($math.div($age.cnt,$totalCnt), 100)))
		
        <tr>
          <td class="listcts" width="170" align="left"><font color="#666666">$!age.sai10</font></td>
          <td class="listcts" width="100" align="right"><font color="#666666">$!{age.cnt}件</font></td>
          <td class="listcts" width="80" align="right"><font color="#666666"> ${percent}%</font></td>
          <td class="listcts" width="600" align="left">
          
          
            <table border="0" cellpadding="1" cellspacing="1">
              <tr>
                <td align="left" height="8" width="$math.mul($percent,6)"  #if($math.mul($percent,6) != 0 ) bgcolor="#0000ff"  #end ></td>
              </tr>
            </table>
          </td>
        </tr>
    #end
      
      </table>
      <BR>
      <table width="950">
        <tr>
          <td class=""><font color="#000099">設問: 性別</font></td>
          <td nowrap class="" align="right" width="20%"><font color="#000099">有効回答者数: $!{enqueteSumBatchForm.genderInfo.totalCnt}名</font></td>
        </tr>
      </table>

      <table width="950" border="0" cellspacing="0" cellpadding="2" bgcolor="#FFFFFF">
        <tr>
          <td class="listmenu" align="left"><font color="#FFA500">選択項目</font></td>
          <td class="listmenu" align="right"><font color="#FFA500">回答件数</font></td>
          <td class="listmenu" align="right"><font color="#FFA500">割合</font></td>
          <td class="listmenu" >&nbsp;</th>
        </tr>

		#set($manPercent    = $math.toInteger($math.mul($math.div($!enqueteSumBatchForm.genderInfo.manCnt  ,$!enqueteSumBatchForm.genderInfo.totalCnt), 100)))
		#set($womanPercent    = $math.toInteger($math.mul($math.div($!enqueteSumBatchForm.genderInfo.womanCnt,$!enqueteSumBatchForm.genderInfo.totalCnt), 100)))
        <!-- 男性 -->
        <tr>
          <td class="listcts" width="170" align="left"><font color="#666666">男性</font></td>
          <td class="listcts" width="100" align="right"><font color="#666666">$!{enqueteSumBatchForm.genderInfo.manCnt}件</font></td>
          <td class="listcts" width="80" align="right"><font color="#666666">$!{manPercent}%</font></td>
          <td class="listcts" width="600" align="left">
            <table border="0" cellpadding="1" cellspacing="1">
              <tr>
                <td align="left" height="8" width="$math.mul($manPercent,6)" #if($math.mul($manPercent,6) != 0 ) bgcolor="#0000ff"  #end></td>
              </tr>
            </table>
          </td>
        </tr>
        <!-- 女性 -->
          <tr>
          <td class="listcts" width="170" align="left"><font color="#666666">女性</font></td>
          <td class="listcts" width="100" align="right"><font color="#666666">$!{enqueteSumBatchForm.genderInfo.womanCnt}件</font></td>
          <td class="listcts" width="80" align="right"><font color="#666666">$!{womanPercent}%</font></td>
          <td class="listcts" width="600" align="left">
            <table border="0" cellpadding="1" cellspacing="1">
              <tr>
                <td align="left" height="8" width="$math.mul($womanPercent,6)" #if($math.mul($womanPercent,6) != 0 ) bgcolor="#0000ff"  #end></td>
              </tr>
            </table>
          </td>
        </tr>
      ##if($enqueteSumBatchForm.genderInfo.whoCnt > 0)
        <!-- 不明 -->
         <tr>
          <td class="listcts" width="170" align="left"><font color="#666666">不明</font></td>
          <td class="listcts" width="100" align="right"><font color="#666666">$!{enqueteSumBatchForm.genderInfo.whoCnt}件</font></td>
          <td class="listcts" width="80" align="right"><font color="#666666">$!{womanPercent}%</font></td>
          <td class="listcts" width="600" align="left">
            <table border="0" cellpadding="1" cellspacing="1">
              <tr>
                <td align="left" height="8" width="$math.mul($womanPercent,6)" bgcolor="#0000ff"></td>
              </tr>
            </table>
          </td>
        </tr>
      ##end
      </table>
      <BR>
      
      #foreach($enqueteResultSumList  in $!enqueteSumBatchForm.enqueteResultSumList)
      #set($totalCnt = 0 )
      	##設問別totalCntを求める
      	#foreach($enqueteResultSum in $enqueteResultSumList)
      		#set($totalCnt = $totalCnt + $enqueteResultSum.cnt)	
      	#end
      	
      	#set($preQuestionNo = "")
      	#foreach($enqueteResultSum in $enqueteResultSumList)
      	##$preQuestionNo :: $enqueteResultSum.questionNo
      		#if($preQuestionNo != $enqueteResultSum.questionNo)
			  <table width="950">
		        <tr>
		          <td class=""><font color="#000099">設問: $!{enqueteResultSum.questionName} </font></td>
		          <td nowrap class="" align="right" width="20%"><font color="#000099">有効回答者数: ${totalCnt}名</font></td>
		        </tr>
		      </table>
		      
		    <table width="950" border="0" cellspacing="0" cellpadding="2" bgcolor="#FFFFFF">
	        <tr>
	          <td class="listmenu" align="left"><font color="#FFA500">選択項目</font></td>
	          <td class="listmenu" align="right"><font color="#FFA500">回答件数</font></td>
	          <td class="listmenu" align="right"><font color="#FFA500">割合</font></td>
	          <td class="listmenu" >&nbsp;</th>
	        </tr>
	        #end
			
			#set($percent    = $math.toInteger($math.mul($math.div($!enqueteResultSum.cnt  ,$!totalCnt), 100)))	      
	
	        <tr>
	          <td class="listcts" width="170" align="left"><font color="#666666">$!{enqueteResultSum.answer}</font></td>
	          <td class="listcts" width="100" align="right"><font color="#666666">$!{enqueteResultSum.cnt}件</font></td>
	          <td class="listcts" width="80" align="right"><font color="#666666">$!{percent}%</font></td>
	          <td class="listcts" width="600" align="left">
	            <table border="0" cellpadding="1" cellspacing="1">
	              <tr>
	                <td align="left" height="8" width="$!math.mul($percent,6)"  #if($!math.mul($percent,6) != 0)  bgcolor="#0000ff" #end ></td>
	              </tr>
	            </table>
	          </td>
	        </tr>
	    	
	    	  #set($preQuestionNo = $enqueteResultSum.questionNo)
      	#end
      	</table>
      <BR>	
      	
      #end
      
    </td>
    </tr>
    <tr>
    	<td>
##CONTENT END 各ページコンテンツ
					        <!-- Button Table Start 点線-->
							<table width="780" border="0" cellspacing="5" cellpadding="0">
								<tr>
									<td background="/em/images/cts_btnbar.gif"><img src="/em/images/spacer.gif" width="1" height="10" border="0"></td>
								</tr>
							</table>
							<!-- Button Table End -->
					        </td>
					    </tr>					    
				    </table>
				    </td>
			   <td width="25" ><img src="/em/images/spacer.gif" width="25" height="1" border="0"></td>
				</tr>
			</table>
		</TD>
	</tr>
	<tr>
		<TD>#parse( "/WEB-INF/view/common/footer.vm" )</TD>		
	</tr>
</table>

</center>
</body>
</html>