<!--
/////////////////////////////////////////
function sendForm(_id){
	
	/*** 予約フォーム ***/
	if(_id=='yoyaku'){
		if(!Field.present('name')){
			alert("お名前は必ずご記入お願いします");
			Field.activate('name');
			return 0;
		}
		if(!Field.present('mailcc')){
			alert("メールアドレスを入力してください");
			Field.activate('mailcc');
			return 0;
		}
		if($('course').selectedIndex==0){
			alert("コースをご選択ください");
			Field.activate('course');
			return 0;
		}
	}
	
	/*** ご感想フォーム ***/
	if(_id=='bbs'){
		if(!Field.present('name')){
			alert("お名前は必ずご記入お願いします");
			Field.activate('name');
			return 0;
		}
		if(!Field.present('kansou')){
			alert("ご感想をご記入ください");
			Field.activate('kansou');
			return 0;
		}
	}
	
	/*** QandAフォーム ***/
	if(_id=='qa'){
		if(!Field.present('name')){
			alert("お名前は必ずご記入お願いします");
			Field.activate('name');
			return 0;
		}
		if(!Field.present('situmon')){
			alert("ご質問をご記入ください");
			Field.activate('situmon');
			return 0;
		}
	}
	
	
	/*** ご意見フォーム ***/
	if(_id=='mailf'){
		if(!Field.present('data1')){
			alert("お名前は必ずご記入お願いします");
			Field.activate('data1');
			return 0;
		}
		if(!Field.present('mailcc')){
			alert("メールアドレスを入力してください");
			Field.activate('mailcc');
			return 0;
		}
	}
	
	
	/* 相互リンク依頼フォーム */
	if(_id=='link'){
		if(!Field.present('site')){
			alert("サイト名は必ずご記入お願いします");
			Field.activate('site');
			return 0;
		}
		if(!Field.present('url') || $('url').value=='http://' ){
			alert("ホームページのアドレスは必ずご記入お願いします");
			Field.activate('url');
			return 0;
		}
		if(!Field.present('bana') || $('bana').value=='http://' ){
			alert("バナーのＵＲＬは必ずご記入お願いします");
			Field.activate('bana');
			return 0;
		}
		if(!Field.present('mmg')){
			alert("ホームページの紹介文は必ずご記入お願いします");
			Field.activate('mmg');
			return 0;
		}
		if(!Field.present('linkurl')){
			alert("当サイトへのリンクページのＵＲＬは必ずご記入お願いします");
			Field.activate('linkurl');
			return 0;
		}
		if(!Field.present('mailcc')){
			alert("メールアドレスは必ずご記入お願いします");
			Field.activate('mailcc');
			return 0;
		}
		if($('cg4').selectedIndex==0){
			alert("カテゴリは必ずご選択お願いします");
			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 style='width:400px;padding:15px;background-color:#ff8;margin-top:10px;'>送信が完了いたしました</span>";
			}else{
				alert(_obj.responseText);
			}
		}
	});
}
/////////////////////////////////////////
-->