function checkAll(){
	if(document.comment.comment_mail.value != ""){
		if(checkRoman(document.comment.comment_mail.value) == false){
			document.comment.comment_mail.focus();
			document.comment.comment_mail.select();
			alert("恐れ入りますが、メールアドレスは半角のみご入力ください");
			return false;
		}
		if(checkMAIL(document.comment.comment_mail.value) == false){
			document.comment.comment_mail.focus();
			document.comment.comment_mail.select();
			alert("恐れ入りますが、正常なメールアドレスをご入力ください");
			return false;
		}
	}
	if(document.comment.comment_url.value != ""){
		if(checkRoman(document.comment.comment_url.value) == false){
			document.comment.comment_url.focus();
			document.comment.comment_url.select();
			alert("恐れ入りますが、URLは半角のみご入力ください");
			return false;
		}
		if(checkURL(document.comment.comment_url.value) == false){
			document.comment.comment_url.focus();
			document.comment.comment_url.select();
			alert("恐れ入りますが、正常なURLをご入力ください");
			return false;
		}	
	}
	return true;
}
function checkRoman(strTarget){
	var i, transTarget;
	var checkStr = new String("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/-_~: @.%&+$#");
	transTarget =strTarget.replace(/\n/g, "");
	for(i=0;i<transTarget.length;i++){
		if(checkStr.indexOf(transTarget.charAt(i),0)==-1){
			return false;
		}
	}
	return true;
}
function checkURL(strTarget){
    var str = strTarget;
    if(str.match(/(http|ftp):\/\/[!#-9A-~]+\.+[a-z0-9]+/i)){
        return true;
    }else{
        return false;
    }
}
function checkMAIL(strTarget){
	var str = strTarget;
    if(str.match(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/)){
        return true;
    }else{
        return false;
    }
}