<!-- #include file="../../../include.asp" -->

<%
'<!--
'################################################
'	 名称	:摘要一覧
'	 作成日:2002/9/6
'	 作成者:徳田
'	 目的 :摘要Mの一覧画面を表示する。
'	 概要	:
'		<<表示>>
'	・摘要一覧画面
'
'	修正日:2002/11/25
'	修正者:重松
'	 fm_tekiyo_ichiran_main.asp
'################################################
'-->
%>

<%
main()
Sub main()

	Dim Label
	Label = "摘要管理"
	If PackageMode = 1 Then
		Label = "摘要マスター"
	End If


	Dim EnshuName
	Dim Query
	Dim Content
	Dim TekiyoCD

	TekiyoCD = Request("TekiyoCD")

	If Not(SessionCheck()) Then
		Exit Sub
	End If

%>


<html>
<% = HtmlHeader("") %>
<SCRIPT LANGUAGE="JavaScript">
<!--
	HomeAlias = "<% = HomeAlias %>";
	HomeAliasSL = "<% = HomeAliasSL %>";
	ExitFlg = 1;
-->
</SCRIPT>
<body onkeydown="if(ExitFlg==2)ExitFlg=3;" onBeforeUnload="if(ExitFlg!=0)window.event.returnValue = ExitMsg(ExitFlg)" bgcolor="#5C70B6" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form OnKeyDown="FormKeyDown(this)"	method="POST" name="form1" autocomplete="off">
<input type="hidden" name="EnshuCD" value="<% = EnshuCD %>">

<%
	Response.Write(HtmlDesign(1))

	Response.Write(HttpL1(3))

	If PackageMode = 1 Then
		Response.Write(HttpL2("メインメニュー" ,"tblbtn('/" & HomeAlias & "/user/bk/menu_cyac.asp')", Label, "", "", "", "", "", "", "", "", ""))
	Else
		Response.Write(HttpL2("会社選択" ,"tblbtn( '/" & HomeAlias & "/user/bk/')", GB_GyosyuMeisyo, "tblbtn( '/" & HomeAlias & "/user/bk/menu_" & GB_Gyosyu & ".asp')", "社長室・総務部", "tblbtn( '/" & HomeAlias & "/user/bk/menu_s4.asp')", Label, "", "", "", "", ""))
	End If

	Response.Write(HttpL3("", "" ,"", "", "", "", "", "", "", "", "", "", "", "", "", ""))

	Response.Write(HttpL3_1("照会", "syokaibtn()", "印刷", "PrintoutReal()", "", "", "", "", "", ""))

	Response.Write(HttpL3_2("追加", "tblbtn( 'fm_tekiyo.asp?Action=1&EnshuCD=" & EnshuCD & "')", "", "", "", "", "", "", "", ""))

	Response.Write(HttpL4(Label, "一覧表示"))
%>


<div id="L0" style="position: absolute; visibility: hidden; left: 0px; top: -2000px;">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="5">
	<tr>
		<td align="center">
			<table height="100%" border="0" cellspacing="5" cellpadding="16" bgcolor="#ffffff" style="border:1px solid #000000">
				<tr>
					<td align="center" background="/<% = HomeAlias %>/images/window_bk.gif"><!--薄青のチェックの背景-->
						<!--青線+タイトルの3x3の外側が幅、高さ20pxのテーブル-->



						<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" HEIGHT="100%">
							<TR>
								<TD HEIGHT="20" VALIGN="BOTTOM" WIDTH="590">
									<TABLE WIDTH="590" HEIGHT="20" BORDER="1" CELLPADDING="0" CELLSPACING="0" BORDERCOLOR="#000000" BGCOLOR="#FFFFCC" CLASS="tx1416" STYLE="border-collapse: collapse">
										<TR ALIGN="CENTER">
											<TD WIDTH="156" HEIGHT="20">摘要コード</TD>
											<TD HEIGHT="20">摘要</TD>
										</TR>
									</TABLE>
								</TD>
							</TR>
							<TR>
								<TD VALIGN="TOP">
									<DIV ID="Layer1" STYLE="position:relative; left:0px; top:0px; width:610; height:100%; z-index:1; border: 1px none #000000; overflow: auto; cursor: hand;">
										<TABLE ID="SyoukaiList" WIDTH="590" BORDER="1" CELLSPACING="0" CELLPADDING="3" BGCOLOR="#FFFFFF" STYLE="border-collapse: collapse" BORDERCOLOR="#000000">
<%
											Dim ii, jj, iiDef

											ii = 0
											iiDef = -1

											Query = "exec SPM摘要一覧 '" & GB_SystemCD & "','" & EnshuCD & "','" & KaisyaCD & "'"
											Set Content = OpenQuery(Query)

											Do While Not(Content.BOF Or Content.EOF)
											
												If TekiyoCD = Content.Fields("摘要CD") Then
													iiDef = ii
												End If
											
												Response.Write("<TR ALIGN=""CENTER"" onClick=""celsel(" & ii & ",'fm_tekiyo_view.asp?EnshuCD=" & EnshuCD & "&TekiyoCD=" & Content.Fields("摘要CD") & "')"" class=""tx1416"" onDblClick=""syokaibtn()"">" & vbCrLf)
												Response.Write("<TD WIDTH=""150"" HEIGHT=""20"" class=""tx1618"">" & Content.Fields("摘要CD") & "</TD>" & vbCrLf)
												Response.Write("<TD HEIGHT=""20"" ALIGN=""LEFT"">" & Content.Fields("摘要") & "</TD>" & vbCrLf)
												ii = ii + 1
												Response.Write("</TR>")
												Content.MoveNext
											Loop

											For jj = ii To 30
												Response.Write("<TR ALIGN=""CENTER"" class=""tx1416"">" & vbCrLf)
												Response.Write("<TD WIDTH=""150"" HEIGHT=""20"">&nbsp;</TD>" & vbCrLf)
												Response.Write("<TD HEIGHT=""20"" ALIGN=""LEFT"">&nbsp;</TD>" & vbCrLf)
												Response.Write("</TR>")
											Next
%>
										</TABLE>
									</DIV>
								</TD>
							</TR>
						</TABLE>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</div>

</form>
 
<SCRIPT LANGUAGE="JavaScript">
<!--
var lsURL="#"
function syokaibtn()
{
	if(lsURL == "#")
	{
		alert("選択されていません");
	}
	else
	{
		tblbtn(lsURL);
	}
}

//TRselect & URLset
function celsel(rw,selURL)
{
	var trw;
	trw = rw;
	lsURL = selURL;

	for (k = 0; k < document.getElementById("SyoukaiList").rows.length; k++)
	{
		document.getElementById("SyoukaiList").rows[k].style.backgroundColor ="";
	}										//セル色クリア
	document.getElementById("SyoukaiList").rows[rw].style.backgroundColor ="#ffcdde";		//選択行色変更
}

//-->
</SCRIPT>

<SCRIPT FOR="window" EVENT="onload" LANGUAGE="JavaScript">
<%
' 2006.12.14 スクロール対応の為、下記ステップ追加
%>
<% If iiDef <> -1 Then %>
//	celsel(<% = iiDef %>, "fm_tekiyo_ichiran.asp?TekiyoCD=<% = TekiyoCD %>")
	celsel(<% = iiDef %>, "fm_tekiyo_view.asp??EnshuCD=<% = EnshuCD %>&TekiyoCD=<% = TekiyoCD %>")
	Layer1.scrollTop = <% = (iiDef - 5) * 20 %>;
<% End If %>

</script>

</body>

<% = HtmlFooter %>

</html>
<%
End Sub
%>