<%@ LANGUAGE="VBScript" %>
<%
'include/jschedule/JSCHEDULE.ASP (Last Update 2001.05.07)
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
'   ESMPRO/JMSS WebClient (JSchedule) Version 6.0
'   Copyright (C) NEC Corporation/NEC Soft, Ltd. 2001
'   All rights reserved
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
'**Start Encode**
'*********** JSchedule common include file ***********
'------------------------------------------
'ASP Properties
'------------------------------------------
'** Prevents robots from getting the page
Response.AddHeader "robots", "noindex,nofollow"
'** Prevents proxy servers( and local machines) from caching the page
Response.Expires = -1
Response.AddHeader "Pragma", "No-Cache"
'Response.CacheControl = "Private"
Response.Buffer = True

'------------------------------------------
'JSchedule Properties
'------------------------------------------
Const JWBMSCHE_VER = "v6.00"

'------------------------------------------
'Fixed Numbers
'------------------------------------------
'ҏW[hinEditModej
'Const READ_ONLY = 0    'Qƃ[h
'Const CHANGEABLE= 1    'ύX[h
'Const TMP_CHANGE= 2    'ꎞύX[h

'------------------------------------------
'Fixed Strings
'------------------------------------------
Const STR_AND = "&"
Const STR_QOT = """"

'------------------------------------------
'Form Strings
'------------------------------------------
Const STR_NOFRAMES = "̃y[Wɂ̓t[gpĂ܂Ag̃uEUł̓T|[gĂ܂B"

'------------------------------------------
'Message Strings
'------------------------------------------
Const JSCH_MSG_S023 = "ȏrƖw肷邱Ƃ͂ł܂B<S023>"
Const JSCH_MSG_S187 = "̃[UXPW[ݒ蒆łB<S187>"
Const JSCH_MSG_S280 = "JMSSXPW[𗘗pł郆[Uł͂܂B<S280>"

'------------------------------------------
'Global Functions
'------------------------------------------
Function ScheduleConnectCheck()
    Dim nRet
    nRet = Session("nScheduleConnectError")
    If Len(nRet) = 0 Then
        nRet = 0    'VBScript3.0 ΍
    End If
    Session("nScheduleConnectError") = ""   'Ă
    If Len(Session("JschSessionID")) = 0 Then
        Select Case nRet
            Case 187
                '[Uݒ蒆
                Response.Redirect "../../include/errorex.asp?Patt=62"
            Case 280
                '[UȂ
                Response.Redirect "../../include/errorex.asp?Patt=61"
            Case Else
                '^CAEg(ؒf)
                Response.Redirect "../../include/errorex.asp"
        End Select
    End If
End Function

Function ClientMessageBox(str)
'Caution!! -- Don't use from <SCRPIT>tag to </SCRIPT>tag
    Response.Write "<SCRIPT language='JavaScript'><!--" & vbCrlf
    Response.Write "alert('" & str & "');" &  vbCrlf
    Response.Write "//-->" & vbCrlf
    Response.Write "</SCRIPT>"
End Function

'Add 2001.07.03 for RL2001/09 -->
Function ClientMessageBoxEx(str)
'Caution!! -- Don't use from <SCRPIT>tag to </SCRIPT>tag
' bZ[W{bNX\A̖߂lNCAg
' O[oJavaScriptϐl(nClientMessageBoxExRet)Ƃēn
    Response.Write "<SCRIPT language='JavaScript'><!--" & vbCrlf
    Response.Write "if(!!nClientMessageBoxExRet){" & vbCrlf
    Response.Write "    var nClientMessageBoxExRet=false;" & vbCrlf
    Response.Write "}" & vbCrlf
    Response.Write "nClientMessageBoxExRet = confirm('" & str & "');" &  vbCrlf
    Response.Write "//-->" & vbCrlf
    Response.Write "</SCRIPT>"
End Function
'Add 2001.07.03 for RL2001/09 <--

function GetEscStrIE(str)
    strRet = Replace(str,"%",Server.URLEncode("%"))
    strRet = Replace(strRet,STR_QOT,Server.URLEncode(STR_QOT))
    strRet = Replace(strRet,"'",Server.URLEncode("'"))
    strRet = Replace(strRet,"\",Server.URLEncode("\"))
    GetEscStrIE = strRet
End Function

function GetEscStrNC(str)
    strRet = Server.URLEncode(str)
    strRet = Replace(strRet,"+"," ")
    GetEscStrNC = strRet
End Function

Function Trace(str)
    Response.Write vbCrLf & "<!--" & str & "-->" & vbCrLf
End Function

'------------------------------------------
'Other
'------------------------------------------
'*** QƁEXV[h̎w ***
Dim szMode
    szMode  = ""
If Len(Session("nEditMode")) > 0 Then
    If Session("nEditMode") = 0 Then
        szMode = " onFocus='this.blur();' disabled"
    End If
End If

%>
