<html>
<head>
<title>Alert_Outbreak</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--base href="$$BASE_URL$$"-->
<link href="css/trend-style-new.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="javascripts/localization.js"></script>
<script language="JavaScript" src="javascripts/trend-ui-new.js"></script>
<script language="JavaScript" src="javascripts/OLH_Mapping.js"></script>
<script language="JavaScript" type="text/JavaScript">
<!--
CANCEL_EVENT = true;

function jsInitPage() {
	// size
	//setOptionValue(document.fmMain.txtRuleSizeUnit5001,STR_SIZE_MBGB,true);
	//setOptionValue(document.fmMain.txtRuleSizeUnit5002,STR_SIZE_MBGB,true);
	//setOptionValue(document.fmMain.txtRuleSizeUnit5003,STR_SIZE_MBGB,true);
	//document.fmMain.txtRuleSizeUnit5001.options[$$OPT_RULE_SIZE_UNIT_VALUE5001$$].selected = true;
	//document.fmMain.txtRuleSizeUnit5002.options[$$OPT_RULE_SIZE_UNIT_VALUE5002$$].selected = true;
	//document.fmMain.txtRuleSizeUnit5003.options[$$OPT_RULE_SIZE_UNIT_VALUE5003$$].selected = true;
	// time
	setOptionValue(document.fmMain.txtRuleTimeUnit5001,STR_UNIT_MMHH,true);
	setOptionValue(document.fmMain.txtRuleTimeUnit5002,STR_UNIT_MMHH,true);
	setOptionValue(document.fmMain.txtRuleTimeUnit5003,STR_UNIT_MMHH,true);
	document.fmMain.txtRuleTimeUnit5001.options[$$OPT_RULE_TIME_UNIT_VALUE5001$$].selected = true;
	document.fmMain.txtRuleTimeUnit5002.options[$$OPT_RULE_TIME_UNIT_VALUE5002$$].selected = true;
	document.fmMain.txtRuleTimeUnit5003.options[$$OPT_RULE_TIME_UNIT_VALUE5003$$].selected = true;
	jsUIDependency();
	// release event capture
	CANCEL_EVENT = false;
}
function jsSubmit() {
	// add some checking
	if (document.getElementById("chkRule5001").checked && !checkNumberRange(document.fmMain.txtRuleSize5001.value,INT_ALERT_NUMBER_MAX,INT_ALERT_NUMBER_MIN,STR_ERR_ALERT_NUMBER_RANGE,false)) {
		document.fmMain.txtRuleSize5001.focus();
		document.fmMain.txtRuleSize5001.select();
		return false;
	}
	if (document.getElementById("chkRule5002").checked && !checkNumberRange(document.fmMain.txtRuleSize5002.value,INT_ALERT_NUMBER_MAX,INT_ALERT_NUMBER_MIN,STR_ERR_ALERT_NUMBER_RANGE,false)) {
		document.fmMain.txtRuleSize5002.focus();
		document.fmMain.txtRuleSize5002.select();
		return false;
	}
	if (document.getElementById("chkRule5003").checked && !checkNumberRange(document.fmMain.txtRuleSize5003.value,INT_ALERT_NUMBER_MAX,INT_ALERT_NUMBER_MIN,STR_ERR_ALERT_NUMBER_RANGE,false)) {
		document.fmMain.txtRuleSize5003.focus();
		document.fmMain.txtRuleSize5003.select();
		return false;
	}
	if (document.getElementById("chkRule5001").checked && !checkNumberRange(document.fmMain.txtRuleTime5001.value,INT_ALERT_TIME_MAX,INT_ALERT_TIME_MIN,STR_ERR_ALERT_TIME_RANGE,false)) {
		document.fmMain.txtRuleTime5001.focus();
		document.fmMain.txtRuleTime5001.select();
		return false;
	}
	if (document.getElementById("chkRule5002").checked && !checkNumberRange(document.fmMain.txtRuleTime5002.value,INT_ALERT_TIME_MAX,INT_ALERT_TIME_MIN,STR_ERR_ALERT_TIME_RANGE,false)) {
		document.fmMain.txtRuleTime5002.focus();
		document.fmMain.txtRuleTime5002.select();
		return false;
	}
	if (document.getElementById("chkRule5003").checked && !checkNumberRange(document.fmMain.txtRuleTime5003.value,INT_ALERT_TIME_MAX,INT_ALERT_TIME_MIN,STR_ERR_ALERT_TIME_RANGE,false)) {
		document.fmMain.txtRuleTime5003.focus();
		document.fmMain.txtRuleTime5003.select();
		return false;
	}
	// cancel event capture
	CANCEL_EVENT = true;
	document.fmMain.btnSubmit.disabled = true;
	document.fmMain.btnReset.disabled = true;
//	document.fmMain.action="$$VAR_SAVE_ACTION$$";
	document.fmMain.FormAction.value="save";
	jsAddCSRFToken(document.fmMain);
    document.fmMain.submit();
}
function jsReset() {
	if(!confirm(STR_ALR_RESET_SETTING))
	    return false;
	
	// cancel event capture
	CANCEL_EVENT = true;
	document.fmMain.btnSubmit.disabled = true;
	document.fmMain.btnReset.disabled = true;
//	document.fmMain.action="$$VAR_RESET_ACTION$$";
	document.fmMain.FormAction.value="reset";
	jsAddCSRFToken(document.fmMain);
    document.fmMain.submit();
}	
function jsUIDependency() {
	document.fmMain.txtRuleSize5001.disabled = !(document.fmMain.chkRule5001.checked);
	document.fmMain.txtRuleTime5001.disabled = !(document.fmMain.chkRule5001.checked);
//	document.fmMain.txtRuleSizeUnit5001.disabled = !(document.fmMain.chkRule5001.checked);
	document.fmMain.txtRuleTimeUnit5001.disabled = !(document.fmMain.chkRule5001.checked);
	
	document.fmMain.txtRuleSize5002.disabled = !(document.fmMain.chkRule5002.checked);
	document.fmMain.txtRuleTime5002.disabled = !(document.fmMain.chkRule5002.checked);
//	document.fmMain.txtRuleSizeUnit5002.disabled = !(document.fmMain.chkRule5002.checked);
	document.fmMain.txtRuleTimeUnit5002.disabled = !(document.fmMain.chkRule5002.checked);

	document.fmMain.txtRuleSize5003.disabled = !(document.fmMain.chkRule5003.checked);
	document.fmMain.txtRuleTime5003.disabled = !(document.fmMain.chkRule5003.checked);
//	document.fmMain.txtRuleSizeUnit5003.disabled = !(document.fmMain.chkRule5003.checked);
	document.fmMain.txtRuleTimeUnit5003.disabled = !(document.fmMain.chkRule5003.checked);
}
function jsGotoSubSettingPage(id,link,menuname)
{
  var linkName = document.getElementById(id).innerHTML;
  document.location.href = link+"&AlertSettingName="+linkName+"&SubMenuName="+menuname;
}
//-->
</script>
<body onload="jsInitPage();" onclick="checkPageStatus(event);">
<form id="fmMain" name="fmMain" action="$$FORM_ACTION$$" method="POST">
<!--Page Title-->
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr><td class="content-title">Outbreak Alert</td>
	<td align="right" valign="bottom">
		<a href="javascript:jsMapOnlineHelp('alerts\Outbreak.htm');" class="moretestblue">
		<img src="images/question.gif" class="vAlignMid"> Help</a></td></tr>
<tr><td colspan="2" height="4"></td></tr>
<tr><td colspan="2" height="1" background="images/dot.gif"></td></tr>
<tr><td colspan="2" height="10"></td></tr>
</table>
<!--/Page Title-->
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<!--Page Description--><!--/Page Description-->
<!--Page Content-->
<tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="border">
		<tr><td class="tableheader" colspan="4">Send an outbreak alert for the following:</td></tr>
		<tr><td colspan="2" class="grey">Condition</td>
			<td class="grey">Number</td>
			<td class="grey-end">Time</td></tr>
		<tr><td class="data1" width="20"><input type=checkbox id="chkRule5001" name="chkRule5001" onclick="jsUIDependency();" $$OPT_RULE_CHECKED5001$$></td>
			<td class="data1b"><a id="link5001" name="link5001" href="javascript:jsGotoSubSettingPage('link5001','$$VAR_HREF_SETTING5001$$','$$SETTING_PARAMETER5001$$')">Viruses detected reach the following number within the shown time</td>
			<td class="data1b"><input type=text maxLength="5" class="text" id="txtRuleSize5001" name="txtRuleSize5001" size="3" value="$$OPT_RULE_SIZE_VALUE5001$$"></td>
				<!--select class="text" id="txtRuleSizeUnit5001" name="txtRuleSizeUnit5001"></select-->
			<td class="data1b" nowrap><input type=text maxLength="4" class="text" id="txtRuleTime5001" name="txtRuleTime5001" size="3" value="$$OPT_RULE_TIME_VALUE5001$$">
				<select class="text" id="txtRuleTimeUnit5001" name="txtRuleTimeUnit5001"></select></td></tr>
		<tr><td class="data2"><input type=checkbox id="chkRule5002" name="chkRule5002" onclick="jsUIDependency();" $$OPT_RULE_CHECKED5002$$></td>
			<td class="data2b"><a id="link5002" name="link5002" href="javascript:jsGotoSubSettingPage('link5002','$$VAR_HREF_SETTING5002$$','$$SETTING_PARAMETER5002$$')">Uncleanable viruses reach the following number within the shown time</td>
			<td class="data2b"><input type=text maxLength="5" class="text" id="txtRuleSize5002" name="txtRuleSize5002" size="3" value="$$OPT_RULE_SIZE_VALUE5002$$"></td>
				<!--select class="text" id="txtRuleSizeUnit5002" name="txtRuleSizeUnit5002"></select-->
			<td class="data2b" nowrap><input type=text maxLength="4" class="text" id="txtRuleTime5002" name="txtRuleTime5002" size="3" value="$$OPT_RULE_TIME_VALUE5002$$">
				<select class="text" id="txtRuleTimeUnit5002" name="txtRuleTimeUnit5002"></select></td></tr>
		<tr><td class="data1"><input type=checkbox id="chkRule5003" name="chkRule5003" onclick="jsUIDependency();" $$OPT_RULE_CHECKED5003$$></td>
			<td class="data1b"><a id="link5003" name="link5003" href="javascript:jsGotoSubSettingPage('link5003','$$VAR_HREF_SETTING5003$$','$$SETTING_PARAMETER5003$$')">Blocked files reach the following number within the shown time</td>
			<td class="data1b"><input type=text maxLength="5" class="text" id="txtRuleSize5003" name="txtRuleSize5003" size="3" value="$$OPT_RULE_SIZE_VALUE5003$$"></td>
				<!--select class="text" id="txtRuleSizeUnit5003" name="txtRuleSizeUnit5003"></select-->
			<td class="data1b" nowrap><input type=text maxLength="4" class="text" id="txtRuleTime5003" name="txtRuleTime5003" size="3" value="$$OPT_RULE_TIME_VALUE5003$$">
				<select class="text" id="txtRuleTimeUnit5003" name="txtRuleTimeUnit5003"></select></td></tr>
		</table></td></tr>
<tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0">
		<!--||Button||-->
		<tr><td height="10"></td></tr>
		<tr><td><input type=button class="text" id="btnSubmit" value="Save" onclick="jsSubmit();">
				<input type=button class="text" id="btnReset" value="Reset" onclick="jsReset();"></td></tr>
				<input type="hidden" name="FormAction"></td></tr>
		</table></td></tr>
<!--/Page Content-->
</table>
</form>
</body>
</html>
