home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2003 November
/
Chip_2003-11_cd2.bin
/
nav2004
/
download
/
NAV
/
External
/
NORTON
/
NAVUIRES.dll
/
HTML
/
NAVSTATS.JS
< prev
next >
Wrap
Text File
|
2003-08-17
|
52KB
|
2,000 lines
g_ModuleID = 3002;
// Disable Drag-and-drop support
document.ondragstart = function(){return false;}
// Globals status
//
// Values are 0 - OK
// 1 - Alert
// 2 - Urgent alert
var gc_OK = 0;
var gc_Warning = 1;
var gc_Urgent = 2;
// The g_fReady variable is used to enable the buttons and panel switching. We have
// been seeing crashes and hangs when we allow the user to start clicking around
// before we have returned from onLoad.
var g_fReady = false;
// The g_fStartingScan variable is used to disable the scan now button for a bit
// after it has been pressed. It's a hack to get around not knowing
// when we are currently executing a scan.
var g_fStartingScan = false;
var g_iVirusDefOldThreshold = 14; // days old before warning
var g_iVirusDefReallyOldThreshold = 30; // days old before urgent
var g_statusNone = 0; // Couldn't get state or uninitialized - ERROR
var g_statusNotInstalled = 1; // Should be installed but isn't, tried to init but failed - ERROR
var g_statusNotRunning = 2; // Not loaded
var g_statusEnabled = 3; // Default OK setting
var g_statusDisabled = 4; // Loaded but turned off
var g_statusNotAvailable = 5; // Not supposed to exist ( e.g. Rescue Disk on NT ) Not an error!
var g_LastItem = 0; // Last status item row clicked on
var g_LastHintText = 0; // Last status item hint text displayed.
var g_LastHintID; // Last status item ID - for refreshes
var g_LastButtonText = 0;
var g_APHintText = 0; // Current AP text object
var g_VirusDefHintText = 0; // Current virus def text object
var g_FullSystemScanHintText = 0; // Current full system scan text object
var g_EmailHintText = 0; // Current Email text object
var g_USHintText = 0; // Current Update service text object
var g_ALUHintText = 0; // Current ALU text object
var g_LastID = "";
var g_SelectColor = "#CFE0FF";
var g_LastHotColor; // Last color of active text
var g_APHelpID = 11512;
var g_EmailHelpID = 11513;
var g_SBHelpID = 11514;
var g_FSSHelpID = 11515;
var g_VirusDefHelpID = 11516;
var g_ALUHelpID = 11517;
var g_USHelpID = 11518;
var IDH_RETAIL_PREACTIVATION_TRIAL = 11810;
var IDH_RETAIL_PREACTIVATION_EXPIRED = 11811;
var IDH_TRYBUY_PREACTIVATION_TRIAL = 11520;
var IDH_TRYBUY_PREACTIVATION_EXPIRED = 11521;
var IDH_SCSS_PREACTIVATION_TRIAL = 11523;
var IDH_SCSS_PREACTIVATION_TRIAL_EXPIRED = 11524;
var IDH_SCSS_ACTIVE = 11525;
var IDH_SCSS_WARNING = 11526;
var IDH_SCSS_EXPIRED = 11527;
var IDH_SCSS_KILLED = 11528;
// Interfaces
//
var g_strAPInterface = "NAVAPSCR.ScriptableAutoProtect";
var g_strOptionsInterface = "Symantec.Norton.AntiVirus.NAVOptions";
var g_strScanTasksInterface = "Symantec.Norton.AntiVirus.ScanTasks";
var g_strLauncherInterface = "Symantec.Norton.AntiVirus.AppLauncher";
var g_strStatusInterface = "Status.NAVStatus";
var g_strNAVLicense = "NAVLicense.NAVLicenseInfo";
var g_strDefAlert = "DefAlert.SymNavDefAlert";
var g_strIconOK = "check_wht.gif";
var g_strIconWarning = "warning_wht.gif";
var g_strIconUrgent = "urgent_wht.gif";
var g_iLicenseType = 0;
// License zone
//
var DJSMAR_LicenseZone_Trial = (0x00000001); // in a trial period
var DJSMAR_LicenseZone_Expired = (0x00000002); // the license has expired
var DJSMAR_LicenseZone_Warning = (0x00000004); // the license is about to expire
var DJSMAR_LicenseZone_PreActivation = (0x00000008); // the license has never been activated
var DJSMAR_LicenseZone_Purchased = (0x00000020); // the license is in a purchased(AKA Activated) state
var DJSMAR_LicenseZone_Killed = (0x00000080); // the license has been purposely killed (By the server)
var DJSMAR_LicenseZone_Violated = (0x00000040) // the license has been violated (i.e. failed security checks)
// License state
//
var DJSMAR00_LicenseState_Violated = -2;
// License types
//
var DJSMAR_LicenseType_Retail = 0;
var DJSMAR_LicenseType_Trial = 1;
var DJSMAR_LicenseType_Rental = 2;
var DJSMAR_LicenseType_TryDie = 3;
var DJSMAR_LicenseType_Beta = 4;
var DJSMAR_LicenseType_Unlicensed = 5;
var DJSMAR_LicenseType_ESD = 6;
// Vendor id
var DJSMAR00_VendorID_SoftSecure = 2;
var STATUS_RETAIL_PREACTIVE = 0;
var STATUS_RETAIL_EXPIRED = 1;
var STATUS_RETAIL_ACTIVE = 2;
var STATUS_TRIALWARE_ACTIVE = 3;
var STATUS_TRIALWARE_EXPIRED = 4;
var STATUS_TRYDIE_ACTIVE = 5;
var STATUS_TRYDIE_EXPIRED = 6;
var STATUS_RENTAL_TRIAL = 7;
var STATUS_RENTAL_TRIAL_EXPIRED = 8;
var STATUS_RENTAL_ACTIVE = 9;
var STATUS_RENTAL_WARNING = 10;
var STATUS_RENTAL_EXPIRED = 11;
var STATUS_RENTAL_KILLED = 12;
var STATUS_CORRUPTED = 13;
var STATUS_ERROR = 14;
// Constant feature index
var gc_AP = 0;
var gc_Email = 1;
var gc_SB = 2;
var gc_FSS = 3;
var gc_VirusDef = 4;
var gc_US = 5;
var gc_ALU = 6;
var gc_LASTONE = 7; // always the last one
// Product status
var Icons = new Array (gc_LASTONE);
Icons[gc_AP] = new Icon ( "APIcon", g_strIconOK);
Icons[gc_Email] = new Icon ( "EmailIcon", g_strIconOK);
Icons[gc_SB] = new Icon ( "SBIcon", g_strIconOK);
Icons[gc_FSS] = new Icon ( "FSSIcon", g_strIconOK);
Icons[gc_VirusDef] = new Icon ( "VirusDefIcon", g_strIconOK);
Icons[gc_US] = new Icon ( "USIcon", g_strIconOK);
Icons[gc_ALU] = new Icon ( "ALUIcon", g_strIconOK);
var Features = new Array (gc_LASTONE);
// Scope the objects
//
var g_Options;
var g_Launcher;
var g_AP;
var g_NAVLicense;
var g_bProductEnabled = true;
var g_ProductStatus = STATUS_RETAIL_ACTIVE;
function Icon ( id, source )
{
this.idtag = id;
this.source = source;
}
function Feature (state, row, hinttext, buttontext, detailstext, detailsbody)
{
this.state = state;
this.row = row;
this.hinttext = hinttext;
this.buttontext = buttontext;
this.detailstext = detailstext;
this.detailsbody = detailsbody;
}
function UpdateNAVStatus()
{
UpdateProductStatus();
UpdateAPStatus ();
UpdateVirusDefStatus ();
UpdateALUStatus ();
UpdateServiceStatus ();
UpdateEmailStatus ();
if ( g_Options != null && g_Options.SCRIPTBLOCKING.Installed != 0 )
UpdateScriptBlockingStatus ();
UpdateFullSystemScan ();
// Evaluate global status.
UpdateSystemStatus();
// We are now ready to let the user start clicking on stuff.
g_fReady = true;
// If the def subscription is out of date, or the defs are old (or gone)
// make the scanner icons "!"
if ( g_NAVStatus.ProductLicenseType != DJSMAR_LicenseType_Rental )
{
if ( Features[gc_US].state == gc_Urgent ||
Features[gc_VirusDef].state == gc_Urgent )
{
if ( Features[gc_AP].state == gc_OK )
Icons[gc_AP].source = g_strIconWarning;
if ( Features[gc_Email].state == gc_OK )
Icons[gc_Email].source = g_strIconWarning;
if ( Features[gc_SB].state == gc_OK )
Icons[gc_SB].source = g_strIconWarning;
}
// "Virus Definition Service"
idtxt_navstats_VPUTitle_Rental.style.display = "none";
idtxt_navstats_VPUTitle.style.display = "";
}
else
{
// "Norton AntiVirus Service"
idtxt_navstats_VPUTitle_Rental.style.display = "";
idtxt_navstats_VPUTitle.style.display = "none";
}
// Refresh the status details text
//
if ( g_LastItem != 0 )
onHint ( g_LastItem, g_LastHintID );
else
{
// If any rows are Urgent, select it for the user.
//
if ( Features[gc_US].state == gc_Urgent )
onHint ( Features[gc_US].row, Features[gc_US].hinttext );
else
{
for ( var iIndex = 0; iIndex < Features.length ; iIndex++)
{
if ( Features[iIndex].state == gc_Urgent )
{
onHint ( Features[iIndex].row, Features[iIndex].hinttext );
break;
}
}
}
}
UpdateIcons();
}
function OnLoad()
{
// Set up row info
Features[gc_AP] = new Feature (gc_OK);
Features[gc_AP].row = APRow;
Features[gc_AP].hinttext = "AP";
Features[gc_AP].state = gc_OK;
Features[gc_Email] = new Feature (gc_OK);
Features[gc_Email].row = EmailRow;
Features[gc_Email].hinttext = "Email";
Features[gc_Email].state = gc_OK;
Features[gc_Email].detailstext = EmailHintText;
Features[gc_Email].detailsbody = HintTableEmail_cell5;
Features[gc_SB] = new Feature (gc_OK);
Features[gc_SB].row = SBRow;
Features[gc_SB].hinttext = "SB";
Features[gc_SB].state = gc_OK;
Features[gc_SB].detailstext = SBHintText;
Features[gc_SB].detailsbody = idtxt_navstats_sb_body1;
Features[gc_FSS] = new Feature (gc_OK);
Features[gc_FSS].row = FSSRow;
Features[gc_FSS].hinttext = "FSS";
Features[gc_FSS].state = gc_OK;
Features[gc_FSS].detailstext = FullSystemScanHintText;
Features[gc_FSS].detailsbody = idtxt_navstats_sb_body2; // yeah, this is correct
Features[gc_VirusDef] = new Feature (gc_OK);
Features[gc_VirusDef].row = VirusDefRow;
Features[gc_VirusDef].hinttext = "VirusDef";
Features[gc_VirusDef].state = gc_OK;
Features[gc_US] = new Feature (gc_OK);
Features[gc_US].row = USRow;
Features[gc_US].hinttext = "US";
Features[gc_US].state = gc_OK;
Features[gc_ALU] = new Feature (gc_OK);
Features[gc_ALU].row = ALURow;
Features[gc_ALU].hinttext = "ALU";
Features[gc_ALU].state = gc_OK;
var SBInstalled;
try
{
g_Launcher = new ActiveXObject( g_strLauncherInterface );
}
catch (err)
{
var msg = document.frames("Errors").document.all.ERR_MSG_NO_LAUNCHER.innerText;
var id = document.frames("Errors").document.all.ERR_ID_NO_LAUNCHER.innerText;
g_ErrorHandler.DisplayNAVError (msg, id);
AllError ();
return;
}
// Create the Options object.
CreateOptions ();
if ( g_Options == null)
{
return;
}
try
{
g_AP = new ActiveXObject ( g_strAPInterface );
}
catch (err)
{
var msg = document.frames("Errors").document.all.ERR_MSG_NO_APSCR.innerText;
var id = document.frames("Errors").document.all.ERR_ID_NO_APSCR.innerText;
g_ErrorHandler.DisplayNAVError (msg, id);
AllError ();
return;
}
try
{
g_NAVLicense = new ActiveXObject( g_strNAVLicense );
}
catch(err)
{
var msg = document.frames("Errors").document.all.ERR_MSG_NO_LICENSE.innerText;
var id = document.frames("Errors").document.all.ERR_ID_NO_LICENSE.innerText;
g_ErrorHandler.DisplayNAVError (msg, id);
AllError ();
return;
}
try
{
g_iLicenseType = g_NAVLicense.GetLicenseType();
}
catch(err)
{
g_NAVLicense.NAVError.LogAndDisplay(0);
AllError ();
return;
}
// Set hint text
onMouseOut(null);
try
{
g_Options.Load();
SBInstalled = g_Options.SCRIPTBLOCKING.Installed;
}
catch (NAVErr)
{
g_Options.NAVError.LogAndDisplay(0);
AllError ();
return;
}
try
{
// Get AP notifications
g_NAVStatus.UseAP = 1;
// Get virus defs date notifications
g_NAVStatus.UseVirusDef = 1;
// Get Automatic LiveUpdate notifications
g_NAVStatus.UseALU = 1;
// Get virus def subscription notifications
// K2 virus def subscription is applied to Retail and trialware.
// Managed Rental uses DJSLicensing.
switch(g_iLicenseType)
{
case DJSMAR_LicenseType_Retail:
case DJSMAR_LicenseType_Trial:
case DJSMAR_LicenseType_Unlicensed:
case DJSMAR_LicenseType_ESD:
case DJSMAR_LicenseType_Beta:
{
g_NAVStatus.UseVirusDefSubscription = 1;
}
break;
default:
break;
}
g_NAVStatus.UseEmail = 1;
// Is Script Blocking supposed to be installed?
//
if ( SBInstalled == 0 )
{
SBRow.style.display = "none";
MainTable_cell26.style.display = "none";
}
else
g_NAVStatus.UseScriptBlocking = 1;
g_NAVStatus.UseFullSystemScan = 1;
g_NAVStatus.UseLicensing = 1;
try
{
// Call all data gathering methods.
g_NAVStatus.GetStatus( 1 );
}
catch (err)
{
var msg = document.frames("Errors").document.all.ERR_MSG_NO_STATUS_OBJECT.innerText;
var id = document.frames("Errors").document.all.ERR_ID_NO_STATUS_OBJECT.innerText;
g_ErrorHandler.DisplayNAVError (msg, id);
return;
}
}
catch (NAVErr)
{
g_NAVStatus.NAVError.LogAndDisplay(0);
AllError ();
return;
}
document.all.APTitle.focus();
}
function UpdateFullSystemScan ()
{
idtxt_navstats_fss_refreshing.style.display = "none";
idtxt_navstats_fss_license_corrupted.style.display = "none";
if(g_NAVStatus.ProductLicenseState == DJSMAR00_LicenseState_Violated)
{
// Corrupted
//
Features[gc_FSS].state = gc_Urgent;
Icons[gc_FSS].source = g_strIconUrgent;
Features[gc_FSS].buttontext = NoButton;
idtxt_navstats_fss_date.style.display="none";
idtxt_navstats_fss_notrun.style.display = "none";
idtxt_navstats_fss_license_corrupted.style.display = "";
return;
}
var lFSSStatus;
var lScanAge;
var strFSSDate;
try
{
lFSSStatus = g_NAVStatus.FullSystemScanStatus;
lScanAge = g_NAVStatus.FullSystemScanAge;
strFSSDate = g_NAVStatus.FullSystemScanDate;
}
catch (NAVErr)
{
g_NAVStatus.NAVError.LogAndDisplay(0);
}
try
{
switch ( lFSSStatus )
{
case g_statusEnabled:
if ( lScanAge < 90 )
{
// OK
//
Features[gc_FSS].state = gc_OK;
idtxt_navstats_fss_date.style.display="";
idtxt_navstats_fss_notrun.style.display = "none";
Icons[gc_FSS].source = g_strIconOK;
idtxt_navstats_fss_date.innerText = strFSSDate;
}
else
{
// Old
//
Features[gc_FSS].state = gc_Warning;
idtxt_navstats_fss_date.style.display="";
idtxt_navstats_fss_notrun.style.display = "none";
Icons[gc_FSS].source = g_strIconWarning;
idtxt_navstats_fss_date.innerText = strFSSDate;
}
break;
default:
// Never run or error
//
Features[gc_FSS].state = gc_Urgent;
idtxt_navstats_fss_date.style.display = "none";
idtxt_navstats_fss_notrun.style.display = "";
Icons[gc_FSS].source = g_strIconUrgent;
break;
}
Features[gc_FSS].buttontext = FSSButtonScan;
}
catch (err)
{
var msg = document.frames("Errors").document.all.ERR_MSG_FSS_STATUS.innerText;
var id = document.frames("Errors").document.all.ERR_ID_FSS_STATUS.innerText;
g_ErrorHandler.DisplayNAVError (msg, id);
return;
}
}
function UpdateEmailStatus ()
{
// Turn off the extra titles by default
//
idtxt_navstats_email_title_on.style.display = "";
idtxt_navstats_email_title_incoming.style.display = "none";
idtxt_navstats_email_title_outgoing.style.display = "none";
idtxt_navstats_email_license_corrupted.style.display= "none";
// Turn off refresh text
//
idtxt_navstats_email_refreshing.style.display= "none";
if(g_NAVStatus.ProductLicenseState == DJSMAR00_LicenseState_Violated)
{
// Corrupted
//
Features[gc_Email].state = gc_Urgent;
Icons[gc_Email].source = g_strIconUrgent;
Features[gc_Email].buttontext = NoButton;
idtxt_navstats_email_error.style.display= "none";
idtxt_navstats_email_on.style.display= "none";
idtxt_navstats_email_off.style.display= "none";
idtxt_navstats_email_license_corrupted.style.display= "";
return;
}
var iEmailStatus;
var bPOP;
var bSMTP;
var bCanEnable;
try
{
iEmailStatus = g_NAVStatus.EmailStatus;
bPOP = g_NAVStatus.EmailPOP;
bSMTP = g_NAVStatus.EmailSMTP;
bCanEnable = g_NAVStatus.EmailCanEnable;
}
catch (NAVErr)
{
g_NAVStatus.NAVError.LogAndDisplay(0);
}
try
{
switch ( iEmailStatus )
{
case g_statusEnabled :
// On
//
Features[gc_Email].state = gc_OK;
Icons[gc_Email].source = g_strIconOK;
idtxt_navstats_email_error.style.display= "none";
idtxt_navstats_email_on.style.display= "";
idtxt_navstats_email_off.style.display= "none";
Features[gc_Email].buttontext = NoButton;
// Now figure out which title to use
//
if ( bPOP && bSMTP )
{
idtxt_navstats_email_title_on.style.display = "";
idtxt_navstats_email_title_incoming.style.display = "none";
idtxt_navstats_email_title_outgoing.style.display = "none";
}
else if ( bPOP )
{
idtxt_navstats_email_title_on.style.display = "none";
idtxt_navstats_email_title_incoming.style.display = "";
idtxt_navstats_email_title_outgoing.style.display = "none";
}
else if ( bSMTP )
{
idtxt_navstats_email_title_on.style.display = "none";
idtxt_navstats_email_title_incoming.style.display = "none";
idtxt_navstats_email_title_outgoing.style.display = "";
}
break;
case g_statusDisabled :
// Off
//
Features[gc_Email].state = gc_Warning;
Icons[gc_Email].source = g_strIconWarning;
idtxt_navstats_email_error.style.display= "none";
idtxt_navstats_email_on.style.display= "none";
idtxt_navstats_email_off.style.display= "";
if ( bCanEnable )
Features[gc_Email].buttontext = EmailButtonOff;
else
Features[gc_Email].buttontext = NoButton;
break;
default:
// Error
//
Features[gc_Email].state = gc_Urgent;
Icons[gc_Email].source = g_strIconUrgent;
idtxt_navstats_email_error.style.display= "";
idtxt_navstats_email_on.style.display= "none";
idtxt_navstats_email_off.style.display= "none";
Features[gc_Email].buttontext = NoButton;
break;
}// end switch
}
catch (err)
{
var msg = document.frames("Errors").document.all.ERR_MSG_EMAIL_STATUS.innerText;
var id = document.frames("Errors").document.all.ERR_ID_EMAIL_STATUS.innerText;
g_ErrorHandler.DisplayNAVError (msg, id);
return;
}
}
function UpdateScriptBlockingStatus ()
{
// Hide the "Refreshing"
//
idtxt_navstats_sb_refreshing.style.display = "none";
idtxt_navstats_sb_license_corrupted.style.display= "none";
if(g_NAVStatus.ProductLicenseState == DJSMAR00_LicenseState_Violated)
{
// corrupted
//
Features[gc_SB].state = gc_Urgent;
Icons[gc_SB].source = g_strIconUrgent;
Features[gc_SB].buttontext = NoButton; // No button for error
idtxt_navstats_sb_error.style.display= "none";
idtxt_navstats_sb_on.style.display= "none";
idtxt_navstats_sb_off.style.display= "none";
idtxt_navstats_sb_license_corrupted.style.display= "";
return;
}
var iSBStatus;
var bCanEnable;
try
{
iSBStatus = g_NAVStatus.ScriptBlockingStatus;
bCanEnable = g_NAVStatus.ScriptBlockingCanEnable;
}
catch (NAVErr)
{
g_NAVStatus.NAVError.LogAndDisplay(0);
}
try
{
// Error?
if ( iSBStatus < g_statusEnabled )
{
// Error
Features[gc_SB].state = gc_Urgent;
Icons[gc_SB].source = g_strIconUrgent;
idtxt_navstats_sb_error.style.display= "";
idtxt_navstats_sb_on.style.display= "none";
idtxt_navstats_sb_off.style.display= "none";
Features[gc_SB].buttontext = NoButton; // No button for error
}
else
{
if ( iSBStatus == g_statusEnabled )
{
// On
//
Features[gc_SB].state = gc_OK;
Icons[gc_SB].source = g_strIconOK;
idtxt_navstats_sb_error.style.display= "none";
idtxt_navstats_sb_on.style.display= "";
idtxt_navstats_sb_off.style.display= "none";
Features[gc_SB].buttontext = NoButton;
}
else
{
// Off
//
Features[gc_SB].state = gc_Warning;
Icons[gc_SB].source = g_strIconWarning;
idtxt_navstats_sb_error.style.display= "none";
idtxt_navstats_sb_on.style.display= "none";
idtxt_navstats_sb_off.style.display= "";
if ( bCanEnable )
Features[gc_SB].buttontext = SBButtonOff;
else
Features[gc_SB].buttontext = NoButton;
}
}
}
catch (err)
{
var msg = document.frames("Errors").document.all.ERR_MSG_SB_STATUS.innerText;
var id = document.frames("Errors").document.all.ERR_ID_SB_STATUS.innerText;
g_ErrorHandler.DisplayNAVError (msg, id);
return;
}
}
function UpdateServiceStatus ()
{
idtxt_navstats_us_refreshing.style.display = "none";
idtxt_navstats_us_numdays.style.display= "none";
idtxt_navstats_us_expired.style.display= "none";
idtxt_navstats_us_error.style.display= "none";
idtxt_navstats_us_notinstalled.style.display= "none";
idtxt_navstats_us_license_rental_active.style.display = "none";
idtxt_navstats_us_license_rental_warning.style.display = "none";
idtxt_navstats_us_license_rental_expired.style.display = "none";
idtxt_navstats_us_license_rental_killed.style.display = "none";
idtxt_navstats_us_license_corrupted.style.display = "none";
USTitleOK.style.display = "none";
USTitleLicenseRetail.style.display = "none";
USTitleLicenseRetailExpired.style.display = "none";
USTitleLicenseTrialware.style.display = "none";
USTitleLicenseTrialwareExpired.style.display = "none";
USTitleLicenseRental.style.display = "none";
USTitleNAV.style.display = "none";
Features[gc_US].detailsbody = HintTableUSOK_cell4;
Features[gc_US].state = gc_Urgent;
Icons[gc_US].source = g_strIconUrgent;
switch(g_ProductStatus)
{
case STATUS_RETAIL_PREACTIVE:
{
SetServiceStatus(gc_Warning, g_strIconWarning, USTitleLicenseRetail, idtxt_navstats_us_numdays, USHintTextRetailPreactive, USButtonRetailPreactive);
try
{
var strDate = g_NAVLicense.LicenseExpirationDate;
idtxt_navstats_us_numdays.innerText = strDate;
LicenseDateRetail.innerText = strDate;
Features[gc_US].detailsbody = HintTableUSRetailPreactive_cell4;
}
catch(err)
{
g_NAVLicense.NAVError.LogAndDisplay(0);
}
}
break;
case STATUS_RETAIL_EXPIRED:
SetServiceStatus(gc_Urgent, g_strIconUrgent, USTitleLicenseRetailExpired, idtxt_navstats_us_expired, USHintTextRetailExpired, USButtonRetailExpired);
Features[gc_US].detailsbody = HintTableUSRetailExpired_cell4;
break;
case STATUS_RETAIL_ACTIVE:
{
// Retail/Trialware Purchased
//
// Is the sub info OK?
//
var lSubState;
var lSubStatus;
var strDate;
try
{
lSubState = g_NAVStatus.VirusDefSubState;
lSubStatus = g_NAVStatus.VirusDefSubStatus;
strDate = g_NAVStatus.VirusDefSubDate;
}
catch (NAVErr)
{
g_NAVStatus.NAVError.LogAndDisplay(0);
}
try
{
USTitleOK.style.display = "";
// SUB_UNKNOWN = 0
// SUB_OK = 1
// SUB_WARNING = 2
// SUB_EXPIRED = 3
if ( lSubStatus > g_statusNotRunning && lSubState != 0 )
{
// Expired?
//
if ( lSubState == 3 )
{
Features[gc_US].state = gc_Urgent;
Icons[gc_US].source = g_strIconUrgent;
idtxt_navstats_us_expired.style.display= "";
try
{
if ( g_NAVLicense.CanRenewSubscription )
Features[gc_US].buttontext = USButtonRenewExpired;
else
Features[gc_US].buttontext = NoButton;
}
catch (NAVErr)
{
g_Launcher.NAVError.LogAndDisplay(0);
}
Features[gc_US].detailstext = USHintTextExpired;
Features[gc_US].detailsbody = HintTableUSExpired_cell4;
}
else
{
if ( lSubState == 2 )
{
// Warning
//
Features[gc_US].state = gc_Warning;
Icons[gc_US].source = g_strIconWarning;
var numberExp = /#/gi; // Replace all #'s - regular expression
var strNewText = idtxt_navstats_us_hint_expires.innerText;
idtxt_navstats_us_hint_expires.innerText = strNewText.replace ( numberExp , strDate );
try
{
if ( g_Launcher.CanLaunchLiveUpdate )
Features[gc_US].buttontext = USButtonRenewWarning;
else
Features[gc_US].buttontext = NoButton;
}
catch (NAVErr)
{
g_Launcher.NAVError.LogAndDisplay(0);
}
Features[gc_US].detailstext = USHintTextOld;
Features[gc_US].detailsbody = HintTableUSOld_cell4;
}
else
{
// OK
//
Features[gc_US].state = gc_OK;
Icons[gc_US].source = g_strIconOK;
// Add "Renew" button to allow
// renew on demand.
try
{
if(g_NAVStatus.VirusDefSubDaysLeft <= 366)
{
if ( g_Launcher.CanLaunchLiveUpdate )
Features[gc_US].buttontext = USButtonRenew;
else
Features[gc_US].buttontext = NoButton;
}
else
{
Features[gc_US].buttontext = NoButton;
}
}
catch (NAVErr)
{
g_Launcher.NAVError.LogAndDisplay(0);
}
Features[gc_US].detailstext = USHintText;
}
// Put in the # days left
//
idtxt_navstats_us_numdays.innerText = strDate
idtxt_navstats_us_numdays.style.display = "";
}
}
else
{
// Errors
//
Features[gc_US].buttontext = NoButton;
Features[gc_US].detailstext = USHintText;
if ( lSubStatus == g_statusNotInstalled )
{
idtxt_navstats_us_notinstalled.style.display = "";
}
else
{
idtxt_navstats_us_error.style.display = "";
}
Features[gc_US].state = gc_Urgent;
}
}
catch (err)
{
var msg = document.frames("Errors").document.all.ERR_MSG_SUB_STATUS.innerText;
var id = document.frames("Errors").document.all.ERR_ID_SUB_STATUS.innerText;
g_ErrorHandler.DisplayNAVError (msg, id);
return;
}
// Suppress renew button for public beta.
if(g_NAVStatus.ProductLicenseType == DJSMAR_LicenseType_Beta)
{
USButtonRenew.style.display = "none";
USButtonRenewWarning.style.display = "none";
USButtonRenewExpired.style.display = "none";
}
}
break;
case STATUS_TRIALWARE_ACTIVE:
{
SetServiceStatus(gc_Warning, g_strIconWarning, USTitleLicenseTrialware, idtxt_navstats_us_numdays, USHintTextTrialwareActive, USButtonTrialwareActive);
try
{
var strDate = g_NAVLicense.LicenseExpirationDate;
idtxt_navstats_us_numdays.innerText = strDate;
LicenseDateTryBuy.innerText = strDate;
Features[gc_US].detailsbody = HintTableUSTrialwareActive_cell4;
}
catch(err)
{
g_NAVLicense.NAVError.LogAndDisplay(0);
}
}
break;
case STATUS_TRIALWARE_EXPIRED:
SetServiceStatus(gc_Urgent, g_strIconUrgent, USTitleLicenseTrialwareExpired, idtxt_navstats_us_expired, USHintTextTrialwareExpired, USButtonTrialwareExpired);
Features[gc_US].detailsbody = HintTableUSTrialwareExpired_cell4;
break;
case STATUS_TRYDIE_ACTIVE:
{
SetServiceStatus(gc_Warning, g_strIconWarning, USTitleLicenseTrialwareExpired, idtxt_navstats_us_numdays, USHintTextTryDieActive, NoButton);
try
{
var strDate = g_NAVLicense.LicenseExpirationDate;
idtxt_navstats_us_numdays.innerText = strDate;
LicenseDateTryDie.innerText = strDate;
Features[gc_US].detailsbody = HintTableUSTryDieActive_cell4;
}
catch(err)
{
g_NAVLicense.NAVError.LogAndDisplay(0);
}
}
break;
case STATUS_TRYDIE_EXPIRED:
SetServiceStatus(gc_Urgent, g_strIconUrgent, USTitleLicenseTrialwareExpired, idtxt_navstats_us_expired, USHintTextTryDieExpired, NoButton);
Features[gc_US].detailsbody = HintTableUSTryDieExpired_cell4;
break;
case STATUS_RENTAL_TRIAL:
{
SetServiceStatus(gc_OK, g_strIconOK, USTitleLicenseRental, idtxt_navstats_us_license_rental_active, USHintTextRentalTrial, USButtonRentalTrial);
Features[gc_US].detailsbody = HintTableUSRentalTrial_cell4;
try
{
var daysLeft = g_NAVLicense.LicenseDaysRemaining;
RentalTrialwareDaysLeft.innerText = daysLeft;
}
catch(err)
{
g_NAVLicense.NAVError.LogAndDisplay(0);
}
}
break;
case STATUS_RENTAL_TRIAL_EXPIRED:
SetServiceStatus(gc_Urgent, g_strIconUrgent, USTitleLicenseRental, idtxt_navstats_us_expired, USHintTextRentalTrialExpired, USButtonRentalTrialExpired);
Features[gc_US].detailsbody = HintTableUSRentalTrialExpired_cell4;
break;
case STATUS_RENTAL_ACTIVE:
SetServiceStatus(gc_OK, g_strIconOK, USTitleLicenseRental, idtxt_navstats_us_license_rental_active, USHintTextRentalActive, NoButton);
Features[gc_US].detailsbody = HintTableUSRentalActive_cell4;
break;
case STATUS_RENTAL_WARNING:
SetServiceStatus(gc_Warning, g_strIconWarning, USTitleLicenseRental, idtxt_navstats_us_license_rental_warning, USHintTextRentalWarning, USButtonRentalWarning);
Features[gc_US].detailsbody = HintTableUSRentalWarning_cell4;
break;
case STATUS_RENTAL_EXPIRED:
SetServiceStatus(gc_Urgent, g_strIconUrgent, USTitleLicenseRental, idtxt_navstats_us_license_rental_expired, USHintTextRentalExpired, USButtonRentalExpired);
Features[gc_US].detailsbody = HintTableUSRentalExpired_cell4;
break;
case STATUS_RENTAL_KILLED:
SetServiceStatus(gc_Urgent, g_strIconUrgent, USTitleLicenseRental, idtxt_navstats_us_license_rental_killed, USHintTextRentalKilled, USButtonRentalKilled);
Features[gc_US].detailsbody = HintTableUSRentalKilled_cell4;
break;
case STATUS_CORRUPTED:
SetServiceStatus(gc_Urgent, g_strIconUrgent, USTitleNAV, idtxt_navstats_us_license_corrupted, USHintTextLicenseCorrupted, NoButton);
Features[gc_US].detailsbody = HintTableUSLicenseCorrupted_cell4;
break;
case STATUS_ERROR:
SetServiceStatus(gc_Urgent, g_strIconUrgent, USTitleLicenseRetailExpired, idtxt_navstats_us_error, USHintTextLicenseError, NoButton);
Features[gc_US].detailsbody = HintTableUSLicenseError_cell4
break;
default:
break;
}
}
function UpdateVirusDefStatus ()
{
// Hide the "Refreshing" text.
//
idtxt_navstats_vp_refreshing.style.display = "none";
idtxt_navstats_vp_license_corrupted.style.display= "none";
Features[gc_VirusDef].detailsbody = idtxt_navstats_virusdef_ok;
if(g_NAVStatus.ProductLicenseState == DJSMAR00_LicenseState_Violated)
{
// corrupted
//
Features[gc_VirusDef].state = gc_Urgent;
Features[gc_VirusDef].detailstext = VirusDefHintText;
Features[gc_VirusDef].buttontext = NoButton;
Icons[gc_VirusDef].source = g_strIconUrgent;
idtxt_navstats_vp_updating.style.display = "none";
idtxt_navstats_vp_error.style.display= "none";
idtxt_navstats_vp_date.style.display= "none";
idtxt_navstats_vp_license_corrupted.style.display= "";
return;
}
var iVirusDefStatus;
var defsAge;
try
{
iVirusDefStatus = g_NAVStatus.VirusDefStatus;
// Get the defs age in days
//
defsAge = g_NAVStatus.VirusDefAge;
}
catch (NAVErr)
{
g_NAVStatus.NAVError.LogAndDisplay(0);
}
try
{
Features[gc_VirusDef].detailstext = VirusDefHintTextOld; // Default to "out of date" text
Features[gc_VirusDef].detailsbody = idtxt_navstats_virusdef_old;
switch ( iVirusDefStatus )
{
case g_statusEnabled :
// Display defs date (it's already formatted for region by the Status object, so we don't have to)
//
idtxt_navstats_vp_date.innerText = g_NAVStatus.VirusDefDate;
idtxt_navstats_vp_error.style.display= "none";
idtxt_navstats_vp_date.style.display= "";
idtxt_navstats_vp_updating.style.display = "none";
// Make sure defs are no more than a month old.
//
if( defsAge > g_iVirusDefOldThreshold )
{
// Defs are stale
//
Icons[gc_VirusDef].source = g_strIconWarning;
Features[gc_VirusDef].state = gc_Warning;
// Defs are really stale
if ( defsAge > g_iVirusDefReallyOldThreshold )
{
Icons[gc_VirusDef].source = g_strIconUrgent;
Features[gc_VirusDef].state = gc_Urgent;
}
try
{
Features[gc_VirusDef].buttontext = VirusDefButtonUpdate;
}
catch (NAVErr)
{
g_Launcher.NAVError.LogAndDisplay(0);
}
}
else
{
// Defs are good
//
Icons[gc_VirusDef].source = g_strIconOK;
Features[gc_VirusDef].state = gc_OK;
Features[gc_VirusDef].buttontext = NoButton; // no button
Features[gc_VirusDef].detailstext = VirusDefHintText;
}
break;
case g_statusNotAvailable :
Features[gc_VirusDef].state = gc_OK;
Icons[gc_VirusDef].source = g_strIconOK;
idtxt_navstats_vp_updating.style.display = "";
idtxt_navstats_vp_error.style.display= "none";
idtxt_navstats_vp_date.style.display= "none";
Features[gc_VirusDef].buttontext = NoButton; // no button
break;
// Error
//
default :
Features[gc_VirusDef].state = gc_Urgent;
Icons[gc_VirusDef].source = g_strIconUrgent;
idtxt_navstats_vp_updating.style.display = "none";
idtxt_navstats_vp_error.style.display= "";
idtxt_navstats_vp_date.style.display= "none";
idtxt_navstats_vp_error.style.display ="";
try
{
Features[gc_VirusDef].buttontext = VirusDefButtonUpdate;
}
catch (NAVErr)
{
g_Launcher.NAVError.LogAndDisplay(0);
}
break;
}
}
catch (err)
{
var msg = document.frames("Errors").document.all.ERR_MSG_VIRUSDEF_STATUS.innerText;
var id = document.frames("Errors").document.all.ERR_ID_VIRUSDEF_STATUS.innerText;
g_ErrorHandler.DisplayNAVError (msg, id);
return;
}
}
function UpdateAPStatus()
{
// Turn off Refreshing text
//
idtxt_navstats_rts_refreshing.style.display = "none";
idtxt_navstats_rts_license_corrupted.style.display = "none";
Features[gc_AP].detailstext = APHintText;
Features[gc_AP].detailsbody = idtxt_navstats_rts_tablebody;
if(g_NAVStatus.ProductLicenseState == DJSMAR00_LicenseState_Violated)
{
// corrupted
//
Icons[gc_AP].source = g_strIconUrgent;
Features[gc_AP].state = gc_Urgent;
Features[gc_AP].buttontext = NoButton;
idtxt_navstats_rts_on.style.display = "none";
idtxt_navstats_rts_off.style.display = "none";
idtxt_navstats_rts_notrunning.style.display = "none";
idtxt_navstats_rts_error.style.display = "none";
idtxt_navstats_rts_license_corrupted.style.display = "";
return;
}
var iAPStatus;
var bCanEnable;
try
{
iAPStatus = g_NAVStatus.APStatus;
bCanEnable = g_NAVStatus.APCanEnable;
}
catch (NAVErr)
{
g_NAVStatus.NAVError.LogAndDisplay(0);
}
try
{
switch ( iAPStatus )
{
case g_statusEnabled :
// Enabled
//
Icons[gc_AP].source = g_strIconOK;
idtxt_navstats_rts_on.style.display = "";
idtxt_navstats_rts_off.style.display = "none";
idtxt_navstats_rts_notrunning.style.display = "none";
idtxt_navstats_rts_error.style.display = "none";
Features[gc_AP].state = gc_OK;
Features[gc_AP].buttontext = NoButton;
break;
case g_statusDisabled :
// Disabled
//
Icons[gc_AP].source = g_strIconWarning;
idtxt_navstats_rts_on.style.display = "none";
idtxt_navstats_rts_off.style.display = "";
idtxt_navstats_rts_notrunning.style.display = "none";
idtxt_navstats_rts_error.style.display = "none";
Features[gc_AP].state = gc_Warning;
if ( bCanEnable )
Features[gc_AP].buttontext = APButtonOff;
else
Features[gc_AP].buttontext = NoButton;
break;
case g_statusNotRunning :
// Not Running
//
Icons[gc_AP].source = g_strIconWarning;
idtxt_navstats_rts_on.style.display = "none";
idtxt_navstats_rts_off.style.display = "none";
idtxt_navstats_rts_notrunning.style.display = "";
idtxt_navstats_rts_error.style.display = "none";
Features[gc_AP].state = gc_Warning;
Features[gc_AP].detailstext = APHintTextNotRunning;
Features[gc_AP].detailsbody = idtxt_navstats_rts_tablebody2;
if ( bCanEnable )
Features[gc_AP].buttontext = APButtonLoad;
else
Features[gc_AP].buttontext = NoButton;
break;
default :
// Error
//
Icons[gc_AP].source = g_strIconUrgent;
idtxt_navstats_rts_on.style.display = "none";
idtxt_navstats_rts_off.style.display = "none";
idtxt_navstats_rts_notrunning.style.display = "none";
idtxt_navstats_rts_error.style.display = "";
Features[gc_AP].state = gc_Urgent;
Features[gc_AP].buttontext = NoButton
break;
}
}
catch (err)
{
var msg = document.frames("Errors").document.all.ERR_MSG_AP_STATUS.innerText;
var id = document.frames("Errors").document.all.ERR_ID_AP_STATUS.innerText;
g_ErrorHandler.DisplayNAVError (msg, id);
return;
}
}
function UpdateALUStatus ()
{
idtxt_navstats_alu_refreshing.style.display="none";
idtxt_navstats_alu_license_corrupted.style.display="none";
Features[gc_ALU].detailstext = ALUHintText;
Features[gc_ALU].detailsbody = HintTableALU_cell4;
if(g_NAVStatus.ProductLicenseState == DJSMAR00_LicenseState_Violated)
{
// corrupted
//
Features[gc_ALU].state = gc_Urgent;
Features[gc_ALU].buttontext = NoButton;
Icons[gc_ALU].source = g_strIconUrgent;
idtxt_navstats_alu_on.style.display="none";
idtxt_navstats_alu_off.style.display="none";
idtxt_navstats_alu_error.style.display="none";
idtxt_navstats_alu_license_corrupted.style.display="";
return;
}
var iALUStatus;
var bCanEnable;
try
{
iALUStatus = g_NAVStatus.ALUStatus;
bCanEnable = g_NAVStatus.ALUCanEnable;
}
catch (NAVErr)
{
g_NAVStatus.NAVError.LogAndDisplay(0);
}
try
{
switch ( iALUStatus )
{
case g_statusEnabled :
// On
//
Icons[gc_ALU].source = g_strIconOK;
idtxt_navstats_alu_on.style.display="";
idtxt_navstats_alu_off.style.display="none";
idtxt_navstats_alu_error.style.display="none";
Features[gc_ALU].state = gc_OK;
Features[gc_ALU].buttontext = NoButton;
break;
case g_statusDisabled :
// Off
//
Icons[gc_ALU].source = g_strIconWarning;
idtxt_navstats_alu_on.style.display="none";
idtxt_navstats_alu_off.style.display="";
idtxt_navstats_alu_error.style.display="none";
Features[gc_ALU].state = gc_Warning;
if ( bCanEnable )
Features[gc_ALU].buttontext = ALUButtonOff;
else
Features[gc_ALU].buttontext = NoButton;
break;
case g_statusNotAvailable :
// Feature not supported (no Task Scheduler)
//
Icons[gc_ALU].source = g_strIconOK;
idtxt_navstats_alu_on.style.display="none";
idtxt_navstats_alu_off.style.display="";
idtxt_navstats_alu_error.style.display="none";
Features[gc_ALU].state = gc_OK;
Features[gc_ALU].buttontext = NoButton;
break;
default :
// Error
//
Icons[gc_ALU].source = g_strIconUrgent;
idtxt_navstats_alu_on.style.display="none";
idtxt_navstats_alu_off.style.display="none";
idtxt_navstats_alu_error.style.display="";
Features[gc_ALU].state = gc_Urgent;
Features[gc_ALU].buttontext = NoButton;
break;
}
}
catch (err)
{
var msg = document.frames("Errors").document.all.ERR_MSG_ALU_STATUS.innerText;
var id = document.frames("Errors").document.all.ERR_ID_ALU_STATUS.innerText;
g_ErrorHandler.DisplayNAVError (msg, id);
return;
}
}
function UpdateSystemStatus()
{
var bWarning = false;
// Make sure there is nothing urgently wrong.
for ( var iIndex = 0; iIndex < Features.length; iIndex++ )
{
if ( Features[iIndex].state == gc_Urgent )
{
// There is.
AllUrgent.style.display = "";
AllWarning.style.display = "none";
AllOK.style.display = "none";
return;
}
if ( Features[iIndex].state == gc_Warning )
bWarning = true;
}
// Make sure there are no items in need of attention
if ( bWarning )
{
AllUrgent.style.display = "none";
AllWarning.style.display = "";
AllOK.style.display = "none";
return;
}
else
{
// Things must be ok.
AllUrgent.style.display = "none";
AllWarning.style.display = "none";
AllOK.style.display = "";
}
}
function UpdateIcons ()
{
for ( var iIndex = 0; iIndex < Icons.length ; iIndex++)
{
var item = document.all(Icons[iIndex].idtag);
item.src = Icons[iIndex].source;
}
}
function onHint( row, itemtext )
{
if (!g_fReady)
{
// The page is not availabe for user input yet. Kill the click.
return;
}
var lasthint;
var lastButton;
// Is this the first time through?
//
if ( g_LastItem == 0 )
{
lasthint = DefaultHintText.id
g_LastHintText = document.all(lasthint)
}
else
{
// Is it the same one again?
//
if ( g_LastItem != row )
g_LastItem.style.background=""
// Hide the old button, if there was one
//
if ( g_LastButtonText != NoButton )
{
g_LastButtonText.style.visibility = "hidden";
}
}
// Set hot color
row.style.background = g_SelectColor;
var iFeature = 0;
switch ( itemtext )
{
case "AP" :
iFeature = gc_AP;
if(g_bProductEnabled)
{
APButtonOff.disabled = false;
}
else
{
APButtonOff.disabled = true;
}
break;
case "Email" :
iFeature = gc_Email;
if(g_bProductEnabled)
{
EmailButtonOff.disabled = false;
}
else
{
EmailButtonOff.disabled = true;
}
break;
case "SB" :
iFeature = gc_SB;
if(g_bProductEnabled)
{
SBButtonOff.disabled = false;
}
else
{
SBButtonOff.disabled = true;
}
break;
case "FSS" :
iFeature = gc_FSS;
if(g_bProductEnabled)
{
FSSButtonScan.disabled = false;
}
else
{
FSSButtonScan.disabled = true;
}
break;
case "VirusDef" :
iFeature = gc_VirusDef;
break;
case "ALU" :
iFeature = gc_ALU;
break;
case "US" :
iFeature = gc_US;
break;
}
lasthint = Features[iFeature].detailstext.id;
lastButton = Features[iFeature].buttontext.id;
if ( Features[iFeature].state == gc_Urgent )
Features[iFeature].detailsbody.style.color = "Red";
else
Features[iFeature].detailsbody.style.color = "Black";
// Hide old text, if this isn't a click on the same item
//
if ( g_LastHintText != document.all(lasthint))
{
g_LastHintText.style.display = "none";
// Show the new one
//
g_LastHintText = document.all(lasthint);
g_LastHintText.style.display = "";
}
g_LastButtonText = document.all(lastButton);
// Show the new button
//
g_LastButtonText.style.visibility = "inherit";
g_LastHintID = itemtext;
g_LastItem = row;
g_LastID = itemtext;
UpdateIcons ();
}
function ScanMyComputerDelay()
{
// Let the scan now button be pressed again.
g_fStartingScan = false;
}
function ButtonClick ()
{
if (!g_fReady)
{
// The page is not availabe for user input yet. Kill the click.
return;
}
switch ( g_LastButtonText )
{
case APButtonOff :
// Disabled
//
try
{
g_AP.Enabled = 1;
}
catch (NAVErr)
{
g_AP.NAVError.LogAndDisplay(0);
}
break;
case APButtonLoad :
// Not loaded
//
try
{
g_AP.Load ();
}
catch (NAVErr)
{
g_AP.NAVError.LogAndDisplay(0);
}
break;
case EmailButtonOff :
try
{
delete g_Options;
CreateOptions ();
if ( g_Options != null )
{
g_Options.Load ();
g_Options.NAVEMAIL.ScanOutgoing = 1;
g_Options.NAVEMAIL.ScanIncoming = 1;
g_Options.Save ();
}
}
catch (NAVErr)
{
g_Options.NAVError.LogAndDisplay(0);
}
break;
case SBButtonOff :
try
{
delete g_Options;
CreateOptions ();
if ( g_Options != null )
{
g_Options.Load ();
g_Options.SCRIPTBLOCKING.Enabled = 1;
g_Options.Save ();
}
}
catch (NAVErr)
{
g_Options.NAVError.LogAndDisplay(0);
}
break;
case FSSButtonScan :
if (!g_fStartingScan)
{
// Disable the button for until our timeout happens.
// This prevents people from clicking the button again and
// launching another scan. It's not perfect but it deters
// the customer from pressing it again for a bit.
g_fStartingScan = true;
try
{
if ( typeof (g_NAVScanTasks) == 'undefined' )
g_NAVScanTasks = new ActiveXObject ( g_strScanTasksInterface );
}
catch (err)
{
var msg = document.frames("Errors").document.all.ERR_MSG_NO_NAVTASKS.innerText;
var id = document.frames("Errors").document.all.ERR_ID_NO_NAVTASKS.innerText;
g_ErrorHandler.DisplayNAVError (msg, id);
return;
}
try
{
g_NAVScanTasks.ScanMyComputer ();
}
catch (NAVErr)
{
g_NAVScanTasks.NAVError.LogAndDisplay(0);
}
window.setTimeout("ScanMyComputerDelay()",5000)
}
break;
case VirusDefButtonUpdate :
try
{
g_Launcher.LaunchLiveUpdate ();
}
catch (NAVErr)
{
g_Launcher.NAVError.LogAndDisplay(0);
}
break;
case ALUButtonOff :
try
{
if ( g_Options != null)
{
g_Options.Load ();
g_Options.LiveUpdate = 1;
g_Options.Save ();
}
}
catch (NAVErr)
{
g_Options.NAVError.LogAndDisplay(0);
}
break;
case USButtonRenew :
case USButtonRenewWarning :
case USButtonRenewExpired :
try
{
g_Launcher.LaunchSubscriptionWizard ();
}
catch (NAVErr)
{
g_Launcher.NAVError.LogAndDisplay(0);
}
break;
case USButtonRetailPreactive:
case USButtonRetailExpired:
case USButtonTrialwareActive:
case USButtonTrialwareExpired:
case USButtonRentalTrial:
case USButtonRentalTrialExpired:
case USButtonRentalWarning:
case USButtonRentalExpired:
case USButtonRentalExpiredSS:
case USButtonRentalKilled:
{
try
{
var HWNDPARENT_FIND = 1; // Ask NAVlicense to find the parent window, which is the integrator.
var SYMALERT_RESULT_RESOLVELICENSE = 1; // Pass parameter "User selects 'activate license'" to ActWiz.
g_NAVLicense.LaunchActivationWizardEx(0, SYMALERT_RESULT_RESOLVELICENSE, HWNDPARENT_FIND);
}
catch (err)
{
g_NAVLicense.NAVError.LogAndDisplay(0);
}
}
break;
}
}
function MoreInfo ( dwHelpID )
{
if (!g_fReady)
{
// The page is not availabe for user input yet. Kill the click.
return;
}
try
{
g_Launcher.LaunchHelp ( dwHelpID );
}
catch (NAVErr)
{
g_Launcher.NAVError.LogAndDisplay(0);
}
}
function HotText (row)
{
// Set cold color
if( row != null )
{
g_LastHotColor = row.style.color;
// Set hot color
row.style.textDecorationUnderline = 1
row.style.color="Blue";
}
}
function onMouseOut( row )
{
// Set cold color
if( row != null )
{
row.style.textDecorationNone = 1
row.style.color=g_LastHotColor;
//row.style.fontWeight="normal";
}
}
function AllError ()
{
for ( var iIndex = 0; iIndex < Features.length; iIndex ++ )
{
Features[iIndex].state = gc_Urgent;
}
idtxt_navstats_rts_refreshing.style.display= "none";
idtxt_navstats_rts_error.style.display= "";
idtxt_navstats_email_refreshing.style.display= "none";
idtxt_navstats_email_error.style.display= "";
idtxt_navstats_sb_refreshing.style.display= "none";
idtxt_navstats_sb_error.style.display= "";
idtxt_navstats_fss_refreshing.style.display= "none";
idtxt_navstats_fss_notrun.style.display= "";
idtxt_navstats_vp_refreshing.style.display= "none";
idtxt_navstats_vp_error.style.display= "";
idtxt_navstats_us_refreshing.style.display= "none";
idtxt_navstats_us_error.style.display= "";
idtxt_navstats_alu_refreshing.style.display= "none";
idtxt_navstats_alu_error.style.display= "";
UpdateSystemStatus ();
}
function UpdateProductStatus()
{
g_ProductStatus = STATUS_ERROR;
var nZone = g_NAVStatus.ProductLicenseZone;
var bViolated = ((nZone & DJSMAR_LicenseZone_Violated) == DJSMAR_LicenseZone_Violated);
var bPreactivation = ((nZone & DJSMAR_LicenseZone_PreActivation) == DJSMAR_LicenseZone_PreActivation);
var bKilled = ((nZone & DJSMAR_LicenseZone_Killed) == DJSMAR_LicenseZone_Killed);
var bExpired = ((nZone & DJSMAR_LicenseZone_Expired) == DJSMAR_LicenseZone_Expired);
var bWarning = ((nZone & DJSMAR_LicenseZone_Warning) == DJSMAR_LicenseZone_Warning) || ((nZone & DJSMAR_LicenseZone_Trial) == DJSMAR_LicenseZone_Trial);
g_bProductEnabled = true;
if(bExpired || bViolated || bKilled)
{
g_bProductEnabled = false;
}
if(bViolated)
{
g_ProductStatus = STATUS_CORRUPTED;
return;
}
if(bPreactivation)
{
switch(g_NAVStatus.ProductLicenseType)
{
case DJSMAR_LicenseType_Retail:
case DJSMAR_LicenseType_Unlicensed:
case DJSMAR_LicenseType_ESD:
case DJSMAR_LicenseType_Beta:
{
if(bExpired)
{
g_ProductStatus = STATUS_RETAIL_EXPIRED;
}
else if(bWarning)
{
g_ProductStatus = STATUS_RETAIL_PREACTIVE;
}
}
break;
case DJSMAR_LicenseType_Trial:
{
if(bExpired)
{
g_ProductStatus = STATUS_TRIALWARE_EXPIRED;
}
else if(bWarning)
{
g_ProductStatus = STATUS_TRIALWARE_ACTIVE;
}
}
break;
case DJSMAR_LicenseType_TryDie:
{
if(bExpired)
{
g_ProductStatus = STATUS_TRYDIE_EXPIRED;
}
else if(bWarning)
{
g_ProductStatus = STATUS_TRYDIE_ACTIVE;
}
}
break;
case DJSMAR_LicenseType_Rental:
{
if(bWarning)
{
if(bExpired)
{
g_ProductStatus = STATUS_RENTAL_TRIAL_EXPIRED;
}
else
{
g_ProductStatus = STATUS_RENTAL_TRIAL;
}
}
}
break;
default:
break;
}
return;
}
switch(g_NAVStatus.ProductLicenseType)
{
case DJSMAR_LicenseType_Rental:
{
if(bKilled)
{
g_ProductStatus = STATUS_RENTAL_KILLED;
}
else if(bExpired)
{
g_ProductStatus = STATUS_RENTAL_EXPIRED;
}
else if(bWarning)
{
g_ProductStatus = STATUS_RENTAL_WARNING;
}
else
{
g_ProductStatus = STATUS_RENTAL_ACTIVE;
}
}
break;
case DJSMAR_LicenseType_Retail:
case DJSMAR_LicenseType_Unlicensed:
case DJSMAR_LicenseType_ESD:
case DJSMAR_LicenseType_Trial:
if(!bExpired)
{
g_ProductStatus = STATUS_RETAIL_ACTIVE;
}
break;
case DJSMAR_LicenseType_Beta:
if(bExpired)
{
g_ProductStatus = STATUS_TRYDIE_EXPIRED;
}
else
{
g_ProductStatus = STATUS_RETAIL_ACTIVE;
}
break;
default:
break;
}
}
function SetServiceStatus(USState, USIcon, strUSTitle, strUSStatus, USHintText, USButtonText)
{
Features[gc_US].state = USState;
Icons[gc_US].source = USIcon;
strUSTitle.style.display = "";
strUSStatus.style.display="";
Features[gc_US].detailstext = USHintText;
Features[gc_US].buttontext = USButtonText;
}
function CreateOptions ()
{
try
{
g_Options = new ActiveXObject ( g_strOptionsInterface );
}
catch (err)
{
var msg = document.frames("Errors").document.all.ERR_MSG_NO_OPTIONS.innerText;
var id = document.frames("Errors").document.all.ERR_ID_NO_OPTIONS.innerText;
g_ErrorHandler.DisplayNAVError (msg, id);
AllError ();
g_Options = null;
return;
}
}