/*
 * Purpose:	Provide Localized text for the Firstrun process
 *          construct all the data objects.
 *
 * CVS: $Id: pagedata.js,v 1.3 2003/11/22 00:12:30 dsmith Exp $
 *
 * This file is a part of the Real Networks software library.
 * Copyright (C) 2001 Real Networks, Inc.
 * All rights reserved.
 *
 */

/* create and initialize the pages */
var pageIdArray = new Array("welcome", "nag", "connect", "offline",
	"generror", "login", "confirm", "account", "pclogin", "marketing");
var pages = new Array();
var currentPage;

function initPages()
{
	for( var i=0; i< pageIdArray.length; i++ )
	{
		pages[ pageIdArray[i] ]    = new PageItem();
		pages[ pageIdArray[i] ].id = pageIdArray[i];
	}
}


/** Page text data arrays **/
var welcomeHeadlines	= new Array ( welcome_text );
var welcomeDescription	= new Array (
		welcome_paragraph,
		welcome_bullet_0,
		welcome_bullet_1,
		welcome_bullet_2,
		welcome_bullet_3,
		welcome_bottom_text,
		welcome_bottom_paragraph);

var nagHeadlines		= new Array ( nag_title );
var nagDescription		= new Array ( 
		nag_paragraph_0,
		nag_paragraph_1,
		nag_bullet_title,
		nag_bullet_0,
		nag_bullet_1,
		nag_bullet_2,
		nag_bullet_3,
		nag_bottom_paragraph_0);
	
var offlineHeadlines	= new Array ( offline_title );
var offlineDescription	= new Array ( ((plyrObj.PlayerProperty("configurationcomplete")==1)?offline_paragraph_1a:offline_paragraph_1b), offline_paragraph_2, offline_paragraph_3);

var loginHeadlines		= new Array (login_title);
var loginDescription	= new Array (login_paragraph, required_info_text);
var loginErrors			= new Array (login_error_0, login_error_1);

var confirmHeadlines	= new Array (confirm_title);
var confirmDescription	= new Array (confirm_paragraph, required_info_text);
var confirmErrors		= new Array (confirm_error_0);

var accountHeadlines	= new Array (createaccount_title);
var accountDescription	= new Array (
		createaccount_paragraph, 
		createaccount_bullet_0, 
		createaccount_bullet_1,
		required_info_text);
var accoutErrors		= new Array (
		createaccount_error_0,
		createaccount_error_1);

var generrorHeadlines   = new Array ( generror_title );
var generrorDescription = new Array ( generror_paragraph_0, generror_paragraph_1 );

var connectDescription	= new Array ( connecting_text_1a, connecting_text_1b );

var pcloginHeadlines	= new Array ( pclogin_title );
var pcloginDescription	= new Array ( pclogin_paragraph, pclogin_bottom_paragraph, required_info_text );
var pcloginErrors		= new Array ( pclogin_error_0, pclogin_error_1 );


/** Fill the PageItem objects with data **/
function initPageDataSet()
{
	pages["login"].headLines	= loginHeadlines;
	pages["login"].desc     	= loginDescription;
	pages["login"].errorMessage	= loginErrors;
	pages["login"].pageLinks	= new Array( lnkForgotPasswd, lnkGetAnAccount, lnkShortPrivacy);
	pages["login"].formItems	= new Array( fiEmail, fiPassword );
	pages["login"].buttons  	= new Array( btnCancel, btnBack, btnLogin );
	pages["login"].dfltButton   = btnLogin;
	pages["login"].render   	= renderLogin;
	pages["login"].prev     	= pages["account"];
	pages["login"].next     	= pages["confirm"];

	pages["confirm"].headLines	= confirmHeadlines;
	pages["confirm"].desc       = confirmDescription;
	pages["confirm"].errorMessage = confirmErrors;
	pages["confirm"].pageLinks  = new Array( lnkShortPrivacy );
	pages["confirm"].formItems	= new Array( fiCountry, fiLanguage, fiPostal );
	pages["confirm"].buttons    = new Array( btnCancel, btnBack, btnConf );
	pages["confirm"].dfltButton = btnConf;
	pages["confirm"].render   	= renderConfirm;
	pages["confirm"].prev     	= pages["login"];
	pages["confirm"].next     	= pages["marketing"];
	
	pages["welcome"].headLines	= welcomeHeadlines;
	pages["welcome"].desc       = welcomeDescription;
	pages["welcome"].pageLinks  = new Array( );
	pages["welcome"].buttons    = new Array( btnCancel, btnConnect );
	pages["welcome"].dfltButton = btnConnect;
	pages["welcome"].render   	= renderWelcome;
	pages["welcome"].prev     	= null;
	pages["welcome"].next     	= pages["connect"];
	
	pages["nag"].headLines		= nagHeadlines;
	pages["nag"].desc       	= nagDescription;
	pages["nag"].pageLinks  	= new Array( lnkShortPrivacy );
	pages["nag"].buttons    	= new Array( btnCancel, btnConnect );
	pages["nag"].dfltButton 	= btnConnect;
	pages["nag"].render   		= renderNag;
	pages["nag"].prev     		= null;
	pages["nag"].next     		= pages["connect"];

	pages["connect"].headLines	= null;
	pages["connect"].desc       = connectDescription;
	pages["connect"].pageLinks  = new Array( );
	pages["connect"].buttons    = new Array( btnCancel );
	pages["connect"].dfltButton = btnCancel;
	pages["connect"].render   	= renderContacting;
	pages["connect"].prev     	= null;
	pages["connect"].next     	= null;
	
	pages["offline"].headLines	= offlineHeadlines;
	pages["offline"].desc       = offlineDescription;
	pages["offline"].pageLinks  = new Array( lnkForceOnline, lnkThrowPrefs );
	pages["offline"].buttons	= new Array( btnCancel, btnRetry );
	pages["offline"].dfltButton	= btnRetry;
	pages["offline"].render   	= renderOffline;
	pages["offline"].prev     	= null;
	pages["offline"].next     	= pages["connect"];

	pages["generror"].headLines  = generrorHeadlines;
	pages["generror"].desc       = generrorDescription;
	pages["generror"].pageLinks  = new Array( lnkForceOnline, lnkThrowPrefs );
	pages["generror"].buttons	 = new Array( btnCancel, btnRetry );
	pages["generror"].dfltButton = btnRetry;
	pages["generror"].render     = renderGenError;
	pages["generror"].prev       = null;
	pages["generror"].next       = pages["connect"];
	
	pages["account"].headLines	= accountHeadlines;
	pages["account"].desc       = accountDescription;
	pages["account"].errorMessage = accoutErrors;
	pages["account"].pageLinks  = new Array(lnkHaveAccount, lnkShortPrivacy);
	pages["account"].buttons    = new Array( btnCancel, btnBack, btnCreateAcct );
	pages["account"].dfltButton = btnCreateAcct;
	pages["account"].render   	= renderAccount;
	pages["account"].prev     	= pages["login"];
	pages["account"].next     	= pages["marketing"];
	pages["account"].formItems	= eval("new Array( "+createaccount_fieldorder+" )");

	pages["pclogin"].headLines	= pcloginHeadlines;
	pages["pclogin"].desc     	= pcloginDescription;
	pages["pclogin"].errorMessage= pcloginErrors;
	pages["pclogin"].pageLinks	= new Array( lnkMyAccount, lnkShortPrivacy);
	pages["pclogin"].formItems	= new Array( fiParental );
	pages["pclogin"].buttons  	= new Array( btnCancel, btnBack, btnLogin );
	pages["pclogin"].dfltButton = btnLogin;
	pages["pclogin"].render   	= renderPclogin;
	pages["pclogin"].prev     	= null;
	pages["pclogin"].next     	= null;

	pages["marketing"].headLines  = null;
	pages["marketing"].desc       = null;
	pages["marketing"].pageLinks  = new Array( );
	pages["marketing"].buttons    = new Array( );
	pages["marketing"].dfltButton = null;
	pages["marketing"].render     = renderMarketing;
	pages["marketing"].prev       = null;
	pages["marketing"].next       = null;
}
var off_pagedata_loaded = true;

