// JavaScript Document
function toiawase(){
    window.open ("https://native-service.net/inquiry/form.do",  "po", 'height=1200,width=1050,resizable=false,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no')
}
function toiawase_old(){
    window.open ("https://www.janga.co.jp/yingpin/form_jt.html",  "po", 'height=620,width=830,resizable=false,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no')
}
function toiawase2(){
    window.open ("jt2.html",  "po", 'width=550,resizable=false,scrollbars=no,status=no,toolbar=no,menubar=no,location=no')
}
function popSms(){
var iTop=(window.screen.height-540)/2;
var iLeft=(window.screen.width-550)/2;
    window.open ("http://jsms.native-service.net/sms3/bin/","sms", 'height=540,width=550,scrollbars=no,status=no,toolbar=no,menubar=no,location=no,top='+iTop+',left='+iLeft)
}
function popJcoms(){
var iTop=(window.screen.height-540)/2;
var iLeft=(window.screen.width-550)/2;
    window.open ("http://jcoms.native-service.net/lite/bin/","jcomslite")
}
function moushikomi(){
    window.open ("https://native-service.net/inquiry/form.do","pop",'height=1200,width=800,resizable=false,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no')
}

/* ふりがなチェック */

    var huri ="フリガナ";
    var co ="会社名";
    var po ="役職名称";
    var na ="お名前";
    var em ="E-mail";
    var te ="TEL";
    var fa ="FAX";
    var zi ="郵便番号";
    

 function FuriganaCheck(n,a) {

   if( n.match( /[^ァ-ン　\s]+/ ) ) {
      alert(a+"は、「カタカナ」のみで入力して下さい。");
      return 1;
   }
   return 0;
}
/* 空欄チェック */
 function nullCheck() {
 var str="";
   if(document.frm.coname.value==""){
        str+= co+"は、必須入力です。\n\r\n\r";
    }
    if(document.frm.post.value==""){
        str+= po+"は、必須入力です。\n\r\n\r";
    }
    if(document.frm.name_reading.value==""){
        str+= "フリガナは、必須入力です。\n\r\n\r";
    }
    if(document.frm.name.value==""){
        str+= "お名前は、必須入力です。\n\r\n\r";
    }
    if(document.frm.email.value==""){
        str+="E-mailは、必須入力です。\n\r\n\r";
    }
    if(document.frm.tel.value==""){
        str+="TELは、必須入力です。\n\r\n\r";
    }
    if(document.frm.zip.value==""){
        str+= "郵便番号は、必須入力です。\n\r\n\r";
    }
    if(document.frm.address.value==""){
        str+="住所は、必須入力です。";
    }
    if( str != "" ){
        alert(str); 
        return 1;
    }   
    return 0;
}   

/* email半角英文字チェック */
function emailCheck(n){
    if( n.value.match(/[^A-Za-z0-9@.\-_]+/)){
    alert("メールアドレスに入力できない文字です。");
    return 1;
    }
return 0;
}

function chMail() {
  // チェック方式（comかne.jpかco.jp限定）
  ml = /.+@.+\..+|.+@.+\.com$|.+@.+\.ne\.jp$|.+@.+\.co\.jp$/;
  mf = document.frm.email;
  if(mf.value==""){
        return 0;
  }else if(mf.value.match(ml)){
   alert("メールアドレスが不正です");
  return 1;
  }
  return 0;
}

/* 半角数字チェック */
function TELCheck(n,a) {
   if( n.value.match( /[^0-9\-]+/ ) ) {
      alert(a+"は、半角数字とハイフン(-)のみで入力して下さい。");
      n.value = "";
      return 1;
   }
   return 0;
}

/* 全部チェック */
function AllCheck() {
   var check = 0;
   check += nullCheck();
   check += FuriganaCheck(document.frm.name_reading.value,huri);
   check += emailCheck(document.frm.email);
   check += TELCheck(document.frm.tel,te);
   check += TELCheck(document.frm.fax,fa);
   check += TELCheck(document.frm.zip,zi);
   check += chMail();
   
   if( check > 0 ) {
      return false;
   }
   return true;
   
}

<!-- フォーム入力検証 -->

