


/*config_login.js ***THIS FILE MUST COME AFTER SFC_LOGIN***
Contains configuration variables for sfc_inserts.js.
This function, configure_inserts(), MUST be run before any course-specific functions

Revision History
Keys: [NEW] New Feature
      [FIX] Bug fix
      [COM] Comment
      [IMP] Improvement

2007/04/30 [NEW] Split old config_inserts.js into 2 files - this config_inserts.js and new sfc_inserts.js.
	See sfc_inserts.js for previous revision history
*/

//////////////////// CONFIGURATION VARIABLES //////////////////////
//
	pisRecordUserToServer = true;  //whether or not to record current user data to server - causes add_user() function (in sfc_login.js) to call recordUserToServer() , also defined on this page
//alert("config-pisRecordUserToServer="+pisRecordUserToServer)
	
	//the two following "Split" vars are used to automatically determine the course ID from the course url
	psCourseIDSplitBefore = 'cbt/c';  //the unique (but same for every course) part of the url immediately preceding the course id
	psCourseIDSplitAfter = '-';  //the unique  (but same for every course) part of the url immediately following the course id

	psCourseID = '08';  //set this as a backup failsafe if you want - it is only used if above splits fail
	sStartPage = 'start.htm';  //the filename of the first page user sees - the "welcome" page.  Storing this filename here ensures all functions that may send user there go to correct page.

	gsPopupBlockedMsg = 'It looks like the course window has been blocked by popup blocking software.';
	gsPopupBlockedMsg += '\n\nThis course makes use of popups throughout, but don\'t worry, none of them contain any advertising...';
	gsPopupBlockedMsg += '\n\nIn order to access the course, click the "To open the course again, click here" link.';
	gsPopupBlockedMsg += '\n\nIf you get this message again, you\'ll have to set your popup blocking software to allow popups from this web address first (or your CD-ROM drive - see your popup blocker documentation), and then click the "To open the course again, click here" link.';

	function on_load_this_course() {  //called by onload() (after all it's stuff but before onload_this_page() ) in sfc_login.js - lets you do stuff to every login page within this course
//alert("navigator.platform= "+navigator.platform);
	}
	
	function validate_form_this_course() {  //called by validate_form() in sfc_login.js after Submit button pressed but before form submitted.  Use this to validate any course-specific user account fields.  return true if all are valid (or none are validated), alert() the problem and return false if not.
		isFormValid = false;
		if (document.theForm.ddAgency.selectedIndex == 0) alert('You must select an Agency type.');
		else if (document.theForm.ddRole.selectedIndex == 0) alert('You must select a Role.');
		else if (document.theForm.ddCounty.selectedIndex == 0) alert('You must select a county.');
		else isFormValid = true;
		return isFormValid;
	}
