function contact_check() {

	if(window.document.fm_contact.cop.value == "") {
		jAlert("貴社名を入力してください。","お問い合わせ");
		return;
	}

	if(window.document.fm_contact.nam.value == "") {
		jAlert("ご担当者名を入力してください。","お問い合わせ");
		return;
	}

	if(window.document.fm_contact.mail.value == "") {
		jAlert("メールアドレスを入力してください。","お問い合わせ");
		return;
	}

	if(window.document.fm_contact.mail.value != "") {
		str = window.document.fm_contact.mail.value;
		var tmp = str.match("^[0-9A-Za-z._-]+@[0-9A-Za-z.-]+$");
		if (tmp != str){
			jAlert("メールアドレスの入力が間違っています","お問い合わせ");
			return;
		}
	}

	if(window.document.fm_contact.imp.value == "") {
		jAlert("コメント欄にお問い合わせ内容をご記入ください。","お問い合わせ");
		return;
	}

	jConfirm('お問合せ内容を送信します。よろしいですか？', '資料請求', function(r) {
		if(r == true) {
			window.document.fm_contact.submit();
		}
	});
}

//半角数字チェック
function isNumeric(num){
    if(isNaN(num)){
        return false;
    }
    return true;
}

//半角英数字チェック
function isAlphaNumeric(str) {
	if( str.match( /[^A-Za-z0-9\s.-]+/ ) ) {
		return false;
	}
	return true;
}

//半角英字チェック
function isAlpha(str) {
	if( str.match( /[^A-Za-z\s.-]+/ ) ) {
		return false;
	}
	return true;
}

//半角ｶﾀｶﾅチェック
function isKana(str) {
	if( str.match( /[^｡-ﾟ]+/ ) ) {
		return false;
	}
	return true;
}

//全角チェック
function checkIsZenkaku(str) {
	for(var i=0; i<str.length; i++){
		/* 1文字ずつ文字コードをエスケープし、その長さが4文字以上なら全角 */
		var len=escape(str.charAt(i)).length;
		if(len>=4){
			return true;
		}
	}
	return false;
}

