function Check(){
 if(document.form.year.value==""){
  alert("ご予約希望日をご入力ください。");
  return false;
 }
 if(document.form.month.value==""){
  alert("ご予約希望日をご入力ください。");
  return false;
 }
 if(document.form.day.value==""){
  alert("ご予約希望日をご入力ください。");
  return false;
 }
 if(document.form.time.value==""){
  alert("ご予約開始時間をお選びください。");
  return false;
 }
  if(document.form.number.value==""){
  alert("ご利用人数をご入力ください。");
  return false;
 }
  if(document.form.sei.value==""){
  alert("お名前をご入力ください。");
  return false;
 }
  if(document.form.mei.value==""){
  alert("お名前をご入力ください。");
  return false;
 }
if(document.form.kana1.value==""){
  alert("ふりがなをご入力ください。");
  return false;
 }
if(document.form.kana2.value==""){
  alert("ふりがなをご入力ください。");
  return false;
 }
if(document.form.tel1.value==""){
  alert("第1連絡先電話番号をご入力ください。");
  return false;
 }
if(checkNo(document.form.tel1.value) == false){
        document.form.tel1.focus();
        document.form.tel1.select();
  alert("第1連絡先電話番号は数字でご入力ください。");
  return false;
 }
if(document.form.tel2.value==""){
  alert("第1連絡先電話番号をご入力ください。");
  return false;
 }
if(checkNo(document.form.tel2.value) == false){
        document.form.tel2.focus();
        document.form.tel2.select();
  alert("第1連絡先電話番号は数字でご入力ください。");
  return false;
 }
if(document.form.tel3.value==""){
  alert("第1連絡先電話番号をご入力ください。");
  return false;
 }
if(checkNo(document.form.tel3.value) == false){
        document.form.tel3.focus();
        document.form.tel3.select();
  alert("第1連絡先電話番号は数字でご入力ください。");
  return false;
 }
if(checkLength(document.form.tel3.value) == false){
        alert("連絡先電話番号の下4桁を入力してください。");
        document.form.tel3.focus();
        document.form.tel3.select();
  return false;
 }
if(document.form.tel4.value==""){
  alert("第2連絡先電話番号をご入力ください。");
  return false;
 }
if(checkNo(document.form.tel4.value) == false){
        document.form.tel4.focus();
        document.form.tel4.select();
  alert("第2連絡先電話番号は数字でご入力ください。");
  return false;
 }
if(document.form.tel5.value==""){
  alert("第2連絡先電話番号をご入力ください。");
  return false;
 }
if(checkNo(document.form.tel5.value) == false){
        document.form.tel5.focus();
        document.form.tel5.select();
  alert("第2連絡先電話番号は数字でご入力ください。");
  return false;
 }
if(document.form.tel6.value==""){
  alert("第2連絡先電話番号をご入力ください。");
  return false;
 }
if(checkNo(document.form.tel6.value) == false){
        document.form.tel6.focus();
        document.form.tel6.select();
  alert("第2連絡先電話番号は数字でご入力ください。");
  return false;
 }
if(checkLength(document.form.tel6.value) == false){
        document.form.tel6.focus();
        document.form.tel6.select();
	  alert("連絡先電話番号の下4桁を入力してください。");
  return false;
 }

if(document.form.mail1.value==""){
  alert("メールアドレスをご入力ください。");
  return false;
 }
if(document.form.mail1.value.indexOf("@")<=0){
  alert("メールアドレスが正しくありません。");
  return false;
 }
if(document.form.mail2.value != document.form.mail1.value)　{
  alert("メールアドレスと確認用のアドレスが間違っています。");
  return false;
 }
  else{
  return true;
 }
}

function checkZenkaku(msg){//全角チェック
    var i,msg2,msg3;
    var char_length = ("あ".length);

    //スペースを取り除く
    msg2 = msg.replace(/ /g,"");
    if(msg2.length == 0){
        return false;
    }
    for(i=0;i<msg2.length;i=i+char_length){
        msg3 = msg2.charAt(i);
        if((msg3 >= "!" && msg3 <= "~") || (msg3 >= "｡" && msg3 <= "ﾟ")){
            return false;
        }
    }
    return true;
}
function checkNo(msg){//数字チェック
    var i,msg2;
    //許容範囲を増やす場合はここで文字を増やせばよい
    var checkStr = new String   ("0123456789１２３４５６７８９０");
    //スペースを取り除く
    msg2 = msg.replace(/ /g,"");
    if(msg2.length == 0){
        return false;
    }
    for(i=0;i<msg2.length;i++){
        if(checkStr.indexOf(msg2.charAt(i),0) == -1){
            return false;
        }
    }
    return true;
}
function checkLength(tel) {
var intLength = 4;
 if (eval(tel.length) != intLength) {
 return false;
 }
}


