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

<%
'<!--
'################################################
'	 名称	:保険一覧
'	 作成日:2002/12/09
'	 作成者:重松
'	 目的 :保険の一覧画面を表示する。
'	 概要	:
'		<<表示>>
'	保険一覧画面
'
'	修正日:
'	修正者:
'	 fu_hoken_ichiran_main.asp
'################################################
'-->
%>

<%
main()
Sub main()
	Dim EnshuName
	Dim Query
	Dim Content

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


	Dim Syubetsu
	Syubetsu = Request("Syubetsu")


	Dim SyubetsuLabel
	If Syubetsu <> "" Then
		Query = "exec SPV区分情報一覧 '" & GB_SystemCD & "', '保険種別'"
		Set Content = OpenQuery(Query)
		Do While Not(Content.BOF Or Content.EOF)
			If Content.Fields("区分CD") = Syubetsu Then
				SyubetsuLabel = Replace("" & Content.Fields("区分名称"), "保険", "")
				Exit Do
			End If
			Content.MoveNext
		Loop
	End If


'****************************************

'Response.Write "--DateStr=" & DateStr
'Response.Write "--Tsuki=" & Tsuki
'Response.Write "--Hi=" & Hi
'EXIT SUB


'Response.Write "--DateStr=" & DateStr
'Response.Write "--KaisyaCD=" & KaisyaCD
'EXIT SUB
'****************************************



%>


<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">

<%
	Response.Write(HtmlDesign(1))

	Response.Write(HttpL1(1))

	Response.Write(HttpL2("会社選択" ,"tblbtn( '/" & HomeAlias & "/user/bk/')", "運輸・倉庫・保険" ,"tblbtn( '/" & HomeAlias & "/user/bk/menu_u.asp')", "運輸倉庫保険業務" , "tblbtn( '/" & HomeAlias & "/user/bk/menu_u2.asp')", "" & SyubetsuLabel & "保険料計算", "", "", "", "", ""))

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

	Response.Write(HttpL3_1("照会", "syokaibtn()", "", "", "", "", "", "", "", ""))

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

	Response.Write(HttpL4("" & SyubetsuLabel & "保険料計算", "一覧表示"))
%>


<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 width="700" height="100%" border="0" cellspacing="5" cellpadding="0" bgcolor="#ffffff" style="border:1px solid #000000">
				<tr>
					<td align="center" background="/<% = HomeAlias %>/images/window_bk.gif?<% = GB_STU %>"><!--薄青のチェックの背景-->
						<!--青線+タイトルの3x3の外側が幅、高さ20pxのテーブル-->
						<table border="0" cellspacing="0" cellpadding="0" height="100%">
							<tr>
<!--3x3上段左	--><td height="20" width="25" background="/<% = HomeAlias %>/images/dlgline_luw25.gif?<% = GB_STU %>"></td>
<!--3x3上段中央--><td height="20" align="center" background="/<% = HomeAlias %>/images/dlgline_h.gif?<% = GB_STU %>" width="640">
									<table width="190" border="0" cellspacing="0" cellpadding="0" height="25" background="/<% = HomeAlias %>/images/window_bk.gif?<% = GB_STU %>">
										<tr>
											<td align="center" valign="bottom" class="tx1820mn">【保険一覧】</td>
										</tr>
									</table>
								</td>
<!--3x3上段右	--><td height="20" width="20" background="/<% = HomeAlias %>/images/dlgline_ru.gif?<% = GB_STU %>"></td>
							</tr>
							<tr>
<!--3x3中段左	--><td width="20" background="/<% = HomeAlias %>/images/dlgline_v.gif?<% = GB_STU %>"></td>
<!--3x3中央		--><td width="650" align="center">


									<TABLE WIDTH="650" BORDER="0" CELLSPACING="0" CELLPADDING="0" HEIGHT="100%">
										<TR>
											<TD HEIGHT="25" VALIGN="BOTTOM" WIDTH="620">
												<TABLE WIDTH="620" HEIGHT="23" BORDER="1" CELLPADDING="0" CELLSPACING="0" BORDERCOLOR="#000000" BGCOLOR="#FFFFCC" CLASS="tx1416" STYLE="border-collapse: collapse">
													<TR ALIGN="CENTER">
														<TD WIDTH="80">申込番号</TD>
														<TD>取引先名称</TD>
														<TD WIDTH="150">保険種別</TD>
														<TD WIDTH="150">申込年月日</TD>
													</TR>
												</TABLE>
											</TD>
										</TR>
										<TR>
											<TD VALIGN="TOP" >
												<DIV ID="Layer1" STYLE="position:relative; left:0px; top:0px; width:640px; height:100%; z-index:1; border: 1px none #000000; overflow: auto; cursor: hand;">
													<TABLE ID="SyoukaiList" height="280" CLASS="tx1416" WIDTH="620" BORDER="1" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#FFFFFF" STYLE="border-collapse: collapse" BORDERCOLOR="#000000">
													<%
														'Response.Write("KaisyaCD=" & KaisyaCD )
														'Response.Write("EnshuCD=" & EnshuCD )

														Dim ii, jj
														ii = 0
														Query = "exec SPC保険一覧 '" & GB_SystemCD & "','" & EnshuCD & "','" & KaisyaCD & "'"
														Set Content = OpenQuery(Query)
															Do While Not(Content.BOF Or Content.EOF)
																						'種別ごとに表示するモード(130123小野)
																If Syubetsu = "" Or "" & Content.Fields("保険種別") = Syubetsu Then
																	Response.Write("<TR ALIGN=""CENTER"" onClick=""celsel(" & ii & ",'fu_hoken_view.asp?Syubetsu=" & Syubetsu & "&MousikomiNum=" & Content.Fields("申込番号") & "')"" onDblClick=""syokaibtn()"">" & vbCrLf)
																	Response.Write("<TD WIDTH=""80"" HEIGHT=""23"">" & Content.Fields("申込番号") & "</TD>" & vbCrLf)
																	Response.Write("<TD HEIGHT=""23"" ALIGN=""CENTER"">" & Content.Fields("会社名称") & "</TD>" & vbCrLf)
																	Response.Write("<TD WIDTH=""150"" HEIGHT=""23"">" & Content.Fields("区分名称") & "</TD>" & vbCrLf)
																	Response.Write("<TD WIDTH=""150"" HEIGHT=""23"" ALIGN=""CENTER"">" & SetTimeYYYYMMDD(Content.Fields("申込年月日")) & "</TD>" & vbCrLf)
																	ii = ii + 1
																	Response.Write("</TR>")
																End If
															 	Content.MoveNext
															Loop

															For jj = ii To 30
																Response.Write("<TR ALIGN=""CENTER"">" & vbCrLf)
																Response.Write("<TD WIDTH=""80"" HEIGHT=""23""></TD>" & vbCrLf)
																Response.Write("<TD HEIGHT=""23""></TD>" & vbCrLf)
																Response.Write("<TD WIDTH=""150"" HEIGHT=""23""></TD>" & vbCrLf)
																Response.Write("<TD WIDTH=""150"" HEIGHT=""23""></TD>" & vbCrLf)
																Response.Write("</TR>")
															Next
														%>
													</TABLE>
												</DIV>
											</TD>
										</TR>
									</TABLE>

								</td>
<!--3x3中段右	--><td width="1" background="/<% = HomeAlias %>/images/dlgline_v.gif?<% = GB_STU %>"></td>
							</tr>
							<tr>
<!--3x3下段左	--><td height="20" width="1" background="/<% = HomeAlias %>/images/dlgline_ldw25.gif?<% = GB_STU %>"></td>
<!--3x3下段中央--><td height="20" background="/<% = HomeAlias %>/images/dlgline_h.gif?<% = GB_STU %>" width="640"></td>
<!--3x3下段右	--><td height="20" width="1" background="/<% = HomeAlias %>/images/dlgline_rd.gif?<% = GB_STU %>"></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>

</body>

<% = HtmlFooter %>

</html>
<%
End Sub
%>