/*#############################################################################

FILE:	openCalendar.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 to open the interactive calendar.

#############################################################################*/


/*###############################
#
# Function: openCalendar()
#
# Parameter: 	'sector' 		- which market
#		'dayControlName'	- day on load
#		'monthControlName'	- month on load
#		'url'			- the address of the new window
#
# Description: Opens a new window that shows the calendar form
#
#
#################################*/	

	function openCalendar(sector, dayControlName, monthControlName, url)
	{
		if ( window.calendarWindow && ! calendarWindow.closed )
		{
			calendarWindow.focus();
		}
		else
		{
			document.skyForm.month_selected.value
				= eval('document.skylightsForm.' + monthControlName + '.selectedIndex');
			document.skyForm.sector.value 	= sector;
			document.skyForm.dayControl.value 	= dayControlName;
			document.skyForm.monthControl.value 	= monthControlName;
			calendarWindow 	= window.open(url,"calendar","width=250,height=251,toolbar=0,status=0,location=0,menubar=0,scrollbars=0,resizable=0");
		}
	}
