﻿/*
RezSmartEngine GUI.Options Ver 1.0
Company: Sentient Technologies Inc.
Author: Ben Tupper
Created: 01/08/2008
Last Update: 04/28/2008
File Version: 1.05
Description:  Optional Parameters for GUI Generation
*/

/* Check to make sure core library and gui functions are loaded, if not throw an error */
var rezSmart;
if (!rezSmart || !rezSmart.DOMFunctions || !rezSmart.Widgets) throw new Error('rezSmart library not loaded. Add scripts/rzs-library.js to correct this error.');
if (!rezSmart.GUI || !rezSmart.GUI.Settings) throw new Error('rezSmart GUI file not loaded. Add scripts/rzs-gui.js to correct this error.');



/**********************************************************/
/***************** General GUI Settings *******************/
/**********************************************************/
/* GUI Settings */

rezSmart.GUI.Settings.siteId = 133;


rezSmart.GUI.Settings.postAction = 'http://airfares.sentienttechnology.com/farerequest.aspx';
rezSmart.GUI.Settings.defaultImagePath = 'images/'
rezSmart.GUI.Settings.searchingAnimation = 'images/new_searching.swf';
rezSmart.GUI.Settings.animationWidth = 275;
rezSmart.GUI.Settings.animationHeight = 100;

/* Gui State Cookie Timeout in minutes */
rezSmart.GUI.Settings.guiStateTimeout = 5;

/* GUI Layout class.  Predefined values are rzsHorizontalLayout or rzsVerticalLayout */
rezSmart.GUI.Settings.layout = 'rzsVerticalLayout';

/* default depart date and day offset values */
rezSmart.GUI.Settings.startDateOffset = 2;
rezSmart.GUI.Settings.nextDateOffset = 3;
rezSmart.GUI.Settings.travelDateFormat = 'MM/dd';

/* maximum number of allowed legs and add/remove leg text for mult-city */
rezSmart.GUI.Settings.maxLegs = 4;
rezSmart.GUI.Settings.addLegText = 'Add Trip';
rezSmart.GUI.Settings.removeLegText = 'Remove Trip';


/**********************************************/
/* DO NOT MODIFY engineMode UNLESS INSTRUCTED */
//rezSmart.GUI.Settings.engineMode = 'B2B';
/**********************************************/


/**********************************************************/
/************** Origin Destination Settings ***************/
/**********************************************************/
rezSmart.GUI.Settings.DefaultOrigin = '';
rezSmart.GUI.Settings.DefaultDestination = '';




/**********************************************************/
/****************** Trip Type Settings ********************/
/**********************************************************/
/* Values are 0 - Round Trip, 1 - One Way, 2 - Open Jaw, 3 - Multi-City
   However the text can be anything.  For example you want the text to display as Multi-City for B2C users but
   only give access to Open Jaw style functionality the setting would be:
   rezSmart.GUI.Options.tripTypes = [['Round Trip',0],['One Way',1],['Multi-City',2]]
*/
rezSmart.GUI.Settings.tripTypes = [['Round Trip',0],['One Way',1],['Multi-City',3]]
rezSmart.GUI.Settings.tripTypesDefault = 0;




/**********************************************************/
/**************** Time & Calendar Settings ****************/
/**********************************************************/
/* Calendar Settings */
rezSmart.Widgets.calendar.monthNames = ['January','February','March','April','May','June','July','August','September','October','November','December'];
rezSmart.Widgets.calendar.dayNames = ['S','M','T','W','T','F','S'];
rezSmart.Widgets.calendar.outputDateFormat = rezSmart.GUI.Settings.travelDateFormat;
rezSmart.Widgets.calendar.maxEnabledDays = 330;
rezSmart.Widgets.calendar.defaultImagePath = rezSmart.GUI.Settings.defaultImagePath;

/* Time Settings */
rezSmart.GUI.Settings.showTime = 1;
rezSmart.GUI.Settings.timeValues = [['Any Time','00:00:00'],['Morning','06:00:00'],['Afternoon','12:00:00'],['Evening','18:00:00']];
rezSmart.GUI.Settings.timeDefault = 0;




/**********************************************************/
/****************** PAX Type Settings *********************/
/**********************************************************/
/* PAX One will always be shown */
rezSmart.GUI.Settings.showPaxTwo = 0;
rezSmart.GUI.Settings.showPaxThree = 0;

/* [PAX Type Control Name,PAX Type Text,Age Text,Submit Id,List Values] */
rezSmart.GUI.Settings.paxOne   = ['Student','Student:','(14-36)','slAdult',[1,2,3,4,5,6]];
rezSmart.GUI.Settings.paxTwo   = ['Child','Child:','(2-11)','slChild',[0,1,2,3,4,5]];
rezSmart.GUI.Settings.paxThree = ['Infant','Infant:','(< 2)','slInfant',[0,1,2,3,4,5]];




/**********************************************************/
/******************** Search Options **********************/
/**********************************************************/
rezSmart.GUI.Settings.showAirline = 0;
rezSmart.GUI.Settings.showCabinPreference = 1;
rezSmart.GUI.Settings.showFareType = 0;
rezSmart.GUI.Settings.airlineText = 'Airline:';
rezSmart.GUI.Settings.cabinText = 'Cabin:';
rezSmart.GUI.Settings.fareTypeText = 'Fare Type:';

/* NOTE: The first item will be selected by default */
/* Cabin Preference values are 0 - First, 1 - Business, 2 - Economy */
rezSmart.GUI.Settings.cabinList = [['Economy',2],['First',0],['Business',1]]
rezSmart.GUI.Settings.cabinListDefault = 0;

/* NOTE: The first item will be selected by default */
/* Fare Type List values are 11 - All, 0 - General Market, 1 - Missionary, 2 - Humanitarian */
rezSmart.GUI.Settings.fareTypeList = [['All',11],['General Market',0],['Missionary',1],['Humanitarian',2]]
rezSmart.GUI.Settings.fareTypeDefault = 0;




/**********************************************************/
/****************** Validation Settings *******************/
/**********************************************************/
rezSmart.GUI.Settings.MAX_DAYS_MESSAGE = 'We apologize but due to airline restrictions tickets can not be booked past {0}';
rezSmart.GUI.Settings.MIN_DAYS_MESSAGE = 'We apologize but due to certain airline restrictions we cannot sell tickets before {0}.';
rezSmart.GUI.Settings.NO_WEEKEND_MESSAGE = 'We apologize but due to airline weekend restrictions we cannot sell tickets before {0}.'; 
rezSmart.GUI.Settings.EMPTY_INVALID_DATE_MESSAGE = 'Please Enter a valid Month and Day.';
rezSmart.GUI.Settings.EMPTY_AIRPORT_MESSAGE = 'Please Enter an Airport/City code or name.';
rezSmart.GUI.Settings.AIRPORTS_ARE_SAME_MESSAGE = 'Please change either your origin or destination airport/city.  They cannot be the same.';

rezSmart.GUI.Settings.MIN_DAYS = rezSmart.GUI.Settings.startDateOffset;
rezSmart.GUI.Settings.MAX_DAYS = rezSmart.Widgets.calendar.maxEnabledDays;

/* 
  the Day of Week considered for weekend rules. A maximum of 4 days can be specified.
  Friday = 5, Saturday = 6, Sunday = 7 and Monday = 1. A minimum of 2 days can be specified.
  Saturday, Sunday.  If the requested departure date falls on one of these days then the 
  search will be stopped and the NO_WEEKEND_MESSAGE message displayed to the user.
*/
rezSmart.GUI.Settings.WEEKEND_DAYS = [5,6,7,1];
rezSmart.GUI.Settings.APPLY_WEEKEND_RULES = 1;


/* max passengers */
rezSmart.GUI.Settings.MIN_PASSENGERS = 1;
rezSmart.GUI.Settings.MAX_PASSENGERS = 6;
