function doApl(LIN) {

//alert(LIN);
	LinId	= LIN;	//V2
	Set_Ap_MENU();
	Layout_Ap_MENU();
	if(LinId=='guest') {
		Ap_SelectMenu(2);
	} else {
		Ap_SelectMenu(0);
	}
}

function Set_Ap_MENU() {

	cntMenu	= 5;

        Menu_Name[0]    = "掲示板";
        Menu_Name[1]    = "資材管理アプリ";
        Menu_Name[2]    = "映像配信";
        Menu_Name[3]    = "データ管理";
        Menu_Name[4]    = "ログアウト";

}

//	Ap_MENU
function Layout_Ap_MENU() {

$('MENU').innerHTML	= "";

	$('MENU').style.position	= "absolute";
	$('MENU').style.top		= "90px";
	$('MENU').style.left		= "0px";
	$('MENU').style.width		= PageWidth;
	//$('MENU').style.height		= "25px";
	$('MENU').style.height		= "40px";
	$('MENU').style.border		= "1px solid " + varAroundColor;
	$('MENU').style.background	= varBgColor;

	var	Menu_Id	= "";
	var	ButtonWidth	= (PageWidth-(cntMenu-1)-2)/cntMenu;

	var	HT	= "";
	var	StPos	= 3;

	var	GradStart	= "#ff003399";
	var	GradEnd	= "#ff66c0ff";

	for(i=0;i<cntMenu;i++) {
		Menu_Id	= "MENU_"+i;
		HT	= "<div id='"+Menu_Id+"' style='line-height:130%;' ";
		HT	+= " onMouseOver='movr(this.id);' onMouseout='mout(this.id);' onClick='Ap_SelectMenu(" + i + ");'>";
		//HT	+= " onMouseOver='movr(this.id);' onMouseout='mout(this.id);'>";
		HT	+= Menu_Name[i] + "</div>";

		$('MENU').innerHTML	+= HT;
		

		$($(Menu_Id).id).style.filter	= "progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr="+GradStart+",EndColorStr="+GradEnd+");";
		$($(Menu_Id).id).style.fontFamily	= "ＭＳ Ｐゴシック";
		$($(Menu_Id).id).style.fontSize		= "12px";
		$($(Menu_Id).id).style.position		= "absolute";
		$($(Menu_Id).id).style.top		= "3px";
		//$($(Menu_Id).id).style.height		= "18px";
		$($(Menu_Id).id).style.height		= "32px";
		$($(Menu_Id).id).style.width		= ButtonWidth + "px";
		$($(Menu_Id).id).style.left		= StPos + "px";
		$($(Menu_Id).id).style.border		= "1px solid " + varBgColor;
		//$($(Menu_Id).id).style.background	= varBorderColor;
		//$($(Menu_Id).id).style.color		= varBgColor;
		$($(Menu_Id).id).style.color		= "#cccccc";
		$($(Menu_Id).id).align		= "center";
		$($(Menu_Id).id).style.padding		= "8px";

		StPos	= StPos + ButtonWidth ;

	}

}

//
//	APメニュークリック時処理
//
function Ap_SelectMenu(n) {

	str_order	= "";
	str_where	= "";

	clearInterval(tm1);
	tm1_cnt	= 0;
	clearInterval(tm2);
	tm2_cnt	= 0;

	if(Sub_Opn==1) {
		CloseSub();
	}

	for(i=0;i<cntMenu;i++) {
		Menu_Id = "MENU_"+i;
		$($(Menu_Id).id).style.background	= varBorderColor;
		$($(Menu_Id).id).style.color		= varBgColor;
	}
	ClickMenuId	= "MENU_"+n;
	$($(ClickMenuId).id).style.background		= Menu_Actv_Bg;
	$($(ClickMenuId).id).style.color		= Menu_Actv_Str;

        switch(n) {
        case 0:
		if(LinId=='guest') {	//V2
			alert("ここから先は社員専用です。");
			return;
		}
                ResetCont();
		Layout_Apl("社内掲示板");
		Layout_Ap_Hdr();
		cnt_Disp_Div	= 3;
		Disp_Div[0]	= "CAT_HDR";
		Disp_Div[1]	= "LST_HDR";
		Disp_Div[2]	= "LST_BDY";
		Request_HTTP("ASYNC","","MyHomePage2/php/List_Bbs.php");
                break;
        case 1:
		if(LinId=='guest') {	//V2
			alert("ここから先は社員専用です。");
			return;
		}
                ResetCont();
		Layout_Apl("資材データ管理");
		Layout_Ap_Hdr();
		//cnt_Disp_Div	= 3;
		//Disp_Div[0]	= "CAT_HDR";
		//Disp_Div[1]	= "LST_HDR";
		//Disp_Div[2]	= "LST_BDY";
		//Request_HTTP("ASYNC","","MyHomePage2/php/List_Mtral.php");
		Disp_Mtral_Cndtn(1);
                break;
        case 2:
                ResetCont();
		Layout_Apl("映像配信");
		Layout_Ap_Hdr();
		cnt_Disp_Div	= 1;
		Disp_Div[0]	= "AP_CONT";

		Request_HTTP("ASYNC","","MyHomePage2/php/Show_Live_P.php");
                break;
        case 3:
		if(LinId=='guest') {	//V2
			alert("ここから先は社員専用です。");
			return;
		}
                ResetCont();
		Layout_Apl("データ管理");
		var	arg	= "";
		cnt_Disp_Div	= 1;
		Disp_Div[0]	= "AP_CONT";
		Request_HTTP("SYNC",arg,"MyHomePage2/php/Mstr_Main.php");
		if(!HTTP_RET) {
			$('CONT').innerHTML	= "<br><br><span class='C1R'>" + Err_Inf + "</span>";
			return;
		}
                break;
        case 4:
		if(!window.confirm("ログアウトしますか？")) {
			return;
		}
		location.href="http://www.shonanso-den.co.jp/";
                break;
        }
}

function Layout_Apl(cat) {

	var	str	= "";
	str	+= "<div id='AP_TTL'></div>";
	str	+= "<div id='AP_CONT'></div>";

	$('CONT').innerHTML		= str;
	$('CONT').style.overflow	= "hidden";

	$('AP_TTL').style.position	= "absolute";
	$('AP_TTL').style.top		= "0px";
	$('AP_TTL').style.left		= "0px";
	$('AP_TTL').style.width		= PageWidth;
	$('AP_TTL').style.height	= "100px";
	$('AP_TTL').style.background	= varBgColor;

	$('AP_CONT').style.position	= "absolute";
	$('AP_CONT').style.top		= "101px";
	$('AP_CONT').style.left		= "0px";
	$('AP_CONT').style.width	= PageWidth;
Cont_Height     = PageHeight - ((PageHeight - document.body.clientHeight) + 91 + 40 + 100 + 20);

	$('AP_CONT').style.height	= Cont_Height;
	$('AP_CONT').style.background	= varBgColor;

        var	HT     = "";

        HT     += "<table align='center' cellspacing=1 width='90%' cellpadding=10>";
        HT     += "    <td width='90%'>";
        HT     += "            <br>";
        HT     += "            <b><span class='C3R'>" + cat + "</span></b>";
        HT     += "    </td>";
        HT     += "</table>";
        HT     += "<hr width='90%' color='#176bfc'>";

	$('AP_TTL').innerHTML	= HT;

}

function Layout_Ap_Hdr() {

	var	str	= "";
	str	+= "<div id='CAT_HDR'></div>";
	str	+= "<div id='LST_HDR'></div>";
	str	+= "<div id='LST_BDY'></div>";

	$('AP_CONT').innerHTML		= str;
	$('AP_CONT').style.overflow	= "hidden";

	$('CAT_HDR').style.position	= "absolute";
	$('CAT_HDR').style.top		= "0px";
	$('CAT_HDR').style.left		= "0px";
	$('CAT_HDR').style.width	= PageWidth;
	$('CAT_HDR').style.height	= "40px";
	$('CAT_HDR').style.background	= varBgColor;
	//$('CAT_HDR').style.border	= "1px solid #ff0000";	// + varAroundColor;

	$('LST_HDR').style.position	= "absolute";
	$('LST_HDR').style.top		= "41px";
	$('LST_HDR').style.left		= "0px";
	$('LST_HDR').style.width	= PageWidth;
	$('LST_HDR').style.height	= "25px";
	$('LST_HDR').style.background	= varBgColor;
	$('LST_HDR').style.border	= "1px solid " + varAroundColor;

	$('LST_BDY').style.position	= "absolute";
	$('LST_BDY').style.top		= "66px";
	$('LST_BDY').style.left		= "0px";
	$('LST_BDY').style.width	= PageWidth;
Cont_Height     = PageHeight - ((PageHeight - document.body.clientHeight) + 91 + 40 + 165 + 20);
	$('LST_BDY').style.height	= Cont_Height;
	$('LST_BDY').style.background	= varBgColor;
	$('LST_BDY').style.border	= "1px solid " + varAroundColor;
	$('LST_BDY').style.overflow	= "scroll";

}


function TTL_SORT(cat,order) {

	if(str_order.match(order + " asc,")) {
		str_order	= str_order.replace(order + " asc,",order + " desc,");
	} else {
		if(str_order.match(order + " desc,")) {
			str_order	= str_order.replace(order + " desc,","");
		} else {
			str_order	+= order + " asc,";
		}
	}

	switch(cat) {
	case "USR":
		Mstr_Usr(str_order);
		break;
	case "DEPT":
		Mstr_Dept(str_order);
		break;
	case "LVL":
		Mstr_Lvl(str_order);
		break;
	case "TPCS":
		Mstr_Tpcs(str_order);
		break;
	case "MTRAL":
		Mstr_Mtral(str_where,str_order);
		break;
	case "MTRAL_CD":
		Mstr_Mtral_Cd(str_order);
		break;
	case "MT_SP1":
		Mstr_Mt_Sp1(str_order);
		break;
	case "MT_IN":
		Mstr_Mt_In(str_order);
		break;
	case "MT_OUT":
		Mstr_Mt_Out(str_order);
		break;
	case "BBS":
		Mstr_Bbs(str_order);
		break;
	case "BBS2":
		Bbs(str_order);
		break;
	}
}

function Mstr_Usr(order) {

	Layout_Ap_Hdr();
	cnt_Disp_Div	= 3;
	Disp_Div[0]	= "CAT_HDR";
	Disp_Div[1]	= "LST_HDR";
	Disp_Div[2]	= "LST_BDY";
	Request_HTTP("ASYNC",order,"MyHomePage2/php/Mstr_List_Usr.php");
}

function Mstr_Dept(order) {

	Layout_Ap_Hdr();
	cnt_Disp_Div	= 3;
	Disp_Div[0]	= "CAT_HDR";
	Disp_Div[1]	= "LST_HDR";
	Disp_Div[2]	= "LST_BDY";
	Request_HTTP("ASYNC",order,"MyHomePage2/php/Mstr_List_Dept.php");
}

function Mstr_Lvl(order) {

	Layout_Ap_Hdr();
	cnt_Disp_Div	= 3;
	Disp_Div[0]	= "CAT_HDR";
	Disp_Div[1]	= "LST_HDR";
	Disp_Div[2]	= "LST_BDY";
	Request_HTTP("ASYNC",order,"MyHomePage2/php/Mstr_List_Lvl.php");
}

function Mstr_Tpcs(order) {

	Layout_Ap_Hdr();
	cnt_Disp_Div	= 3;
	Disp_Div[0]	= "CAT_HDR";
	Disp_Div[1]	= "LST_HDR";
	Disp_Div[2]	= "LST_BDY";
	Request_HTTP("ASYNC",order,"MyHomePage2/php/Mstr_List_Tpcs.php");
}

function Mstr_Bbs(order) {

	Layout_Ap_Hdr();
	cnt_Disp_Div	= 3;
	Disp_Div[0]	= "CAT_HDR";
	Disp_Div[1]	= "LST_HDR";
	Disp_Div[2]	= "LST_BDY";
	Request_HTTP("ASYNC",order,"MyHomePage2/php/Mstr_List_Bbs.php");
}

function Mstr_Live() {

	Layout_Ap_Hdr();
	cnt_Disp_Div	= 3;
	Disp_Div[0]	= "CAT_HDR";
	Disp_Div[1]	= "LST_HDR";
	Disp_Div[2]	= "LST_BDY";
	Request_HTTP("ASYNC","","MyHomePage2/php/Mstr_Live.php");
}



function Mstr_Mtral_Cndtn() {
	Disp_Mtral_Cndtn(0);
}

function Mstr_Mtral(where,order) {

	var	arg	= where + order;
	Layout_Ap_Hdr();
	cnt_Disp_Div	= 3;
	Disp_Div[0]	= "CAT_HDR";
	Disp_Div[1]	= "LST_HDR";
	Disp_Div[2]	= "LST_BDY";
	Request_HTTP("ASYNC",arg,"MyHomePage2/php/Mstr_List_Mtral.php");
}

function Mstr_Mtral_Cd(order) {

	Layout_Ap_Hdr();
	cnt_Disp_Div	= 3;
	Disp_Div[0]	= "CAT_HDR";
	Disp_Div[1]	= "LST_HDR";
	Disp_Div[2]	= "LST_BDY";
	Request_HTTP("ASYNC",order,"MyHomePage2/php/Mstr_List_Mtral_Cd.php");
}

function Mstr_Mt_Sp1(order) {

	Layout_Ap_Hdr();
	cnt_Disp_Div	= 3;
	Disp_Div[0]	= "CAT_HDR";
	Disp_Div[1]	= "LST_HDR";
	Disp_Div[2]	= "LST_BDY";
	Request_HTTP("ASYNC",order,"MyHomePage2/php/Mstr_List_Mt_Sp1.php");
}

function Mstr_Mt_In(order) {

	Layout_Ap_Hdr();
	cnt_Disp_Div	= 3;
	Disp_Div[0]	= "CAT_HDR";
	Disp_Div[1]	= "LST_HDR";
	Disp_Div[2]	= "LST_BDY";
	Request_HTTP("ASYNC",order,"MyHomePage2/php/Mstr_List_Mt_In.php");
}

function Mstr_Mt_Out(order) {

	Layout_Ap_Hdr();
	cnt_Disp_Div	= 3;
	Disp_Div[0]	= "CAT_HDR";
	Disp_Div[1]	= "LST_HDR";
	Disp_Div[2]	= "LST_BDY";
	Request_HTTP("ASYNC",order,"MyHomePage2/php/Mstr_List_Mt_Out.php");
}

function Bbs(order) {

	Layout_Ap_Hdr();
	cnt_Disp_Div	= 3;
	Disp_Div[0]	= "CAT_HDR";
	Disp_Div[1]	= "LST_HDR";
	Disp_Div[2]	= "LST_BDY";
	Request_HTTP("ASYNC",order,"MyHomePage2/php/List_Bbs.php");
}

function Disp_New(cat) {

	Edit_Mode       = "R";   // マスター詳細レイヤ指定モード
	Mstr_Cat        = cat;   // マスターカテゴリ
	Mstr_List_Ln    = "";   // マスターリストKEY

	$('SUB').innerHTML	= "";
	$('SUB').style.position	= "absolute";
	$('SUB').style.overflow	= "hidden";

	// レイヤサイズの決定

	switch(Mstr_Cat) {
	case "USR":
		Sub_Top			= 300;
		Sub_Height		= 390;
		Sub_Diff		= Sub_Height/2;
		$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
		$('SUB').style.height	= "0px";
		$('SUB').style.left	= PageWidth/4
		$('SUB').style.width	= PageWidth/2;
		break;
	case "DEPT":
		Sub_Top			= 300;
		Sub_Height		= 140;
		Sub_Diff		= Sub_Height/2;
		$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
		$('SUB').style.height	= "0px";
		$('SUB').style.left	= PageWidth/4
		$('SUB').style.width	= PageWidth/2;
		break;
	case "LVL":
		Sub_Top			= 300;
		Sub_Height		= 140;
		Sub_Diff		= Sub_Height/2;
		$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
		$('SUB').style.height	= "0px";
		$('SUB').style.left	= PageWidth/4
		$('SUB').style.width	= PageWidth/2;
		break;
	case "TPCS":
		Sub_Top			= 200;
		Sub_Height		= 380;
		Sub_Diff		= Sub_Height/2;
		$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
		$('SUB').style.height	= "0px";
		$('SUB').style.left	= PageWidth/6
		$('SUB').style.width	= PageWidth*(2/3);
		break;
	case "MTRAL":
		Sub_Top			= 300;
		Sub_Height		= 140;
		Sub_Diff		= Sub_Height/2;
		$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
		$('SUB').style.height	= "0px";
		$('SUB').style.left	= PageWidth/4
		$('SUB').style.width	= PageWidth/2;
		break;
	case "MTRAL_CD":
		Sub_Top			= 300;
		Sub_Height		= 140;
		Sub_Diff		= Sub_Height/2;
		$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
		$('SUB').style.height	= "0px";
		$('SUB').style.left	= PageWidth/4
		$('SUB').style.width	= PageWidth/2;
		break;
	case "MT_SP1":
		Sub_Top			= 300;
		Sub_Height		= 240;
		Sub_Diff		= Sub_Height/2;
		$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
		$('SUB').style.height	= "0px";
		$('SUB').style.left	= PageWidth/4
		$('SUB').style.width	= PageWidth/2;
		break;
	case "MT_IN":
		Sub_Top			= 300;
		Sub_Height		= 140;
		Sub_Diff		= Sub_Height/2;
		$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
		$('SUB').style.height	= "0px";
		$('SUB').style.left	= PageWidth/4
		$('SUB').style.width	= PageWidth/2;
		break;
	case "MT_OUT":
		Sub_Top			= 300;
		Sub_Height		= 140;
		Sub_Diff		= Sub_Height/2;
		$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
		$('SUB').style.height	= "0px";
		$('SUB').style.left	= PageWidth/4
		$('SUB').style.width	= PageWidth/2;
		break;


	case "BBS":
		Sub_Top			= 300;
		Sub_Height		= 340;
		Sub_Diff		= Sub_Height/2;
		$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
		$('SUB').style.height	= "0px";
		$('SUB').style.left	= PageWidth/6
		$('SUB').style.width	= PageWidth*(2/3);
		break;
	}

	$('SUB').style.background	= varBgColor;
	$('SUB').style.border	= "5px dotted " + varBorderColor;
	$('SUB').style.display	= "";
	$('SUB').style.filter    = "Alpha(Opacity=0,FinishOpacity=0,Style=1)";

	$('MSK').style.display  = "";
	Sub_Opn	= 1;

	clearInterval(tm1);
	tm1_cnt = 0;
	tm1      = setInterval('Show_Mstr_Sub()', 20);

}

function Disp_Dtl(cat,lid) {

	Edit_Mode       = "U";   // マスター詳細レイヤ指定モード
	Mstr_Cat        = cat;   // マスターカテゴリ
	Mstr_List_Ln    = lid;   // マスターリストKEY

	$('SUB').innerHTML	= "";
	$('SUB').style.position	= "absolute";
	$('SUB').style.overflow	= "hidden";

	// レイヤサイズの決定

	switch(Mstr_Cat) {
	case "USR":
		Sub_Top			= 300;
		Sub_Height		= 430;
		Sub_Diff		= Sub_Height/2;
		$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
		$('SUB').style.height	= "0px";
		$('SUB').style.left	= PageWidth/4
		$('SUB').style.width	= PageWidth/2;
		break;
	case "DEPT":
		Sub_Top			= 300;
		Sub_Height		= 160;
		Sub_Diff		= Sub_Height/2;
		$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
		$('SUB').style.height	= "0px";
		$('SUB').style.left	= PageWidth/4
		$('SUB').style.width	= PageWidth/2;
		break;
	case "LVL":
		Sub_Top			= 300;
		Sub_Height		= 160;
		Sub_Diff		= Sub_Height/2;
		$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
		$('SUB').style.height	= "0px";
		$('SUB').style.left	= PageWidth/4
		$('SUB').style.width	= PageWidth/2;
		break;
	case "TPCS":
		Sub_Top			= 100;
		Sub_Height		= 640;
		Sub_Diff		= Sub_Height/2;
		$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
		$('SUB').style.height	= "0px";
		$('SUB').style.left	= PageWidth/6
		$('SUB').style.width	= PageWidth*(2/3);
		break;
	case "MTRAL":
	case "MTRAL_AP":
		Sub_Top			= 300;
		Sub_Height		= 400;
		Sub_Diff		= Sub_Height/2;
		$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
		$('SUB').style.height	= "0px";
		$('SUB').style.left	= PageWidth/6
		$('SUB').style.width	= PageWidth*(2/3);
		break;
	case "MTRAL_CD":
		Sub_Top			= 300;
		Sub_Height		= 160;
		Sub_Diff		= Sub_Height/2;
		$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
		$('SUB').style.height	= "0px";
		$('SUB').style.left	= PageWidth/4
		$('SUB').style.width	= PageWidth/2;
		break;
	case "MT_SP1":
		Sub_Top			= 300;
		Sub_Height		= 260;
		Sub_Diff		= Sub_Height/2;
		$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
		$('SUB').style.height	= "0px";
		$('SUB').style.left	= PageWidth/4
		$('SUB').style.width	= PageWidth/2;
		break;
	case "MT_IN":
		Sub_Top			= 300;
		Sub_Height		= 160;
		Sub_Diff		= Sub_Height/2;
		$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
		$('SUB').style.height	= "0px";
		$('SUB').style.left	= PageWidth/4
		$('SUB').style.width	= PageWidth/2;
		break;
	case "MT_OUT":
		Sub_Top			= 300;
		Sub_Height		= 160;
		Sub_Diff		= Sub_Height/2;
		$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
		$('SUB').style.height	= "0px";
		$('SUB').style.left	= PageWidth/4
		$('SUB').style.width	= PageWidth/2;
		break;
	case "BBS":
		Sub_Top			= 100;
		Sub_Height		= 660;
		Sub_Diff		= Sub_Height/2;
		$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
		$('SUB').style.height	= "0px";
		$('SUB').style.left	= PageWidth/6
		$('SUB').style.width	= PageWidth*(2/3);
		break;
	}

	$('SUB').style.background	= varBgColor;
	$('SUB').style.border	= "5px dotted " + varBorderColor;
	$('SUB').style.display	= "";
	$('SUB').style.filter    = "Alpha(Opacity=0,FinishOpacity=0,Style=1)";

	$('MSK').style.display  = "";
	Sub_Opn	= 1;

	clearInterval(tm1);
	tm1_cnt = 0;
	tm1      = setInterval('Show_Mstr_Sub()', 20);
}

function Close_Dtl(arg) {

	var	arg_ar	= arg.split(':');
	var	n = arg_ar[0];

	switch(n) {
	case "0":	
		Parent_flg	= 0;
		break;
	case "1":	
		Parent_flg	= 1;
		Sub_Top		= arg_ar[1]*1;
		Sub_Height	= arg_ar[2]*1;
		Sub_Diff	= arg_ar[3]*1;
		break;
	}

	if(Parent_flg=="0") {
		$('SUB').style.border	= "5px dotted " + varBorderColor;
	} else {
		parent.$('SUB').style.border	= "5px dotted " + varBorderColor;
	}
	clearInterval(tm1);
	tm1_cnt = 0;
	tm1      = setInterval('Hide_Mstr_Sub()', 20);
}

function Show_Mstr_Sub() {

	var	vTop;
	var	vHeight;
	var	local_arg;

	$('SUB').style.overflow	= "hidden";

	switch(tm1_cnt) {
	case 5:
		$('SUB').style.filter    = "Alpha(Opacity=100,FinishOpacity=100,Style=1)";
		$('SUB').style.border	= "5px double " + varBorderColor;
		$('SUB').style.top	= Sub_Top + "px";
		$('SUB').style.height	= Sub_Height + "px";

		tm1_cnt	= 0;
		clearInterval(tm1);

		// 条件別実行スクリプトの決定

		switch(Edit_Mode) {
		case "R":	// 新規登録
			switch(Mstr_Cat) {
			case "USR":	// ユーザ情報
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",Mstr_List_Ln,"MyHomePage2/php/Mstr_Reg_Usr.php");
				break;
			case "DEPT":	// 部署情報
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",Mstr_List_Ln,"MyHomePage2/php/Mstr_Reg_Dept.php");
				break;
			case "LVL":	// 役職情報
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",Mstr_List_Ln,"MyHomePage2/php/Mstr_Reg_Lvl.php");
				break;
			case "TPCS":	// トピックス情報
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				local_arg	= Mstr_List_Ln + "__:__";
				local_arg	+= Sub_Top + "__:__";
				local_arg	+= Sub_Height + "__:__";
				local_arg	+= Sub_Diff + "__:__";
				Request_HTTP("ASYNC",local_arg,"MyHomePage2/php/Mstr_Reg_Tpcs_P.php");
				break;
			case "MTRAL_CD":	// 資材コード
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",Mstr_List_Ln,"MyHomePage2/php/Mstr_Reg_Mtral_Cd.php");
				break;
			case "MT_SP1":	// 資材仕様１
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",Mstr_List_Ln,"MyHomePage2/php/Mstr_Reg_Mt_Sp1.php");
				break;
			case "MT_IN":	// 資材常置場所
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",Mstr_List_Ln,"MyHomePage2/php/Mstr_Reg_Mt_In.php");
				break;
			case "MT_OUT":	// 資材搬出先
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",Mstr_List_Ln,"MyHomePage2/php/Mstr_Reg_Mt_Out.php");
				break;
			case "BBS":	// 掲示板情報
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				local_arg	= Mstr_List_Ln + "__:__";
				local_arg	+= Sub_Top + "__:__";
				local_arg	+= Sub_Height + "__:__";
				local_arg	+= Sub_Diff + "__:__";
				Request_HTTP("ASYNC",local_arg,"MyHomePage2/php/Mstr_Reg_Bbs_P.php");
				break;
			}
			break;
		case "U":	// 更新・削除
			switch(Mstr_Cat) {
			case "USR":	// ユーザ情報
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",Mstr_List_Ln,"MyHomePage2/php/Mstr_Upd_Usr.php");
				break;
			case "DEPT":	// 部署情報
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",Mstr_List_Ln,"MyHomePage2/php/Mstr_Upd_Dept.php");
				break;
			case "LVL":	// 役職情報
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",Mstr_List_Ln,"MyHomePage2/php/Mstr_Upd_Lvl.php");
				break;
			case "TPCS":	// トピックス情報
				local_arg	= Mstr_List_Ln + "__:__";
				local_arg	+= Sub_Top + "__:__";
				local_arg	+= Sub_Height + "__:__";
				local_arg	+= Sub_Diff + "__:__";
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",local_arg,"MyHomePage2/php/Mstr_Upd_Tpcs_P.php");
				break;
			case "MTRAL":	// 資材データ
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",Mstr_List_Ln,"MyHomePage2/php/Mstr_Upd_Mtral.php");
				break;
			case "MTRAL_AP":	// 資材データ(AP)
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",Mstr_List_Ln,"MyHomePage2/php/Upd_Mtral.php");
				break;
			case "MTRAL_CD":	// 資材コード情報
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",Mstr_List_Ln,"MyHomePage2/php/Mstr_Upd_Mtral_Cd.php");
				break;
			case "MT_SP1":	// 資材仕様１
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",Mstr_List_Ln,"MyHomePage2/php/Mstr_Upd_Mt_Sp1.php");
				break;
			case "MT_IN":	// 資材常置場所
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",Mstr_List_Ln,"MyHomePage2/php/Mstr_Upd_Mt_In.php");
				break;
			case "MT_OUT":	// 資材搬出先
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",Mstr_List_Ln,"MyHomePage2/php/Mstr_Upd_Mt_Out.php");
				break;
			case "BBS":	// 掲示板情報
				local_arg	= Mstr_List_Ln + "__:__";
				local_arg	+= Sub_Top + "__:__";
				local_arg	+= Sub_Height + "__:__";
				local_arg	+= Sub_Diff + "__:__";
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",local_arg,"MyHomePage2/php/Mstr_Upd_Bbs_P.php");
				break;
			}
			break;
		case "REF":
			switch(Mstr_Cat) {
			case "BBS2":	// 掲示板公開用
				local_arg	= Mstr_List_Ln + "__:__";
				local_arg	+= Sub_Top + "__:__";
				local_arg	+= Sub_Height + "__:__";
				local_arg	+= Sub_Diff + "__:__";
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",local_arg,"MyHomePage2/php/Show_Bbs_P.php");
				//$('SUB').style.overflow	= "scroll";
				break;
			case "TPCS2":	// ﾄﾋﾟｯｸｽ一般公開用
				local_arg	= Mstr_List_Ln + "__:__";
				local_arg	+= Sub_Top + "__:__";
				local_arg	+= Sub_Height + "__:__";
				local_arg	+= Sub_Diff + "__:__";
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",local_arg,"MyHomePage2/php/Show_Tpcs_P.php");
				$('SUB').style.border		= "5px double " + varBorderColorLB;
				break;
			}
			break;
		case "CND":
			switch(Mstr_Cat) {
			case "MTRAL_CND":	// 資材データ検索
				local_arg	= Mstr_List_Ln + "__:__";
				local_arg	+= Mtral_Sw + "__:__";
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				//Request_HTTP("ASYNC",Mstr_List_Ln,"MyHomePage2/php/Show_Mtral_Cndtn.php");
				Request_HTTP("ASYNC",local_arg,"MyHomePage2/php/Show_Mtral_Cndtn.php");
				break;
			case "CHG_PW":	// パスワード変更
				cnt_Disp_Div	= 1;
				Disp_Div[0]	= "SUB";
				Request_HTTP("ASYNC",Mstr_List_Ln,"MyHomePage2/php/Show_Chg_Pw.php");
				break;
			}
			break;
		}
		break;
	default:

		if(tm1_cnt!=0) {
			$('SUB').style.filter    = "Alpha(Opacity="+(tm1_cnt*10)+",FinishOpacity="+(tm1_cnt*10)+",Style=1)";
			vTop	= Sub_Top + (Sub_Diff/tm1_cnt);
			$('SUB').style.top	= vTop + "px";
			vHeight	= (Sub_Diff - (Sub_Diff/tm1_cnt)) * 2;
			$('SUB').style.height	= vHeight + "px";
		}
		tm1_cnt++;
	}
}

function Hide_Mstr_Sub() {

	var	vTop;
	var	vHeight;

	switch(tm1_cnt) {
	case 5:
		Sub_Opn	= 0;
		switch(Parent_flg) {
		case 0:
			$('SUB').style.filter    = "Alpha(Opacity=0,FinishOpacity=0,Style=1)";
			$('SUB').style.border	= "5px double " + varBorderColor;
			$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
			$('SUB').style.height	= "0px";
			$('SUB').style.display	= "none";
			$('MSK').style.display  = "none";
			break;
		case 1:
			parent.$('SUB').style.filter    = "Alpha(Opacity=0,FinishOpacity=0,Style=1)";
			parent.$('SUB').style.border	= "5px double " + varBorderColor;
			parent.$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
			parent.$('SUB').style.height	= "0px";
			parent.$('SUB').style.display	= "none";
			parent.$('MSK').style.display  = "none";
			break;
		}
		tm1_cnt	= 0;
		clearInterval(tm1);

		break;
	default:

		if(tm1_cnt!=0) {
			switch(Parent_flg) {
			case 0:
				$('SUB').style.filter    = "Alpha(Opacity="+(100-(tm1_cnt*10))+",FinishOpacity="+(100-(tm1_cnt*10))+",Style=1)";
				break;
			case 1:
				parent.$('SUB').style.filter    = "Alpha(Opacity="+(100-(tm1_cnt*10))+",FinishOpacity="+(100-(tm1_cnt*10))+",Style=1)";
				break;
			}
			vTop	= Sub_Top + (Sub_Diff - (Sub_Diff/tm1_cnt));

			switch(Parent_flg) {
			case 0:
				$('SUB').style.top	= vTop + "px";
				break;
			case 1:
				parent.$('SUB').style.top	= vTop + "px";
				break;
			}
			//vHeight	= (Sub_Diff - (Sub_Diff/tm1_cnt)) * 2;
			vHeight	= ((Sub_Top + Sub_Diff) - vTop) * 2;
			switch(Parent_flg) {
			case 0:
				$('SUB').style.height	= vHeight + "px";
				break;
			case 1:
				parent.$('SUB').style.height	= vHeight + "px";
			}
		}
		tm1_cnt++;
	}
}

function Close_Mstr_List() {

	str_order	= "";
	Ap_SelectMenu(3);
}

function Upd_Exec(flg,cat) {

	var	inq;
	var	script;
	var	arg;

	switch(flg) {
	case "R":
		inq	= "この内容で登録しますか？";
		break;
	case "U":
		inq	= "この内容で変更しますか？";
		break;
	case "D":
		inq	= "この内容を削除しますか？";
		break;
	}
	if(!window.confirm(inq)) {
		return;
	}

	switch(flg) {
	case "R":
		switch(cat) {
		case "USR":	
			arg	= $('v_usr_id').value + "__:__";
			arg	+= $('v_usr_nm').value + "__:__";
			arg	+= $('v_usr_knm').value + "__:__";
			arg	+= $('v_cmb_dept').value + "__:__";
			arg	+= $('v_cmb_lvl').value + "__:__";
			arg	+= $('v_note').value + "__:__";
			if($('v_U_USR').checked) {
				arg	+= "1__:__";
			} else {
				arg	+= "0__:__";
			}
			if($('v_U_CD').checked) {
				arg	+= "1__:__";
			} else {
				arg	+= "0__:__";
			}
			if($('v_U_TPCS').checked) {
				arg	+= "1__:__";
			} else {
				arg	+= "0__:__";
			}

		if($('v_U_MTRAL').checked) {
			arg	+= "1__:__";
		} else {
			arg	+= "0__:__";
		}
		if($('v_U_MTRAL_CD').checked) {
			arg	+= "1__:__";
		} else {
			arg	+= "0__:__";
		}
		if($('v_U_MT_SP1').checked) {
			arg	+= "1__:__";
		} else {
			arg	+= "0__:__";
		}
		if($('v_U_MT_IN').checked) {
			arg	+= "1__:__";
		} else {
			arg	+= "0__:__";
		}
		if($('v_U_MT_OUT').checked) {
			arg	+= "1__:__";
		} else {
			arg	+= "0__:__";
		}

			if($('v_U_BBS').checked) {
				arg	+= "1__:__";
			} else {
				arg	+= "0__:__";
			}
			script	= "MyHomePage2/php/Mstr_RegExec_Usr.php";
			break;
		case "LIVE":	
			arg	= $('v_live_cmt').value + "__:__";
			script	= "MyHomePage2/php/Mstr_RegExec_Live.php";
			break;
		case "DEPT":	
			arg	= $('v_dept_nm').value + "__:__";
			script	= "MyHomePage2/php/Mstr_RegExec_Dept.php";
			break;
		case "LVL":	
			arg	= $('v_lvl_nm').value + "__:__";
			script	= "MyHomePage2/php/Mstr_RegExec_Lvl.php";
			break;
		case "TPCS":	
			arg	= $('v_title').value + "__:__";
			arg	+= $('v_contents').value + "__:__";
			arg	+= $('v_pic_1').value + "__:__";
			arg	+= $('v_pic_2').value + "__:__";
			arg	+= $('v_pic_3').value + "__:__";
			script	= "MyHomePage2/php/Mstr_RegExec_Tpcs.php";
			break;
		case "MTRAL_CD":	
			arg	= $('v_cat_nm').value + "__:__";
			script	= "MyHomePage2/php/Mstr_RegExec_Mtral_Cd.php";
			break;
		case "MT_SP1":	
			arg	= $('v_cat_cd').value + "__:__";
			arg	+= $('v_sp_nm').value + "__:__";
			arg	+= $('v_sp_unit').value + "__:__";
			arg	+= $('v_sp_note').value + "__:__";
			script	= "MyHomePage2/php/Mstr_RegExec_Mt_Sp1.php";
			break;
		case "MT_IN":	
			arg	= $('v_in_nm').value + "__:__";
			script	= "MyHomePage2/php/Mstr_RegExec_Mt_In.php";
			break;
		case "MT_OUT":	
			arg	= $('v_out_nm').value + "__:__";
			script	= "MyHomePage2/php/Mstr_RegExec_Mt_Out.php";
			break;
		case "BBS":	
			arg	= $('v_title').value + "__:__";
			arg	+= $('v_contents').value + "__:__";
			arg	+= $('v_pic_1').value + "__:__";
			arg	+= $('v_pic_2').value + "__:__";
			arg	+= $('v_pic_3').value + "__:__";
			script	= "MyHomePage2/php/Mstr_RegExec_Bbs.php";
			break;
		}
		break;
	case "U":
	case "D":
		switch(cat) {
		case "USR":	
			arg	= flg + "__:__";
			arg	+= $('v_usr_no').value + "__:__";
			arg	+= $('v_usr_nm').value + "__:__";
			arg	+= $('v_usr_knm').value + "__:__";
			arg	+= $('v_cmb_dept').value + "__:__";
			arg	+= $('v_cmb_lvl').value + "__:__";
			arg	+= $('v_note').value + "__:__";
			if($('v_U_USR').checked) {
				arg	+= "1__:__";
			} else {
				arg	+= "0__:__";
			}
			if($('v_U_CD').checked) {
				arg	+= "1__:__";
			} else {
				arg	+= "0__:__";
			}
			if($('v_U_TPCS').checked) {
				arg	+= "1__:__";
			} else {
				arg	+= "0__:__";
			}
		if($('v_U_MTRAL').checked) {
			arg	+= "1__:__";
		} else {
			arg	+= "0__:__";
		}
		if($('v_U_MTRAL_CD').checked) {
			arg	+= "1__:__";
		} else {
			arg	+= "0__:__";
		}
		if($('v_U_MT_SP1').checked) {
			arg	+= "1__:__";
		} else {
			arg	+= "0__:__";
		}
		if($('v_U_MT_IN').checked) {
			arg	+= "1__:__";
		} else {
			arg	+= "0__:__";
		}
		if($('v_U_MT_OUT').checked) {
			arg	+= "1__:__";
		} else {
			arg	+= "0__:__";
		}
			if($('v_U_BBS').checked) {
				arg	+= "1__:__";
			} else {
				arg	+= "0__:__";
			}
			if($('v_PWD_RESET').checked) {
				arg	+= "1__:__";
			} else {
				arg	+= "0__:__";
			}
			if($('v_U_LIVE').checked) {
				arg	+= "1__:__";
			} else {
				arg	+= "0__:__";
			}
			script	= "MyHomePage2/php/Mstr_UpdExec_Usr.php";
			break;
		case "DEPT":	
			arg	= flg + "__:__";
			arg	+= $('v_dept_cd').value + "__:__";
			arg	+= $('v_dept_nm').value + "__:__";
			script	= "MyHomePage2/php/Mstr_UpdExec_Dept.php";
			break;
		case "LVL":	
			arg	= flg + "__:__";
			arg	+= $('v_lvl_cd').value + "__:__";
			arg	+= $('v_lvl_nm').value + "__:__";
			script	= "MyHomePage2/php/Mstr_UpdExec_Lvl.php";
			break;
		case "TPCS":	
			arg	= flg + "__:__";
			arg	+= $('v_tpcs_no').value + "__:__";
			arg	+= $('v_title').value + "__:__";
			arg	+= $('v_contents').value + "__:__";
			arg	+= $('v_pic_1').value + "__:__";
			arg	+= $('v_pic_2').value + "__:__";
			arg	+= $('v_pic_3').value + "__:__";
			script	= "MyHomePage2/php/Mstr_UpdExec_Tpcs.php";
			break;
		case "MTRAL":	
			arg	= flg + "__:__";
			arg	+= $('v_sno').value + "__:__";
			arg	+= $('v_sp2_note').value + "__:__";
			arg	+= $('v_serial').value + "__:__";
			arg	+= $('v_cnt').value + "__:__";
			arg	+= $('v_made_at').value + "__:__";
			arg	+= $('v_check_at').value + "__:__";
			arg	+= $('v_note').value + "__:__";
			arg	+= $('v_sts').value + "__:__";
			arg	+= $('v_loc').value + "__:__";
			script	= "MyHomePage2/php/Mstr_UpdExec_Mtral.php";
			break;
		case "MTRAL_AP":	
			arg	= flg + "__:__";
			arg	+= $('v_sno').value + "__:__";
			arg	+= $('v_sts').value + "__:__";
			arg	+= $('v_loc').value + "__:__";
			script	= "MyHomePage2/php/UpdExec_Mtral.php";
			break;
		case "MTRAL_CD":	
			arg	= flg + "__:__";
			arg	+= $('v_cat_cd').value + "__:__";
			arg	+= $('v_cat_nm').value + "__:__";
			script	= "MyHomePage2/php/Mstr_UpdExec_Mtral_Cd.php";
			break;
		case "MT_SP1":	
			arg	= flg + "__:__";
			arg	+= $('v_sno').value + "__:__";
			arg	+= $('v_cat_cd').value + "__:__";
			arg	+= $('v_sp_cd').value + "__:__";
			arg	+= $('v_sp_nm').value + "__:__";
			arg	+= $('v_sp_unit').value + "__:__";
			arg	+= $('v_sp_note').value + "__:__";
			script	= "MyHomePage2/php/Mstr_UpdExec_Mt_Sp1.php";
			break;
		case "MT_IN":	
			arg	= flg + "__:__";
			arg	+= $('v_in_cd').value + "__:__";
			arg	+= $('v_in_nm').value + "__:__";
			script	= "MyHomePage2/php/Mstr_UpdExec_Mt_In.php";
			break;
		case "MT_OUT":	
			arg	= flg + "__:__";
			arg	+= $('v_out_cd').value + "__:__";
			arg	+= $('v_out_nm').value + "__:__";
			script	= "MyHomePage2/php/Mstr_UpdExec_Mt_Out.php";
			break;
		case "BBS":	
			arg	= flg + "__:__";
			arg	+= $('v_bbs_no').value + "__:__";
			arg	+= $('v_title').value + "__:__";
			arg	+= $('v_contents').value + "__:__";
			arg	+= $('v_pic_1').value + "__:__";
			arg	+= $('v_pic_2').value + "__:__";
			arg	+= $('v_pic_3').value + "__:__";
			script	= "MyHomePage2/php/Mstr_UpdExec_Bbs.php";
			break;
		}
		break;
	}

	cnt_Disp_Div	= 0;
	Request_HTTP("SYNC",arg,script);

        if(HTTP_RET) {
		alert("完了しました。");
		Close_Dtl("0:::");
		switch(cat) {
		case "USR":	
			Mstr_Usr(str_order);
			break;
		case "DEPT":	
			Mstr_Dept(str_order);
			break;
		case "LVL":	
			Mstr_Lvl(str_order);
			break;
		case "TPCS":	
			Mstr_Tpcs(str_order);
			break;
		case "MTRAL":	
			Mstr_Mtral(str_where,str_order);
			break;
		case "MTRAL_CD":	
			Mstr_Mtral_Cd(str_order);
			break;
		case "MT_SP1":	
			Mstr_Mt_Sp1(str_order);
			break;
		case "MT_IN":	
			Mstr_Mt_In(str_order);
			break;
		case "MT_OUT":	
			Mstr_Mt_Out(str_order);
			break;
		case "BBS":	
			Mstr_Bbs(str_order);
			break;
		}
        } else {
		alert(Err_Inf);		
	}
}

function Disp_Tpcs(lid) {

	Edit_Mode       = "REF";	// ﾄﾋﾟｯｸｽ詳細レイヤ指定モード
	Mstr_Cat	= "TPCS2";
	Mstr_List_Ln    = lid;		// ﾄﾋﾟｯｸｽリストKEY

	$('SUB').innerHTML	= "";
	$('SUB').style.position	= "absolute";

	// レイヤサイズの決定

	Sub_Top			= 420;
	Sub_Height		= 360;
	Sub_Diff		= Sub_Height/2;
	$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
	$('SUB').style.height	= "0px";
	$('SUB').style.left	= "0px";
	$('SUB').style.width	= PageWidth;

	$('SUB').style.background	= varBgColor;
	$('SUB').style.border		= "5px dotted " + varBorderColor;
	$('SUB').style.display		= "";
	$('SUB').style.filter   	= "Alpha(Opacity=0,FinishOpacity=0,Style=1)";

	$('MSK').style.display  = "";
	Sub_Opn	= 1;

	clearInterval(tm1);
	tm1_cnt = 0;
	tm1      = setInterval('Show_Mstr_Sub()', 20);
}

function Disp_Bbs(lid) {

	Edit_Mode       = "REF";	// 掲示板詳細レイヤ指定モード
	Mstr_Cat	= "BBS2";	// 社内掲示板用
	Mstr_List_Ln    = lid;		// 掲示板リストKEY

	$('SUB').innerHTML	= "";
	$('SUB').style.position	= "absolute";

	// レイヤサイズの決定

	Sub_Top			= 270;
	Sub_Height		= 510;
	Sub_Diff		= Sub_Height/2;
	$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
	$('SUB').style.height	= "0px";
	$('SUB').style.left	= "0px";
	$('SUB').style.width	= PageWidth;

	$('SUB').style.background	= varBgColor;
	$('SUB').style.border		= "5px dotted " + varBorderColor;
	$('SUB').style.display		= "";
	$('SUB').style.filter   	= "Alpha(Opacity=0,FinishOpacity=0,Style=1)";

	$('MSK').style.display  = "";
	Sub_Opn	= 1;

	clearInterval(tm1);
	tm1_cnt = 0;
	tm1      = setInterval('Show_Mstr_Sub()', 20);
}

function Disp_Chg_Pw() {

	Edit_Mode       = "CND";	// 条件
	Mstr_Cat	= "CHG_PW";	// パスワード変更 
	Mstr_List_Ln    = "";		// リストKEY

	$('SUB').innerHTML	= "";
	$('SUB').style.position	= "absolute";

	// レイヤサイズの決定

	Sub_Top			= 300;
	Sub_Height		= 150;
	Sub_Diff		= Sub_Height/2;
	$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
	$('SUB').style.height	= "0px";
	$('SUB').style.left	= PageWidth/4
	$('SUB').style.width	= PageWidth/2;

	$('SUB').style.background	= varBgColor;
	$('SUB').style.border		= "5px dotted " + varBorderColor;
	$('SUB').style.display		= "";
	$('SUB').style.filter   	= "Alpha(Opacity=0,FinishOpacity=0,Style=1)";

	$('MSK').style.display  = "";
	Sub_Opn	= 1;

	clearInterval(tm1);
	tm1_cnt = 0;
	tm1      = setInterval('Show_Mstr_Sub()', 20);
}

function Do_Chg_Pw() {

        var     arg     = $('pwd').value;

        Sub_Left        = $('SUB').style.left.replace("px","");
        cnt_Disp_Div    = 0;
        Disp_Div[0]     = "";
        Request_HTTP("SYNC",arg,"MyHomePage2/php/ChgExec_Pw.php");

        if(HTTP_RET) {
                $('Err_Msg').innerHTML    = "";
		alert("変更しました。次回ﾛｸﾞｲﾝから有効です。");
		Close_Dtl("0:::");
        } else {
                $('Err_Msg').innerHTML    = "<span class='C1R'>" + Err_Inf + "</span>";
                tm1_cnt  = 0;
                clearInterval(tm1);
                tm1      = setInterval('Move_Err()', 30);
        }
}


function Disp_Mtral_Cndtn(n) {

	Mtral_Sw	= n;

	Edit_Mode       = "CND";	// 資材データ絞込み条件
	Mstr_Cat	= "MTRAL_CND";	// 
	Mstr_List_Ln    = "";		// リストKEY

	$('SUB').innerHTML	= "";
	$('SUB').style.position	= "absolute";

	// レイヤサイズの決定

	Sub_Top			= 300;
	Sub_Height		= 180;
	Sub_Diff		= Sub_Height/2;
	$('SUB').style.top	= (Sub_Top + Sub_Diff) + "px";
	$('SUB').style.height	= "0px";
	$('SUB').style.left	= PageWidth/4
	$('SUB').style.width	= PageWidth/2;

	$('SUB').style.background	= varBgColor;
	$('SUB').style.border		= "5px dotted " + varBorderColor;
	$('SUB').style.display		= "";
	$('SUB').style.filter   	= "Alpha(Opacity=0,FinishOpacity=0,Style=1)";

	$('MSK').style.display  = "";
	Sub_Opn	= 1;

	clearInterval(tm1);
	tm1_cnt = 0;
	tm1      = setInterval('Show_Mstr_Sub()', 20);
}

function Review_Sp1() {

	var	arg	= $('sel_cat').value;
	cnt_Disp_Div	= 1;
	Disp_Div[0]	= "Review_Sp1_Area";
	Request_HTTP("ASYNC",arg,"MyHomePage2/php/Review_Sp1.php");

}

function Do_Mtral_Srch(n) {

        var     arg;

        str_where	= $('sel_sts').value + "__:__";
	str_where	+= $('sel_cat').value + "__:__";
	str_where	+= $('sel_sp1').value + "__:__";

	arg	= str_where + "__:__";

        Layout_Ap_Hdr();
        cnt_Disp_Div    = 3;
        Disp_Div[0]     = "CAT_HDR";
        Disp_Div[1]     = "LST_HDR";
        Disp_Div[2]     = "LST_BDY";

	switch(n) {
	case 0:
       		Request_HTTP("SYNC",arg,"MyHomePage2/php/Mstr_List_Mtral.php");
		break;
	case 1:
       		Request_HTTP("SYNC",arg,"MyHomePage2/php/List_Mtral.php");
		break;
	}



        if(HTTP_RET) {
		Close_Dtl("0:::");
        } else {
                alert(Err_Inf);
	}
}

function Review_Loc() {

	var	arg	= $('v_sts').value + "__:__";
        cnt_Disp_Div    = 1;
        Disp_Div[0]     = "Review_Loc_Area";

        Request_HTTP("SYNC",arg,"MyHomePage2/php/Review_Loc.php");

}

