function InpChk(theForm) {
var sBuf;

  if(theForm.name.value == "") {
    alert("お名前は必ず入力してください");
    theForm.name.focus();
    return false;
  }
  if(theForm.name.value.length > 10) {
    alert("お名前は１０文字以内で入力してください");
    theForm.name.focus();
    return false;
  }
   if(theForm.hurigana.value == "") {
    alert("ご担当者名（フリガナ）は必ず入力してください");
    theForm.hurigana.focus();
    return false;
  }
if(theForm.hurigana.value.length > 50) {
	    alert("ご担当者名（フリガナ）は５０文字以内で入力してください");
	    theForm.hurigana.focus();
	    return false;	
	}
  if(theForm.company.value == "") {
    alert("会社名は必ず入力してください");
    theForm.company.focus();
    return false;
  }
  if(theForm.company.value.length > 100) {
    alert("会社名は１００文字以内で入力してください");
    theForm.company.focus();
    return false;
	}
  if(theForm.section.value != "") {
	  if(theForm.section.value.length > 50) {
	    alert("部門は５０文字以内で入力してください");
	    theForm.section.focus();
	    return false;
		}
	}
  if(theForm.title.value != "") {
	  if(theForm.title.value.length > 50) {
	    alert("役職は５０文字以内で入力してください");
	    theForm.title.focus();
	    return false;
		}
	}
  if(theForm.addr1.value == "") {
    alert("住所は必ず入力してください");
    theForm.addr1.focus();
    return false;
  }
  if(theForm.addr1.value.length > 50) {
    alert("住所１は５０文字以内で入力してください");
    theForm.addr1.focus();
    return false;
	}
  if(theForm.addr2.value != "") {
	  if(theForm.addr2.value.length > 50) {
	    alert("住所２は５０文字以内で入力してください");
	    theForm.addr2.focus();
	    return false;
		}
	}
  if(theForm.phone.value == "") {
    alert("電話番号は必ず入力してください");
    theForm.phone.focus();
    return false;
	} else {
	  if(theForm.phone.value.length > 25) {
	    alert("電話番号は２５文字以内で入力してください");
	    theForm.phone.focus();
	    return false;
		}
		sBuf = theForm.phone.value;
		if(!sBuf.match(/^[0-9-]{6,9}$|^[0-9-]{12}$/) && !sBuf.match(/^\d{1,4}-\d{4}$|^\d{2,5}-\d{1,4}-\d{4}$/)) {
	    alert("電話番号が正しくありません");
	    theForm.phone.focus();
	    return false;
		}
  }

  if(theForm.email.value == "") {
    alert("メールアドレスは必ず入力してください");
    theForm.email.focus();
    return false;
  }
  if(theForm.email.value.length > 100) {
    alert("メールアドレスは１００文字以内で入力してください");
    theForm.email.focus();
    return false;
	}
	if(!theForm.email.value.match(/.+@.+\..+/)) {
    alert("メールアドレスが正しくありません");
    theForm.email.focus();
    return false;
	}
  if(theForm.URL.value != "") {
	  if(theForm.URL.value.length > 100) {
	    alert("URLは１００文字以内で入力してください");
	    theForm.URL.focus();
	    return false;
		}
		sBuf = theForm.URL.value;
		if(!sBuf.match(/[a-z0-9]+\.+[a-z0-9]/i)) {
	    alert("URLが正しくありません");
	    theForm.URL.focus();
	    return false;
		}
	}
	if(theForm.p_num.value == "") {
    alert("想定ユーザ数は必ず入力してください");
    theForm.p_num.focus();
    return false;
  }
  sBuf = theForm.p_num.value;
  if(!sBuf.match(/^\d*$/)) {
    alert("想定ユーザ数は数字で入力してください");
    theForm.p_num.focus();
    return false;
  }
  if(theForm.content.value.length > 500) {
	    alert("ご質問・ご要望は５００文字以内で入力してください");
	    theForm.URL.focus();
	    return false;
	}
  if(theForm.product_name1.value.length > 500) {
	    alert("ご検討中のサービス名は５００文字以内で入力してください");
	    theForm.URL.focus();
	    return false;
	}
  if(theForm.product_name2.value.length > 500) {
	    alert("ご利用中のサービス名は５００文字以内で入力してください");
	    theForm.URL.focus();
	    return false;
	}
  
  return true;
}
