'*-----* グローバル変数定義 *----------------------------------------------------* '****************************************************************************** '** Cookie設定処理 * '****************************************************************************** Sub SetCookie(pKey,pValue) '*-----* プライベート変数定義 *---------------------------------------------------* Dim strExpires '有効期限情報 Dim intDate '有効期限日 Dim strWeekDay '曜日 Dim strMonth '月名 Dim intCounter 'カウンタ '*-----* 有効期限情報 作成 *--------------------------------------------------* intDate = DateAdd("yyyy",1,Date) '有効期限 1年 SetLocale("en-us") strWeekDay = WeekDayName(WeekDay(intDate),False) '曜日 strMonth = MonthName(Month(intDate),True) '月名 SetLocale("ja") strExpires = ";expires=" & strWeekDay & ", " & _ Day(intDate) & "-" & _ strMonth & "-" & _ Year(intDate) & " " & _ Time & " GMT;" '*-----* Cookie 登録 *--------------------------------------------------------* document.cookie = pKey & "=" & pValue & strExpires End Sub '****************************************************************************** '** Cookie取得処理 * '****************************************************************************** Function GetCookie(pkey) On Error Resume Next '*-----* プライベート変数定義 *---------------------------------------------------* Dim aryCookie 'Cookie値 Dim intCounter 'カウンタ '*-----* リクエスト値 取得 *-------------------------------------------------------* GetCookie = "" For intCounter = 0 To UBound(Split(document.cookie,";")) aryCookie = Split(document.cookie,";")(intCounter) If Trim(Split(aryCookie,"=")(0)) = pKey Then GetCookie = Split(aryCookie,"=")(1) Exit For End If Next End Function '****************************************************************************** '** Cookie削除処理 * '****************************************************************************** Function ClrCookie(arg1) intDate = DateAdd("yyyy",-1,Date) '有効期限 -1年(過去設定によりCookie削除) SetLocale("en-us") strWeekDay = WeekDayName(WeekDay(intDate),False) '曜日 strMonth = MonthName(Month(intDate),True) '月名 SetLocale("ja") strExpires = ";expires=" & strWeekDay & ", " & _ Day(intDate) & "-" & _ strMonth & "-" & _ Year(intDate) & " " & _ Time & " GMT;" '*-----* Cookie 削除 *--------------------------------------------------------* document.cookie = arg1 & "=" & "0" & strExpires ' End Function '****************************************************************************** '** 表示/非表示処理 * '****************************************************************************** Function UDOpen(arg) Call Reopen(arg) End Function Function Reopen(arg) '*-----* プライベート変数定義 *---------------------------------------------------* Dim strRowsCols ' パレット ウィンドウの高さ/幅 Dim intCounter ' カウンター Dim strMainName Dim paletteoheight ' パレット初期データ(開いている時の高さ) Dim paletteposition paletteoheight = "182" ' パレット初期データ(開いている時の高さ) paletteposition = "bottom" ' パレットの表示位置 '*-----* パレット ウィンドウ 表示有無判定 *------------------------------------------* For intCounter = 0 To window.top.document.all.length - 1 If window.top.document.all(intCounter).tagName ="META" Then Select Case window.top.document.all(intCounter).name Case "MainFrameName" strMainName = window.top.document.all(intCounter).content 'メインフレーム名 Case "PaletteOHeight" paletteoheight = window.parent.document.all(intCounter).content ' 2006.11.16 PalettePosition 追加 Case "PalettePosition" paletteposition = LCase(window.parent.document.all(intCounter).content) End Select End If Next If LEN(strMainName) = 0 Then Call window.open(arg,"_top") Call SetCookie("buttonflg",1) 'Cookie設定処理 Else Dim href ' href = window.parent.frames("Window_Palette").location.href ' window.parent.frames("Window_Palette").location.href = href window.parent.frames("Window_Palette").location.reload If paletteposition = "top" Then strRowsCols = paletteoheight + "px,*" ElseIf paletteposition = "left" Then strRowsCols = paletteoheight + "px,*" ElseIf paletteposition = "right" Then strRowsCols = "*," + paletteoheight + "px" Else strRowsCols = "*," + paletteoheight + "px" End If '*-----* パレット ウィンドウ 高さ設定 *----------------------------------------------* For intCounter = 0 To window.parent.document.all.length - 1 If window.top.document.all(intCounter).tagName ="FRAMESET" Then If paletteposition = "left" Or paletteposition = "right" Then window.top.document.all(intCounter).cols = strRowsCols Else window.top.document.all(intCounter).rows = strRowsCols End If Exit For End If Next End If '*-----* デフォルト アクション キャンセル *-------------------------------------------------* ' window.event.returnValue = False 'Aタグ ナビゲート アクション キャンセル End Function '****************************************************************************** '** フレーム生成して表示する処理 * '****************************************************************************** Function view(arg) Dim MetaTag1() Dim MetaTag2() Dim MetaTag3() Dim MetaTagCount Dim strMainName Dim strSubFrameName Dim strPaletteName Dim strFrameSet Dim strSelfDirectory Dim strPaletteSource ' パレットのフィル名 Dim paletteoheight ' パレット初期データ(開いている時の高さ) Dim palettecheight ' パレット初期データ(閉じている時の高さ) Dim palette_height ' パレットの高さ Dim paletteposition strPaletteSource = "palette.html" ' パレットのソース paletteoheight = "182" ' パレット初期データ(開いている時の高さ) palettecheight = "25" ' パレット初期データ(閉じている時の高さ) paletteposition = "bottom" ' パレットの表示位置 MetaTagCount = 0 For intCounter = 0 To window.parent.document.all.length - 1 If window.parent.document.all(intCounter).tagName ="META" Then ReDim Preserve MetaTag1(MetaTagCount + 1) ReDim Preserve MetaTag2(MetaTagCount + 1) ReDim Preserve MetaTag3(MetaTagCount + 1) If window.parent.document.all(intCounter).name <> "" Then MetaTag1(MetaTagCount) = "name" MetaTag2(MetaTagCount) = window.parent.document.all(intCounter).name If window.parent.document.all(intCounter).content <> "" Then MetaTag3(MetaTagCount) = window.parent.document.all(intCounter).content Else MetaTag3(MetaTagCount) = "" End If MetaTagCount = MetaTagCount + 1 ElseIf window.parent.document.all(intCounter).httpEquiv <> "" Then MetaTag1(MetaTagCount) = "http-equiv" MetaTag2(MetaTagCount) = window.parent.document.all(intCounter).httpEquiv If window.parent.document.all(intCounter).content <> "" Then MetaTag3(MetaTagCount) = window.parent.document.all(intCounter).content Else MetaTag3(MetaTagCount) = "" End If MetaTagCount = MetaTagCount + 1 End If Select Case window.parent.document.all(intCounter).name Case "MainFrameName" strMainName = window.parent.document.all(intCounter).content 'メインフレーム名 Case "UDFolder" strSelfDirectory = window.parent.document.all(intCounter).content Case "PaletteSource" strPaletteSource = window.parent.document.all(intCounter).content Case "PaletteOHeight" paletteoheight = window.parent.document.all(intCounter).content Case "PaletteCHeight" palettecheight = window.parent.document.all(intCounter).content ' 2006.11.16 PalettePosition 追加 Case "PalettePosition" paletteposition = LCase(window.parent.document.all(intCounter).content) End Select End If Next strSubFrameName = " " strPaletteName = " " document.open() document.writeln("") document.writeln("") document.writeln("") document.writeln("
") For intCounter = 0 To MetaTagCount - 1 If MetaTag3(intCounter) <> "" Then document.writeln("") Else document.writeln("") End If Next document.writeln("