<%--
 Copyright : All Rights Reserved. Copyright (C) 2006, Hitachi, Ltd.
 Title     : ServerConductor WebConsole
 Version   : 08-00
 Name      : envAgtUse.jsp
 Date      : 2006/04/17
 Author    : Dinesh P.
 --%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<%@ page language = "java" %>
<%@ page errorPage = "errorDialog.jsp" %>
<%@ page import = 
"JP.co.Hitachi.soft.System_Manager.webconsole.common.MessageConstant"%>
<%@ page import = 
"JP.co.Hitachi.soft.System_Manager.webconsole.common.Const" %>
<%@ page import = "java.util.Vector" %>
<%@ page contentType ="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri = "/WEB-INF/struts-html.tld" prefix = "html" %>
<%@ taglib uri = "/WEB-INF/struts-bean.tld" prefix = "bean" %>
<%@ taglib uri = "/WEB-INF/common-tags.tld" prefix = "util" %>

<% response.addHeader("Cache-Control","no-cache"); %>

<jsp:useBean id="AgentUsageSettingBean" 
class="JP.co.Hitachi.soft.System_Manager.webconsole.model.bean.AgentUsageSettingBean" 
scope="request"/>

<util:checkURL/> 
    
<html:html>
    <head>                               
        <script src = "js/common.js"> </script>                                 <% //800WA_WEBCONSOLE192 %>    
        <script src = "js/envSet.js"> </script>        
        <link rel = "stylesheet" type = "text/css" href = "css/common.css">
    </head>    
    <body onload = "document.forms[0].thresholdDevice.focus(); 
                                                deviceChange();setLoad(0);">
        <%-- <html:form  action = "AgentUsageRateSettingAction"> --%>           <%-- 800WA_WEBCONSOLE451 --%>
        <html:form  action = "AgentUsageRateSettingAction"
            onsubmit = "return postValues();">                                  <%-- 800WA_WEBCONSOLE451 --%>
             <table border = "0" cellspacing= "0" cellpadding = "3" 
                                                                 width = 100%> 
                <tr>
                   <td>
                       <span class = "middle">
                         <bean:message
                            bundle = "<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>"
                            key = "envagt.detail.main.label"/>
                       </span>
                   </td>
               </tr>
              <tr> 
                  <td>
                     <span class = "small">
                        <bean:message 
                            bundle = "<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>"  
                            key = "envagt.detail.select.device"/>
                    </span>
                </td> 
                <td>
                    <span class = "small">
                       <bean:message 
                          bundle = "<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>"  
                          key = "envagt.detail.use.rate.title"/>
                    </span>
                </td> 
            </tr>
            <tr> 
                <td> 
                    <%-- <html:select property = "thresholdDevice" 
                               onchange = "deviceChange();" > --%>              <%-- 800WA_WEBCONSOLE448 --%>
                    <%-- <html:select property = "thresholdDevice" 
                               onfocus = "return validateExcessVal();"
                               onchange = "deviceChange();" > --%>              <%-- 800WA_WEBCONSOLE448 --%><%-- 800WA_WEBCONSOLE457 --%>
                    <html:select property = "thresholdDevice" 
                               onfocus = "return validateExcessVal();"
                               onchange = "deviceChange();" disabled = "true">  <%-- 800WA_WEBCONSOLE457 --%>
                        <html:options collection = "usagerateDeviceList"
                            property = "value" labelProperty = "label"/>
                    </html:select>
                </td>
                <td>
                    <%-- <html:text property = "thresholdParam" disabled = "true" 
                    size = "8" maxlength = "3" styleClass = "small"
     onchange = "setObject(this);return setonChange('thresholdParam');" /> --%> <% // 800WA_WEBCONSOLE319 %> <% // 800WA_WEBCONSOLE371 %><%-- 800WA_WEBCONSOLE448 --%>
                    <%-- <html:text property = "thresholdParam" disabled = "true" 
                    size = "8" maxlength = "3" styleClass = "small"
                    onchange = "setObject(this);setChangeFlag();" 
                    onblur="removeSelection(this);"/> --%>                      <%-- 800WA_WEBCONSOLE448 --%><%-- 800WA_WEBCONSOLE452 --%>
                    <html:text property = "thresholdParam" disabled = "true" 
                    size = "8" maxlength = "3" styleClass = "small"
                    onchange = "setObject(this);setChangeFlag();" 
                    onblur="setExcessHasChanged();removeSelection(this);"/>     <%-- 800WA_WEBCONSOLE452 --%>
                    <span class = "small">
                       <bean:message 
                           bundle = "<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>"  
                           key = "envagt.detail.use.rate.label"/>
                    </span>
                </td>
            </tr>
            <tr>
                <td></td>
                <td width = 50%>                                                <% // 800WA_WEBCONSOLE325 %>
                    <span class = "small">
                      <bean:message
                         bundle = "<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>"  
                         key = "envagt.detail.attention.label"/>
                    </span>
                </td>
            </tr> 
            <tr>
                <td rowspan = "5"> 
                    <%-- <html:select property = "driveList" size = "12" 
                       style = "width:180px" disabled ="true" 
                       ondblclick =
                        "setDblClick(document.forms[0].driveList.selectedIndex);
                        setObject(this);"
                       onclick = 
                       "setClick(document.forms[0].driveList.selectedIndex)" 
                      onkeydown = "setKeydown()" onkeypress="checkEnter()"> --%><%-- 800WA_WEBCONSOLE448 --%>
                    <html:select property = "driveList" size = "12" 
                       style = "width:180px" disabled ="true" 
                       onfocus = "validateUsagerate();"
                       ondblclick =
                        "setDblClick(document.forms[0].driveList.selectedIndex);
                        setObject(this);"
                       onclick = 
                       "setClick(document.forms[0].driveList.selectedIndex)" 
                       onkeydown = "setKeydown()" onkeypress="checkEnter()">    <%-- 800WA_WEBCONSOLE448 --%>
                    </html:select>                                              <%-- 800WA_WEBCONSOLE391 --%>   
                </td>
                <td bgcolor = "azure" >
                    <%-- <html:multibox property = "usageRateCheck" value = "false"
                       onclick = 
                       "setEnabled(document.forms[0].usageRateCheck.checked);
                       setObject(this);" > --%>                                 <% // 800WA_WEBCONSOLE371 %><%-- 800WA_WEBCONSOLE457 --%>
                    <html:multibox property = "usageRateCheck" value = "false"
                       onclick = 
                       "setEnabled(document.forms[0].usageRateCheck.checked);
                       setObject(this);" disabled = "true">                     <%-- 800WA_WEBCONSOLE457 --%>
                    </html:multibox>                                            
                    <span class = "small">
                    <%-- <bean:message --%>                                     <%-- 800WA_WEBCONSOLE375 --%>
                       <%-- bundle="<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>" --%><%-- 800WA_WEBCONSOLE375 --%>
                       <%-- key="envagt.detail.use.rate.check"/>. --%>          <%-- 800WA_WEBCONSOLE375 --%>
                    <bean:message 
                       bundle="<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>"
                       key="envagt.detail.use.rate.check"/>                     <%-- 800WA_WEBCONSOLE375 --%>
                    </span> 
                </td> 
            </tr> 
            <tr bgcolor = "azure">
                 <td>
                    <span class = "small">
                    <bean:message 
                        bundle = "<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>"  
                        key = "envagt.detail.use.second.title"/>
                    </span>
                </td>
            </tr>
            <tr bgcolor = "azure">
                <td>
                    <%-- <html:text property = "pollInterval" disabled = "true" 
                       size = "8" maxlength = "5" styleClass = "small"
        onchange = "setObject(this);return setonChange('pollInterval');" /> --%><% // 800WA_WEBCONSOLE319 %><% // 800WA_WEBCONSOLE371 %><%-- 800WA_WEBCONSOLE448 --%>
                    <%-- <html:text property = "pollInterval" disabled = "true" 
                       size = "8" maxlength = "5" styleClass = "small"
                       onchange = "setObject(this);setChangeFlag();" 
                       onblur="removeSelection(this);"/> --%>                   <%-- 800WA_WEBCONSOLE448 --%><%-- 800WA_WEBCONSOLE452 --%>
                    <html:text property = "pollInterval" disabled = "true" 
                       size = "8" maxlength = "5" styleClass = "small"
                       onchange = "setObject(this);setChangeFlag();" 
                       onblur="setExcessHasChanged();removeSelection(this);"/>  <%-- 800WA_WEBCONSOLE452 --%>
                    <span class = "small">
                    <bean:message
                        bundle = "<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>"  
                        key = "envagt.detail.use.second.label"/>
                    </span>
                </td>
            </tr> 
            <tr bgcolor = "azure"> 
                <td>
                    <span class = "small">
                    <bean:message
                         bundle = "<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>"  
                         key = "envagt.detail.sampling.count.title"/>
                    </span>
                </td>
            </tr>
            <tr bgcolor = "azure">
                <td> 
                    <%-- <html:text property = "samplingCount" disabled = "true" 
                      size = "8" maxlength = "4" styleClass = "small"
            onchange = "setObject(this);setChangeFlag();" onblur="removeSelection(this);"/> --%><% // 800WA_WEBCONSOLE319 %><% // 800WA_WEBCONSOLE371 %><%-- 800WA_WEBCONSOLE448 --%>
                    <%-- <html:text property = "samplingCount" disabled = "true" 
                      size = "8" maxlength = "4" styleClass = "small"
                      onchange = "setObject(this);setChangeFlag();" 
                      onblur="removeSelection(this);"/> --%>                    <%-- 800WA_WEBCONSOLE448 --%><%-- 800WA_WEBCONSOLE452 --%>
                    <html:text property = "samplingCount" disabled = "true" 
                      size = "8" maxlength = "4" styleClass = "small"
                      onchange = "setObject(this);setChangeFlag();" 
                      onblur="setExcessHasChanged();removeSelection(this);"/>   <%-- 800WA_WEBCONSOLE452 --%>
                    <span class = "small">
                    <bean:message 
                        bundle = "<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>"  
                        key = "envagt.detail.sampling.count.label"/>
                    </span>
                </td>
            </tr> 
            <tr><td>&nbsp;</td></tr>                                            <%-- 800WA_WEBCONSOLE404 --%>
            <tr>                                                                <%-- 800WA_WEBCONSOLE404 --%>
                <td  colspan = "2" align = "right" valign = "top">              <%-- 800WA_WEBCONSOLE404 --%>
                   <%-- <html:submit property = "setup" onclick="return postValues()"
                                        styleClass = "small"> --%>              <%-- 800WA_WEBCONSOLE404 --%><%-- 800WA_WEBCONSOLE451 --%>
                 <%-- <html:submit property = "setup" styleClass = "small"> --%><%-- 800WA_WEBCONSOLE451 --%><%-- 800WA_WEBCONSOLE457 --%>
                   <html:submit property = "setup" styleClass = "small" 
                       disabled = "true">                                       <%-- 800WA_WEBCONSOLE457 --%>
                   <bean:message 
                       bundle = "<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>"  
                       key = "envagt.common.set.button" />                      <%-- 800WA_WEBCONSOLE404 --%>
                   </html:submit>                                               <%-- 800WA_WEBCONSOLE404 --%>
                <%-- <td>  --%>                                                 <%-- 800WA_WEBCONSOLE404 --%><%-- 800WA_WEBCONSOLE443 --%>
                </td>                                                           <%-- 800WA_WEBCONSOLE443 --%>  
            </tr>                                                               <%-- 800WA_WEBCONSOLE404 --%>
        </table>
        
         <%-- <!-- Hidden Fields are used to store the array values --> --%>    <% // 800WA_WEBCONSOLE300 %>
         <input type = "hidden" name = "hdnNodeId" value = ""></input>
         <input type = "hidden" name = "hdnDeviceID" value = ""></input>
         <input type = "hidden" name = "hdnThresholdDeviceNames" value = "">
         </input>
         <input type = "hidden" name = "hdnThresholdValues" value = ""></input>
         <input type = "hidden" name = "hdnUsageRateCheckBoxValues" value = "">
         </input>
         <input type = "hidden" name = "hdnPollIntervalValues" value = "">
         </input>
         <input type = "hidden" name = "hdnSamplingCountValues" value = "">
         </input>
         <input type = "hidden" name = "hdnDriveParamValues" value = "">
         </input>
         <input type = "hidden" name = "hdnCpuParamValues" value = ""></input>
         <input type = "hidden" name = "hdnMemoryParamValues" value = "">
         </input>
        <%-- <br>
        
        <div align = "right"> --%>                                              <%-- 800WA_WEBCONSOLE404 --%>
        <%-- <html:submit property = "setup" onclick="return postValues()"
                                        styleClass = "small"> --%>              <% // 800WA_WEBCONSOLE316 %><%-- 800WA_WEBCONSOLE404 --%>
        <%-- <bean:message 
           bundle = "<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>"  
           key = "envagt.common.set.button" /> --%>                             <%-- 800WA_WEBCONSOLE404 --%>
        <%-- </html:submit> 
        </div> --%>                                                             <%-- 800WA_WEBCONSOLE404 --%>
        
        <util:set name="ExcessUsageConstants">
		<%-- var USAGE_RATE = '<bean:message --%>                               <%-- 800WA_WEBCONSOLE396 --%>
        <%--  bundle = "<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>" --%>           <%-- 800WA_WEBCONSOLE396 --%> 
        <%-- key = "envagt.detail.use.rate.title" />'; --%>                     <%-- 800WA_WEBCONSOLE396 --%>
        var USAGE_RATE = '<%= Const.EXCESS_USAGE_RATE %>';                      <%-- 800WA_WEBCONSOLE396 --%>
		var USAGE_RATE_INTERVAL = '<bean:message 
           				  bundle = "<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>"  
           				  key = "envagt.detail.use.second.title" />';
        var USAGE_RATE_SAMPLING_COUNT = '<bean:message 
           				  bundle = "<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>"  
           				  key = "envagt.detail.sampling.count.title" />';
        var USAGE_RATE_DONOTSET =  '<bean:message 
           				  bundle = "<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>"  
           				  key = "envagt.detail.donotset" />';                   <% // 800WA_WEBCONSOLE355 %>				     				  	        	
		</util:set>
        
        <util:set name = "errorArray"> 
            var errorMsgArr = new Array(); 
            var MSG_USAGERATE_CHECK = 
                "<%=MessageConstant.MSG_USAGERATE_CHECK %>"; 
            var MSG_USAGEINTERVAL_CHECK = 
               "<%=MessageConstant.MSG_USAGEINTERVAL_CHECK %>"; 
            var MSG_SAMPLING_CHECK =
                "<%=MessageConstant.MSG_SAMPLING_CHECK %>"; 
            var MSG_COMMON_POSITIVE_INTEGER_CHECK = 
              "<%=MessageConstant.MSG_COMMON_POSITIVE_INTEGER_CHECK %>"; 
            var MSG_COMMON_RANGE_CHECK = 
            "<%=MessageConstant.MSG_COMMON_RANGE_CHECK %>"; 

              errorMsgArr[MSG_USAGERATE_CHECK]
                  = '<bean:message bundle =
                  "<%= Const.MESSAGE_RESOURCES_KEY_ERRMESSAGE %>" 
                  key = "<%=MessageConstant.MSG_USAGERATE_CHECK %>"/>'; 

              errorMsgArr[MSG_USAGEINTERVAL_CHECK] 
                  = '<bean:message bundle = 
                  "<%= Const.MESSAGE_RESOURCES_KEY_ERRMESSAGE %>" 
                  key = "<%=MessageConstant.MSG_USAGEINTERVAL_CHECK %>"/>'; 
                  
              errorMsgArr[MSG_SAMPLING_CHECK] 
                  = '<bean:message bundle = 
                  "<%= Const.MESSAGE_RESOURCES_KEY_ERRMESSAGE %>" 
                  key = "<%=MessageConstant.MSG_SAMPLING_CHECK %>"/>'; 
                  
              errorMsgArr[MSG_COMMON_POSITIVE_INTEGER_CHECK] 
                 = '<bean:message bundle = 
                 "<%= Const.MESSAGE_RESOURCES_KEY_ERRMESSAGE %>" 
                 key = "<%=MessageConstant.MSG_COMMON_POSITIVE_INTEGER_CHECK %>" 
                 arg0 = "{0}"/>'; 
                  
              errorMsgArr[MSG_COMMON_RANGE_CHECK] 
                  = '<bean:message bundle = 
                  "<%= Const.MESSAGE_RESOURCES_KEY_ERRMESSAGE %>" 
                  key = "<%=MessageConstant.MSG_COMMON_RANGE_CHECK %>" 
                  arg0 = "{0}" arg1 = "{1}" arg2 = "{2}"/>'; 
        </util:set> 
        
    <script>
      var errorMsgArr = new Array();         // Array used for Error message
      var DeviceIDArr = new Array();         // Array used for DeviceID
      var DeviceNamesArr = new Array();      // Array used for DeviceNames
      var PollIntervalArr = new Array();     // Array used for PollInterval
      var SamplingCntArr = new Array();      // Array used for Sampling count
      var UsageRateChkArr = new Array();     // Array used for UsageRate checkbox
      var ThresholdParamArr = new Array();   // Array used for Threshold parameters
      var DriveIdArr = new Array();          // Array used for DriveID
      var ThresholdValueArr = new Array();   // Array used for Threshold values
      var DriveNameArr = new Array();        // Array used for DriveNames
      var ThresholdBooleanArr = new Array();  // Array used for Threshold boolean values
      var NodeID = ""                         // variable used for NodeID
      var CPUDeviceID = "";                   // variable used for CPUDeviceID
      var MemoryDeviceID = "";                // variable used for MemoryDeviceID
      var CPUDeviceName = "";                 // variable used for CPUDeviceName
      var MemoryDeviceName = "";           // variable used for MemoryDeviceName
      
            //Min & Max Value Constants
            
            var CPU_VAL_MIN = 
            <%=Const.AGENT_SETTING_THRESHOLD_CPU_VAL_MIN %>;
            var CPU_VAL_MAX =
            <%=Const.AGENT_SETTING_THRESHOLD_CPU_VAL_MAX %>;
            var DRIVE_VAL_MIN =
            <%=Const.AGENT_SETTING_THRESHOLD_DRIVE_VAL_MIN %>;
            var DRIVE_VAL_MAX = 
            <%=Const.AGENT_SETTING_THRESHOLD_DRIVE_VAL_MAX %>;
            var POLLINTERVAL_VAL_MIN = 
            <%=Const.AGENT_SETTING_USAGE_RATE_INTERVAL_MIN %>;
            var POLLINTERVAL_VAL_MAX = 
            <%=Const.AGENT_SETTING_USAGE_RATE_INTERVAL_MAX %>;
            var SAMPLINGCOUNT_VAL_MIN = 
            <%=Const.AGENT_SETTING_SAMPLING_COUNT_MIN %>;
            var SAMPLINGCOUNT_VAL_MAX =
             <%=Const.AGENT_SETTING_SAMPLING_COUNT_MAX %>;            
            
            <%=pageContext.getAttribute("ExcessUsageConstants").toString()%>
            <%=pageContext.getAttribute("errorArray").toString()%>            
        
            //Storing NodeID
            NodeID = <%= AgentUsageSettingBean.getNodeID()%>

            //Storing DeviceIDs in an Array
            <% Vector l_vtDeviceID = AgentUsageSettingBean.getDeviceID(); 
            if(l_vtDeviceID != null)
            {
            for(int l_iCnt=0;l_iCnt< l_vtDeviceID.size(); l_iCnt ++)
             { %>
                
                DeviceIDArr[<%=l_iCnt%>]='<%=l_vtDeviceID.get(l_iCnt)%>';
            <%
            }
            }
            %>
            
            //Storing DeviceNames in an Array
            <% Vector l_vtDeviceName1 = 
                                    AgentUsageSettingBean.getThresholdDevice();
            if(l_vtDeviceName1 != null)
            {
            for(int l_iCnt=0;l_iCnt< l_vtDeviceName1.size(); l_iCnt ++)
             { %>
                
                DeviceNamesArr[<%=l_iCnt%>]='<%=l_vtDeviceName1.get(l_iCnt)%>';
            <%
            }
            }
            %>
            
            //Storing PollInterval values in an Array
            <% Vector l_vtPollInterval =AgentUsageSettingBean.getPollInterval();
            if(l_vtPollInterval != null)
            {
            for(int l_iCnt=0;l_iCnt< l_vtPollInterval.size(); l_iCnt ++)
             { %>
            PollIntervalArr[<%=l_iCnt%>]='<%=l_vtPollInterval.get(l_iCnt)%>';
            <%
            }
            }
            %>
            
            //Storing Sampling Count values in an Array
            <% Vector l_vtSamplingCount =
                                 AgentUsageSettingBean.getSamplingCount();
            if(l_vtSamplingCount != null)
            {
            for(int l_iCnt=0;l_iCnt< l_vtSamplingCount.size(); l_iCnt ++)
             { %>
            SamplingCntArr[<%=l_iCnt%>]='<%=l_vtSamplingCount.get(l_iCnt)%>';
            <%
            }
            }
            %>
            
            //Storing UsageRate Checkbox values in an Array
            <% Vector l_vtUsageRateChk = 
                                  AgentUsageSettingBean.getUsageRateCheck();
            if(l_vtUsageRateChk != null)
            {
            for(int l_iCnt=0;l_iCnt< l_vtUsageRateChk.size(); l_iCnt ++)
             { %>
            UsageRateChkArr[<%=l_iCnt%>]='<%=l_vtUsageRateChk.get(l_iCnt)%>'; 
            <%
            }
            }
            %>
            
            //Storing DriveParameter Values in an Array
            <%
              Vector l_vtThresholdParam =
                                   AgentUsageSettingBean.getThresholdParam();
              if(l_vtThresholdParam != null)
              {
              for(int l_iCnt=0;l_iCnt< l_vtThresholdParam.size(); l_iCnt++) { 
              %>
                // Storing CPU values 
                <%
                    if(l_iCnt == 0) {
                       Vector l_vtCPU = (Vector) l_vtThresholdParam.get(l_iCnt);
                      if(null != l_vtCPU) {
                        if(null != l_vtCPU.get(0)) {
                %>
                         var paramStr = ('<%= l_vtCPU.get(0)%>');
                         var paramArr = new Array();
                         paramArr = paramStr.split("-");
                         if(paramArr.length == 4) 
                         {
                            CPUDeviceID = paramArr[0];
                            CPUDeviceName = paramArr[1];
                            ThresholdParamArr[<%=l_iCnt%>] = paramArr[2];
                         }
                <%   
                       }
                     } 
                   }
                %>
           
                // Storing Drive or FileSystem values
                <%
                  if(l_iCnt == 1) {
                   Vector l_vtDrive = (Vector)l_vtThresholdParam.get(l_iCnt);
                   if(null != l_vtDrive) {
                      for(int l_iCnt1=0;l_iCnt1< l_vtDrive.size(); l_iCnt1++) { 
               %>
                        var value = '<%= l_vtDrive.get(l_iCnt1)%>';
                        var array = new Array();
                        array = value.split("-");
                        if(array.length == 4)
                        { 
                             DriveIdArr[<%=l_iCnt1%>] = array[0];
                             DriveNameArr[<%=l_iCnt1%>] = array[1];
                          ThresholdValueArr[<%=l_iCnt1%>] = array[2];
                          ThresholdBooleanArr[<%=l_iCnt1%>] = array[3];
                        }

              <%    }
                  }
              %>
                  ThresholdParamArr[<%=l_iCnt%>] =
                        <%=Const.AGENT_SETTING_THRESHOLD_DEFAULT_VAL %>; //Threshold default value 
             <% } %>
                                
            //Storing Memory values
            <%
                if(l_iCnt == 2) {
                   Vector l_vtMemory = (Vector) l_vtThresholdParam.get(l_iCnt);
                  if(null != l_vtMemory) {
                    if(null != l_vtMemory.get(0)) {
            %>
                     var memoryStr = ('<%= l_vtMemory.get(0)%>');
                     var memoryArr = new Array();
                     memoryArr = memoryStr.split("-");
                     if(memoryArr.length == 4) 
                     {
                       MemoryDeviceID = memoryArr[0];
                       MemoryDeviceName = memoryArr[1];
                       ThresholdParamArr[<%=l_iCnt%>] = memoryArr[2];
                     }
            <%   
                   }
                 } 
               }
            %>

            <%
                }
              }
            %>
            
            //Storing DeviceIDs into member variable
            m_ArrDeviceID = new Array(DeviceIDArr.length);
            for(var l_iCnt=0;l_iCnt<DeviceIDArr.length;l_iCnt++) { 
                m_ArrDeviceID[l_iCnt] = DeviceIDArr[l_iCnt];
            }
            
            //Storing DeviceNames into member variable
            m_ArrDeviceNames = new Array(DeviceNamesArr.length);
            for(var l_iCnt=0;l_iCnt<DeviceNamesArr.length;l_iCnt++) { 
                m_ArrDeviceNames[l_iCnt] = DeviceNamesArr[l_iCnt];
            }
            
            //Storing PollInterval into member variable
            m_iPollIntervalValue = new Array(PollIntervalArr.length);
            for(var l_iCnt=0;l_iCnt<PollIntervalArr.length;l_iCnt++) { 
            m_iPollIntervalValue[l_iCnt] = PollIntervalArr[l_iCnt];
            }
            
            //Storing SamplingCount into member variable
            m_iSamplingCountValue = new Array(SamplingCntArr.length);
            for(var l_iCnt=0;l_iCnt<SamplingCntArr.length;l_iCnt++) { 
            m_iSamplingCountValue[l_iCnt] = SamplingCntArr[l_iCnt];
            }
            
            //Storing UsageRate CheckBox values into member variable
            m_blCheckBoxValue = new Array(UsageRateChkArr.length);
            for(var l_iCnt=0;l_iCnt<UsageRateChkArr.length;l_iCnt++) { 
            m_blCheckBoxValue[l_iCnt] = UsageRateChkArr[l_iCnt];
            }
            
            //Storing Threshold values into member variable
            m_iThresholdValue = new Array(ThresholdParamArr.length);
            for(var l_iCnt=0;l_iCnt<ThresholdParamArr.length;l_iCnt++) {
            m_iThresholdValue[l_iCnt] = ThresholdParamArr[l_iCnt];
            } 
            
            //Storing Drives Threshold values into member variable
            m_ArrThreshold = new Array(ThresholdValueArr.length);
            for(var l_iCnt=0;l_iCnt<ThresholdValueArr.length;l_iCnt++) {
             m_ArrThreshold[l_iCnt] = ThresholdValueArr[l_iCnt];
            }
            
            //Storing DriveIDs into member variable
            m_ArrDriveId = new Array(DriveIdArr.length);
            for(var l_iCnt=0;l_iCnt<DriveIdArr.length;l_iCnt++) {
            m_ArrDriveId[l_iCnt] = DriveIdArr[l_iCnt];
            }
            
            //Storing DriveNames into member variable
            m_ArrDriveName = new Array(DriveNameArr.length);
            for(var l_iCnt=0;l_iCnt<DriveNameArr.length;l_iCnt++) {
            m_ArrDriveName[l_iCnt] = DriveNameArr[l_iCnt];
            }
            
            //Storing Drive boolean values into member variable
            m_ArrFlag = new Array(ThresholdBooleanArr.length);
            for(var l_iCnt=0;l_iCnt<ThresholdBooleanArr.length;l_iCnt++) {
            m_ArrFlag[l_iCnt] = ThresholdBooleanArr[l_iCnt];
            }
            document.forms[0].setup.disabled = false;                           <%-- 800WA_WEBCONSOLE457 --%>
            document.forms[0].thresholdDevice.disabled = false;                 <%-- 800WA_WEBCONSOLE457 --%>
            document.forms[0].usageRateCheck.disabled = false;                  <%-- 800WA_WEBCONSOLE457 --%>
         </script>        
       </html:form>
    </body>
</html:html>

