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

<%
'<!--
'################################################
'	 名称	:商社メニュー
'	 作成日:2002/10/18
'	 作成者:山崎
'################################################
'-->
%>


<%
main()
Sub main()
	If Not(SessionCheck()) Then
		Exit Sub
	End If

	Dim Kurikoshi
	Kurikoshi = Request("Kurikoshi")

	If Request("WndType") = "View" Then
		Session(HomeAlias & "WndType") = "View"
	Else
		Session(HomeAlias & "WndType") = "Normal"
	End If


	Dim SyohinKaihatukaRiyo
	Dim GenkaKaikeiRiyo
	Dim NyuShukkoTanto
	Query = "exec SPM演習取得 '" & GB_SystemCD & "', '" & EnshuCD & "'"
	Set Content = OpenQuery(Query)
	If Not(Content.BOF Or Content.EOF) Then
		SyohinKaihatukaRiyo = "" & Content.Fields("商品開発課利用")
		GenkaKaikeiRiyo = "" & Content.Fields("原価会計利用")
		NyuShukkoTanto = "" & Content.Fields("倉庫部利用")
	End If
'GenkaKaikeiRiyo = "1"
'NyuShukkoTanto = "0"

	Dim IPAddress,hoshiki,GakkoCD,Appsyurui
	Query = "SELECT * FROM TC1システムM"
	Set Content = OpenQuery(Query)
	If Not(Content.BOF Or Content.EOF) Then
		IPAddress1 = Content.Fields("IPアドレス")
		hoshiki = Content.Fields("方式")
		Appsyurui = Content.Fields("App種類")
		GakkoCD = Content.Fields("学校CD")
	End If


	Dim KaishaImage
	Query = "exec SPM会社取得 '" & GB_SystemCD & "', '" & EnshuCD & "', '" & KaisyaCD & "'" 
	Set Content = OpenQuery(Query)
	If Not(Content.BOF Or Content.EOF) Then
		KaishaImage = "" & Content.Fields("トップ画像マスタ")
		If "" & Content.Fields("トップ画像") <> "" Then
			KaishaImage = "" & Content.Fields("トップ画像")
		End If
	End If
	If KaishaImage <> "" Then
		KaishaImage = "/" & HomeAlias & "/data/topimage/" & GB_EnshuCD & "/" & KaishaImage
	End If

	'KaishaImage = ""


%>
<html>
<% = HtmlHeader("") %>
<SCRIPT LANGUAGE="JavaScript">
<!--
	ExitFlg = 1;
	HomeAlias = "<% = HomeAlias %>";
	HomeAliasSL = "<% = HomeAliasSL %>";
-->
</SCRIPT>
<%
'######################################################################################
'修正 By Hamada 2005/12/14  修正6月26日 Wolscastバグ対策及び Wood BEL仕様機能追加
'######################################################################################
If Request("WBCLB") <> "1" Then	'チェックしなければ起動しない
Else

If (Tvvariable = 1 Or Tvvariable = 2) And IPAddress1 <> "" Then	'↓↓↓Tvvariable = 1 or 2 以外で全迂回(061025小野)
	If Session(HomeAlias & "EnshuKubun") = "P" Then
	Else
		'↓↓↓WebCollabo利用フラグが立っていなければ全迂回(061117小野)
		Dim WebCollaboRiyo
		Query = "exec SPM演習取得 '" & GB_SystemCD & "','" & EnshuCD & "'" 
		Set Content = OpenQuery(Query)
		If Not(Content.BOF Or Content.EOF) Then
			WebCollaboRiyo = Content.Fields("WebCollabo利用")
		End If
		If WebCollaboRiyo = "1" Or WebCollaboRiyo = "2" Then

			Dim TelName,Content2,Query2,Conn,Recs,SQL1,tmpurl,IPAddress1,GroupCD,ref
			ref = Request("ref")
			If ref = "" Then
				ref = Request.ServerVariables("HTTP_REFERER")
			End If
			If ref = "collabo" Then
				ref = "bk/"
			ElseIf ref <> "" Then
				'キャッシュ抑制処理によりクエリ文字が付加されていれば除去する(091019小野)
				If InStr(ref, "?") > 0 Then
					ref = Right(Left(ref,InStr(ref, "?") - 1) ,3)
				Else
					ref = Right(ref,3)
				End If
			Else
				ref = "99"
			End If
			If ref ="bk/" Then
				Query2 = "SELECT * FROM TC5学生M WHERE 学生番号 ='" & GakuseiNo & "'"
				Set Content2 = OpenQuery(Query2)
				If Not(Content2.BOF Or Content2.EOF) Then
					GroupCD = Content2.Fields("学生グループCD")
				End If
				IPAddress = Request.ServerVariables("REMOTE_ADDR")
				TelName = GakuseiShimei & " " & KaisyaMeisyo
				Query = "exec SPWebCollaboデータ更新 '" & hoshiki & "','" & Appsyurui & "', '" & GakkoCD & "', '" & EnshuCD & "', '" & GakuseiNo & "', '" & TelName & "', '" & IPAddress & "'"
				'ウッドベル版廃止により利用停止
				'Set Content = OpenQuery3(Query)
			End If
			Dim GakuseiShimei0
			GakuseiShimei0 = KaisyaRyakuMeisyo & " - " & GakuseiShimei
			If ref ="bk/" Then	'hoshikiによる分岐を廃止(小野)
				If Tvvariable = 2 Then
					'「会社略名称 - 学生氏名」をEUC-JPでURIエンコードする(Apache対策)
					Dim GakuseiShimei1
					Dim lngSourceSize                                          'GakuseiShimei の文字数
					Dim strArray()                                             '変換された文字列を格納する配列
					Dim strSingle                                              '抜き出された 1 文字を格納する変数
					Dim i                                                      'ループカウンタ
					Dim intAsc                                                 '文字コード
					Dim strHex                                                 '16 進数に変換した文字コード
					Dim lngHexLength                                           'strHex の文字数
					Dim lngCount                                               'strArray の格納位置
					lngSourceSize = Len(GakuseiShimei0)
					If lngSourceSize <> 0 Then
						ReDim strArray(lngSourceSize * 6 - 1)                   'strArray() のサイズを予約。文字数 * 6 にしておく。
						For i = 1 To lngSourceSize Step 1                       'GakuseiShimei の文字数分ループをまわす
							strSingle = Mid(GakuseiShimei0, i, 1)                    'i 文字目の 1 文字を strSource から抜き出す
							intAsc = Asc(strSingle)                             '文字コードを取得
							If intAsc = &H20 Then                               '文字が半角空白文字の場合
								strArray(lngCount) = "+"                        '"+" を代わりに入れる
							ElseIf (intAsc >= &H40 And intAsc <= &H5A) Or _
								(intAsc >= &H61 And intAsc <= &H7A) Or _
								(intAsc >= &H30 And intAsc <= &H39) Or _
								intAsc = &H2A Or intAsc = &H2D Or _
								intAsc = &H2E Or intAsc = &H5F Then                '無変換文字だった場合
								strArray(lngCount) = strSingle
							Else
								strArray(lngCount) = "%"
								strHex = Hex(intAsc)                            '16 進文字コードを取得する
								lngHexLength = Len(strHex)
								If lngHexLength = 4 Then                        '2 バイト文字の場合
									If True then
										Dim HiByte 'as Integer
										Dim LowByte 'as Integer
										HiByte  = CInt("&H" & Left(strHex, 2))
										LowByte = CInt("&H" & Right(strHex, 2))
										If LowByte >= &H9f Then
											If HiByte >= &hE0 Then
												HiByte = HiByte * 2 - &hE0
											Else
												HiByte = HiByte * 2 - &h60
											End If
											LowByte = LowByte + 2
										Else
											If HiByte >= &hE0 Then
												HiByte = HiByte * 2 - &hE1
											Else
												HiByte = HiByte * 2 - &h61
											End If
											If LowByte < &H7F Then
												LowByte = LowByte + &h60 +1
											Else
												LowByte = LowByte + &h60
											End If
										End If
										strHex = Left(Hex(HiByte),2) & Left(Hex(LowByte),2)                            '16 進文字コードを取得する
										'strHex =                             '16 進文字コードを取得する
									End If
									strArray(lngCount + 1) = Left(strHex, 2)
									strArray(lngCount + 2) = "%"
									strArray(lngCount + 3) = Right(strHex, 2)
									lngCount = lngCount + 3
								ElseIf lngHexLength = 2 Then                    '1 バイト文字の場合
									strArray(lngCount + 1) = "8E"
									strArray(lngCount + 2) = "%"
									strArray(lngCount + 3) = strHex
									lngCount = lngCount + 3
								Else
									strArray(lngCount + 1) = "0"
									strArray(lngCount + 2) = strHex
									lngCount = lngCount + 2
								End If
							End If
							lngCount = lngCount + 1
						Next
						ReDim Preserve strArray(lngCount - 1)
						GakuseiShimei1 = Join(strArray, "")	'EUC-JPでURIエンコードした文字列を返す
					End If
					GroupCD = "WebCollabo"	'イーステージ版対策:同一演習で異グループが区別されてしまうためグループをダミーに統一
					tmpurl = "http://" & IPAddress1 & "/" & TvAlias & "url_check.php?" & GakkoCD & "&" & GroupCD & "&"  & EnshuCD & "&" & GakuseiNo & "&" & GakuseiNo & "&"
					Response.Write("<SCRIPT LANGUAGE=JavaScript>" & vbCrLf)
					'Response.Write("window.open("""&tmpurl&""")" & vbCrLf)
					If TvvariableES > 0 Then
						Response.Write("var TmpUrl = """ & GakuseiShimei1)
					Else
						Response.Write("var TmpUrl = """ & GakuseiShimei0)	'IISの場合はS-JISで生データを返す
					End If
					Response.Write(""";" & vbCrLf)
					Dim TmpWOpen
					TmpWOpen = "window.open(""" & tmpurl & """+TmpUrl,"""",""toolbar=no,location=no,directories=no,status=,menubar=no,scrollbars=no,resizable=yes,width=300,height=100"");" & vbCrLf
					'moveToは別ドメインに対してはブロックされるためアドレスが同一の場合にのみ作動させる
					Dim TmpServerName
					TmpServerName = IPAddress1
					If InStr(IPAddress1, ":") > 0 Then
						tmpurl = Split("" & IPAddress1, ":")
						TmpServerName = tmpurl(0)
					End If
					If TmpServerName = Request.ServerVariables("SERVER_NAME") Then
						Response.Write("CollaboWindow = " & TmpWOpen)
						Response.Write("CollaboWindow.moveTo(0,0);" & vbCrLf)
						Response.Write("CollaboWindow.focus();" & vbCrLf)
					Else
						Response.Write(TmpWOpen)
					End If
					Response.Write("</SCRIPT>" & vbCrLf)
				Else
					Dim Kidou,Kidou1
					Kidou = "WebColabo起動"
					Kidou1 = ""
					tmpurl = "http://" & IPAddress1 & "/WebCollabo/WebCollaboExec.asp?p1=" & hoshiki & "&p2=" & Appsyurui & "&p3=" & GakkoCD & "&p4=" & EnshuCD & "&p5=" & GakuseiNo & "&p6=" & GakuseiShimei0 & "&IP=" & IPAddress1 & "&PORT=80"
					Response.Write("<script language=jscript>" & vbCrLf)
					Response.Write("window.open("""&tmpurl&""","""&Kidou&""","""&Kidou1&""")" & vbCrLf)
					'Response.Write("window.open("""&tmpurl&""")" & vbCrLf)
					Response.Write("</script>" & vbCrLf)
				End If
			End If
		End If
	End If
End If	'↑↑↑Tvvariable = 1 or 2 以外で全迂回(061025小野)

End If
'######################################################################################
%>

<body onkeydown="if(ExitFlg==2)ExitFlg=3;" onBeforeUnload="if(ExitFlg!=0)window.event.returnValue = ExitMsg(ExitFlg)" bgcolor="#5C70B6" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"<% If Kurikoshi = "1" Then %> onLoad="alert('期末残高繰越処理を行い、繰越先の演習に移動しました。');"<% End If %>>
<!--<form OnKeyDown="FormKeyDown(this)"	 name="form1" method="POST" action="test1.asp">-->
<%

	Dim Query, Content
	Dim BunsyoInfo, SenpoKakuninInfo, MailInfo, MailInfoM, MailInfoF, KaifuFlg

	Query = "exec SPN受信文書一覧 '" & GB_SystemCD & "','" & EnshuCD & "', '" & KaisyaCD & "'"
	Set Content = OpenQuery(Query)
	Do While Not(Content.BOF Or Content.EOF)

		If Content.Fields("削除フラグ") = 0 And Content.Fields("開封フラグ") = 0 Then
			If BunsyoInfo = "" Then
				BunsyoInfo = Content.Fields("文書名称")
			ElseIf Right(BunsyoInfo , 2) <> "など" Then
				BunsyoInfo = BunsyoInfo & " など"
			End If

		End If
		Content.MoveNext
	Loop
	If BunsyoInfo <> "" Then
		BunsyoInfo = BunsyoInfo & "が未開封です"
	End If

	'未開封の先方確認済み注文請書があればその旨を表示する(061214小野)
	Query = "exec SPD仕入売上書類一覧 '" & GB_SystemCD & "','" & EnshuCD & "','" & KaisyaCD & "', '" & KaisyaCD & "', 'KU'"
	Set Content = OpenQuery(Query)
	Do While Not(Content.BOF Or Content.EOF)
		If Content.Fields("削除フラグ") = 0 And Content.Fields("開封フラグ") = 1 And Content.Fields("返信フラグ") = 0 Then
			If SenpoKakuninInfo= "" Then
				SenpoKakuninInfo= "注文請書を先方が確認済みです"
			End If
		End If
		Content.MoveNext
	Loop

	Query = "exec SPNメール受信一覧 '" & GB_SystemCD & "','" & EnshuCD & "', '" & KaisyaCD & "'"
	Set Content = OpenQuery(Query)
	Do While Not(Content.BOF Or Content.EOF)
		If Content.Fields("削除フラグ") = 0 And Content.Fields("開封フラグ") = 0 Then
			If MailInfoM = "" Then
				MailInfoM = "メールが届いています"
				Exit Do
			End If
		End If
		Content.MoveNext
	Loop
	If Tvvariable > 0 Then
		Query = "exec SPNFAX一覧 '" & GB_SystemCD & "','" & EnshuCD & "', '" & KaisyaCD & "', 'R'"
		Set Content = OpenQuery(Query)
		Do While Not(Content.BOF Or Content.EOF)
			If Content.Fields("削除フラグ") = 0 And Content.Fields("開封フラグ") = 0 Then
				If MailInfoF = "" Then
					MailInfoF = "FAXが届いています"
					Exit Do
				End If
			End If
			Content.MoveNext
		Loop
	End If
	If MailInfoM = "" And  MailInfoF <> "" Then
		MailInfo = MailInfoF
	ElseIf MailInfoM <> "" And  MailInfoF = "" Then
		MailInfo = MailInfoM
	ElseIf MailInfoM <> "" And  MailInfoF <> "" Then
		MailInfo = "メール・FAXが届いています"
	End If



	Dim Kitakuriyou
	Dim KitakuKeiyaku
	Query = "exec SPM演習取得 '" & GB_SystemCD & "','" & EnshuCD & "'"
	Set Content = OpenQuery(Query)
	If Not(Content.BOF Or Content.EOF) Then
		Kitakuriyou = "" & Content.Fields("寄託倉庫利用")
	End If
	'寄託利用状態を整数化(070207小野)
	If Kitakuriyou = "1" Then
		Kitakuriyou = 1
	Else
		Kitakuriyou = 0
	End If
	'寄託契約状態判定関数を追加(070207小野)
	KitakuKeiyaku = KitakuKeiyakuJoutai() 'int型1文字
	If Kitakuriyou = 1 And KitakuKeiyaku < 1 And BunsyoInfo = "" Then
		BunsyoInfo = "社長室・総務部より寄託契約を締結してください"
	End If




	If SyosyaMenuUseFlash = 1 Then

		If MailInfo = "" Then
			MailInfo = "#"
		End if
		Dim tmp
		tmp = Minute(Now()) * 100 + Second(Now())
		tmp = "?tmp=" & tmp
		HttpH0 = ""
		HttpH0 = HttpH0 & "<table width=""100%"" onMouseOver=""ExitFlg=0;""><tr onMouseOver=""ExitFlg=0;""><td onMouseOver=""ExitFlg=0;"" align=""center"">" & vbCrLf
		HttpH0 = HttpH0 & "<object classid=""clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"" codebase=""/" & HomeAlias & "/binx/swflash.cab#version=6,0,0,0"" width=""760"" height=""400"">" & vbCrLf
		HttpH0 = HttpH0 & "<param name=""flashvars"" value=""surl1=menu_s1.asp" & tmp & "&surl2=menu_s4.asp" & tmp & "&surl3=menu_s3.asp" & tmp & "&surl4=menu_s2.asp" & tmp & "&infotext=" & BunsyoInfo & "&mailtext=" & MailInfo & """>" & vbCrLf
		HttpH0 = HttpH0 & "<param name=""movie"" value=""/" & HomeAlias & "/images/office.swf"">" & vbCrLf
		HttpH0 = HttpH0 & "<param name=""quality"" value=""high"">" & vbCrLf
		HttpH0 = HttpH0 & "<param name=""SCALE"" value=""exactfit"">" & vbCrLf
		HttpH0 = HttpH0 & "<param name=""BGCOLOR"" value=""#CED4E9"">" & vbCrLf
		HttpH0 = HttpH0 & "<embed src=""/" & HomeAlias & "/images/office.swf"" width=""760"" height=""400"" quality=""high"" type=""application/x-shockwave-flash"" scale=""exactfit"" flashvars=""surl1=menu_s1.asp" & tmp & "&surl2=menu_s4.asp" & tmp & "&surl3=menu_s3.asp" & tmp & "&surl4=menu_s2.asp" & tmp & "&infotext=" & BunsyoInfo & "&mailtext=" & MailInfo & """ PLUGINSPAGE=""http://www.macromedia.com/go/getflashplayer"" bgcolor=""#CED4E9""></embed> " & vbCrLf
		HttpH0 = HttpH0 & "</object>" & vbCrLf
		HttpH0 = HttpH0 & "</td></tr></table>" & vbCrLf
	End If


	Response.Write(HtmlDesign(1))

	Response.Write(HttpL1(3))

	Response.Write(HttpL2("会社選択" ,"tblbtn( '/" & HomeAlias & "/user/bk/')", GB_GyosyuMeisyo, "", "", "", "", "", "", "", "", ""))

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

	Response.Write(HttpL3_1("", "", "", "", "", "", "", "", "", ""))

	Response.Write(HttpL3_2("", "", "", "", "", "", "", "", "", ""))

	Response.Write(HttpL4(GB_GyosyuMeisyo, ""))


	Response.Write(HttpL5(BunsyoInfo ))

%>

<div id="L0" style="position:absolute; visibility: hidden; left: 0px; top: 0px;">

<% 'If SyosyaMenuUseFlash <> 1 Then %>
<% If KaishaImage = "" Then %>
<table width="912" height="360" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td width="630" height="480" align="left" valign="top" background="/<% = HomeAlias %>/images/mbkimg_s.jpg?<% = GB_STU %>">
			<table border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td><% = Spacer(1,50) %></td>
					<td></td>
				</tr>
				<tr>
					<td width="50" height="160">&nbsp;</td>
					<td width="320" height="160" align="center" valign="middle" background="/<% = HomeAlias %>/images/mbkimg_sd.jpg?<% = GB_STU %>">
						<IFRAME name="informationiframe" SRC="informationboard.asp?<% = TimeUniq() %>" WIDTH="320" HEIGHT="160" FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 NORESIZE SCROLLING=no>
						 	<img src="/<% = HomeAlias %>/images/spacer.gif?<% = GB_STU %>" width="8" height="1">
					 	</IFRAME>
					</td>
				</tr>
			</table>
		</td>
		<td width="270" height="480" background="/<% = HomeAlias %>/images/mbk_mbk.gif?<% = GB_STU %>">
			<table width="235" height="200" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td width="282" height="60">
						<table width="282" height="60" border="0" cellpadding="0" cellspacing="0" background="/<% = HomeAlias %>/images/mmenu_btn.gif?<% = GB_STU %>" class="tbtn" onClick="tblbtn('menu_s1.asp')">
							<tr>
								<td width="65" height="50">&nbsp;</td>
								<td width="170" height="50" class="tx2022b">
								<div><% = Spacer(1,8) %></div>
								経 理 部
								</td>
							</tr>
						</table>
					</td>
				</tr>
	<% If (Genkavariable > 0 And GenkaKaikeiRiyo = "1") Or SyohinKaihatukaRiyo = "1" Then %>
	<% Else %>
				<tr>
					<td width="235" height="15">&nbsp; </td>
				</tr>
	<% End If %>
				<tr>
					<td width="282" height="60">
						<table width="282" height="60" border="0" cellpadding="0" cellspacing="0" background="/<% = HomeAlias %>/images/mmenu_btn.gif?<% = GB_STU %>" class="tbtn" onClick="tblbtn('menu_s3.asp')">
							<tr>
								<td width="65" height="50">&nbsp;</td>
								<td width="170" height="50" class="tx2022b">
								<div><% = Spacer(1,8) %></div>
								仕 入 部
								</td>
							</tr>
						</table>
					</td>
				</tr>
	<% If (Genkavariable > 0 And GenkaKaikeiRiyo = "1") Or SyohinKaihatukaRiyo = "1" Then %>
	<% Else %>
				<tr>
					<td width="235" height="15">&nbsp; </td>
				</tr>
	<% End If %>
				<tr>
					<td width="282" height="60">
						<table width="282" height="60" border="0" cellpadding="0" cellspacing="0" background="/<% = HomeAlias %>/images/mmenu_btn.gif?<% = GB_STU %>" class="tbtn" onClick="tblbtn('menu_s2.asp')">
							<tr>
								<td width="65" height="50">&nbsp;</td>
								<td width="170" height="50" class="tx2022b">
								<div><% = Spacer(1,8) %></div>
								販 売 部
								</td>
							</tr>
						</table>
					</td>
				</tr>
	<% If NyuShukkoTanto = "1" Then %>
				<tr>
					<td width="282" height="60">
						<table width="282" height="60" border="0" cellpadding="0" cellspacing="0" background="/<% = HomeAlias %>/images/mmenu_btn.gif?<% = GB_STU %>" class="tbtn" onClick="tblbtn('menu_s7.asp')">
							<tr>
								<td width="65" height="50">&nbsp;</td>
								<td width="170" height="50" class="tx2022b">
								<div><% = Spacer(1,8) %></div>
								倉 庫 部
								</td>
							</tr>
						</table>
					</td>
				</tr>
	<% End If %>
	<% If Genkavariable > 0 And GenkaKaikeiRiyo = "1" Then %>
				<tr>
					<td width="282" height="60">
						<table width="282" height="60" border="0" cellpadding="0" cellspacing="0" background="/<% = HomeAlias %>/images/mmenu_btn.gif?<% = GB_STU %>" class="tbtn" onClick="tblbtn('menu_s6.asp')">
							<tr>
								<td width="65" height="50">&nbsp;</td>
								<td width="170" height="50" class="tx2022b">
								<div><% = Spacer(1,8) %></div>
								製 造 部
								</td>
							</tr>
						</table>
					</td>
				</tr>
	<% ElseIf SyohinKaihatukaRiyo = "1" Then %>
				<tr>
					<td width="282" height="60">
						<table width="282" height="60" border="0" cellpadding="0" cellspacing="0" background="/<% = HomeAlias %>/images/mmenu_btn.gif?<% = GB_STU %>" class="tbtn" onClick="tblbtn('menu_s5.asp')">
							<tr>
								<td width="65" height="50">&nbsp;</td>
								<td width="170" height="50" class="tx2022b">
								<div><% = Spacer(1,8) %></div>
								商品企画室
								</td>
							</tr>
						</table>
					</td>
				</tr>
	<% Else %>
				<tr>
					<td width="235" height="15">&nbsp; </td>
				</tr>
	<% End If %>
				<tr>
					<td width="282" height="60">
						<table width="282" height="60" border="0" cellpadding="0" cellspacing="0" background="/<% = HomeAlias %>/images/mmenu_btn.gif?<% = GB_STU %>" class="tbtn" onClick="tblbtn('menu_s4.asp')">
							<tr>
								<td width="65" height="50">&nbsp;</td>
								<td width="170" height="50" class="tx2022b">
								<div><% = Spacer(1,8) %></div>
								社長室・総務部
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>



<% Else '背景画像設定あり(180705小野) %>

<table width="912" height="360" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td valign="middle" align="center">
			<table border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td>
	<% Session(HomeAlias & "TimeUniq") = "" 'TimeUniqセッション変数をクリアしないと初回以降更新されないのでクリア %>
		 	<img id="ImageTop" src="<% = KaishaImage %>?<% = TimeUniq() %>" width="560" height="480">
<script language="JavaScript" type="text/JavaScript">
<!--

	ResizeImage("ImageTop");

	//画像の縦横比補正
	function ResizeImage(ImageID) {
		var newPic = new Image();	//初期化するためローカルで宣言する
		newPic.src = document.getElementById(ImageID).src;	//イメージプリロード
		var LoopCnt = 0;
		var CheckLoop = setInterval(ResizeImage2, 10);	//以下の関数をループ処理する
		function ResizeImage2() {
			LoopCnt = LoopCnt + 1;
			//プリロードが終わったら処理(10秒経過したら強制処理)
			if (newPic.complete || LoopCnt > 1000) {
				var NewWidth = document.getElementById(ImageID).width;	//imgタグのwidthを取得
				var NewHeight = document.getElementById(ImageID).height;//imgタグのheightを取得
//alert(NewWidth + " x " + NewHeight);
				var Hiritsu;
				//元画像のサイズとimgタグのサイズが異なっていれば内接リサイズ
				if (newPic.width != NewWidth || newPic.height != NewHeight) {
					if (newPic.width / newPic.height > NewWidth / NewHeight) {
						Hiritsu = newPic.width / NewWidth;
					} else {
						Hiritsu = newPic.height / NewHeight;
					}
					NewWidth = newPic.width / Hiritsu;
					NewHeight = newPic.height / Hiritsu;
					document.getElementById(ImageID).width = NewWidth;
					document.getElementById(ImageID).height = NewHeight;
				}
				clearInterval(CheckLoop);	//setIntervalオブジェクトをクリアする
			}
		}
	}

-->
</script>
					</td>
				</tr>
			</table>
		</td>
		<td width="270" valign="middle">
			<table width="235" height="200" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td width="282" height="60">
						<table width="282" height="60" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td width="170" height="50" class="tx2022b">
									<IFRAME name="informationiframe" SRC="informationboard.asp?<% = TimeUniq() %>" WIDTH="320" HEIGHT="160" FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 NORESIZE SCROLLING=no>
									 	<img src="/<% = HomeAlias %>/images/spacer.gif?<% = GB_STU %>" width="8" height="1">
					 				</IFRAME>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td height="12">
					</td>
				</tr>
				<tr>
					<td width="310" height="60" align="center">
						<table width="282" height="60" border="0" cellpadding="0" cellspacing="0" background="/<% = HomeAlias %>/images/mmenu_btn01.gif?<% = GB_STU %>" class="tbtn" onClick="tblbtn('menu_s1.asp')">
							<tr>
								<td width="65" height="50">&nbsp;</td>
								<td width="170" height="50" class="tx2022b">
								<div><% = Spacer(1,8) %></div>
								経 理 部
								</td>
							</tr>
						</table>
					</td>
				</tr>
	<% If (Genkavariable > 0 And GenkaKaikeiRiyo = "1") Or SyohinKaihatukaRiyo = "1" Or NyuShukkoTanto = "1" Then %>
	<% Else %>
				<tr>
					<td width="235" height="15">&nbsp; </td>
				</tr>
	<% End If %>
				<tr>
					<td width="310" height="60" align="center">
						<table width="282" height="60" border="0" cellpadding="0" cellspacing="0" background="/<% = HomeAlias %>/images/mmenu_btn01.gif?<% = GB_STU %>" class="tbtn" onClick="tblbtn('menu_s3.asp')">
							<tr>
								<td width="65" height="50">&nbsp;</td>
								<td width="170" height="50" class="tx2022b">
								<div><% = Spacer(1,8) %></div>
								仕 入 部
								</td>
							</tr>
						</table>
					</td>
				</tr>
	<% If (Genkavariable > 0 And GenkaKaikeiRiyo = "1") Or SyohinKaihatukaRiyo = "1" Or NyuShukkoTanto = "1" Then %>
	<% Else %>
				<tr>
					<td width="235" height="15">&nbsp; </td>
				</tr>
	<% End If %>
				<tr>
					<td width="310" height="60" align="center">
						<table width="282" height="60" border="0" cellpadding="0" cellspacing="0" background="/<% = HomeAlias %>/images/mmenu_btn01.gif?<% = GB_STU %>" class="tbtn" onClick="tblbtn('menu_s2.asp')">
							<tr>
								<td width="65" height="50">&nbsp;</td>
								<td width="170" height="50" class="tx2022b">
								<div><% = Spacer(1,8) %></div>
								販 売 部
								</td>
							</tr>
						</table>
					</td>
				</tr>
	<% If NyuShukkoTanto = "1" Then %>
				<tr>
					<td width="310" height="60" align="center">
						<table width="282" height="60" border="0" cellpadding="0" cellspacing="0" background="/<% = HomeAlias %>/images/mmenu_btn01.gif?<% = GB_STU %>" class="tbtn" onClick="tblbtn('menu_s7.asp')">
							<tr>
								<td width="65" height="50">&nbsp;</td>
								<td width="170" height="50" class="tx2022b">
								<div><% = Spacer(1,8) %></div>
								倉 庫 部
								</td>
							</tr>
						</table>
					</td>
				</tr>
	<% End If %>
	<% If Genkavariable > 0 And GenkaKaikeiRiyo = "1" Then %>
				<tr>
					<td width="310" height="60" align="center">
						<table width="282" height="60" border="0" cellpadding="0" cellspacing="0" background="/<% = HomeAlias %>/images/mmenu_btn01.gif?<% = GB_STU %>" class="tbtn" onClick="tblbtn('menu_s6.asp')">
							<tr>
								<td width="65" height="50">&nbsp;</td>
								<td width="170" height="50" class="tx2022b">
								<div><% = Spacer(1,8) %></div>
								製 造 部
								</td>
							</tr>
						</table>
					</td>
				</tr>
	<% ElseIf SyohinKaihatukaRiyo = "1" Then %>
				<tr>
					<td width="310" height="60" align="center">
						<table width="282" height="60" border="0" cellpadding="0" cellspacing="0" background="/<% = HomeAlias %>/images/mmenu_btn01.gif?<% = GB_STU %>" class="tbtn" onClick="tblbtn('menu_s5.asp')">
							<tr>
								<td width="65" height="50">&nbsp;</td>
								<td width="170" height="50" class="tx2022b">
								<div><% = Spacer(1,8) %></div>
								商品企画室
								</td>
							</tr>
						</table>
					</td>
				</tr>
	<% Else %>
				<tr>
					<td width="235" height="15">&nbsp; </td>
				</tr>
	<% End If %>
				<tr>
					<td width="310" height="60" align="center">
						<table width="282" height="60" border="0" cellpadding="0" cellspacing="0" background="/<% = HomeAlias %>/images/mmenu_btn01.gif?<% = GB_STU %>" class="tbtn" onClick="tblbtn('menu_s4.asp')">
							<tr>
								<td width="65" height="50">&nbsp;</td>
								<td width="170" height="50" class="tx2022b">
								<div><% = Spacer(1,8) %></div>
								社長室・総務部
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<% End If %>
</div>
<!--</form>-->
</body>

<SCRIPT LANGUAGE="JavaScript">
	Init();
</SCRIPT>
</html>
<%
End Sub
%>