/*************************************************
 File			: Timer.Config.js
 Description: Javascript configuration for NML timer
 Date			: 5/31/2008
 Project		: NML Timer
 ================================================
 Updates:
*************************************************/

// Program information
var handle = "edd";
var program = "PSH";
var progVer = "CA Super";
var programRootPath = "/psh/" + handle + "/CA_super/";

// Services and pages
var loginPage = programRootPath + "start.shtml";
var welcomeBackPage = programRootPath + "WelcomeBack.php";
var masteryTestPage = programRootPath + "test.htm";
var supplementPage = programRootPath + "supplemental.php";
var firstPage = programRootPath + "113.php";
var firstPageUserExists = programRootPath + "msgonce.php";
var loginService = "/timer/webservice/Login.php";
var timerService = "/timer/webservice/TimerUpdate.php";
var delService = "/timer/webservice/DeleteTimer.php";
var userDataService = "/timer/webservice/GetUserData.php";
var requiredPagesService = "/timer/webservice/CheckRequiredPages.php";
var testScoreService = "/timer/webservice/MasteryTestScore.php";

// Cookie stuff
var cookiePath = "/";
var cookieTimeout = 2; // in minutes
var secureCookie = false;

// Some configuration for the timer
var defaultMaxTime = 2; // Default maximum number of minutes per page
var defaultTimeout = 4.5; // Default timeout in minutes
var defaultTimeoutOn = false; // Whether or not the timeout is on by default on a page
var defaultWarningTimeout = 0.5; // Amount of time the warning shows to the user before reseting
var defaultResetValue = 2; // Default number of minutes to reset a page to after a timeout
var timerUpdateInterval = 10; // in seconds
var stopTimerLostFocus = false; // Whether to stop the timer when the window loses focus
var timeRequired = 117*60; // Time required for the mastery test in seconds (minutes*60)
var warnOnFirstUpdate = true; // Whether or not to show the popup warning when a user enters the page if they've already
var loginTries = 2; // The number of times to try to login before giving an error

// Array of times different that the default (defaultMaxTime above)
// maxTime[PagePath] = Maximum time in minutes
var maxTime = [];
maxTime[programRootPath + "contact.shtml"] = 5;
maxTime[programRootPath + "114.php"] = 5;
maxTime[programRootPath + "msgonce.php"] = 4;
maxTime[programRootPath + "instruct1.php"] = 5;
maxTime[programRootPath + "instruct2.php"] = 5;
maxTime[programRootPath + "150a.php"] = 4;
maxTime[programRootPath + "150aa.php"] = 3;
maxTime[programRootPath + "150aaa.php"] = 4;
maxTime[programRootPath + "mcginnis.shtml"] = 15;
maxTime[programRootPath + "150e.php"] = 5;
maxTime[programRootPath + "suders.shtml"] = 15;
maxTime[programRootPath + "150k.php"] = 5;
maxTime[programRootPath + "150ee.php"] = 4;
maxTime[programRootPath + "150ab.php"] = 5;
maxTime[programRootPath + "185.php"] = 3;
maxTime[programRootPath + "2010.php"] = 3;
maxTime[programRootPath + "2020.php"] = 3;
maxTime[programRootPath + "2030.php"] = 3;
maxTime[programRootPath + "2040.php"] = 3;
maxTime[programRootPath + "2050.php"] = 3;
maxTime[programRootPath + "2060.php"] = 3;
maxTime[programRootPath + "1005.php"] = 5;
maxTime[programRootPath + "1005a.php"] = 3;
maxTime[programRootPath + "1005f.php"] = 3;
maxTime[programRootPath + "1005h.php"] = 3;
maxTime[programRootPath + "1005j.php"] = 3;
maxTime[programRootPath + "1005n.php"] = 3;
maxTime[programRootPath + "1005p.php"] = 3;
maxTime[programRootPath + "1005r.php"] = 3;
maxTime[programRootPath + "1005rr.php"] = 3;
maxTime[programRootPath + "1005t.php"] = 3;
maxTime[programRootPath + "1008.php"] = 3;
maxTime[programRootPath + "1008a.php"] = 3;
maxTime[programRootPath + "2190.php"] = 3;
maxTime[programRootPath + "2191.php"] = 3;
maxTime[programRootPath + "2192.php"] = 3;
maxTime[programRootPath + "216a.php"] = 5;
maxTime[programRootPath + "2160.php"] = 4;
maxTime[programRootPath + "miller.shtml"] = 15;
maxTime[programRootPath + "1011a.php"] = 3;
maxTime[programRootPath + "1011b.php"] = 3;
maxTime[programRootPath + "220.php"] = 5;
maxTime[programRootPath + "219a.php"] = 5;
maxTime[programRootPath + "219b.php"] = 5;
maxTime[programRootPath + "230a.php"] = 3;
maxTime[programRootPath + "260.php"] = 4;
maxTime[programRootPath + "262.php"] = 3;
maxTime[programRootPath + "1010.php"] = 3;
maxTime[programRootPath + "1010a.php"] = 3;
maxTime[programRootPath + "2802.php"] = 4;
maxTime[programRootPath + "285.php"] = 4;
maxTime[programRootPath + "313b.php"] = 4;
maxTime[programRootPath + "313c.php"] = 4;
maxTime[programRootPath + "315.php"] = 3;
maxTime[programRootPath + "2160.php"] = 3;
maxTime[programRootPath + "hanlon.shtml"] = 15;
maxTime[programRootPath + "350.php"] = 5;
maxTime[programRootPath + "oncale.shtml"] = 15;
maxTime[programRootPath + "dfehvjarvis.shtml"] = 15;
maxTime[programRootPath + "380.php"] = 3;
maxTime[programRootPath + "385.php"] = 5;
maxTime[programRootPath + "385a.php"] = 5;
maxTime[programRootPath + "breyer_opinion.shtml"] = 5;
maxTime[programRootPath + "burlington.shtml"] = 15;
maxTime[programRootPath + "3853.php"] = 5;
maxTime[programRootPath + "3854.php"] = 5;
maxTime[programRootPath + "3855.php"] = 3;
maxTime[programRootPath + "390.php"] = 3;
maxTime[programRootPath + "400.php"] = 4;
maxTime[programRootPath + "406.php"] = 4;
maxTime[programRootPath + "407.php"] = 4;
maxTime[programRootPath + "408.php"] = 4;
maxTime[programRootPath + "1025.php"] = 5;
maxTime[programRootPath + "409.php"] = 5;
maxTime[programRootPath + "409a.php"] = 5;
maxTime[programRootPath + "409c.php"] = 5;
maxTime[programRootPath + "maze.shtml"] = 10;
maxTime[programRootPath + "600.php"] = 3;
maxTime[programRootPath + "602.php"] = 4;
maxTime[programRootPath + "603.php"] = 3;
maxTime[programRootPath + "608.php"] = 3;
maxTime[programRootPath + "608c.php"] = 3;
maxTime[programRootPath + "609.php"] = 4;
maxTime[programRootPath + "611.php"] = 3;
maxTime[programRootPath + "assistant_maze.shtml"] = 10;
maxTime[programRootPath + "117.php"] = 5;
maxTime[programRootPath + "218aa.php"] = 4;
maxTime[programRootPath + "218b.php"] = 5;
maxTime[programRootPath + "feha.shtml"] = 15;
maxTime[programRootPath + "218c.php"] = 3;
maxTime[programRootPath + "dfeh_complaint.shtml"] = 5;
maxTime[programRootPath + "490.php"] = 4;
maxTime[programRootPath + "218d.php"] = 5;
maxTime[programRootPath + "crackerbarrel.shtml"] = 5;
maxTime[programRootPath + "rivera.shtml"] = 5;
maxTime[programRootPath + "510.php"] = 4;
maxTime[programRootPath + "520.php"] = 10;
maxTime[programRootPath + "1037a.php"] = 4;
maxTime[programRootPath + "1037c.php"] = 4;
maxTime[programRootPath + "1037ca.php"] = 4;
maxTime[programRootPath + "1037e.php"] = 4;
maxTime[programRootPath + "1037f.php"] = 4;
maxTime[programRootPath + "1037g.php"] = 4;
maxTime[programRootPath + "550.php"] = 3;
maxTime[programRootPath + "1038g.php"] = 4;
maxTime[programRootPath + "570.php"] = 3;
maxTime[programRootPath + "nytimes.shtml"] = 5;
maxTime[programRootPath + "glossary.php"] = 20;
// ADD NEW PAGES UNDER THIS LINE

// Array of pages that don't show the maximum time warning
var maxTimeAlertOff = [];
maxTimeAlertOff[programRootPath + "glossary.php"] = true;
maxTimeAlertOff[programRootPath + "exit.php"] = true;
maxTimeAlertOff[programRootPath + "evalonli.php"] = true;
maxTimeAlertOff[programRootPath + "evalprnt.php"] = true;
maxTimeAlertOff[programRootPath + "evalthnk.php"] = true;
maxTimeAlertOff[programRootPath + "leavtest.php"] = true;
maxTimeAlertOff[programRootPath + "certend.php"] = true;

// Array of the minimum amount of time a user must spend on a page (default none)
// minTime[PagePath] = Minimum time allowed in minutes
var minTime = [];
//minTime["/psh/testprogram/CA_super/SomePage.php"] = 2;

// Array of the timeout before the warning shows up (default is defaultTimeout above)
// warningTimeout[PagePath] = Timeout warning in minutes
var warningTimeout = [];
//warningTimeout[programRootPath + "contact.shtml"] = 4;
warningTimeout[programRootPath + "114.php"] = 4;
warningTimeout[programRootPath + "instruct1.php"] = 4;
warningTimeout[programRootPath + "instruct2.php"] = 4;
warningTimeout[programRootPath + "mcginnis.shtml"] = 14;
warningTimeout[programRootPath + "150e.php"] = 4;
warningTimeout[programRootPath + "suders.shtml"] = 14;
warningTimeout[programRootPath + "150k.php"] = 4;
warningTimeout[programRootPath + "150ab.php"] = 4;
warningTimeout[programRootPath + "1005.php"] = 4;
warningTimeout[programRootPath + "216a.php"] = 4;
warningTimeout[programRootPath + "miller.shtml"] = 14;
warningTimeout[programRootPath + "220.php"] = 4;
warningTimeout[programRootPath + "219a.php"] = 4;
warningTimeout[programRootPath + "219b.php"] = 4;
warningTimeout[programRootPath + "hanlon.shtml"] = 14;
warningTimeout[programRootPath + "350.php"] = 4;
warningTimeout[programRootPath + "oncale.shtml"] = 14;
warningTimeout[programRootPath + "dfehvjarvis.shtml"] = 14;
warningTimeout[programRootPath + "385.php"] = 4;
warningTimeout[programRootPath + "385a.php"] = 4;
warningTimeout[programRootPath + "breyer_opinion.shtml"] = 4;
warningTimeout[programRootPath + "burlington.shtml"] = 14;
warningTimeout[programRootPath + "3853.php"] = 4;
warningTimeout[programRootPath + "3854.php"] = 4;
warningTimeout[programRootPath + "1025.php"] = 4;
warningTimeout[programRootPath + "409.php"] = 4;
warningTimeout[programRootPath + "409a.php"] = 4;
warningTimeout[programRootPath + "409c.php"] = 4;
warningTimeout[programRootPath + "maze.shtml"] = 9;
warningTimeout[programRootPath + "assistant_maze.shtml"] = 9;
warningTimeout[programRootPath + "117.php"] = 4;
warningTimeout[programRootPath + "218b.php"] = 4;
warningTimeout[programRootPath + "feha.shtml"] = 14;
warningTimeout[programRootPath + "dfeh_complaint.shtml"] = 4;
warningTimeout[programRootPath + "218d.php"] = 4;
warningTimeout[programRootPath + "crackerbarrel.shtml"] = 4;
warningTimeout[programRootPath + "rivera.shtml"] = 4;
warningTimeout[programRootPath + "520.php"] = 9;
warningTimeout[programRootPath + "nytimes.shtml"] = 4;
// ADD NEW PAGES UNDER THIS LINE

// Array of the amount of time the warning shows up before reseting (default is defaultWarningTimeout above)
// resetTimeout[PagePath] = Minutes before reset
var resetTimeout = [];
//resetTimeout[programRootPath + "contact.shtml"] = 0.5;
resetTimeout[programRootPath + "114.php"] = 0.5;
resetTimeout[programRootPath + "instruct1.php"] = 0.5;
resetTimeout[programRootPath + "instruct2.php"] = 0.5;
resetTimeout[programRootPath + "mcginnis.shtml"] = 0.5;
resetTimeout[programRootPath + "150e.php"] = 0.5;
resetTimeout[programRootPath + "suders.shtml"] = 0.5;
resetTimeout[programRootPath + "150k.php"] = 0.5;
resetTimeout[programRootPath + "150ab.php"] = 0.5;
resetTimeout[programRootPath + "1005.php"] = 0.5;
resetTimeout[programRootPath + "216a.php"] = 0.5;
resetTimeout[programRootPath + "miller.shtml"] = 0.5;
resetTimeout[programRootPath + "220.php"] = 0.5;
resetTimeout[programRootPath + "219a.php"] = 0.5;
resetTimeout[programRootPath + "219b.php"] = 0.5;
resetTimeout[programRootPath + "hanlon.shtml"] = 0.5;
resetTimeout[programRootPath + "350.php"] = 0.5;
resetTimeout[programRootPath + "oncale.shtml"] = 0.5;
resetTimeout[programRootPath + "dfehvjarvis.shtml"] = 0.5;
resetTimeout[programRootPath + "385.php"] = 0.5;
resetTimeout[programRootPath + "385a.php"] = 0.5;
resetTimeout[programRootPath + "breyer_opinion.shtml"] = 0.5;
resetTimeout[programRootPath + "burlington.shtml"] = 0.5;
resetTimeout[programRootPath + "3853.php"] = 0.5;
resetTimeout[programRootPath + "3854.php"] = 0.5;
resetTimeout[programRootPath + "1025.php"] = 0.5;
resetTimeout[programRootPath + "409.php"] = 0.5;
resetTimeout[programRootPath + "409a.php"] = 0.5;
resetTimeout[programRootPath + "409c.php"] = 0.5;
resetTimeout[programRootPath + "maze.shtml"] = 0.5;
resetTimeout[programRootPath + "assistant_maze.shtml"] = 0.5;
resetTimeout[programRootPath + "117.php"] = 0.5;
resetTimeout[programRootPath + "218b.php"] = 0.5;
resetTimeout[programRootPath + "feha.shtml"] = 0.5;
resetTimeout[programRootPath + "dfeh_complaint.shtml"] = 0.5;
resetTimeout[programRootPath + "218d.php"] = 0.5;
resetTimeout[programRootPath + "crackerbarrel.shtml"] = 0.5;
resetTimeout[programRootPath + "rivera.shtml"] = 0.5;
resetTimeout[programRootPath + "520.php"] = 0.5;
resetTimeout[programRootPath + "nytimes.shtml"] = 0.5;
// ADD NEW PAGES UNDER THIS LINE

// Array of the number of minutes to give for a page if the user times out (default is defaultResetValue above)
// resetTime[PagePath] = Number of minutes to reset to
var resetTime = [];
//resetTime[programRootPath + "contact.shtml"] = 2;
resetTime[programRootPath + "114.php"] = 2;
resetTime[programRootPath + "instruct1.php"] = 2;
resetTime[programRootPath + "instruct2.php"] = 2;
resetTime[programRootPath + "mcginnis.shtml"] = 6;
resetTime[programRootPath + "150e.php"] = 2;
resetTime[programRootPath + "suders.shtml"] = 6;
resetTime[programRootPath + "150k.php"] = 2;
resetTime[programRootPath + "150ab.php"] = 2;
resetTime[programRootPath + "1005.php"] = 2;
resetTime[programRootPath + "216a.php"] = 2;
resetTime[programRootPath + "miller.shtml"] = 6;
resetTime[programRootPath + "220.php"] = 2;
resetTime[programRootPath + "219a.php"] = 2;
resetTime[programRootPath + "219b.php"] = 2;
resetTime[programRootPath + "hanlon.shtml"] = 6;
resetTime[programRootPath + "350.php"] = 2;
resetTime[programRootPath + "oncale.shtml"] = 6;
resetTime[programRootPath + "dfehvjarvis.shtml"] = 6;
resetTime[programRootPath + "385.php"] = 2;
resetTime[programRootPath + "385a.php"] = 2;
resetTime[programRootPath + "breyer_opinion.shtml"] = 2;
resetTime[programRootPath + "burlington.shtml"] = 6;
resetTime[programRootPath + "3853.php"] = 2;
resetTime[programRootPath + "3854.php"] = 2;
resetTime[programRootPath + "1025.php"] = 2;
resetTime[programRootPath + "409.php"] = 2;
resetTime[programRootPath + "409a.php"] = 2;
resetTime[programRootPath + "409c.php"] = 2;
resetTime[programRootPath + "maze.shtml"] = 4;
resetTime[programRootPath + "assistant_maze.shtml"] = 4;
resetTime[programRootPath + "117.php"] = 2;
resetTime[programRootPath + "218b.php"] = 2;
resetTime[programRootPath + "feha.shtml"] = 6;
resetTime[programRootPath + "dfeh_complaint.shtml"] = 2;
resetTime[programRootPath + "218d.php"] = 2;
resetTime[programRootPath + "crackerbarrel.shtml"] = 2;
resetTime[programRootPath + "rivera.shtml"] = 2;
resetTime[programRootPath + "520.php"] = 4;
resetTime[programRootPath + "nytimes.shtml"] = 2;
// ADD NEW PAGES UNDER THIS LINE

// Required pages
// requiredPage[PagePath] = Page Description
var requiredPage = [];
requiredPage[programRootPath + "520.php"] = "EDD Sexual Harassment Policy";

// Pages not to set as last visited (for coming back in)
// notLast[PagePath] = true
var notLast = [];
notLast[programRootPath + "exit.php"] = true;
notLast[programRootPath + "evalonli.php"] = true;
notLast[programRootPath + "evalprnt.php"] = true;
notLast[programRootPath + "evalthnk.php"] = true;
notLast[programRootPath + "contact.shtml"] = true;
notLast[programRootPath + "certend.php"] = true;
notLast[programRootPath + "finish.php"] = true;
notLast[programRootPath + "leavtest.php"] = true;
notLast[programRootPath + "test.htm"] = true;

// Warning/error messages
var warnMessageType = "alert"; // Whether to show notice (non disruptive) or alert (disruptive) warning

var alreadyLoggedIn = "You are already logged in either in another tab or window. Please Exit and Save that session before " +
	"logging in as another user.";
	
var warnMissingIdentifier = "You must enter the Last 4 Digits of your SSN.";
var errMsgNoWebService = "Your browser does not support JavaScript web service calls. You will need to use one " +
	"of the following to access this program: Internet Explorer 5.5 or greater, Firefox 2 or greater, Safari 3 " +
	"or greater, or Opera 8 or greater. Please download one of these browsers to use this program.";

var warnMsgMaxTime = "The maximum time you can accumulate on this page has been exceeded. " +
	"You can continue to view this page, but no more time will be added to the total elapsed time " +
	"for this program.";	

var warnMsgLostFocus = "This window has lost focus. Time will not accumulate unless this window has focus.<br>" +
	"\n<strong>Please click back in the window when you are ready to resume.</strong><br>";	

var warnMsgNotEnoughTime = "You have not spent at least 1 hour and 57 minutes, the required amount of time reviewing the material. You have spent [TOTAL_ELAPSED_TIME].  The next screen will provide a list of supplemental material you may have overlooked.";

var warnSessionTimedOut = "You tried to return to a bookmarked page or a page stored in the history of your browser after your session expired. You are being redirected to the login page to re-enter your credentials, after which you can choose to return to the last screen you visited.";
