<%@ page language="java" %> 
<%@taglib uri="/WEB-INF/tld/com_iplanet_jato/jato.tld" prefix="jato"%> 
<%@taglib uri="/WEB-INF/tld/com_sun_web_ui/cc.tld" prefix="cc"%>
<%@taglib uri="/WEB-INF/lib/sa.tld" prefix="sa"%>

<jato:useViewBean className="com.sun.netstorage.mgmt.fm.storade.ui.viewbeans.admin.NotificationSetupViewBean">

<%
  String isSystemEdition = "0";

  if(com.sun.netstorage.mgmt.fm.storade.ui.util.SystemUtil.isSystemEdition())
	isSystemEdition = "1";
%>

<sa:primarymasthead name="Masthead">

<jato:form name="notificationSetupForm" method="post">

<script language="JavaScript">

function validate() {
   if(!ps_CheckRequiredFields()) return false;

   if(<%=isSystemEdition%>) {
         var ssrrField = document.getElementById("SSRRActive");
         if (ssrrField.checked) {
            if(!empty_check(document.getElementById("SSRRHeartBeatFrequencyFor"),
                           "<cc:text name="JSAlert" bundleID="appBundle" defaultValue="js.alert.ssrr.frequency.empty" escape="false"/>"))
                                                                                       
	    return false;

            if(!qty_check(document.getElementById("SSRRHeartBeatFrequencyFor"),
	                    1, -999, 
	                    "<cc:text name="JSAlert" bundleID="appBundle" defaultValue="js.alert.ssrr.frequency.intValue" escape="false"/>")) 
            return false;
         }
   } else {
	 var field = document.getElementById("SunMCActive")
         if (field.checked) {
           if(!empty_check(document.getElementById("ipAddressFor"),
                           "<cc:text name="JSAlert" bundleID="appBundle" defaultValue="notification.sunMCErrorMsg" escape="false"/>"))
                                                                                       
	    return false;
	 }
   }

   return true;
}

</script>


<!-- Page Title --> 
<cc:pagetitle 
  name="PageTitle" 
  bundleID="appBundle"
  pageTitleText="page.title.notificationSetup" 
  showPageTitleSeparator="true"
  showPageButtonsTop="true"
  showPageButtonsBottom="true">

<!-- PropertySheet -->
  <cc:propertysheet 
   name="NotificationSetupPropertySheet" 
   bundleID="appBundle" 
   showJumpLinks="false"
   addJavaScript="true" />

</cc:pagetitle>

</jato:form>
</sa:primarymasthead>

</jato:useViewBean>
