<!--#include file="../../include/jschedule/schevent.asp"-->
<%
'jschedule/schevent/propEvt.asp (Last Update 2001.04.16)
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
'   ESMPRO/JMSS WebClient (JSchedule) Version 6.0
'   Copyright (C) NEC Corporation/NEC Soft, Ltd. 2001
'   All rights reserved
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
'**Start Encode**

    bTerm = false
    Set obj = Session("jsch").SchEvtData.EvtPage

    '*** Ԃ̎擾 ****
    Dim nIndex
    Dim datBegin
    Dim datEnd
    Dim nBeginYear
    Dim nBeginMonth
    Dim nBeginDay
    Dim nEndYear
    Dim nEndMonth
    Dim nEndDay

    If Session("nEditMode") = 0 Then    '[ύX[h]
        '[Qƃ[h]p
        If obj.Begin = 0 Then
            nBeginYear = "----"
            nBeginMonth= "--"
            nBeginDay  = "--"
        Else
            nBeginYear = Year(CDate(obj.Begin))
            nBeginMonth= Month(CDate(obj.Begin))
            nBeginDay  = Day(CDate(obj.Begin))
        End If

        If obj.End = 0 Then
            nEndYear = "----"
            nEndMonth= "--"
            nEndDay  = "--"
        Else
            nEndYear = Year(CDate(obj.End))
            nEndMonth= Month(CDate(obj.End))
            nEndDay  = Day(CDate(obj.End))
        End If
    Else
        '*** T[o̖{̔N擾 ***
         datBegin = Session("jsch").JSchServerDate(Session("jserver"))
        If obj.Begin = 0 Then
            nBeginYear = Year(CDate(datBegin))
            nBeginMonth= Month(CDate(datBegin))
            nBeginDay  = Day(CDate(datBegin))
        Else
            nBeginYear = Year(CDate(obj.Begin))
            nBeginMonth= Month(CDate(obj.Begin))
            nBeginDay  = Day(CDate(obj.Begin))
        End If

        If obj.End = 0 Then
            datEnd = DateAdd("d",364,datBegin)
            nEndYear = Year(CDate(datEnd))
            nEndMonth= Month(CDate(datEnd))
            nEndDay  = Day(CDate(datEnd))
        Else
            nEndYear = Year(CDate(obj.End))
            nEndMonth= Month(CDate(obj.End))
            nEndDay  = Day(CDate(obj.End))
        End If
    End If
%>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">

<title>JMSS</title>
<link rel="stylesheet" type="text/css" href="../../include/jmss.css">
<script src="../../include/functions.js"></script>
<script src="../../include/jschedule/datefunc.js"></script>
<script src="../../include/jschedule/strfunc.js"></script>
<script language="javascript"><!--

function txtAsciiJustify(str){
    var str;
    var bRet;
    var strRet;

    bRet=isAscii(str);
    if(bRet){
        strRet=str;
    }else{
        alert("ppȊO͓͂ł܂B");
        strRet="";
    }
    return strRet;

}

function DisabledDate(bFlag){
var obj;
    <%
        If Session("nEditMode")=0 Then
            'Qƃ[h̏ꍇA䂵Ȃ
            Response.Write "return;" & vbCrLf
        End If
    %>
    if (!!document.all){
        obj = document.propform;
        obj.nYear.disabled=bFlag;
        obj.nMonth.disabled=bFlag;
        obj.nDay.disabled=bFlag;
        obj.nYearTo.disabled=bFlag;
        obj.nMonthTo.disabled=bFlag;
        obj.nDayTo.disabled=bFlag;
    }
}

function initDate(){
    with (document.propform){
        ReMakeDays(nYear,nMonth,nDay);
        ReMakeDays(nYearTo,nMonthTo,nDayTo);
        initYMD(nYear,nMonth,nDay,'<%=nBeginYear%>','<%=nBeginMonth%>','<%=nBeginDay%>');
        initYMD(nYearTo,nMonthTo,nDayTo,'<%=nEndYear%>','<%=nEndMonth%>','<%=nEndDay%>');
        DisabledDate(!TermFlag.checked);
    }
}

//-->
</script>
</head>

<!-- ////////////////////////////// main section ////////////////////////////// -->
<%
If Session("nEditMode") = 0 Then
    Response.Write "<body class='dialog'>"
    Response.Write "<form name='propform'>"
Else
    Response.Write "<body class='dialog' onLoad='javascript:initDate();'>"
    Response.Write "<form name='propform' method='post' action='propSubmit.asp' target='_self'>"
End If
%>
<!-- Hidden Parameters -->
  <input type="hidden" name="nTabIndex" value="1">
  <input type="hidden" name="nNextTabIndex" value="1">

  <table border="0" cellspacing="0" cellpadding="2">
    <tr>
      <td>CxgNID1</td>
      <td><input type="text" name="Event01" size="6" maxlength="4" value="<%=obj.Event01%>" onBlur="this.value=txtAsciiJustify(this.value);" <%=szMode%>></td>
    </tr>
    <tr>
      <td>CxgNID2</td>
      <td><input type="text" name="Event02" size="6" maxlength="4" value="<%=obj.Event02%>" onBlur="this.value=txtAsciiJustify(this.value);" <%=szMode%>></td>
    </tr>
    <tr>
      <td>CxgNID3</td>
      <td><input type="text" name="Event03" size="6" maxlength="4" value="<%=obj.Event03%>" onBlur="this.value=txtAsciiJustify(this.value);" <%=szMode%>></td>
    </tr>
    <tr>
      <td>CxgNID4</td>
      <td><input type="text" name="Event04" size="6" maxlength="4" value="<%=obj.Event04%>" onBlur="this.value=txtAsciiJustify(this.value);" <%=szMode%>></td>
    </tr>
    <tr>
      <td>CxgNID5</td>
      <td><input type="text" name="Event05" size="6" maxlength="4" value="<%=obj.Event05%>" onBlur="this.value=txtAsciiJustify(this.value);" <%=szMode%>></td>
    </tr>
    <tr>
      <td colspan="2"><input type="checkbox" name="EffectFlag" value="1" <%If obj.EffectFlag = 1 Then Response.Write "checked"%> <%=szMode%>>CxgNLɂ</td>
    </tr>
    <tr>
     <td nowrap valign="top"><input type="checkbox" name="TermFlag" value="1" onClick="DisabledDate(!this.checked)" <%If obj.TermFlag = 1 Then Response.Write "checked"%> <%=szMode%>></td>
     <td nowrap valign="top">
      <%
          If Session("nEditMode") = 0 Then    '[Qƃ[h]
              Response.Write "<INPUT Type='text' size='4' maxlength='4' value='" & nBeginYear  & "' " & szMode & ">/"
              Response.Write "<INPUT Type='text' size='2' maxlength='2' value='" & nBeginMonth & "' " & szMode & ">/"
              Response.Write "<INPUT Type='text' size='2' maxlength='2' value='" & nBeginDay   & "' " & szMode & ">"
          Else
              Response.Write "<SELECT Size='1' Name='nYear' onChange='ReMakeDays(document.propform.nYear,document.propform.nMonth,document.propform.nDay);' " & szMode & ">"
              Response.Write "<SCRIPT Language='JavaScript'>" & vbCrLf
              Response.Write "<!--" & vbCrLf
              Response.Write "drawYearOptions();" & vbCrLf
              Response.Write "//-->" & vbCrLf
              Response.Write "</Script>"
              Response.Write "</Select>"
              Response.Write "/"

              Response.Write "<SELECT Size='1' Name='nMonth' onChange='ReMakeDays(document.propform.nYear,document.propform.nMonth,document.propform.nDay);' " & szMode & ">"
              Response.Write "<SCRIPT Language='JavaScript'>" & vbCrLf
              Response.Write "<!--" & vbCrLf
              Response.Write "drawMonthOptions();" & vbCrLf
              Response.Write "//-->" & vbCrLf
              Response.Write "</Script>"
              Response.Write "</Select>"
              Response.Write "/"

              Response.Write "<SELECT Size='1' Name='nDay' " & szMode & ">" & vbCrLf
              Response.Write "<SCRIPT Language='JavaScript'>" & vbCrLf
              Response.Write "<!--" & vbCrLf
              Response.Write "drawDayOptions();" & vbCrLf
              Response.Write "//-->" & vbCrLf
              Response.Write "</Script>"
              Response.Write "</Select>"
              Response.Write ""
          End If

          Response.Write "<br>"

          If Session("nEditMode") = 0 Then    '[Qƃ[h]
              Response.Write "<INPUT Type='text' size='4' maxlength='4' value='" & nEndYear  & "' " & szMode & ">/"
              Response.Write "<INPUT Type='text' size='2' maxlength='2' value='" & nEndMonth & "' " & szMode & ">/"
              Response.Write "<INPUT Type='text' size='2' maxlength='2' value='" & nEndDay   & "' " & szMode & ">܂"
          Else
              Response.Write "<SELECT Size='1' Name='nYearTo' onChange='ReMakeDays(document.propform.nYearTo,document.propform.nMonthTo,document.propform.nDayTo);' " & szMode & ">"
              Response.Write "<SCRIPT Language='JavaScript'>" & vbCrLf
              Response.Write "<!--" & vbCrLf
              Response.Write "drawYearOptions();" & vbCrLf
              Response.Write "//-->" & vbCrLf
              Response.Write "</Script>"
              Response.Write "</Select>"
              Response.Write "/"

              Response.Write "<SELECT Size='1' Name='nMonthTo' onChange='ReMakeDays(document.propform.nYearTo,document.propform.nMonthTo,document.propform.nDayTo);' " & szMode & ">"
              Response.Write "<SCRIPT Language='JavaScript'>" & vbCrLf
              Response.Write "<!--" & vbCrLf
              Response.Write "drawMonthOptions();" & vbCrLf
              Response.Write "//-->" & vbCrLf
              Response.Write "</Script>"
              Response.Write "</Select>"
              Response.Write "/"

              Response.Write "<SELECT Size='1' Name='nDayTo' " & szMode & ">" & vbCrLf
              Response.Write "<SCRIPT Language='JavaScript'>" & vbCrLf
              Response.Write "<!--" & vbCrLf
              Response.Write "drawDayOptions();" & vbCrLf
              Response.Write "//-->" & vbCrLf
              Response.Write "</Script>"
              Response.Write "</Select>"
              Response.Write "܂"
          End If

         '*** IuWFNg̉ ***
         Set obj = Nothing
      %>
      </td>
    </tr>
  </table>
</form>

</body>

</html>
