<script src='https://www.google.com/recaptcha/api.js'></script>

<script type="text/javascript">


	var kakunin_data = 0;

	function syncerRecaptchaCallback( code )
	{
		if(code != "")
		{
			kakunin_data = 1;
		}
	}

	$(function(){

		$('#fsend').on('click',function(){
				if(kakunin_data == 0) {
	     		alert("チェックを入れてくださいね！");
					return false;
			  }
				$('#sendform').submit();
		});
	});




</script>

<{$formmail.javascript}>

<h1 class="btitle"><{$formmail.title}></h1>

<div class="padded">

<div><{$text_form}><br /></div>

<form name="<{$formmail.name}>" action="<{$formmail.action}>" id="sendform" method="<{$formmail.method}>" <{$formmail.extra}>>
<table cellspacing="1" class="outer">
  <{foreach item=element from=$formmail.elements}>
    <{if $element.hidden != true}>
      <tr>
	     <td class="formmail_head"><{$element.caption}></td>
	     <{if $element.caption == $ATTESTATION_CODE}>
	       <td class="<{cycle values="formmail_even,formmail_odd"}>">
	         <table border="0">
	           <tr>
	             <td>
	               <{$element.body}>
	             </td>
	             <td>
	               <{$md5ninsyo}>
	             </td>
	           </tr>
	           <tr>
	             <td colspan="2">
	               <{$ATTESTATION_MESSAGE}>
	             </td>
	           </tr>
	         </table>
	     <{else}>
	       <td class="<{cycle values="formmail_even,formmail_odd"}>"><{$element.body}>
	     <{/if}>
	    </td>
     </tr>
    <{/if}>
  <{/foreach}>
  <{if $formmail_spam eq 1}>
  <tr>
  <td class="formmail_head">SPAM CHECK</td>
  <td class="formmail_even">
    <div class="g-recaptcha" data-callback="syncerRecaptchaCallback" data-sitekey="6LcC-R4UAAAAANjFgqZv0AKhyMvDztv_wuV49ID2"></div>
  </td>
  </tr>
  <{/if}>
  <tr>
		<td class="formmail_head"></td>
  	<td class="formmail_even"><button class="green" id="fsend">送信</button></td>
  </tr>
</table>

<input type="hidden" name="submit" value="1">
  <{foreach item=element from=$formmail.elements}>
    <{if $element.hidden == true}>
	    <{$element.body}>
    <{/if}>
  <{/foreach}>
</form>
</div>
