﻿<!--
//  Copyright(C) 2000-2005 TAKEUCHI-Veludo Co.,Ltd. All Rights Reserved.


var c3=false,c4=false,c5=false,
c6=false,c7=false,c8=false,c9=false,c10=false,c11=false,c13=false;

msg="このページの 右上の ボタンを クリック して、画 面を 最大化 して ご覧ください。　　　　　　";

timerID=setTimeout("scrollSt()",120);

var times=getCookie("times");

var sptms=getCookie("sptms");

var iwidth=screen.width;
var jwidth=iwidth-100;
if(times ==""){
 times=0;
}
if(sptms =="")  sptms=0;
if(document.referrer == "http://www.takeuchi-veludo.com/present.htm"){
  if(document.getElementById){        //Moz,NN6,IE5用
    window.resizeTo(jwidth,580);
  }
  else if(document.all){
    window.resizeTo(jwidth,580);
  }
  else if(document.layers){
    window.outerWidth=jwidth;
    window.outerHeight=540;
  }
}

function FormClear(){
   c3=false,c4=false,c5=false,
   c6=false,c7=false,c8=false,c9=false,c10=false,c11=false,c13=false;
   document.Formp.jobtype.options[0].text = "－ お仕事の業種 －"; 
}
function itemSelect(){
   document.Formp.item.select();
}
function acshName(){
   document.Formp.acsh.select();
}
function schName(){
   document.Formp.school.select();
}
function mtSelect(){
   document.Formp.desiremeter.select();
}
function pickup(){
   c13=!c13;
   if(c6==true && c7==true  && c8==true && c9==true && c10==true && c11==true){
     c6=false,c7=false,c8=false,c9=false,c10=false,c11=false;
     document.Formp.velselect[0].checked=false;
     document.Formp.velselect[1].checked=false;
     document.Formp.velselect[2].checked=false;
     document.Formp.velselect[3].checked=false;
     document.Formp.velselect[4].checked=false;
     document.Formp.velselect[5].checked=false;
   }
}
function pickup2(){
   if(c6==true && c7==true  && c8==true && c9==true && c10==true && c11==true){
         c6=false,c7=false,c8=false,c9=false,c10=false,c11=false;
         document.Formp.velselect[0].checked=false;
         document.Formp.velselect[1].checked=false;
         document.Formp.velselect[2].checked=false;
         document.Formp.velselect[3].checked=false;
         document.Formp.velselect[4].checked=false;
         document.Formp.velselect[5].checked=false;
         alert("生地タイプの全てがチェックされていましたので、\n\n代表的な生地をピックアップして\n\nサンプル送付させていただきます。");
         c13=!c13;
         document.Formp.velselect1[1].checked=true;
   }
}
function FormCheck(){
 document.Formp.apna.value=navigator.appName;
 document.Formp.apver.value=navigator.appVersion;
     if(document.Formp.Fcheck[0].checked == true)  c3=true;
     if(document.Formp.Fcheck[1].checked == true)  c5=true;
if  (c3 == false && c4 == false && c5 == false){
       alert("１．～ ２．の チェック 項目の チェックを お忘れです。");
       document.Formp.Fcheck[0].focus();
       return false;
}
if  (document.Formp.postNo.value == ""){
    if(document.Formp.Fcheck[1].checked == false){
       alert("郵便番号の 入力を お忘れです。");
       document.Formp.postNo.focus();
       return false;
    }
}
if  (document.Formp.name.value == ""){
       alert("お名前の 入力を お忘れです。");
       document.Formp.name.focus();
       return false;
}
if  (document.Formp.address.value == ""){
    if(document.Formp.Fcheck[1].checked == false){
       alert("ご住所の 入力を お忘れです。");
       document.Formp.address.focus();
       return false;
    }
}
if  (document.Formp.telephone.value == ""){ 
      alert("ＴＥＬの 入力を お忘れです。");
       document.Formp.telephone.focus();
       return false;
}

if  (document.Formp.Fcheck[1].checked == true || document.Formp.Fcheck[0].checked == true){
    if(document.Formp.comment.value == ""){
       alert("できるだけ お客様のご要望にお答えしたいと考えておりますので、\n\nご使用用途・ご要望などを どうぞ、詳しく お書きくださいませ。");
       document.Formp.comment.focus();
       return false;
    }
}       
 
if  (document.Formp.email.value == "") return velSelItem();
if  (document.Formp.email.value.indexOf("@",0)<0){
       alert("メールアドレスを ご確認お願いします。");
       document.Formp.email.focus();
       document.Formp.email.select();
       return false;
     }
if  (navigator.appVersion.charAt(0)<4) return velSelItem();
else if  (document.Formp.email.value.match(/\w+@\w+/)) return velSelItem();
       alert("メールアドレスを ご確認お願いします。");
       document.Formp.email.focus();
       document.Formp.email.select();
       return false;
}
function velSelItem(){
    if(document.Formp.Fcheck[0].checked == true){
       NAME=document.Formp.name.value;
       thanks=NAME+" 様、生地サンプルのご依頼 有難うございます";
document.Formp.We_keep_on_being_creative_of_the_dreams.value="";
       document.Formp.title.value=thanks;
//       document.Formp.subject.value = "フォームメール：生地購入用サンプル希望（個人）tkv";
     if(document.Formp.desiremeter.value=="　0" || document.Formp.desiremeter.value=="")
        document.Formp.desiremeter.value="未 定";
     if(document.Formp.velselect2[1].checked == true)  c6=true;
     if(document.Formp.velselect3[1].checked == true)  c7=true;
     if(document.Formp.velselect4[1].checked == true)  c8=true;
     if(document.Formp.velselect5[1].checked == true)  c9=true;
     if(document.Formp.velselect6[1].checked == true)  c10=true;
     if(document.Formp.velselect7[1].checked == true)  c11=true;
     if(document.Formp.velselect1[1].checked == true)  c13=true;
       if(c6==false && c7==false && c8==false && c9==false && c10==false && c11==false && c13==false){
         alert("ご希望生地の 種類の項目の チェックをお忘れです。\n\n生地タイプと 色系の ご選択をお願いします。");
         document.Formp.velselect2[1].focus();
         return false;
       }
       else{
         if(document.all || document.getElementById){
            i=Formp.length-2;
            var obj=Formp.elements[i];
            obj.disabled = true;
         }
         return true;
       }
    }

    else{
       if(document.Formp.BusinessExpress[0].checked==true)  document.Formp.BusinessExpress[0].value="お問い合わせのみ";
       if(document.Formp.BusinessExpress[1].checked==true)  document.Formp.BusinessExpress[1].value="お問い合わせのみ";
       NAME=document.Formp.name.value;
       thanks3=NAME+"　様、ご記入  ありがとうございました";
       document.Formp.We_keep_on_being_creative_of_the_dreams.value="";
       document.Formp.title.value=thanks3;
       document.Formp.subject.value = "フォームメール：生地購入の問合わせ、感想など";
         if(document.all || document.getElementById){
            i=Formp.length-2;
            var obj=Formp.elements[i];
            obj.disabled = true;
         }
         return true;
    }
}

function faxEmail(){
    if(document.Formp.Fcheck[0].checked == true){
      alert("ＦＡＸを お持ちでしたら、ご入力をお願いします。\n\nお持ちでなければ、メールアドレスへ お進みください。");
      document.Formp.fax.focus();
    }
}
function Emailin(){
    if(document.Formp.email.value == ""){
      alert("メールアドレス を お持ちでしたら、\n\n必ず ご入力をお願いします。");
      if(document.Formp.Fcheck[0].checked == true){
        alert("サンプルご依頼に対する 受付け返信メールを 送信いたします。");
        document.Formp.email.focus();
      }
      else
        document.Formp.email.focus();
    }
    else 
      document.Formp.age.focus();
}
function emCheck(){
    if(document.Formp.email.value != ""){
      emad=document.Formp.email.value;
      emch=confirm("---《 メールアドレスの ご確認 》-----------------------\n\nメールアドレスに お間違いが 無いか、ご確認をお願いします。\n\n　　【 "+emad+" 】\n\n◎ お間違いが 無ければ、［ Ｏ Ｋ ］ボタンを クリック してください。\n\n\n● 訂正される場合には、[キャンセル]ボタン または、[×]をクリックしてください。\n");
        if(emch == true){
          document.Formp.sex[0].focus();
        }
        else
          document.Formp.email.focus();
    }
    else
      document.Formp.sex[0].focus();
}
function cutsell(){
 var ua=window.navigator.userAgent;
 c3=!c3;
if(times == 0){
 if(navigator.appName.charAt(0) == "N"){
   if(navigator.appVersion.charAt(0)>3){
    if(document.referrer != "http://www.takeuchi-veludo.com/buy-stm.html" && document.referrer != "http://www.takeuchi-veludo.com/cutsell1.html"){
     mess=confirm("◆ このページへは、トップページから お入りになりましたか？\n\n　　○ トップページから 入られたお客様は、[Ｏ Ｋ] ボタンを\n\n　　▼ 直接、このページに入られたお客様は、[キャンセル] ボタンを\n\n押してください。");
     if(mess == false){
       alert("◎ トップページから お入りくださるよう\n\n　　お願い申し上げます。");
       location.href="http://www.takeuchi-veludo.com/velvet.html";
     }
    }
    if(document.referrer == "http://www.takeuchi-veludo.com/cutsell1.html"){
       mess=confirm("《 ご購入希望のお客様へ 》を お読みくださいましたか？\n\n◎ 読まれたお客様は、[Ｏ Ｋ] ボタンを\n\n▼ 読まれていないお客様は、[キャンセル] ボタンを\n\n押してください。");
       if(mess == false){
        alert("《 ご購入希望のお客様へ 》を 一度、お読みください。");
        window.open("buy-stm.html");
       }
       else{
         location.hash="policy8";
       }
    }
    else if(document.referrer != "http://www.takeuchi-veludo.com/buy-stm.html"){
      mess=confirm("《 ご購入希望のお客様へ 》を お読みくださいましたか？\n\n◎ 読まれたお客様は、[Ｏ Ｋ] ボタンを\n\n▼ 読まれていないお客様は、[キャンセル] ボタンを\n\n押してください。");
       if(mess == true){
         location.hash="policy8";
       } 
       else{
        alert("《 ご購入希望のお客様へ 》を 一度、お読みください。");
        window.open("buy-stm.html");
       }
    }
   }
 }
 else if(document.all) {
   if(document.referrer != "http://www.takeuchi-veludo.com/buy-stm.html" || document.referrer != "http://www.takeuchi-veludo.com/cutsell1.html"){
     return showModalDialog("Confirm/Confirm1.htm",window,"status:no;dialogWidth:380px;dialogHeight:230px");
   }
   location.hash="policy8";

   if(document.referrer == "http://www.takeuchi-veludo.com/cutsell1.html"){
    return showModalDialog("Confirm/Confirm2.htm",window,"status:no;dialogWidth:450px;dialogHeight:210px");
   }
   else if(document.referrer != "http://www.takeuchi-veludo.com/buy-stm.html"){
    return showModalDialog("Confirm/Confirm2.htm",window,"status:no;dialogWidth:450px;dialogHeight:210px");
   }
 }
 else{
    if(document.referrer != "http://www.takeuchi-veludo.com/buy-stm.html" && document.referrer != "http://www.takeuchi-veludo.com/cutsell1.html"){
     mess=confirm("◆ このページへは、トップページから お入りになりましたか？\n\n  ○ トップページから 入られたお客様は、[Ｏ Ｋ] ボタンを\n\n　　▼ 直接、このページに入られたお客様は、[キャンセル] ボタンを\n\n押してください。");
     if(mess == false){
       alert("◎ トップページから お入りくださるよう\n\n　　お願い申し上げます。");
       location.href="http://www.takeuchi-veludo.com/velvet.html";
      }
    }
    if(document.referrer == "http://www.takeuchi-veludo.com/cutsell1.html"){
       mess=confirm("《 ご購入希望のお客様へ 》を お読みくださいましたか？\n\n◎ 読まれたお客様は、[Ｏ Ｋ] ボタンを\n\n▼ 読まれていないお客様は、[キャンセル] ボタンを\n\n押してください。");
       if(mess == false){
        alert("《 ご購入希望のお客様へ 》を 一度、お読みください。");
        window.open("buy-stm.html");
       }
       else{
         location.hash="policy8";
       }
   }
   else if(document.referrer != "http://www.takeuchi-veludo.com/buy-stm.html"){
       mess=confirm("《 ご購入希望のお客様へ 》を お読みくださいましたか？\n\n◎ 読まれたお客様は、[Ｏ Ｋ] ボタンを\n\n▼ 読まれていないお客様は、[キャンセル] ボタンを\n\n押してください。");
       if(mess == true){
         location.hash="policy8";
       } 
       else{
        alert("《 ご購入希望のお客様へ 》を 一度、お読みください。");
        window.open("buy-stm.html");
       }
   }
 }
}
else{
 if(navigator.appName.charAt(0) == "N"){
   if(navigator.appVersion.charAt(0)>3){
    if(document.referrer == "http://www.takeuchi-veludo.com/cutsell1.html"){
       mess=confirm("《 ご購入希望のお客様へ 》を お読みくださいましたか？\n\n◎ 読まれたお客様は、[Ｏ Ｋ] ボタンを\n\n▼ 読まれていないお客様は、[キャンセル] ボタンを\n\n押してください。");
       if(mess == false){
        alert("《 ご購入希望のお客様へ 》を 一度、お読みください。");
        window.open("buy-stm.html");
       }
       else{
         location.hash="policy8";
       }
    }
    else if(document.referrer != "http://www.takeuchi-veludo.com/buy-stm.html"){
      mess=confirm("《 ご購入希望のお客様へ 》を お読みくださいましたか？\n\n◎ 読まれたお客様は、[Ｏ Ｋ] ボタンを\n\n▼ 読まれていないお客様は、[キャンセル] ボタンを\n\n押してください。");
       if(mess == true){
         location.hash="policy8";
       } 
       else{
        alert("《 ご購入希望のお客様へ 》を 一度、お読みください。");
        window.open("buy-stm.html");
       }
    }
   }
 }
 else if(document.all){
   location.hash="policy8";
   if(document.referrer == "http://www.takeuchi-veludo.com/cutsell1.html"){
    return showModalDialog("Confirm/Confirm2.htm",window,"status:no;dialogWidth:450px;dialogHeight:210px");
   }
   else if(document.referrer != "http://www.takeuchi-veludo.com/buy-stm.html"){
    return showModalDialog("Confirm/Confirm2.htm",window,"status:no;dialogWidth:450px;dialogHeight:210px");
   }
 }
 else{
    if(document.referrer == "http://www.takeuchi-veludo.com/cutsell1.html"){
    mess=confirm("《 ご購入希望のお客様へ 》を お読みくださいましたか？\n\n◎ 読まれたお客様は、[Ｏ Ｋ] ボタンを\n\n▼ 読まれていないお客様は、[キャンセル] ボタンを\n\n押してください。");
       if(mess == false){
        alert("《 ご購入希望のお客様へ 》を 一度、お読みください。");
        window.open("buy-stm.html");
       }
       else{
         location.hash="policy8";
       }
   }
   else if(document.referrer != "http://www.takeuchi-veludo.com/buy-stm.html"){
 mess=confirm("《 ご購入希望のお客様へ 》を お読みくださいましたか？\n\n◎ 読まれたお客様は、[Ｏ Ｋ] ボタンを\n\n▼ 読まれていないお客様は、[キャンセル] ボタンを\n\n押してください。");
       if(mess == true){
         location.hash="policy8";
       } 
       else{
        alert("《 ご購入希望のお客様へ 》を 一度、お読みください。");
        window.open("buy-stm.html");
       }
   }
 }
}
}
function prtChek(){
 c4=!c4;

 if(navigator.appName.charAt(0) == "N"){
   if(navigator.appVersion.charAt(0)>3){
    if(document.referrer != "http://www.takeuchi-veludo.com/present.htm"){
     mess=confirm("◆ このページへは、トップページから お入りになりましたか？\n\n　　◎ トップページから 入られたお客様は、[Ｏ Ｋ] ボタンを\n\n　　▼ 直接、このページに入られたお客様は、[キャンセル] ボタンを\n\n押してください。");
     if(mess == false){
       alert("○ トップページから お入りくださるよう\n\n　　お願い申し上げます。");
       location.href="http://www.takeuchi-veludo.com/velvet";
     } 
     else{
       alert("◎ トップページ最下部の【プレゼントボタン】を 押して\n\n　　応募ページへ お入りください。");
       location.href="cutsell1.html#okurimono";
     }
    }
   }
 }
 else{
   if(document.referrer != "http://www.takeuchi-veludo.com/present.htm"){
     mess=confirm("◆ このページへは、トップページから お入りになりましたか？\n\n　　○ トップページから 入られたお客様は、[Ｏ Ｋ] ボタンを\n\n　　▼ 直接、このページに入られたお客様は、[キャンセル] ボタンを\n\n押してください。");
     if(mess == false){
       alert("◎ トップページから お入りくださるよう\n\n　　お願い申し上げます。");
       location.href="http://www.takeuchi-veludo.com/velvet";
     } 
     else{
       alert("トップページ最下部の【プレゼントボタン】を 押して\n\n応募ページへ お入りください。");
       location.href="cutsell1.html#okurimono";
     }
   }
 } 

}
function jobType(){
  if(document.Formp.job.options[0].selected == true ||
     document.Formp.job.options[5].selected == true ||
     document.Formp.job.options[6].selected == true ||
     document.Formp.job.options[7].selected == true ||
     document.Formp.job.options[8].selected == true){
     document.Formp.jobtype.options[0].text = "－ お仕事の業種 －";
     document.Formp.jobtype.focus();
  }
  else{
     document.Formp.jobtype.options[0].text = "※ ご選択不要です";
     document.Formp.item.focus();
  }
}
function scrollSt(){
  clearTimeout(timerID);
  window.status=msg;
  msg=msg.substring(1,msg.length)+msg.substring(0,1);
  timerID=setTimeout("scrollSt()",200);
}
function velSelect(){
  if(document.Formp.Fcheck[0].checked == true){
  if(document.Formp.item.value == " ( たとえば、スカート など )" ||
     document.Formp.item.value == ""){
     document.Formp.velselect2[1].focus();
  }
  else{
     if(c6==false && c7==false && c8==false && c9==false && c10==false && c11==false &&  c13==false){
       alert("お好きな ベルベットタイプが ありましたら、\n\n生地タイプと 色系の ご選択をお願いします。");
       document.Formp.velselect2[1].focus();
     }   
  }
  }
}

function Init(){
   chFck();
   times++;setCookie("times",times);
}

function f_submit(){
   document.Formp.vtimes.value=times;
   if(!navigator.cookieEnabled)
     document.Formp.sptimes.value="Block-cookie";
   else  document.Formp.sptimes.value=sptms;
}
function getCookie(key){
   tmp=document.cookie+";";
   tmp1=tmp.indexOf(key,0);
   if(tmp1 != -1){
     tmp=tmp.substring(tmp1,tmp.length);
     start=tmp.indexOf("=",0) + 1;
     end=tmp.indexOf(";",start);
     return(unescape(tmp.substring(start,end)));
   }
   return("");
}
function setCookie(key,val){
   var expiresDate = new Date();
   expiresDate.setTime(expiresDate.getTime() + 60*60*24*365*1000);
   tmp = key + "=" + escape(val) + ";";
   tmp += "expires=";
   tmp += expiresDate.toGMTString();
   document.cookie=tmp;
}
function chFck(){
  if(navigator.appName.charAt(0) == "N"){
   if(navigator.appVersion.charAt(0)>3){
    if(document.referrer == "http://www.takeuchi-veludo.com/buy-stm.html"){
      document.Formp.Fcheck[0].click();     
    }
    if(document.referrer == "http://www.takeuchi-veludo.com/cutsell1.html"){
      document.Formp.Fcheck[0].click();     
    }
   } 
  }
  else{
     if(document.referrer == "http://www.takeuchi-veludo.com/buy-stm.html"){
      document.Formp.Fcheck[0].click();     
     }
     if(document.referrer == "http://www.takeuchi-veludo.com/cutsell1.html"){
      document.Formp.Fcheck[0].click();     
    }
  }
}
function spset(){
  sptms++;setCookie("sptms",sptms);
}
function bettchu(){
  kakumsg=confirm("※ オーダーメイド加工をご希望の場合は、\n\n　　ご指定の色に染色させていただきますが、\n\n　　加工数量として１０ｍ以上からのご注文になります。\n\n　　　また、ご注文数量のまとまる場合にも、\n\n　　お見積もり価格を出させていただきますので、\n\n● ご要望 数量のご記入をお願いします。");
  if(kakumsg == true){
     document.Formp.ordermeter.focus();
     document.Formp.ordermeter.select();
     }
  else{
     document.Formp.By_Order[0].checked=false;
     document.Formp.comment.focus();
  }
}
function taChek(){
c5=!c5;
 tamsg=confirm("◆ お問い合わせのみでよろしいのでしょうか？\n\n　　○ お問い合わせのみの場合には、【 Ｏ Ｋ 】ボタンを押してください。\n\n　　● 生地サンプルをご希望の場合には、［キャンセル］ボタンを押してください。");
 if(tamsg == true){
     document.Formp.postNo.focus();   
 }
 else{
    c5=false;
    document.Formp.Fcheck[0].click();
    document.Formp.BusinessExpress[1].focus();
 }
}
function scrkb(){
var userAgent = window.navigator.userAgent.toLowerCase();
if (userAgent.indexOf('edge') != -1) {
   msgon=confirm("★ 表示ダイアログの［ 保 存 ］⇒［ 開 く ］の順にクリックしてください。\n\n　　パソコンの環境(スペック)によって処理に時間がかかることがあります。");
   if(msgon == true){
      return false;
   }
}
else if (userAgent.indexOf('chrome') != -1) {
   alert("Chromeでは、スクリーンキーボードは Windowsの補助機能でご利用ください。");
}
else if (userAgent.indexOf('chrome') == -1){
   msgon=confirm("★ 表示ダイアログの［ 開 く ］をクリックしてください。\n\n　　パソコンの環境(スペック)によって処理に時間がかかることがあります。");
   if(msgon == true){
      return false;
   }
}
}
//-->
