home *** CD-ROM | disk | FTP | other *** search
- ////////////////////////////////////////////////////////////////////////////////////////////
- //
- // PRODUCT: Norton Internet Security/Symantec Desktop Firewall
- //
- // NAME: AddRuleWiz.js (Javascript file for AddRuleWiz.HTM)
- //
- // Copyright (c) 2001 by Symantec Corporation. All rights reserved.
- //
- ////////////////////////////////////////////////////////////////////////////////////////////
-
- var CCFW_ACTION_BLOCK = 1;
-
- window.returnValue = null;
-
- function init()
- {
- NextB.disabled = "";
- NextB.focus();
-
- var rule = window.dialogArguments;
-
- UserManager.WatchForFREIntegStart();
-
- rule.Priority = 1;
- // Re-Position the background bitmap.
-
- ruleDoc.document.body.style.backgroundPositionX = "121%";
- ruleDoc.document.body.style.backgroundPositionY = "49%";
-
- if("" != rule.ApplicationDescription)
- {
- ruleDoc.init(rule, "Application", rule.ApplicationDescription);
- return;
- }
- else
- {
- if(rule.Type == 0)
- {
- ruleDoc.init(rule, "System", StrID("your_computer"));
- return;
- }
-
- if(rule.Type == 1)
- {
- rule.Action = CCFW_ACTION_BLOCK;
- ruleDoc.init(rule, "Trojan", StrID("Trojan"));
- return;
- }
- }
- }
-
- function UserManager_OnFREIntegratorStart()
- {
- window.navigate('res://closeme.xyz');
- }
-
- function BackB_OnClick()
- {
- tellMe.style.visibility = "";
-
- switch(ruleDoc.CurrPage)
- {
- // case "Action": // Do nothing
- case "Direction":
- ruleDoc.SetPage("Action");
- BackB.disabled = "disabled";
- break;
- case "IP":
- ruleDoc.SetPage("Direction");
- break;
- case "Ports":
- ruleDoc.SetPage("IP");
- break;
- case "Logging":
- ruleDoc.SetPage("Ports");
- break;
- case "Type":
- ruleDoc.SetPage("Logging");
- break;
- case "Title":
- if(usingClientRules() && (UserManager.CurrentUserType == "UT_SUPERVISOR"))
- ruleDoc.SetPage("Type");
- else
- ruleDoc.SetPage("Logging");
- break;
- case "Locations":
- ruleDoc.SetPage("Title");
- break;
- case "Finished":
- ruleDoc.SetPage("Locations");
- NextB.value = StrID("NextB");
- NextB.accessKey = "N";
- }
-
- NextB.disabled = false;
- window.focus();
- }
-
- function NextB_OnClick()
- {
- tellMe.style.visibility = "";
-
- switch(ruleDoc.CurrPage)
- {
- case "Action":
- if (ruleDoc.ActionValidate())
- {
- ruleDoc.SetPage("Direction");
- BackB.disabled = "";
- }
- break;
- case "Direction":
- if (ruleDoc.DirectionValidate())
- {
- ruleDoc.SetPage("IP");
- }
- break;
- case "IP":
- if (ruleDoc.IPValidate())
- {
- ruleDoc.SetPage("Ports");
- }
- break;
- case "Ports":
- if (ruleDoc.ProtocolAndPortValidate())
- {
- ruleDoc.SetPage("Logging");
- }
- break;
- case "Logging":
- if(usingClientRules() && (UserManager.CurrentUserType == "UT_SUPERVISOR"))
- {
- ruleDoc.SetPage("Type");
- }
- else
- {
- ruleDoc.SetPage("Title");
- }
- break;
- case "Type":
- ruleDoc.SetPage("Title");
- ruleDoc.displayRuleData();
- break;
- case "Title":
- if (ruleDoc.TitleValidate()) {
- ruleDoc.SetPage("Locations");
- ruleDoc.displayRuleData();
- }
- break;
- case "Locations":
- ruleDoc.SetPage("Finished");
- NextB.value = StrID("FinishB");
- NextB.accessKey = "F";
- ruleDoc.displayRuleData();
- tellMe.style.visibility = "hidden";
- break;
- case "Finished":
- {
- window.returnValue = ruleDoc.saveRule();
- window.navigate("res://closeme.xyz");
- break;
- }
- }
- window.focus();
- }
-
- function CancelB_OnClick()
- {
- window.navigate("res://closeme.xyz");
- }
-