<!--
    var m_noUppreConsName = null;   // Upperにしないコントロール名の配列
    var _submitTime = 0;                // サブミット判定時間
    var childWindowCount = 0;
    var childWindowArray = new Array(); // 起動した別ブラウザのwindow名を格納しておくもの
    var _HiddenCommandName = null;  // Hiddenに値をいれてSubmitするタイプのコマンド名
    var _allowTime = 0;             // サブミット許容時間

/*------------------------------------------------------------------------*/ /**
*   submit時の前処理
*   Hiddenコマンドをクリアする。
**/ //--------------------------------------------------------------------------
    function submitPrecleaning() {
        // コントロールのvalueをクリア
        clearValue(_HiddenCommandName);
        return true;
    }

/*------------------------------------------------------------------------*/ /**
*   Hiddenに値をいれてSubmitするタイプのコマンド名をセットします。
*
*   @param arrycmd  コントロール名
**/ //--------------------------------------------------------------------------
    function setHiddenCommand(arrycmd) {
        _HiddenCommandName = arrycmd;
    }

/*------------------------------------------------------------------------*/ /**
*   受け渡された名前のコントロール名分valueをクリア("")します。
*
*   @param arrycmd  コントロール名
**/ //--------------------------------------------------------------------------
    function clearValue(arrycmd) {
        if (arrycmd != null) {
            // 渡されたコマンド名の配列分値を空にする。
            for (var i=0; i<arrycmd.length;i++) {
                if (document.forms[0].elements[arrycmd[i]] != null) {
                    document.forms[0].elements[arrycmd[i]].value = "";

                }
            }
        }
    }

/*------------------------------------------------------------------------*/ /**
*   別ブラウザを起動して、その別ブラウザからリクエスト要求をします。
*
*   @param theURL   URL
*   @param winName  ウィンドウ名
*   @param features ウィンドウ属性
**/ //--------------------------------------------------------------------------
    function openChildWindow(theURL,winName,features) { //v2.0
        var myDialog = null;
        if(winName == '' && features == ''){
            myDialog = window.open(theURL);
        }else{
            myDialog = window.open(theURL,winName,features);
        }
        childWindowArray[childWindowCount] = myDialog;
        childWindowCount++;
    }

/*------------------------------------------------------------------------*/ /**
*   当システム内で起動した別ブラウザを閉じます。
**/ //--------------------------------------------------------------------------
    function closeChildWindows() {
        for (var i = 0; i < childWindowCount; i++) {
            if (childWindowArray[i]) {
                if (childWindowArray[i].closed == false) {
                    childWindowArray[i].close();
                }
            }
        }
    }

/*------------------------------------------------------------------------*/ /**
*   同一ブラウザにURL指定します。
*   @param URL  URL
**/ //--------------------------------------------------------------------------
    function openhref(URL){location.href=URL;}


/*------------------------------------------------------------------------*/ /**
*   Hiddenに値をいれてSubmitする。
*
*   @param cmd      コントロール名（コマンド名）
*   @param value    値
**/ //--------------------------------------------------------------------------
    function goServer(cmd, value) {

        if (preSubmit() == false ) return

        // コントロールが存在します。
        if (!existContorol(cmd))
            alert(cmd + 'のコントロールは存在しません。');

        // 該当コントロールのvalueに値をセット
        if (document.forms[0].elements[cmd].type == 'hidden') {
            // コントロールのvalueをクリア
            clearValue(_HiddenCommandName);
            document.forms[0].elements[cmd].value = value;
            // サーバリクエスト
            document.forms[0].submit();
        }
    }

/*------------------------------------------------------------------------*/ /**
*   ラインナンバーの項目に引数の値をセットする。
*
*   @param no   ラインナンバー
**/ //--------------------------------------------------------------------------
    function setLineNo(no) {

        // 該当コントロールのvalueに値をセット
        if (document.forms[0].elements['command_line_no'] != null &&
            document.forms[0].elements['command_line_no'].type == 'hidden' ) {

            document.forms[0].elements['command_line_no'].value = no;
        }
    }

/*------------------------------------------------------------------------*/ /**
*   ServerへSumbit
*
*   @param cmd      コントロール名（コマンド名）
*   @param value    値
*   @param arrycmd  クリアするHIDDENコマンド名
*   ・渡された第二引数のはHTMLのvalueにセットし第三引数の配列をclearValue(cmd[])に受け渡した後に
*   第一引数のコントロール名に該当するvalueに値をセットして、serverに
*   submitをする。
**/ //--------------------------------------------------------------------------
    function goServerValue(cmd, value, arrycmd) {

        if (preSubmit() == false ) return

        // コントロールが存在します。
        if (!existContorol(cmd))
            alert(cmd + 'のコントロールは存在しません。');

        // 指定コントロールのvalueクリア
        clearValue(arrycmd);

        // 該当コントロールのvalueに値をセット
        if (document.forms[0].elements[cmd].type == 'hidden') {
            // コントロールのvalueをクリア
            clearValue(_HiddenCommandName);
            document.forms[0].elements[cmd].value = value;
            // サーバリクエスト
            document.forms[0].submit();
        }
    }

/*------------------------------------------------------------------------*/ /**
*   サブミット前処理。
*
**/ //--------------------------------------------------------------------------
    function preSubmit() {
        submitPrecleaning();
        return checkBeatAttack();
    }

/*------------------------------------------------------------------------*/ /**
*   最終コントロールが存在するかしないかのを判定する。
**/ //--------------------------------------------------------------------------
    function existFinalContorol() {
        // 最終コントロールが存在し 且つ まだボタンクリックされていない場合
        if (document.forms[0].elements['finalcon'] != null) return true;
        else return false;
    }

/*------------------------------------------------------------------------*/ /**
*   指定されたコントロールにfocusをあてる。
**/ //--------------------------------------------------------------------------
    // コントロールが存在するかしないかのを判定する。
    function existContorol(name) {
        if (document.forms[0].elements[name] != null) return true;
        else return false;
    }

/*------------------------------------------------------------------------*/ /**
*   指定されたコントロールにfocusをあてる。
**/ //--------------------------------------------------------------------------
    function setFocus(name) {
        document.forms[0].elements[name].focus();
    }

/*------------------------------------------------------------------------*/ /**
*   PopUpWindowブラウザを起動
**/ //--------------------------------------------------------------------------
    function JumpPop(URL, FrameName, attribute) {
        var win1;
        if (win1 == null){
            win1 = openChildWindow(URL, FrameName, attribute);
        }
    }

/*------------------------------------------------------------------------*/ /**
*   大文字変換しないコントロール名の取得
**/ //--------------------------------------------------------------------------
    function getNoUpperCaseControlName() { return m_noUppreConsName; }

/*------------------------------------------------------------------------*/ /**
*   大文字変換しないコントロール名の設定
**/ //--------------------------------------------------------------------------
    function setNoUpperCaseControlName(consname) { m_noUppreConsName = consname;}

/*------------------------------------------------------------------------*/ /**
*   入力エリア(text)の指定された項目以外の項目全て大文字変換します。
**/ //--------------------------------------------------------------------------
    function toUpperTextControl() {
        with (document) {
            var i = 0;
            var flg = 1;
            // 大文字変換しないコントロール名の取得
            var cons = getNoUpperCaseControlName();
            // 画面のコントロールループ
            while (forms[0].elements[i] != null) {
                // コントロールのTYPEがTEXTの場合
                if (forms[0].elements[i].type == 'text') {
                    if (cons != null) {
                        // 大文字変換しないコントロール名とTYPEがTEXTのコントロールの比較を行なう。
                        for (var j =0; j < cons.length; j++) {
                            if (forms[0].elements[i].name != cons[j]) {
                                // 一致しない！大文字変換する。
                                flg = 1;
                            } else {
                                // 一致！大文字変換しない。
                                flg= 0;
                                break;
                            }
                        }
                        // フラグが１の場合は大文字変換する。
                        if (flg == 1) {
                            forms[0].elements[i].value = forms[0].elements[i].value.toUpperCase();
                        }
                    } else {
                        // 大文字変換する
                        forms[0].elements[i].value = forms[0].elements[i].value.toUpperCase();
                    }
                }
                i++;
            }
        }
    }

/*------------------------------------------------------------------------*/ /**
*   現在時刻の年+月+日+時+分+秒+ミリ秒を返す。
*   例：2001年5月4日9時8分6秒256 → 20010504090806256
**/ //--------------------------------------------------------------------------
    function getDateTimeFormatString() {
        var datetime = new Date();
        var year = datetime.getYear();
        var month = datetime.getMonth()+1;
        var day = datetime.getDate();
        var hours = datetime.getHours();
        var minutes = datetime.getMinutes();
        var seconds = datetime.getSeconds();
        var milliseconds = datetime.getMilliseconds();
        if (year < 10 ) year = '200' + year;
        else if (year < 100 ) year = '20' + year;
        if (month < 10) month = '0' + month;
        if (day < 10) day = '0' + day;
        if (hours < 10) hours = '0' + hours;
        if (minutes < 10) minutes = '0' + minutes;
        if (seconds < 10) seconds = '0' + seconds;
        if (milliseconds < 10) milliseconds = '00' + milliseconds;
        else if (milliseconds < 100) milliseconds = '0' + milliseconds;
        return year + month + day + hours + minutes + seconds + milliseconds;
    }

/*------------------------------------------------------------------------*/ /**
*   現在時刻の時,分,秒,ミリ秒の合計を返す。
**/ //--------------------------------------------------------------------------
    function getTimeNumber() {
        return Number(new Date());
//      var datetime = new Date();
//      var hours = datetime.getHours();
//      var minutes = datetime.getMinutes();
//      var seconds = datetime.getSeconds();
//      var milliseconds = datetime.getMilliseconds();
//      hours = hours * 60*60*1000;
//      minutes = minutes *60*1000;
//      seconds = seconds *1000;
//      return hours + minutes + seconds + milliseconds;
    }

/*------------------------------------------------------------------------*/ /**
*   サブミット時の連打チェックを行う。
*   サブミット判定時間が0の場合は、true → サーバリクエスト
*   サブミット判定時間 + サブミット許可時間（ms) > 現サブミット時間の場合は、false → サーバリクエストなし
*   サブミット判定時間 + サブミット許可時間（ms) <= 現サブミット時間の場合は、true → サーバリクエスト
**/ //--------------------------------------------------------------------------
    function checkBeatAttack() {
        // サブミット判定時間が0の場合は、trueを返す。
        if (_submitTime == 0) {
            _submitTime = getTimeNumber();
            return true;
        // サブミット判定時間 + サブミット許可時間（ms) > 現サブミット時間の場合は、falseを返す。
        } else if (_submitTime + getSubmitAllowTime() > getTimeNumber()) {
            // サブミットフラグをOFF
            return false;
        // 上記以外はtrueをかえす。
        } else {
            _submitTime = getTimeNumber();
            return true;
        }
    }

/*------------------------------------------------------------------------*/ /**
*   サブミット許可時間（ms)をセットする。
**/ //--------------------------------------------------------------------------
    function setSubmitAllowTime(allowTime) { _allowTime = allowTime;}

/*------------------------------------------------------------------------*/ /**
*   サブミット許可時間（ms)を取得する。
**/ //--------------------------------------------------------------------------
    function getSubmitAllowTime() {return _allowTime;}

/*------------------------------------------------------------------------*/ /**
*   URLを直接指定して子ウインドウをオープンします。
**/ //--------------------------------------------------------------------------
    function openDirectChildWindow(theURL,winName,features) { //v2.0
        var myDialog = window.open(theURL,winName,features);
        childWindowArray[childWindowCount] = myDialog;
        childWindowCount++;
    }

    function setFocusFirstsumitButton(){
        with (document) {
            var i = 0;
            var flg = 0;
            // 画面のコントロールループ
            while (forms[0].elements[i] != null && flg == 0) {
                // コントロールのTYPEがTEXTの場合
                if (forms[0].elements[i].type == 'submit') {
                    document.forms[0].elements[i].focus();
                    flg = 1;
                    break;
                }
                i++;
            }
        }
    }

/*------------------------------------------------------------------------*/ /**
*   別ブラウザを起動して、その別ブラウザからリクエスト要求をします。
*   親ウインドウとの同期はとりません。
*   @param theURL   URL
*   @param winName  ウィンドウ名
*   @param features ウィンドウ属性
**/ //--------------------------------------------------------------------------
    function openOtherWindow(theURL,winName,features) {

        if(winName == '' && features == ''){
            window.open(theURL);
        }else{
            window.open(theURL,winName,features);
        }
    }

/*------------------------------------------------------------------------*/ /**
*   指定したチェックボックスの状態を指定したhidden項目に設定します。
*   チェック時には、チェックボックスの値が、非チェック時には空文字が設定されます。
*   @param chkName  チェックボックスのNAME属性
*   @param hidName  hidden項目のNAME属性
**/ //--------------------------------------------------------------------------
    function editCheckBoxStatus(chkName,hidName){
        if (document.forms[0].elements[chkName].checked) {
            document.forms[0].elements[hidName].value = document.forms[0].elements[chkName].value;
        }
        else {
            document.forms[0].elements[hidName].value = "";
        }
    }

/*------------------------------------------------------------------------*/ /**
*   指定したラジオボタンの状態を指定したhidden項目に設定します。
*   チェック時には、ラジオボタンの値が、非チェック時には空文字が設定されます。
*   @param chkName  ラジオボタンのNAME属性
*   @param hidName  hidden項目のNAME属性
**/ //--------------------------------------------------------------------------
    function editRadioButtonStatus(radioName,hidName){
        var i;
        document.forms[0].elements[hidName].value = "";
        if (document.forms[0].elements[radioName].length) {
            for (i = 0; i < document.forms[0].elements[radioName].length; i++) {
                if (document.forms[0].elements[radioName][i].checked) {
                    document.forms[0].elements[hidName].value = document.forms[0].elements[radioName][i].value;
                }
            }
        } else {
            if (document.forms[0].elements[radioName].checked) {
                document.forms[0].elements[hidName].value = document.forms[0].elements[radioName].value;
            }
        }
    }

/*------------------------------------------------------------------------*/ /**
*                             == Pegasus固有関数 ==
**/ //--------------------------------------------------------------------------

// 定数＆変数
WebLogicSession='WebLogicSession';	// WebLogicSessionID Cookie名
BosskSession='BosskSession'; 		// BosskSessionID Cookie名

/*------------------------------------------------------------------------*/ /**
*   クッキーをクライアントに設定する
*   @param name		Cookie名
*   @param value	Cookie値
*   @param expire	Cookieの有効期限
**/ //--------------------------------------------------------------------------
	function setCookie(name,value,expire){
		document.cookie = name + '=' + escape(value)
			+ ((expire==null)?'':('; expires='+expire.toGMTString()));
	}
	
	
/*------------------------------------------------------------------------*/ /**
*   クッキーをクライアントから取得する
*   @param name		Cookie名
**/ //--------------------------------------------------------------------------
	function getCookie(name){
		var search = name + '=';
		if (document.cookie.length>0) {
			offset = document.cookie.indexOf(search);
			if (offset != -1){
				offset += search.length;
				end = document.cookie.indexOf(';',offset);
				if(end == -1)
				end = document.cookie.length;
				return unescape(document.cookie.substring(offset,end));
			}
		}
		return null;
	}


/*------------------------------------------------------------------------*/ /**
*   HIDDEN項目(プロジェクトセッションID）を設定する
*   @param form		FORM名
**/ //--------------------------------------------------------------------------
	function setHidden(form){
		//document.MyForm.SESSIONID.value=getCookie(BosskSession);
		form.SESSIONID.value=getCookie(BosskSession);
	}

/*------------------------------------------------------------------------*/ /**
*   ダウンロードサーバに対する自動サブミット（セッションIDをHIDDENとして設定）
*   @param form		FORM名
**/ //--------------------------------------------------------------------------
	function Jump(form){
		setHidden(form);
		//document.MyForm.submit();
		form.submit();
	}

/* 以下、BBSoft用 */

/*------------------------------------------------------------------------*/ /**
*   OSの区分(95系、NT系、Vista)及び利用可能なOSかどうかをチェックする
*   @param なし
**/ //--------------------------------------------------------------------------
function checkOS(){

		if((navigator.userAgent.indexOf("Win95") != -1) || (navigator.userAgent.indexOf("Windows 95") != -1) || 
			(navigator.userAgent.indexOf("Win98") != -1) || (navigator.userAgent.indexOf("Windows 98") != -1) || 
			(navigator.userAgent.indexOf("9x 4.9") != -1) ){
			return 1;
		}else if((navigator.userAgent.indexOf("NT 5.0") != -1) || (navigator.userAgent.indexOf("NT 5.1") != -1)){
			return 2;
		}else if((navigator.userAgent.indexOf("NT 6.0") != -1)){
			return 3;
		}else{
			return 9;
		}
}

/*------------------------------------------------------------------------*/ /**
*   Playerを取得する
*   ※WindowsXP以外は使用不可(試用サイト用)
*   @param form		FORM名
**/ //--------------------------------------------------------------------------
function getPlayer(){
	// Windows 2000、Windows XP
	if((navigator.userAgent.indexOf("NT 5.0") != -1) || (navigator.userAgent.indexOf("NT 5.1") != -1)){
		openhref("/download/STSetup_xp_w2k.exe");
	// Windows Vista
	}else if(navigator.userAgent.indexOf("NT 6.0") != -1){
		openhref("/download/SFCSetupVista.exe");
	// Windows 7 
	}else if(navigator.userAgent.indexOf("NT 6.1") != -1){
		if(showConfirm(3) == true){
			openhref("/download/SFCSetupVista.exe");
		}
	}else{
		showAlert(3);
	}
}

/*------------------------------------------------------------------------*/ /**
*   アラートを表示する
*   @param なし
**/ //--------------------------------------------------------------------------
function showAlert(num){
	if(num == 1){
		alert("アプリケーションをご利用いただくには、使用許諾に同意して頂く必要があります。");
	}else if(num == 2){
		alert("利用規約に同意して頂かない場合は、サービスを利用する事は出来ません。");
	}else if(num == 3){
		alert("本サービスをご利用できるＯＳのバージョンはWindows 2000 SP2以上、Windows XP および Windows Vistaとなっております。");
	}else if(num == 4){
		alert("必要とする動作環境を満たしていないため、お使いのパソコンからは\n" 
				+ "アプリケーションをご利用いただけません。\n"
				+ "動作環境・注意事項をご確認ください。")
	}else if(num == 5){
		alert("ActiveXの設定が無効のため、利用できません。")
	}
	
}

/*------------------------------------------------------------------------*/ /**
*   「OK/キャンセル」ダイアログを表示する
*   @param num
*   @return true:OK押下、false:キャンセル押下
**/ //--------------------------------------------------------------------------
function showConfirm(num){
	var res = false;
	
	if(num == 1){
		res = confirm("BBソフトはWindows7のパソコン環境においては、\n"
				+ "動作保証対象外となりますので、お客様の任意での\n"
				+ "ご利用をお願いいたします。");
	}else if(num == 2){
		res = confirm("BBソフトはWindows7のパソコン環境においては、\n"
				+ "動作保証対象外となりますので、お客様の任意での\n"
				+ "お申し込みをお願いいたします。");	
	}else if(num == 3){
		res = confirm("BBソフトプレーヤーはWindows7のパソコン環境においては、\n"
				+ "動作保証対象外となりますので、お客様の任意での\n"
				+ "ご利用をお願いいたします。");
	}
	return res;
}

/*------------------------------------------------------------------------*/ /**
*   ブラウザの種別及びバージョンの取得
*   @param なし
**/ //--------------------------------------------------------------------------
function getBsrVer(){
	//ブラウザ情報の取得
	myBsr   = navigator.appName;                     // ブラウザ名取得
	myAgent = navigator.userAgent;                   // エージェント取得
	myTop = myAgent.indexOf("Opera",0);              // OP チェック
	if (myTop == -1){                                // OPじゃない
	   myTop = myAgent.indexOf("MSIE",0);               // IE チェック
	   if (myTop == -1){                                // IEじゃない
	      myTop = myAgent.indexOf("Mozilla/",0);        // NN チェック
	      if (myTop == -1){                             // NNでもない
	         myVersion = "";
	      }else{                                        // NNだ!
	         myLast = myAgent.indexOf(" ",myTop);
	         myVer = myAgent.substring(myTop+8,myLast); // NNのバージョン切り取り
	         myVersion = " Version " + myVer;
	      }
	   }else{                                           // IEだ!
	      myLast = myAgent.indexOf(";",myTop);
	      myVer = myAgent.substring(myTop+5,myLast);    // IEのバージョン切り取り
	      myVersion = " Version " + myVer;
	   }
	}else{                                              // OPだ!
	   myBsr = "Opera";
	   myLast = myAgent.indexOf(" ",myTop+6);
	   myVer = myAgent.substring(myTop+6,myLast);       // OPのバージョン切り取り
	   myVersion = " Version " + myVer;
	}

	return myBsr+myVersion;
}

/*------------------------------------------------------------------------*/ /**
*   HT搭載か否かの文字列返却
*   @param なし
**/ //--------------------------------------------------------------------------
function getHtVal(ht){
	if(ht == 1){
		return 'あり';
	}else{
		return 'なし';
	}
}

/*------------------------------------------------------------------------*/ /**
*   HT搭載のPCか否かの判定
*   @param なし
**/ //--------------------------------------------------------------------------
function checkHT(ht){

//	if(ht == 1){
	if(ht == 1 || ht == 4){
		return true;
	}else{
		return false;
	}
}

/*------------------------------------------------------------------------*/ /**
*   デュアルCPUか否かの判定
*   @param なし
**/ //--------------------------------------------------------------------------
function checkCPUCnt(cpuCnt){
	if(cpuCnt <= 1){
		return true;
	}else{
		return false;
	}
}

/*------------------------------------------------------------------------*/ /**
*   CD-ROMデバイス有無の文字列返却
*   @param なし
**/ //--------------------------------------------------------------------------
function getCdromVal(cdromdev){
	if(cdromdev == 1){
		return '有';
	}else{
		return '無';
	}
}

/*------------------------------------------------------------------------*/ /**
*   メモリ値のコンバート処理
*   @param mem	メモリ値
**/ //--------------------------------------------------------------------------
function convMemSize(mem){

	if(mem == 64){
		return 58;
	}else if(mem == 128){
		return 115;
	}else if(mem == 192){
		return 173;
	}else if(mem == 256){
		return 200;
	}else if(mem == 512){
		return 440;
	}else if(mem == 1024){
		return 894;
	}else if(mem == 96){
		return 87;
	}else if(mem == 100){
		return 87;
	}else if(mem == 516){
		return 440;
	}else if(mem == 1500){
		return 1370;
	}else {
		return mem;
	}

}

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x;if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
 if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/*------------------------------------------------------------------------*/ /**
*   カスタマー調査アクセスログ出力用リクエスト送信
*   @param sCid	カスタマーID
*   @param sPcd 商品コード
*   @return なし
**/ //--------------------------------------------------------------------------
function sendAgent(sCid, sPcd){

	var sCid_after = convertCid(sCid);

	var sURL = "/MYPG?chk_os=" + getOSName() + "&chk_mem=" + checker.memsize + "&chk_cid=" + sCid_after + "&chk_pcd=" + sPcd + "&chk_end=end";

	var sDoc = getResponseText(null, sURL);
}

/*------------------------------------------------------------------------*/ /**
*   カスタマーID変換
*   @param sCid	カスタマーID(変換前)
*   @return カスタマーID(変換後)
**/ //--------------------------------------------------------------------------
function convertCid(sCid){

	var sCid_after = sCid.replace(/0/g,"o").replace(/1/g,"l").replace(/2/g,"z").replace(/3/g,"m").replace(/4/g,"k").replace(/5/g,"s").replace(/6/g,"b").replace(/7/g,"t").replace(/8/g,"x").replace(/9/g,"q");

	return sCid_after;
}

/*------------------------------------------------------------------------*/ /**
*   OS名取得
*   @param なし
*   @return OS名
**/ //--------------------------------------------------------------------------
function getOSName(){

	if(navigator.userAgent.indexOf("NT 6.1") != -1){
		return "Win7";
	}else if(navigator.userAgent.indexOf("NT 6.0") != -1){
		return "Vista";
	}else if(navigator.userAgent.indexOf("NT 5.1") != -1){
		return "WinXP";
	}else if(navigator.userAgent.indexOf("NT 5.0") != -1){
		return "Win2K";
	}else if((navigator.userAgent.indexOf("NT") != -1) && (navigator.userAgent.indexOf("NT 5.") == -1) && (navigator.userAgent.indexOf("NT 6.") == -1)){
		return "WinNT";
	}else if(navigator.userAgent.indexOf("9x 4.9") != -1){
		return "WinME";
	}else if((navigator.userAgent.indexOf("Win98") != -1) || (navigator.userAgent.indexOf("Windows 98") != -1)){
		return "Win98";
	}else if((navigator.userAgent.indexOf("Win95") != -1) || (navigator.userAgent.indexOf("Windows 95") != -1)){
		return "Win95";
	}else{
		return "etc";
	}
}

/*------------------------------------------------------------------------*/ /**
*   ページ遷移なしのHTTPリクエスト発行(レスポンスをテキスト形式で取得)
*   @param sXML	送信データ
*   @param sURL	リクエスト先のURL
*   @return レスポンス
**/ //--------------------------------------------------------------------------
function getResponseText(sXML, sURL){
	var oXMLHTTP;
	var sDoc;

	oXMLHTTP = createHttpRequest();
	if (oXMLHTTP) {
		oXMLHTTP.open("POST", sURL, false);
		oXMLHTTP.send(sXML);
		sDoc = oXMLHTTP.responseText;
	}
	return sDoc;
}

/*------------------------------------------------------------------------*/ /**
*   XMLHttpRequestオブジェクト生成
*   @param なし
*   @return XMLHttpRequestオブジェクト
**/ //--------------------------------------------------------------------------
function createHttpRequest(){

	//XMLHttpRequestオブジェクト実装ブラウザ用
	if(window.XMLHttpRequest){
		return new XMLHttpRequest();
	//Win ie
	} else if(window.ActiveXObject) {
		try {
			//MSXML2以降用
			return new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				//旧MSXML用
				return new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e2) {
				return null;
			}
		}
	} else {
		return null;
	}
}

/*------------------------------------------------------------------------*/ /**
*   OSの判定を行います。
**/ //--------------------------------------------------------------------------
function checkOSType(){
		// UserAgentの文字列よりOSを判定する
		if((navigator.userAgent.indexOf("Win98") != -1) || (navigator.userAgent.indexOf("Windows 98") != -1)){
			// Windows 98/98SE
			return 2;
		}else if(navigator.userAgent.indexOf("9x 4.9") != -1){
			// Windows Me
			return 3;
		}else if(navigator.userAgent.indexOf("NT 5.0") != -1){
			// Windows 2000
			return 4;
		}else if(navigator.userAgent.indexOf("NT 5.1") != -1){
			// Windows XP
			return 5;
		}else if(navigator.userAgent.indexOf("NT 6.0") != -1){
			// Windows Vista
			return 7;
		}else if(navigator.userAgent.indexOf("NT 6.1") != -1){
			// Windows 7
			return 8;
		}else{
			//その他のOS（Win95を含む）
			return 9;
		}
}

//-->
