/*#############################################################################

FILE:	navigate.js

	Copyright © 2005 Navitaire Inc. All rights reserved.

	This source code is (i) proprietary to and a trade secret of Navitaire Inc.
	and (ii) protected by copyright law and international treaties.
	Unauthorized disclosure, reproduction, distribution or alteration of this
	source code, or any portion of it, may result in severe civil and criminal
	penalties and will be prosecuted to the maximum extent possible under
	the law.

	www.navitaire.com

DESCRIPTION:

	Contains javascript for navigation within skylights.

#############################################################################*/

// Begin Login Submit Form javascript

/*###############################
#
# Function: navigate()
#
# Parameter: 	'module' 	- whether SB, MP...
#		'page'		- Pages as defined in Static prefs
#		'language'	- language input
#		'action'	- action input
#
# Description: Handles what page is to be loaded when the navigation buttons are pressed
#
#
#################################*/	

	function navigate(module, page, language, action)
	{
		if (module)
		{
			document.nav.module.value = module;
		}

		if (page)
		{
			document.nav.page.value = page;
			
			// For SSO only - AK custom fuction
			if (page == "MEMBER_PROFILE1")
			{
				document.nav.page.value = "MEMBER_PROFILE";
				if (document.nav.akSSO)
					document.nav.akSSO.value = "y";
			}
		}

		if (action)
		{
			document.nav.action = action;
		}

		if (language)
		{
			document.nav.language.value = language;
		}

		//this event allows us to distiguish between coming to
		//a page from the navigate method, or some other method
		//
		document.nav.event.value = "nav";
		document.nav.submit();
	}
