// お問い合わせ
function doSubmit( fm ) {

	var cust;
	cust = 'お客様の';

	if ( ! check_input( fm.name1, 	cust + '氏名（姓）' ) ) 		return;
	if ( ! check_input( fm.name2, 	cust + '氏名（名）' ) ) 		return;
	if ( ! check_input( fm.kana1, 	cust + 'フリガナ（姓）' ) ) return;
	if ( ! check_input( fm.kana2, 	cust + 'フリガナ（名）' ) ) return;
	if ( ! check_input( fm.tel,			cust + 'お電話番号' ) )			return;
	if ( ! check_input( fm.email, 	cust + 'E-mail' ) ) 				return;
	if ( ! check_email( fm.email, 	cust + 'E-mail' ) ) 				return;
	if ( ! check_checkbox( fm, 'contact[]' , cust + '連絡方法' ) ) 		return;
	if ( ! check_checkbox( fm, 'true[]' , '上記内容に同意する' ) ) 		return;
	for ( i = 0; i < fm.elements['true[]'].length; i++ ) {
		if (fm.elements['true[]'][i].checked ) {
			found = fm.elements['true[]'][i].value;
			if(found == "f"){
					alert("上記内容に同意するにチェックしてください。");return;
			}
		}
	}
	fm.submit();
}

jQuery(function(){
	var tmpT = false;
	var tmpF = false;
	jQuery("#ctrue").click(function() {
		tmpT = jQuery("#ctrue").attr("checked");
		tmpF = jQuery("#cfalse").attr("checked");
		if(tmpT == true && tmpF == true){
			jQuery("#ctrue").attr("checked", "");
			alert("上記内容に同意するまたは同意しないを選択してください。");
		}
	});
	jQuery("#cfalse").click(function() {
		tmpT = jQuery("#ctrue").attr("checked");
		tmpF = jQuery("#cfalse").attr("checked");
		if(tmpT == true && tmpF == true){
			jQuery("#cfalse").attr("checked", "");
			alert("上記内容に同意するまたは同意しないを選択してください。");
		}
	});
});

