function checkForm(){
	var name = document.getElementById("name");
	var email = document.getElementById("email");	
	var content = document.getElementById("content");
	if( name.value == "" ){
		name.focus();
		alert( "お名前は必要項目です。" );
		return false;
	}
	
	if( email.value == "" ){
		email.focus();
		alert( "E-mailは必要項目です。" );
		return false;
	}
	
	reg = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/i;
	if( !reg.test( email.value ) ){
		email.focus();
		email.select();
		alert( "E-mailのフォマットは正しくないです。例：demo@4299.jp" );
		return false;
	}
	
	if( content.value == "" ){
		content.focus();
		alert( "お問合せ内容を入力してください。" );
		return false;
	}
	
	checkData();
}

function checkData(){		
	$("#mail_form").css("display", "none");
	$("#mail_form").before("<bR><bR><br><bR><p align=\"center\">送信中、少々お待ちください</p>");
	
	$(":text").each(function(i){
		$(this).replaceWith( $(this).val() );
	}); 
	$("textarea").each(function(i){
		$(this).replaceWith( $(this).val() );
	}); 	
	$("select").each(function(i){
		$(this).replaceWith( $(this).val() );
	});
	$(":radio").each(function(i){
		if(!$(this).attr('checked')){
			$(this).remove();
		}
		else{
			$(this).replaceWith( $(this).val() );
		}
	}); 
	$(":checkbox").each(function(i){
		if(!$(this).attr('checked')){
			$(this).remove();
		}
		else{
			$(this).replaceWith( $(this).val() );
		}
	}); 
	
	
	$(".hide").each(function(i){
		$(this).remove();
	}); 
	
	$("#submit_content").attr("value",$("#mail").html());
	//alert($("#submit_content").val());
	return true;
	//return true;
}