
function sendForm(_id){
	
	// alert(_id);
	
	/*** アンケート ***/
	
	if(_id=='mailf'){
		if(!Field.present('name')){
			alert("お名前は必ずご記入お願いします");
			Field.activate('name');
			return 0;
		}
		if(!Field.present('mailcc')){
			alert("メールアドレスを入力してください");
			Field.activate('mailcc');
			return 0;
		}
		if(!Field.present('date1')){
			alert("ご利用日をご記入ください");
			Field.activate('date1');
			return 0;
		}
		if(!Field.present('date2')){
			alert("ご利用日をご記入ください");
			Field.activate('date2');
			return 0;
		}
		if(!Field.present('date3')){
			alert("ご利用日をご記入ください");
			Field.activate('date3');
			return 0;
		}
		if(!Field.present('time2')){
			alert("ご利用の時間帯をご記入ください");
			Field.activate('time2');
			return 0;
		}
		if(!Field.present('girlname')){
			alert("女性の名前をご記入ください");
			Field.activate('girlname');
			return 0;
		}
		
		if(!(document.mailf.goriyou[0].checked || document.mailf.goriyou[1].checked || document.mailf.goriyou[2].checked || document.mailf.goriyou[3].checked || document.mailf.goriyou[4].checked)){
			alert("ご利用の第一印象を5段階でお選びください");
			Field.activate('goriyou');
			return 0;
		}
		
		if(!(document.mailf.service[0].checked || document.mailf.service[1].checked || document.mailf.service[2].checked || document.mailf.service[3].checked || document.mailf.service[4].checked)){
			alert("そのときのサービスを5段階でお選びください");
			Field.activate('service');
			return 0;
		}
	}
	
	
	/*** お問合せ ***/
	
	if(_id=='contact'){
		if(!Field.present('mailcc')){
			alert("恐れ入りますが、返信先のメールアドレスは必ずご記入ください");
			Field.activate('mailcc');
			return 0;
		}
	}
	
	
		
	/*** 送信処理 ***/
	
	if(!confirm("それではメッセージを送信します")) return 0; 
	
	new Ajax.Request('/send.php',{
		method: "post",
		postBody: encodeURI(Form.serialize(_id)),
		
		onLoading :function(){
			$(_id + "_btn").disabled = true;
			$(_id + "_btn").value="送信しています....";
		},
		
		onComplete:function(_obj){
			if(_obj.responseText=='1'){
				alert("送信されました");
				$(_id + "_btn").value = "送信完了";
				$(_id + "_msg").innerHTML = "<span class='fs14 bold'>送信が完了いたしました</span>";
			}else{
				alert(_obj.responseText);
			}
		}
		
	});
}



