home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2003 November
/
Chip_2003-11_cd2.bin
/
nav2004
/
download
/
NAV
/
External
/
NORTON
/
APP
/
CfgWzRes.dll
/
HTML
/
WELCOME.JS
< prev
Wrap
Text File
|
2003-08-17
|
9KB
|
355 lines
g_ModuleID = 3009;
var lOEM = 0;
var MainFrame = window.parent;
var CfgWizMgrObj;
var NAVLicense;
var NAVOptionObj;
var DJSMAR_LicenseType_Violated = -1;
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;
MainFrame.g_WebWnd = null;
MainFrame.bPromptUser = true;
MainFrame.g_iLicenseType = DJSMAR_LicenseType_Retail;
function OnLoad()
{
try
{
MainFrame.g_WebWnd = window.external.ObjectArg("CFGWIZ_WEBWINDOW_OBJECT");
MainFrame.g_WebWnd.OnCloseCallback = OnCloseButton;
}
catch(err)
{
var msg = document.frames("Errors").document.all.ERR_MSG_NO_WEBWND.innerText;
var id = document.frames("Errors").document.all.ERR_ID_NO_WEBWND.innerText;
g_ErrorHandler.DisplayNAVError (msg, id);
return;
}
try
{
CfgWizMgrObj = new ActiveXObject ("NAVCfgWizDll.NAVCfgWizMgr");
}
catch(err)
{
var msg = document.frames("Errors").document.all.ERR_MSG_NO_CFGWIZDLL.innerText;
var id = document.frames("Errors").document.all.ERR_ID_NO_CFGWIZDLL.innerText;
g_ErrorHandler.DisplayNAVError (msg, id);
return;
}
try
{
NAVLicense = new ActiveXObject("NAVLicense.NAVLicenseInfo");
}
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);
return;
}
try
{
MainFrame.g_iLicenseType = window.external.ObjectArg("DRM::LicenseType");
}
catch(err)
{
NAVLicense.NAVError.LogAndDisplay(0);
}
try
{
NAVOptionObj = new ActiveXObject ("Symantec.Norton.AntiVirus.NAVOptions");
}
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);
return;
}
try
{
// Check if OEM sku
lOEM = CfgWizMgrObj.ProductType;
if ( NAVOptionObj.IsNAVPro )
{
intro_table.style.backgroundImage = "url('welcome_bkg_pro.gif')";
text_table_cell2.style.display = "none";
text_table_cell2_oem.style.display = "none";
text_table_cell2_oem_spacer.style.display = "none";
text_table_cell2_pro.style.display = "";
g_strProductName = ProductNamePro.innerText;
}
else
{
g_strProductName = ProductName.innerText;
intro_table.style.backgroundImage = "url('welcome_bkg.gif')";
// If OEM layout, display OEM text.
if (lOEM == 1)
{
// hide non-OEM text
text_table_cell1.style.display = "none";
text_table_cell2.style.display = "none";
text_table_cell2_pro.style.display = "none";
text_table_cell2_oem.style.display = "";
}
else
text_table_cell2_oem_spacer.style.display = "none";
if(DJSMAR_LicenseType_Rental == MainFrame.g_iLicenseType)
{
try
{
if (CfgWizMgrObj.ShowBrandingLogo)
{
// Check to see if the system is in high contrast mode.
// If yes, windows will not show the vendor logo because it's a background image.
// We will need to need to show vendor name in text.
var bShowVendorLogo = true;
var DefAlertObj;
try
{
DefAlertObj = new ActiveXObject ("DefAlert.SymNavDefAlert");
if(DefAlertObj.IsHighContrast())
{
// Load vendor name from NAVUIRES.DLL
var IDS_VENDOR_NAME = 116; // from NAVUIRES.H
var VendorName = DefAlertObj.GetStringFromBrandingResource(IDS_VENDOR_NAME, false);
var szBrandingText = p_partner_text.innerText + " " + VendorName;
p_partner_text.innerText = szBrandingText;
bShowVendorLogo = false;
}
}
catch(err)
{
// ignore error.
}
try
{
if(bShowVendorLogo)
{
intro_table3.style.backgroundImage = "url(\'res://" + NAVOptionObj.NortonAntiVirusPath + "\\navuires.dll/WELCOME_VENDOR.gif\')";
intro_table3.style.backgroundRepeat = "no-repeat";
intro_table3.style.backgroundPosition = "right";
}
}
catch(err)
{
NAVOptionObj.NAVError.LogAndDisplay(0);
intro_table3.style.backgroundImage = "none";
partner_text.style.display = "none";
}
partner_text.style.display = "";
}
}
catch(err)
{
CfgWizMgrObj.NAVError.LogAndDisplay(0);
}
var nTotalText;
try
{
// Check to see if there is branding text.
nTotalText = CfgWizMgrObj.TotalBrandingText;
}
catch(err)
{
CfgWizMgrObj.NAVError.LogAndDisplay(0);
}
// Get branding text from NAVUIRES.
if(nTotalText == 0)
{
// Hide all bullets.
// (i.e. TOnline does not want to display any text in the welcome screen.)
text_table_cell1.style.display = "none";
text_table_bullet1.style.display = "none";
text_table_bullet2.style.display = "none";
text_table_bullet3.style.display = "none";
}
else if(nTotalText > 0)
{
// Get branding text from NAVUIRES.
var aText = new Array(nTotalText);
for(var i=0; i < nTotalText; i++)
{
aText[i] = CfgWizMgrObj.GetBrandingText(i);
}
switch(nTotalText)
{
case 3:
{
if(aText[0].length != 0)
text_table_bullet1.innerText = aText[0];
if(aText[1].length != 0)
text_table_bullet2.innerText = aText[1];
if(aText[2].length != 0)
text_table_bullet3.innerText = aText[2];
}
break;
case 2:
{
if(aText[0].length != 0)
text_table_bullet1.innerText = aText[0];
if(aText[1].length != 0)
text_table_bullet2.innerText = aText[1];
// Hide the last bullet.
text_table_bullet3.style.display = "none";
}
break;
case 1:
{
if(aText[0].length != 0)
text_table_bullet1.innerText = aText[0];
// Hide the last two bullets.
text_table_bullet2.style.display = "none";
text_table_bullet3.style.display = "none";
}
break;
default:
break;
}
}
}
}
intro_table.style.backgroundRepeat = "no-repeat";
}
catch(err)
{
CfgWizMgrObj.NAVError.LogAndDisplay (0);
window.navigate("res://closeme.xyz");
return;
}
// Make sure we're at the top
document.body.scrollTop = 0;
// Always set focus to the next button
var TimerID = 0;
TimerID = setInterval("SetNextButtonFocus()", 500);
}
function SetNextButtonFocus()
{
NextButton.focus();
}
function NextPage()
{
var bShowPostInstallTasks = true;
try
{
// Are all post install tasks are set to hidden?
bShowLaunchLiveUpdate = CfgWizMgrObj.ShowLaunchLiveUpdate;
bShowLaunchRescue = CfgWizMgrObj.ShowLaunchRescue;
bShowEnableWeeklyScan = CfgWizMgrObj.ShowEnableWeeklyScan;
bShowLaunchFullSysScan = CfgWizMgrObj.ShowLaunchFullSysScan;
bShowPostInstallTasks = bShowLaunchLiveUpdate || bShowLaunchRescue || bShowEnableWeeklyScan || bShowLaunchFullSysScan;
}
catch(err)
{
CfgWizMgrObj.NAVError.LogAndDisplay(0);
bShowPostInstallTasks = true;
}
try
{
// Navigate to frameset page
window.navigate("home.htm");
}
catch(err)
{
// Fatal error
var msg = document.frames("Errors").document.all.ERR_MSG_FATAL_DJS.innerText;
var id = document.frames("Errors").document.all.ERR_ID_FATAL_DJS.innerText;
g_ErrorHandler.DisplayNAVError (msg, id);
return;
}
// Pass license sub type to the next page.
window.external.Global = window.external.ObjectArg;
}
function OnScroll ()
{
document.body.scrollTop = 0;
}
function OnCloseButton()
{
// MessageBox() Flags
var MB_YESNO = 0x00000004;
var MB_ICONQUESTION = 0x00000020;
var IDYES = 6;
if (MainFrame.m_nCurrentPanel == MainFrame.m_nMaxPanels - 1)
{
OnCompleteCfgWiz();
MainFrame.navigate("res://closeme.xyz");
return true;
}
else
{
// Prompt users to see if they really wanna cancel
if( MainFrame.bPromptUser == true )
{
iMsgBoxReturn = MainFrame.g_WebWnd.MsgBox(CancelWarning.innerHTML, MainFrame.g_strProductName, MB_YESNO | MB_ICONQUESTION);
if (iMsgBoxReturn == IDYES)
{
MainFrame.navigate("res://closeme.xyz");
return true;
}
return false
}
else
MainFrame.navigate("res://closeme.xyz");
}
return true;
}