﻿// ----------------------------
// KNOWLEDGE MAP USER VARIABLES
// ----------------------------
// Copyright (c) 2004-2007 The Salamander Organization Ltd.  All Rights Reserved.
//
// THIS WORK IS SUBJECT TO U.K. AND INTERNATIONAL COPYRIGHT LAWS AND TREATIES.
//
// DISCLAIMER:
//
// The Salamander Organization Ltd. (hereto referred as "Salamander") makes no representations or warranties
// with respect to the contents or use of this code, and specifically disclaims any express or implied
// warranties of merchantability or fitness for any particular purpose.  Further, Salamander reserves the right
// to revise this publication and to make changes to its content, at any time, without obligation to notify any
// person or entity of such revisions or changes.
//
// Further, Salamander makes no representations or warranties with respect to any software, and specifically
// disclaims any express or implied warranties of merchantability or fitness for any particular purpose.  Salamander
// reserves the right to make changes to any and all parts of the software, at any time, without obligation to notify
// any person or entity of such changes.
//
// Inclusion of the above notice does not necessarily imply publication.


// ##########################################################
// ### default pngcorrector.js variables ####################

// how many PNG images should be attempt to apply transparency to
// default is 200, but faster machines may be able to cope with larger numbers (1000, 10000?)
var maxImagesToProcess = 200;



// ##########################################################
// ### default page_nav.js / page_nav_layout.js variables ###

// -- these are DEFAULT settings only - main settings made in response to User Tags below

// display the "Top of the Page" link?
// true shows a "Top of the page" link in the nav bar, recommend false for no "Top of the page" link
var displayTopNav = false;

// show empty page sections?
// true allows the display of empty sections and their navigation on a page - recommend false for best look and feel
var showEmptySections = false;

// what happens when you click on a navigation link (uncomment ONLY ONE at a time)
//DoNavClickEvent = DoNothing;  // clicking a navigation link does nothing
//DoNavClickEvent = DoNavClickEvent_ScrollToSection;  // scrolls section into view
//DoNavClickEvent = DoNavClickEvent_ToggleSection;  // toggle display of section
//DoNavClickEvent = DoNavClickEvent_ToggleSectionAndScroll;  // toggle display of section, then scroll section into view if showing it
//DoNavClickEvent = DoNavClickEvent_ShowSection;  // show a section, or if already displayed do nothing
DoNavClickEvent = DoNavClickEvent_ShowSectionAndScroll;  // show a section and scroll it into view, or if already displayed just scroll into view
//DoNavClickEvent = DoNavClickEvent_ShowOnlySection;  // hide all sections, then show only this section (ensuring it is in view too)

// what happens when you click on a section title (uncomment ONLY ONE at a time)
//DoSectionTitleClickEvent = DoNothing;  // clicking a section title does nothing
DoSectionTitleClickEvent = ScrollToPageTop;  // scroll back to top of page
//DoSectionTitleClickEvent = DoSectionTitleClickEvent_HideSection;  // hide a section
//DoSectionTitleClickEvent = DoSectionTitleClickEvent_HideSectionAndScroll;  // hide a section, then scroll to top of page

// maximum number of stored page states, where 0 is "do not store page states"
// -- keep at a value of 18 or less, recommended values of 0 or 1 or 5 or 8
var maxStoredPageStates = 5;

// expand all page sections on page initialisation?
// true expands all sections, false uses the default page layout
var expandAllSections = false;

// check for the MooD Web Plugin?
// true checks that the plugin object can be created and displays a warning if it can't be, false avoids all this
var checkForPlugin = false;


// ###############################################
// ### default knowledge_resource.js variables ###

// maximum number of stored resource menu states, where 0 is "do not store resource menu states"
// -- keep at a value of 18 or less, recommended values of 0 or 1 or 5 or 8
var maxStoredResMenuStates = 1;


// #####################################
// ### default func_lib.js variables ###

// -- these are DEFAULT settings only - main settings made in response to User Tags below

// use cookies to save navigation bar auto-hide state?
var useAutoHideCookieSettings = true;

// use the individual auto-hide settings provided by each page?
var usePageAutoHideSettings = false;

// true for "by default, auto-hide", false for "by default, do not auto-hide"
var defaultAutoHide = false;

// text use for the auto-hide toggle link
var autoHideOffText = "Hide navigation";  // when the nav bar auto-hides
var autoHideOnText = "Pin Navigation";  // when the nav bar stays open

// powered by logo
var poweredbyLogo = "Images/tso_images/powered_by_mood.gif";


// ################################
// ### kindex_func.js variables ###

// -- these are written out by MooD Web Publisher - modify for global post-publication changes

var helpLink = "Processes/4/1C68164315AC218A643DBDEC45.htm";
var faqLink = "HelperPages/faq.htm";
var homeLink = "Processes/A/D329E9A552654C3BB102CF0BD0A2766B.htm";
var startLink = "Processes/9/036415935E7D46B5AD676EFFE0E0C0D5.htm";
var architectureRVLink = "start/Default.htm";

var generationDate = "Tuesday, May 04, 2010";
var kmapName = "LCIA 4.0";
var footerText = "&#169; Ministry of Defence";
var copyrightText = "&#169; Ministry of Defence";

var feedbackAddress = "DESLogNECProg-FLIS-BIA-BM@mod.uk";

var outputExtension = ".htm";

var logoTopLeft = "Images/mod_images/modcrest.png";
var logoTopRight = "Images/mod_images/ukceb.png";


// #############################
// ### MooD-parsed user tags ###

// -- these are written out by MooD Web Publisher - modify for global post-publication changes

// --- use these MooD User Tags to override the defaults ? ---
// Options are:
//		true			(recommended)
//		false
var user_useMooDTags = "true";

// --- Display the "Top of the Page" link? ---
// Options are:
//		true
//		false			(recommended)
var user_displayTopNav = "false";

// --- Show empty page sections? ---
// Options are:
//		true
//		false			(recommended)
var user_showEmptySections = "false";

// --- What action should be taken when clicking on a section name in the left hand navigation? ---
// Options are:
//		noaction		(clicking a navigation link does nothing)
//		scroll			(scrolls section into view)
//		toggle			(toggle display of section)
//		toggleandscroll	(toggle display of section, then scroll section into view if showing it)
//		show			(show a section, or if already displayed do nothing)
//		showandscroll	(show a section and scroll it into view, or if already displayed just scroll into view)
//		showonly		(hide all sections, then show this one)
var user_navClickEvent = "toggleandscroll";

// --- What action should be taken when clicking on a section title in the main content area? ---
// Options are:
//		noaction		(clicking a section title does nothing)
//		scroll			(scroll back to top of page)
//		hide			(hide a section)
//		hideandscroll	(hide a section, then scroll to top of page)
var user_sectionClickEvent = "scroll";

// --- Use cookies to save navigation bar auto-hide state? ---
// Options are:
//		true			(recommended)
//		false
var user_useAutoHideCookieSettings = "true";

// --- Use the individual auto-hide settings provided by each page? ---
// Options are:
//		true
//		false			(recommended)
var user_usePageAutoHideSettings = "false";

// --- What is the default navigation bar display state? ---
// Options are:
//		show			(initially, show the navigation)
//		hide			(initially, hide the navigation)
var user_defaultAutoHide = "hide";

// --- What text is used for the auto-hide toggle link? ---
var user_autoHideOffText = "Navigation Auto-Hides\n(click here to keep it open)";
var user_autoHideOnText = "Navigation Stays Open\n(click to make it auto-hide)";

// --- How many separate page states should be stored at once? ---
var user_maxStoredPageStates = "5";

// --- How many separate resource menu states should be stored at once? ---
var user_maxStoredResMenuStates = "1";

// --- Should we expand all page sections initially? ---
var user_expandAllSections = "true";

// --- Should we check to see if the MooD Web Plugin is installed? ---
var user_checkForPlugin = "false";


// ###########################
// ### USER TAG PROCESSING ###

// -- there are NO user-modifiable variables in this section

var useMooDTags = true;
user_useMooDTags = user_useMooDTags.toLowerCase();

switch(user_useMooDTags)
{
	case "true" :
		useMooDTags = true;
		break;
	case "false" :
		useMooDTags = false;
		break;
	default :
		// use defaults from above
		break;
}


if (useMooDTags)
{

	// --- Display the "Top of the Page" link? ---

	user_displayTopNav = user_displayTopNav.toLowerCase();

	switch(user_displayTopNav)
	{
		case "true" :
			displayTopNav = true;
			break;
		case "false" :
			displayTopNav = false;
			break;
		default :
			// use defaults from above
			break;
	}

	// --- Show empty page sections? ---

	user_showEmptySections = user_showEmptySections.toLowerCase();

	switch(user_showEmptySections)
	{
		case "true" :
			showEmptySections = true;
			break;
		case "false" :
			showEmptySections = false;
			break;
		default :
			// use defaults from above
			break;
	}

	// --- What action should be taken when clicking on a section name in the left hand navigation? ---

	user_navClickEvent = user_navClickEvent.toLowerCase();
	
	switch(user_navClickEvent)
	{
		case "noaction" :
			DoNavClickEvent = DoNothing;  // clicking a navigation link does nothing
			break;
		case "scroll" :
			DoNavClickEvent = DoNavClickEvent_ScrollToSection;  // scrolls section into view
			break;
		case "toggle" :
			DoNavClickEvent = DoNavClickEvent_ToggleSection;  // toggle display of section
			break;
		case "toggleandscroll" :
			DoNavClickEvent = DoNavClickEvent_ToggleSectionAndScroll;  // toggle display of section, then scroll section into view if showing it
			break;
		case "show" :
			DoNavClickEvent = DoNavClickEvent_ShowSection;  // show a section, or if already displayed do nothing
			break;
		case "showandscroll" :
			DoNavClickEvent = DoNavClickEvent_ShowSectionAndScroll;  // show a section and scroll it into view, or if already displayed just scroll into view
			break;
		case "showonly" :
			DoNavClickEvent = DoNavClickEvent_ShowOnlySection;  // hide all sections, then show only this section (ensuring it is in view too)
			break;
		default :
			// use defaults from above
			break;
	}

	// --- What action should be taken when clicking on a section title in the main content area? ---

	user_sectionClickEvent = user_sectionClickEvent.toLowerCase();

	switch(user_sectionClickEvent)
	{
		case "noaction" :
			DoSectionTitleClickEvent = DoNothing;  // clicking a section title does nothing
			break;
		case "scroll" :
			DoSectionTitleClickEvent = ScrollToPageTop;  // scroll back to top of page
			break;
		case "hide" :
			DoSectionTitleClickEvent = DoSectionTitleClickEvent_HideSection;  // hide a section
			break;
		case "hideandscroll" :
			DoSectionTitleClickEvent = DoSectionTitleClickEvent_HideSectionAndScroll;  // hide a section, then scroll to top of page
			break;
		default :
			// use defaults from above
			break;
	}

	// --- Use cookies to save navigation bar auto-hide state? ---
	
	user_useAutoHideCookieSettings = user_useAutoHideCookieSettings.toLowerCase();

	switch(user_useAutoHideCookieSettings)
	{
		case "true" :
			useAutoHideCookieSettings = true;
			break;
		case "false" :
			useAutoHideCookieSettings = false;
			break;
		default :
			// use defaults from above
			break;
	}

	// --- Use the individual auto-hide settings provided by each page? ---
	
	user_usePageAutoHideSettings = user_usePageAutoHideSettings.toLowerCase();

	switch(user_usePageAutoHideSettings)
	{
		case "true" :
			usePageAutoHideSettings = true;
			break;
		case "false" :
			usePageAutoHideSettings = false;
			break;
		default :
			// use defaults from above
			break;
	}

	// --- What is the default navigation bar display state? ---
	
	user_defaultAutoHide = user_defaultAutoHide.toLowerCase();

	switch (user_defaultAutoHide)
	{
		case "hide" :
			defaultAutoHide = true;
			break;
		case "show" :
			defaultAutoHide = false;
			break;
		default :
			// use defaults from above
			break;
	}

	// --- What text is used for the auto-hide toggle link? ---

	// concatenated these make up the default MooD tags for comparison to make sure the tags have been parsed
	var offTextTag = "__" + "NAV_AUTOHIDE_OFF_TEXT" + "__";
	var onTextTag = "__" + "NAV_AUTOHIDE_ON_TEXT" + "__";

	if (user_autoHideOffText != "" && user_autoHideOffText != offTextTag)
	{
		autoHideOffText = user_autoHideOffText;
	}
	if (user_autoHideOnText != "" && user_autoHideOnText != onTextTag)
	{
		autoHideOnText = user_autoHideOnText;
	}

	// --- How many separate page states should be stored at once? ---
	
	var system_maxStoredPageStates = parseInt(user_maxStoredPageStates, 10);
	
	// check that we've got a number and that the number is greater than zero before using the value provided
	if (isNaN(system_maxStoredPageStates) || (system_maxStoredPageStates < 0))
	{
		// use defaults from above
	}
	else
	{
		maxStoredPageStates = system_maxStoredPageStates;
	}
	
	// --- How many separate resource menu states should be stored at once? ---
	
	var system_maxStoredResMenuStates = parseInt(user_maxStoredResMenuStates, 10);
	
	// check that we've got a number and that the number is greater than zero before using the value provided
	if (isNaN(system_maxStoredResMenuStates) || (system_maxStoredResMenuStates < 0))
	{
		// use defaults from above
	}
	else
	{
		maxStoredResMenuStates = system_maxStoredResMenuStates;
	}

	// --- Should we expand all page sections initially? ---
	
	user_expandAllSections = user_expandAllSections.toLowerCase();

	switch (user_expandAllSections)
	{
		case "true" :
			expandAllSections = true;
			break;
		case "false" :
			expandAllSections = false;
			break;
		default :
			// use defaults from above
			break;
	}

	// --- Should we check to see if the MooD Web Plugin is installed? ---
	
	user_checkForPlugin = user_checkForPlugin.toLowerCase();
	
	switch (user_checkForPlugin)
	{
		case "true" :
			checkForPlugin = true;
			break;
		case "false" :
			checkForPlugin = false;
			break;
		default :
			// use defaults from above
			break;
	}
}
