<!--
/************************************************************************

FILE: kdx_init.js
DESCRIPTION: Global variables and security tokens that are configurable
for each implementation. This JS file *must* be included on 
all pages that use KDX objects.

Copyright (c) 2004-2005 Kontiki Inc.

*************************************************************************/

//////////////////////////////////////////////////////////////////////////
//
// URL to the signed cab file. Used in installations and upgrades.
//
//////////////////////////////////////////////////////////////////////////
var gCabFile		= "http://kdx.kontiki.com/kdx/Client403/kdx.cab";

//////////////////////////////////////////////////////////////////////////
//
// Default installation values.
//
//////////////////////////////////////////////////////////////////////////
gDefaultNetMgrDomain = "web-g.kontiki.com";
gDefaultClientModelMoid = "be8b0e04-e87c-21ab-3af3-f422e16ae90f";

//////////////////////////////////////////////////////////////////////////
//
// Increment gCacheVersion for time a new version of the implementation
// is deployed so user's local cache files get updated. Also used to
// renew or push new authorization tokens.
//
//////////////////////////////////////////////////////////////////////////
var gCacheVersion   = 1; 

//////////////////////////////////////////////////////////////////////////
//
// KDX Authorization Token and Signature provided to you by Kontiki.
// Must be customized for each domain where an implementation is hosted.
//
//////////////////////////////////////////////////////////////////////////
var gAuthToken		= "kontiki | *.kontiki.com | urn:kid:";
var gAuthSignature	= "E5joMOe8dwAtQxeywAuy5B7+I60qh9JpWaodTZ6oCS97Ea1fnfxTIRe53LRpJmzjMOyMVb2IQqvxc4wZuPxCspwxqrpbBzUXUtKlYDLIrAME7Ult+hPef7E+cvbxV9wKtDSrQuDmO0Gfsaojb+a1rnLksuwgVTbFy4cEmqYbd00=";



//////////////////////////////////////////////////////////////////////////
//
// External links.
//
//////////////////////////////////////////////////////////////////////////
var gAboutLink = "http://www.kontiki.com/kdx/about.html";
var gBlackoutLink = "http://www.kontiki.com/client/messages.html#Blackout";
var gEulaLink = "http://www.kontiki.com/kdx/eula.html#eula";
var gEulaBaseLink = "http://www.kontiki.com/kdx/eula.html";
var gDiskFullLink = "http://www.kontiki.com/client/messages.html#DiskLow";
var gHelpLink = "http://kdx-help.kontiki.com/";
var gOptedOutLink = "http://www.kontiki.com/client/messages.html#OptedOut";
var gOptInLink = "http://www.kontiki.com/client/relay-networkfaq.html";
var gPriortzDLsLink = "http://www.kontiki.com/client/messages.html#PrioritizeKontikiDL";
var gPriortzSubsLink = "http://www.kontiki.com/client/messages.html#PrioritizeKontikiSubs";
var gNetActivityLink = "http://www.kontiki.com/client/messages.html#DetectedNetworkActivity";
var gNetworkManagedLink = "http://www.kontiki.com/client/messages.html#NetworkManaged";
var gConservingLink = "http://www.kontiki.com/client/messages.html#Conserving";
var gAcceleratingLink = "http://www.kontiki.com/client/messages.html#Accelerating";
var gPrivacyLink = "http://www.kontiki.com/client/privacy.html";
var gSuspendedLink = "http://www.kontiki.com/client/messages.html#Suspended";
var gUserActivityLink = "http://www.kontiki.com/client/messages.html#DetectedUserActivity";

//////////////////////////////////////////////////////////////////////////
//
// Configurable text.
//
//////////////////////////////////////////////////////////////////////////
var gLongTitle      = "Kontiki Delivery Manager"; // Used in: About dlg, Default titlebars
var gShortTitle     = "Delivery Manager"; // Used in: Desktop shortcut, Uninstall, About titlebar, Complete dlg, Upgrade msg, Index pages
var gInboxName = "My Deliveries";

var gBrowseForDeliveriesFolder	= "Browse for your " + gInboxName + " Folder";
var gCopyright = "Copyright 2003-2005 Kontiki, Inc."
var gSubTypeUpdater = "Latest Version";
var gUpgradeMessage = "A newer version of " + gShortTitle + " is available.\nPlease click 'OK' to continue.\n\nIf a security dialog appears then click 'Yes' to get the latest version.";
var gUpgradeFailedMessage = "Could not finish your installation or upgrade.";

//////////////////////////////////////////////////////////////////////////
//
// Pre-authentication UI.
//
// Used only if pre-auth pref is enabled via KAM.
//
//////////////////////////////////////////////////////////////////////////
var gPreAuthLogo = "kontiki.ico"; // This file can be found in the images directory.

//////////////////////////////////////////////////////////////////////////
//
// UI Defaults that can be overridden in each dlg.
//
//////////////////////////////////////////////////////////////////////////
document.title = gLongTitle; // titlebars
// Comment out the following line for testing during development.
document.oncontextmenu = new Function("return false"); // disable right click menus

//////////////////////////////////////////////////////////////////////////
//
// Error messages.
//
//////////////////////////////////////////////////////////////////////////
var gErrorSubjectMap = new Array();
var gErrorMsgMap = new Array();

gErrorSubjectMap["Z_ERROR_FAILED_URN_RESOLVER"] = "<b>Delivery Error</b>";
gErrorMsgMap["Z_ERROR_FAILED_URN_RESOLVER"] = "The content you are trying to access could not be resolved to the proper Delivery Management System server set. Please contact support for further information.";

gErrorSubjectMap["Z_ERROR_MALFORMED_METADATA"] = "<b>Delivery Error</b>";
gErrorMsgMap["Z_ERROR_MALFORMED_METADATA"]  = "The content you are trying to access has an invalid content identifier or the metadata for the object is invalid. Please contact support for further information.";

gErrorSubjectMap["Z_ERROR_HTTP_TIMEOUT"] = "<b>Delivery Error</b>";
gErrorMsgMap[ "Z_ERROR_HTTP_TIMEOUT"] =  "The server connection has timed out";

gErrorSubjectMap["Z_ERROR_MD_AUTH_DENIED"] = "<b>Access Denied</b>";
gErrorMsgMap[ "Z_ERROR_MD_AUTH_DENIED"] =  "You are not currently listed as a member of any department or group that is authorized to view this file."; 
              
// in progress download errors
gErrorSubjectMap["Z_ERROR_DOWNLOAD_FAILED"] = "<b>Delivery Error</b>";
gErrorMsgMap[ "Z_ERROR_DOWNLOAD_FAILED"] =  "An error occurred; the cause is unknown at this time. Please contact support for further information.";

gErrorSubjectMap["Z_ERROR_SIGNATURE_FAILED"] = "<b>Delivery Error</b>";
gErrorMsgMap[ "Z_ERROR_SIGNATURE_FAILED"] =  "Data verification for the delivered content failed. Please contact support for further information.";

gErrorSubjectMap["Z_ERROR_PERMISSION_DENIED"] = "<b>Delivery Error</b>";
gErrorMsgMap[ "Z_ERROR_PERMISSION_DENIED"] =  "No response from server.";

gErrorSubjectMap["Z_ERROR_ZERO_SIZE"] = "<b>Delivery Error</b>";
gErrorMsgMap[ "Z_ERROR_ZERO_SIZE"] =  "File size zero error. Cannot deliver file. Please contact support for further information.";

gErrorSubjectMap["Z_ERROR_SIZE_MISMATCH"] = "<b>Delivery Error</b>";
gErrorMsgMap[ "Z_ERROR_SIZE_MISMATCH"] =  "Size mismatch error. Cannot deliver file. Please contact support for further information.";

gErrorSubjectMap["Z_ERROR_MOID_NOT_FOUND"] = "<b>Error</b>";
gErrorMsgMap[ "Z_ERROR_MOID_NOT_FOUND"] =  "Cannot locate file. Please contact support for further information.";

gErrorSubjectMap["Z_ERROR_INVALID_PROTOCOL"] = "<b>Error</b>";
gErrorMsgMap[ "Z_ERROR_INVALID_PROTOCOL"] =  "Invalid protocol error. Please contact support for further information.";

gErrorSubjectMap["Z_ERROR_DISK_FULL"] = "<b>Delivery Error</b>";
gErrorMsgMap[ "Z_ERROR_DISK_FULL"] =  "Your hard disk is full. Delete some files from your PC and retry.";

// blackout errors
gErrorSubjectMap["ERROR_BLACKOUT"] = "<b>Restricted Time Period</b>";
gErrorMsgMap[ "ERROR_BLACKOUT"] =  "Your item has been added to pending deliveries. However, your administrator is not currently allowing downloads. Downloads will resume automatically once the restricted time period is over.";  

// content expired errors
gErrorSubjectMap["Z_ERROR_FAILED_CONTENT_EXPIRED"] = "<b>Content Not Available</b>";
gErrorMsgMap[ "Z_ERROR_FAILED_CONTENT_EXPIRED"] =  "We are sorry. This content is no longer available."

// subscription errors
gErrorSubjectMap["Z_ERROR_SUBSCRIPTION_FAILURE"] = "<b>Delivery Error</b>";
gErrorMsgMap[ "Z_ERROR_SUBSCRIPTION_FAILURE"] =  "There was an error while delivering the subscription.";  

gErrorSubjectMap["ERROR_ALREADY_SUBSCRIBED"] = "<b>Subscription Already Activated</b>";
gErrorMsgMap[ "ERROR_ALREADY_SUBSCRIBED"] =  "You have already requested this subscription. Check in " + gInboxName + ".";  

// player errors
gErrorSubjectMap["Z_ERROR_EXCEEDED_ALLOWED_PLAYS"] = "<b>Delivery Error</b>";
gErrorMsgMap[ "Z_ERROR_EXCEEDED_ALLOWED_PLAYS"] =  "This file has been played the maximum allowable number of times.";

//////////////////////////////////////////////////////////////////////////
//
// Debug variables.
//
// Used only to test upgrades during development.
//
//////////////////////////////////////////////////////////////////////////
var gUsePrevCab     = false;
var gPrevCabFile	= "http://kontiki.corp.kontiki.com/Departments/engineering/release/clients/maui/previous/kdx.cab";

//-->
