<!--
//------------------------------------------
//  お客様情報変更ボタン押下時
//------------------------------------------
function update_button() {
	//
	// Ｃｏｏｋｉｅ出力（グレード、フラグに""を保管）
	//
	setCookie("GRADE", "");
	setCookie("FLG", "");
}

//------------------------------------------
//  インプットチェック１ （タイプ別製品一覧）
//------------------------------------------
function input_check1() {
	//
	// 製品（空白データ）のチェック
	//
        check1 = "00";
        for(i = 0;i< document.form1.grade.options.length; i++){
                  if(document.form1.grade.options[i].selected == true){
                        check1 = document.form1.grade.options[i].value;
                  }
        }
        if(check1 == "00") { alert("\n「タイプ別製品一覧」を一覧から選択してください。"); return false; }

	//
	// 送信時間の取得(nowを補完）
	//
	now = new Date();
	year = now.getYear(); if (year < 1900){ year = 1900 + year; }
	month = now.getMonth()+1; if (month < 10){ month = "0" + month; }
	day = now.getDate(); if (day < 10){ day = "0" + day; }
	hour = now.getHours(); if (hour < 10){ hour = "0" + hour; }
	minute = now.getMinutes(); if (minute < 10){ minute = "0" + minute; }
        document.form1.now.value = year + "/" + month + "/" + day + " " + hour + ":" + minute;
        document.form1.yyyymmdd.value = year + "/" + month + "/" + day;
	//
	// Ｃｏｏｋｉｅチェック（Cookieより隠れ項目に編集）
	//
	document.form1.name.value = getCookie("NAME");
	document.form1.corp.value = getCookie("CORP");
	document.form1.buka.value = getCookie("BUKA");
	document.form1.tel.value = getCookie("TEL");
	document.form1.mail.value = getCookie("MAIL");

	//
	// Ｃｏｏｋｉｅ出力（グレード、フラグの保存）
	//
	setCookie("GRADE", check1);
	check3 = document.form1.flg.value;
	setCookie("FLG", check3);

	//
	// Ｃｏｏｋｉｅに氏名コードが保存されていなかった場合、
        //            お客様登録画面を表示へ飛ぶ
	//
	check2 = document.form1.name.value;
	if(check2 == "") { OpenWindowUPDATE();
                           return false; }
	return true;
}

//------------------------------------------
//  インプットチェック２ （グレード物性表）
//------------------------------------------
function input_check2() {
	//
	// 製品（空白データ）のチェック
	//
        check1 = "00";
        for(i = 0;i< document.form2.grade.options.length; i++){
                  if(document.form2.grade.options[i].selected == true){
                        check1 = document.form2.grade.options[i].value;
                  }
        }
        if(check1 == "00")  { alert("\n「グレード物性表」を一覧から選択してください。"); return false; }

	//
	// 送信時間の取得(nowを補完）
	//
	now = new Date();
	year = now.getYear(); if (year < 1900){ year = 1900 + year; }
	month = now.getMonth()+1; if (month < 10){ month = "0" + month; }
	day = now.getDate(); if (day < 10){ day = "0" + day; }
	hour = now.getHours(); if (hour < 10){ hour = "0" + hour; }
	minute = now.getMinutes(); if (minute < 10){ minute = "0" + minute; }
        document.form2.now.value = year + "/" + month + "/" + day + " " + hour + ":" + minute;
        document.form2.yyyymmdd.value = year + "/" + month + "/" + day;
	//
	// Ｃｏｏｋｉｅチェック（Cookieより隠れ項目に編集）
	//
	document.form2.name.value = getCookie("NAME");
	document.form2.corp.value = getCookie("CORP");
	document.form2.buka.value = getCookie("BUKA");
	document.form2.tel.value = getCookie("TEL");
	document.form2.mail.value = getCookie("MAIL");

	//
	// Ｃｏｏｋｉｅ出力（グレードの保存）
	//
	setCookie("GRADE", check1);
	check3 = document.form2.flg.value;
	setCookie("FLG", check3);

	//
	// Ｃｏｏｋｉｅに保存されていなかった場合、お客様登録画面を表示へ飛ぶ
	//
	check2 = document.form2.name.value;
	if(check2 == "") { OpenWindowUPDATE(); 
                           return false; }
	return true;
}

//------------------------------------------
//  インプットチェック３ （射出成形条件）
//------------------------------------------
function input_check3() {
	//
	// 製品（空白データ）のチェック
	//
        check1 = "00";
        for(i = 0;i< document.form3.grade.options.length; i++){
                  if(document.form3.grade.options[i].selected == true){
                        check1 = document.form3.grade.options[i].value;
                  }
        }
        if(check1 == "00")  { alert("\n「射出成形条件」を一覧から選択してください。"); return false; }

	//
	// 送信時間の取得(nowを補完）
	//
	now = new Date();
	year = now.getYear(); if (year < 1900){ year = 1900 + year; }
	month = now.getMonth()+1; if (month < 10){ month = "0" + month; }
	day = now.getDate(); if (day < 10){ day = "0" + day; }
	hour = now.getHours(); if (hour < 10){ hour = "0" + hour; }
	minute = now.getMinutes(); if (minute < 10){ minute = "0" + minute; }
        document.form3.now.value = year + "/" + month + "/" + day + " " + hour + ":" + minute;
        document.form3.yyyymmdd.value = year + "/" + month + "/" + day;
	//
	// Ｃｏｏｋｉｅチェック（Cookieより隠れ項目に編集）
	//
	document.form3.name.value = getCookie("NAME");
	document.form3.corp.value = getCookie("CORP");
	document.form3.buka.value = getCookie("BUKA");
	document.form3.tel.value = getCookie("TEL");
	document.form3.mail.value = getCookie("MAIL");

	//
	// Ｃｏｏｋｉｅ出力（グレードの保存）
	//
	setCookie("GRADE", check1);
	check3 = document.form3.flg.value;
	setCookie("FLG", check3);

	//
	// Ｃｏｏｋｉｅに保存されていなかった場合、お客様登録画面を表示へ飛ぶ
	//
	check2 = document.form3.name.value;
	if(check2 == "") { OpenWindowUPDATE(); 
                           return false; }
	return true;
}


//------------------------------------------
//  インプットチェック４ （プロダクトガイド）
//------------------------------------------
function input_check4() {
	//
	// 製品（空白データ）のチェック
	//
        check1 = "00";
        for(i = 0;i< document.form4.grade.options.length; i++){
                  if(document.form4.grade.options[i].selected == true){
                        check1 = document.form4.grade.options[i].value;
                  }
        }
        if(check1 == "00")  { alert("\n「プロダクトガイド」を一覧から選択してください。"); return false; }

	//
	// 送信時間の取得(nowを補完）
	//
	now = new Date();
	year = now.getYear(); if (year < 1900){ year = 1900 + year; }
	month = now.getMonth()+1; if (month < 10){ month = "0" + month; }
	day = now.getDate(); if (day < 10){ day = "0" + day; }
	hour = now.getHours(); if (hour < 10){ hour = "0" + hour; }
	minute = now.getMinutes(); if (minute < 10){ minute = "0" + minute; }
        document.form4.now.value = year + "/" + month + "/" + day + " " + hour + ":" + minute;
        document.form4.yyyymmdd.value = year + "/" + month + "/" + day;
	//
	// Ｃｏｏｋｉｅチェック（Cookieより隠れ項目に編集）
	//
	document.form4.name.value = getCookie("NAME");
	document.form4.corp.value = getCookie("CORP");
	document.form4.buka.value = getCookie("BUKA");
	document.form4.tel.value = getCookie("TEL");
	document.form4.mail.value = getCookie("MAIL");

	//
	// Ｃｏｏｋｉｅ出力（グレードの保存）
	//
	setCookie("GRADE", check1);
	check3 = document.form4.flg.value;
	setCookie("FLG", check3);

	//
	// Ｃｏｏｋｉｅに保存されていなかった場合、お客様登録画面を表示へ飛ぶ
	//
	check2 = document.form4.name.value;
	if(check2 == "") { OpenWindowUPDATE(); 
                           return false; }
	return true;
}


//------------------------------------------
//  インプットチェック６ （テクニカルレポート）
//------------------------------------------
function input_check6() {
	//
	// 製品（空白データ）のチェック
	//
        check1 = "00";
        for(i = 0;i< document.form6.grade.options.length; i++){
                  if(document.form6.grade.options[i].selected == true){
                        check1 = document.form6.grade.options[i].value;
                  }
        }
        if(check1 == "00") { alert("\n「テクニカルレポート」を一覧から選択してください。"); return false; }

	//
	// 送信時間の取得(nowを補完）
	//
	now = new Date();
	year = now.getYear(); if (year < 1900){ year = 1900 + year; }
	month = now.getMonth()+1; if (month < 10){ month = "0" + month; }
	day = now.getDate(); if (day < 10){ day = "0" + day; }
	hour = now.getHours(); if (hour < 10){ hour = "0" + hour; }
	minute = now.getMinutes(); if (minute < 10){ minute = "0" + minute; }
        document.form6.now.value = year + "/" + month + "/" + day + " " + hour + ":" + minute;
        document.form6.yyyymmdd.value = year + "/" + month + "/" + day;

	//
	// Ｃｏｏｋｉｅチェック（Cookieより隠れ項目に編集）
	//
	document.form6.name.value = getCookie("NAME");
	document.form6.corp.value = getCookie("CORP");
	document.form6.buka.value = getCookie("BUKA");
	document.form6.tel.value = getCookie("TEL");
	document.form6.mail.value = getCookie("MAIL");


	//
	// Ｃｏｏｋｉｅ出力（グレードの保存）
	//
	setCookie("GRADE", check1);
	check3 = document.form6.flg.value;
	setCookie("FLG", check3);


	//
	// Ｃｏｏｋｉｅに保存されていなかった場合、お客様登録画面を表示へ飛ぶ
	//
	check2 = document.form6.name.value;
	if(check2 == "") { OpenWindowUPDATE(); 
                           return false; }
	return true;

}

//------------------------------------------

//  インプットチェック５ （イエローカード）

//------------------------------------------
function input_check5() {
	//
	// 製品（空白データ）のチェック
	//
        check1 = "00";
        for(i = 0;i< document.form5.grade.options.length; i++){
                  if(document.form5.grade.options[i].selected == true){
                        check1 = document.form5.grade.options[i].value;
                  }
        }
        if(check1 == "00")  { alert("\n「イエローカード」を一覧から選択してください。"); return false; }


	//
	// 送信時間の取得(nowを補完）
	//
	now = new Date();
	year = now.getYear(); if (year < 1900){ year = 1900 + year; }
	month = now.getMonth()+1; if (month < 10){ month = "0" + month; }
	day = now.getDate(); if (day < 10){ day = "0" + day; }
	hour = now.getHours(); if (hour < 10){ hour = "0" + hour; }
	minute = now.getMinutes(); if (minute < 10){ minute = "0" + minute; }
        document.form5.now.value = year + "/" + month + "/" + day + " " + hour + ":" + minute;
        document.form5.yyyymmdd.value = year + "/" + month + "/" + day;

	//
	// Ｃｏｏｋｉｅチェック（Cookieより隠れ項目に編集）
	//
	document.form5.name.value = getCookie("NAME");
	document.form5.corp.value = getCookie("CORP");
	document.form5.buka.value = getCookie("BUKA");
	document.form5.tel.value = getCookie("TEL");
	document.form5.mail.value = getCookie("MAIL");


	//
	// Ｃｏｏｋｉｅ出力（グレードの保存）
	//
	setCookie("GRADE", check1);
	check3 = document.form5.flg.value;
	setCookie("FLG", check3);


	//
	// Ｃｏｏｋｉｅに保存されていなかった場合、お客様登録画面を表示へ飛ぶ
	//
	check2 = document.form5.name.value;
	if(check2 == "") { OpenWindowUPDATE(); 
                           return false; }
	return true;
}

//----------------------------------------
//  ＧｅｔＣｏｏｋｉｅ
//----------------------------------------
function getCookie(key,  tmp1, tmp2, xx1, xx2, xx3) {
	tmp1 = " " + document.cookie + ";";
	xx1 = xx2 = 0;
	len = tmp1.length;
	while (xx1 < len) {
		xx2 = tmp1.indexOf(";", xx1);
		tmp2 = tmp1.substring(xx1 + 1, xx2);
		xx3 = tmp2.indexOf("=");
		if (tmp2.substring(0, xx3) == key) {
			return(unescape(tmp2.substring(xx3 + 1, xx2 - xx1 - 1)));
		}
		xx1 = xx2 + 1;
	}
	return("");
}

//----------------------------------------
//  ＳｅｔＣｏｏｋｉｅ
//----------------------------------------
function setCookie(key, val, tmp) {
	tmp = key + "=" + escape(val) + "; ";
	// tmp += "path=" + location.pathname + "; ";
	tmp += "expires=Fri, 31-Dec-2030 23:59:59; ";
	document.cookie = tmp;

}

//--------------------------------------------
// お客様情報変更　（ウィンドウ OPEN）
//--------------------------------------------
function OpenWindowUPDATE() {
	var win2 = window.open('registration.htm','newwin2','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
	win2.focus();
}

//--------------------------------------------
// ＭＳＤＳ　（ウィンドウ OPEN・サイズの指定）
//--------------------------------------------
function OpenWindowMSDS() {
	var win2 = window.open('msdsinfo.htm','newwin2','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
	win2.focus();
}


// -->
