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

    Dim obj
    Dim obj2

    Dim szTitle
    Dim szPath
    Dim szParam
    Dim szDir
    Dim szQueue
    Dim nPriority
    Dim nOutFlags
    Dim szOutFile
    Dim nOutType
    Dim nTimeoutHour
    Dim nTimeoutMinute

    '*** So^HwH ***
    If Session("nDispMode") = 1 Then
        Set obj = Session("jsch").SchDateData.NotifyPage
        Set obj2 = Session("jsch").SchDateData.YetJobPage
    Else
        Set obj = Session("jsch").SchMasterData.NotifyPage
        Set obj2 = Session("jsch").SchMasterData.YetJobPage
    End If

   '*** ÑWuN ***
   If obj.YetJobFlag = 1 Then
           szTitle       = obj2.Title
           szPath        = obj2.Path
           szParam       = obj2.Param
           szDir         = obj2.Dir
           szQueue       = obj2.Queue
           nPriority     = obj2.Priority
           nOutFlags     = obj2.OutFlags
           szOutFile     = obj2.OutFile
           nOutType      = obj2.OutType
           nTimeoutHour  = obj2.TimeoutHour
           nTimeoutMinute= obj2.TimeoutMinute
   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/strfunc.js"></script>
<!-- ///////////////////////// client script section ////////////////////////// -->
<script language="JavaScript">
<!--
var QueWin = null;
window.onerror = null;

function onUnload_Body(){
    if (QueWin != null){
        QueWin.close();
        QueWin = null;
    }
}

function InitTextBoxValue(){
    with(document.propform){
        if (!!document.all){
            Title.value = unescape('<%=GetEscStrIE(szTitle)%>');
            Path.value = unescape('<%=GetEscStrIE(szPath)%>');
            Param.value = unescape('<%=GetEscStrIE(szParam)%>');
            Dir.value = unescape('<%=GetEscStrIE(szDir)%>');
            Queue.value = unescape('<%=GetEscStrIE(szQueue)%>');
            OutFile.value = unescape('<%=GetEscStrIE(szOutFile)%>');
            TimeoutHour.value = unescape('<%=GetEscStrIE(nTimeoutHour)%>');
            TimeoutMinute.value = unescape('<%=GetEscStrIE(nTimeoutMinute)%>');
        }else{
            Title.value = unescape('<%=GetEscStrNC(szTitle)%>');
            Path.value = unescape('<%=GetEscStrNC(szPath)%>');
            Param.value = unescape('<%=GetEscStrNC(szParam)%>');
            Dir.value = unescape('<%=GetEscStrNC(szDir)%>');
            Queue.value = unescape('<%=GetEscStrNC(szQueue)%>');
            OutFile.value = unescape('<%=GetEscStrNC(szOutFile)%>');
            TimeoutHour.value = unescape('<%=GetEscStrNC(nTimeoutHour)%>');
            TimeoutMinute.value = unescape('<%=GetEscStrNC(nTimeoutMinute)%>');
        }

        //ftHglݒ add 2001.03.24
        if (Path.value == ""){
            Priority.selectedIndex=2;
        }

        //ҏWEsݒ
        changeModeYetJob();

    }
}

function changeModeYetJob(){
    var bFlag=true;
    var obj=document.propform;
    <%
        If Session("nEditMode")=0 Then
            'Qƃ[h̏ꍇA䂵Ȃ
            Response.Write "return;" & vbCrLf
        End If
    %>
    if (!!document.all){
        if (obj.ExecYetFlag.checked){
            if (obj.YetJobFlag.checked){
                //`FbNĂꍇ̂݁Agp
                bFlag=false;
            }
            obj.YetJobFlag.disabled=false;
        }else{
            obj.YetJobFlag.disabled=true;
        }
        obj.Title.disabled=bFlag;
        obj.Path.disabled=bFlag;
        obj.Param.disabled=bFlag;
        obj.Dir.disabled=bFlag;
        obj.Queue.disabled=bFlag;
        obj.btnQueue.disabled=bFlag;
        obj.Priority.disabled=bFlag;
        obj.OutFlags.disabled=bFlag;
        if (!bFlag&&obj.OutFlags.checked){
            DisabledOutFile(false);
        }else{
            DisabledOutFile(true);
        }
        obj.TimeoutHour.disabled=bFlag;
        obj.TimeoutMinute.disabled=bFlag;
    }
}

function DisabledOutFile(bFlag){
    var obj;
    if (!!document.all){
        obj=document.propform;
        obj.OutFile.disabled=bFlag;
        obj.OutType[0].disabled=bFlag;
        obj.OutType[1].disabled=bFlag;
    }
    return;
}

function onBlur_Path(){
    with (document.propform){
        if (Title.value == "" && Path.value != ""){
            Title.value = getTitleFromPath(Path.value);
        }
    }
}

function onClick_Queue(){

    <% If Session("nEditMode") <> 1 Then Response.Write "return;" %>

    var x=(screen.width -300)/2;
    var y=(screen.height-200)/2;
    QueWin = window.open('../propJobQueRef.asp', 'QueWin', 'resizable=0,width=300,height=200,left=' + x + ',top=' + y);
    if (QueWin != null){
        QueWin.opener = self;
    }
}

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

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

  <table border="0" cellspacing="0" cellpadding="1">
    <tr>
    <td nowrap>ʒm</td>
    <td nowrap colspan="2">
     <input type="checkbox" name="ExecSuccessFlag" value="1" <%If obj.ExecSuccessFlag = 1 Then Response.Write "checked"%> <%=szMode%>>N
     <input type="checkbox" name="ExitFlag"        value="1" <%If obj.ExitFlag        = 1 Then Response.Write "checked"%> <%=szMode%>>I
     <input type="checkbox" name="ExecFailFlag"    value="1" <%If obj.ExecFailFlag    = 1 Then Response.Write "checked"%> <%=szMode%>>NG[
     <input type="checkbox" name="ExecYetFlag"     value="1" onClick="changeModeYetJob();" <%If obj.ExecYetFlag     = 1 Then Response.Write "checked"%> <%=szMode%>>Niςݎcj</td>
    </tr>

    <tr>
      <td colspan="3">
        <img border='0' src='../../image/jschedule/black.gif' height="1" width="500">
      </td>
    </tr>

    <tr>

      <td colspan="3"><input type="checkbox" name="YetJobFlag" value="1" onClick="changeModeYetJob();" <%If obj.YetJobFlag = 1 Then Response.Write "checked"%> <%=szMode%>>NɎsWuw</td>
    </tr>
    <tr>
      <td></td>
      <td>Ɩ</td>
      <td><input type="TEXT" name="Title" size="36" maxlength="32" onBlur="this.value=cutOverLenStr(this.value,32);" <%=szMode%>></td>
    </tr>
    <tr>
      <td></td>
      <td>Wu</td>
      <td><input type="TEXT" name="Path" size="36" maxlength="255" onBlur="javascript:onBlur_Path();this.value=cutOverLenStr(this.value,255);" <%=szMode%>></td>
    </tr>
    <tr>
      <td></td>
      <td>p[^</td>
      <td><input type="TEXT" name="Param" size="36" maxlength="255" onBlur="this.value=cutOverLenStr(this.value,255);" <%=szMode%>></td>
    </tr>
    <tr>
      <td></td>
      <td>sfBNg</td>
      <td><input type="TEXT" name="Dir" size="36" maxlength="255" onBlur="this.value=cutOverLenStr(this.value,255);" <%=szMode%>></td>
    </tr>
    <tr>
      <td></td>
      <td>WuL[</td>
      <td>
        <input type="TEXT" name="Queue" size="20" maxlength="15" onBlur="this.value=cutOverLenStr(this.value,15);" <%=szMode%>>
        <input type="button" name="btnQueue" value="Q..." onClick="onClick_Queue();" <%=szMode%>>
      </td>
    </tr>
    <tr>
      <td></td>
      <td>D揇</td>
      <td><select name="Priority" size="1" <%=szMode%>>
          <option value="0" <% If nPriority = 0 Then Response.Write "selected"%>>REALTIME
          <option value="1" <% If nPriority = 1 Then Response.Write "selected"%>>HIGH
          <option value="2" <% If (nPriority <> 0) And (nPriority <> 1) And (nPriority <> 3) Then Response.Write "selected"%>>NORMAL
          <option value="3" <% If nPriority = 3 Then Response.Write "selected"%>>IDLE
        </select></td>
    </tr>
    <tr>
      <td>
      </td>
      <td colspan="2">
      <input type="checkbox" name="OutFlags" value="1" onClick="DisabledOutFile(!this.checked);" <% If nOutFlags = 1 Then Response.Write "checked"%> <%=szMode%>>Wo͂̊Ď
      </td>
    </tr>
    <tr>
      <td align="right"></td>
      <td align="right">Wo̓t@C</td>
      <td><input type="text" name="OutFile" size="36" maxlength="255" onBlur="this.value=cutOverLenStr(this.value,255);" <%=szMode%>></td>
    </tr>
    <tr>
      <td></td>
      <td><br></td>
      <td><input type="radio" name="OutType" value="1" <% If nOutType <> 0 Then Response.Write "checked"%> <%=szMode%>>㏑
          <input type="radio" name="OutType" value="0" <% If nOutType =  0 Then Response.Write "checked"%> <%=szMode%>>ǉ
      </td>
    </tr>
    <tr>
      <td><br></td>
      <td>soߎԃ^CAEg</td>
      <td><input type="text" name="TimeoutHour"   size="4" maxlength="4" onBlur="this.value=txtNumJustify(this.value,0,1000);" <%=szMode%>>
          <input type="text" name="TimeoutMinute" size="2" maxlength="2" onBlur="this.value=txtNumJustify(this.value,0,59);" <%=szMode%>>
      </td>
    </tr>
  </table>
</form>

</body>

</html>
<%
    '*** IuWFNg̉ ***
    Set obj2 = Nothing
    Set obj  = Nothing
%>
