function checkData(){
	var check = true;
	
	//if( !checkRadio( "corporation" ) )
	//	check = false;	
	
	$(".require").each(function(i){
		if( $.trim($(this).val()) == "" ){
			$(this).addClass("error");
			$(this).parent().parent().find(".require_text").addClass("error_text");
			check = false;
		}
		else{
			$(this).removeClass("error");
			$(this).parent().parent().find(".require_text").removeClass("error_text");
		}
	});
	
	$(".email").each(function(i){
		reg = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/i;
		if( !reg.test( $(this).val() ) ){
			$(this).addClass("error");
			$(this).parent().parent().find(".require_text").addClass("error_text");
			check = false;
		}
		else{
			$(this).removeClass("error");
			$(this).parent().parent().find(".require_text").removeClass("error_text");
		}
	});
	$(".num").each(function(i){
		reg = /^[0-9]{2}$/; 
		if( !reg.test( $(this).val() ) ){
			$(this).addClass("error");
			$(this).parent().parent().find(".require_text").addClass("error_text");
			check = false;
		}
		else{
			$(this).removeClass("error");
			$(this).parent().parent().find(".require_text").removeClass("error_text");
		}
	});															
		
	if( !check ){
		alert( "赤い文字の項目がが入力されていません。" );
		return false;
	}
		
		
	$("#mail_form").css("display", "none");
	$("#site").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() );
		}
	}); 
	
	
	$(".hidden").each(function(i){
		$(this).remove();
	}); 
	
	$("#submit_content").attr("value",$("#mail").html());
	//return false;
	return true;
}

function checkRadio( name ) 
{ 
	var obj = document.getElementsByName( name );
	var objlength = obj.length; 
	for (var i = 0; i < objlength; i++) 
	{ 
		if(obj[i].checked){
			$("input[@name=" + name + "]").each(function(){
				$(this).removeClass("error");
				$(this).parent().parent().find(".require_text").removeClass("error_text");
			})		
			return true;
		}
	}
	
	$("input[@name=" + name + "]").each(function(){
		$(this).addClass("error");
		$(this).parent().parent().find(".require_text").addClass("error_text");
	})
	 
	return false;
} 