// ***
// *** Engine Javascript Setup ***
// ***


// *** Array of Supported browsers (uses the navigator.userAgent function) ***
var browser = new Array ('MSIE 6.0','MSIE 7.0', 'MSIE 8.0', 'Opera', 'Firefox', 'Safari');
// *** Array of Supported Platforms (uses the navigator.platform function) ***
var os = new Array ('Win32', 'Linux', 'MacPPC', 'Mac');
// *** Redirect URL for unsupported Browsers and Platforms
unsuppRedirURL = 'http://webengine.forth-crs.gr/english/_browse/notcomp2.htm';

// *** Passenger Values ***
var totPass = 9;
var defPass = 2;

// *** Vehicle Values ***
var totVeh  = 4;
var defVeh  = 0;

// *** RoundTrip Engine ***
// RoundTrip = 'R' (roundtrip engine) or 
// 						 'M' (multileg engine)  or
// 						 'L' (multileg engine Locked on leg2i)
var roundtrip = 'R';

// *** Date Validation  ***
// Defines the invalid operator for the Date of the Incoming Route
// GT  = Greater Than (Incoming MUST BE GREATER Than Ougoing)
// GTE = Greater Than Or Equal (Incoming MUST BE GREATER OR EQUAL Than Ougoing)
var dtValidation = 'GTE';

// *** Template CSS Definition ***
var templateCSS        = '_forth_crs.css';  

// *** Various Consts  ***
var sitelanguage       = 'EN';	  // The Language of the site (EN, IT) in order to build the calendar captions
var rvDaysGap          = 3;       // Number of days between today and reservation day, we allow reservations
var lnDaysGap	       = 0;       // Number of days between today and search day for itineraries//added 27-09-2005 (recall process)
var multiLegEngine     = false;	  // If multileg option is enabled
var showCourrier       = false;    // If has courrier on step 5
var showCourrierMinVal = 0;       // Min TotalValue required to show Courrier
var autoSelectWhole    = true;    // Auto Select "Whole" on Step2 when "Class of Type > 1"
var VehicleLicenseStep = 2;       // The step (2 or 4) where we're asking the Vehicle License Number
var showCompanyVessel  = true;    // If the company of the vessel is shown on ViewAllRoutes
var showRouteInfo      = false;	  // Show the basic fares and Route details, as the 1st machine
var handlingFeesCtrl   = 0;       // Controls the division with the Included Handling Fees on Step 5
				    // 0 = no service fee at all				     // If 0, I don't care about the value of the var 'handlingFees' 
				    // 1 = service fee in total price (including courier cost) // If 1 the handling fees are calculated on the total (reservation + courrier)
				    // 2 = service fee only in ticket price		     // If 2 the  handling fees are calculated on reservation only
                                  // Changed with '0' in following routines
var handlingFees       = 0;       // Handling Fees %, INCLUCED on the total Price
var serviceFeePrice    = 0;	  // Flat Service Fee added at the ticket price
var showContactComments= false;   // If the <#CONTACTCOMMENTS> on Step 5 will be visible 
var showVehicleSelect  = true;   // If we're showing the vehicle select
var showRouteAtTitle   = false;   // If the Route is shown on ViewAllRoutes.
var showKioskComp      = false;  // If the kiosk radio button is shown(PTA) 
var cbmDimension       = 165;     //Change dimension cmb trip oneway, rountrip, multileg 
var no_delivery        = false;   //step5 non delivery and our office
var terms_coditions    = false;    //show the checkbox for terms&conditions step5

// Setup for Accomodation (Step 2)
var hasInfant          = true;		// If the company supports Infants
var hasStudent         = false;		// If the company supports Students
var childrenTravelAlone= false;		// If the Child can travel alone
var showWholeRadio     = false;		// If the Whole radion is visible
var showSharedRadio    = false;		// If the Shared radion is visible
var OnlyInfantOnType9  = true;	    // Only Infants are traveling on Accomodation with type 9
var radio_step2        = false;      //Close to step2 the radio buttons.  
var farequotation      = false;      //Show Fare Quotation
var showinternational  = true;       //show step4 PassIDLeg, BirthDateLeg input
var bookservices       = false;     
var onlyfly            = false;
var jsbankEnable       = true;    //Banck and close Browser
var showweather        = true;   //oneway roundtrip
var showcurrencies     = true;   //stp3 and step5
var freeports          = false;   //Free ports to roundtrip. Change var roundtrip = 'R' with 'M'  
var bookservices       = false;     
var change_reserv      = false;   //enable button Change Reservation (page result_reservation.html) 



// *** Code for Logo
var headerLogo ='<table width=\"784\"border=\"0\"cellpadding=\"0\"cellspacing=\"0\"height=\"90\">';
		headerLogo = headerLogo + '<tr>';
		headerLogo = headerLogo + '<td>';
		headerLogo = headerLogo + '<table width=\"100%\"border=\"0\"cellspacing=\"0\"cellpadding=\"0\">';
		headerLogo = headerLogo + '<tr>';
		headerLogo = headerLogo + '<td><img src=\"_images/logo_f.gif\"width=\"358\"height=\"90\"alt=\"\"></td>';
		headerLogo = headerLogo + '<td align=\"right\"background=\"_images/topMenu_f.gif\"valign=\"top\"width=\"426\">';
		headerLogo = headerLogo + '<table border=\"0\"cellpadding=\"0\"cellspacing=\"0\"height=\"90\"width=\"290\">';
		headerLogo = headerLogo + '<tbody>';
		headerLogo = headerLogo + '<tr>';
		headerLogo = headerLogo + '<td colspan=\"2\"align=\"right\"valign=\"top\">&nbsp;';
		headerLogo = headerLogo + '</td>';
		headerLogo = headerLogo + '</tr>';
		headerLogo = headerLogo + '<tr>';
		headerLogo = headerLogo + '<td class=\"topmenu\"align=\"right\"height=\"30\">';
		headerLogo = headerLogo + '</td>';
		headerLogo = headerLogo + '<td class=\"topmenu\"height=\"30\"width=\"135\"></td>';
		headerLogo = headerLogo + '</tr>';
		headerLogo = headerLogo + '</tbody>';
		headerLogo = headerLogo + '</table>';
		headerLogo = headerLogo + '</td>';
		headerLogo = headerLogo + '</tr>';
		headerLogo = headerLogo + '</table>';
		headerLogo = headerLogo + '</td>';
		headerLogo = headerLogo + '</table>';
// *** End of Code for Logo




// **** 
// **** DON'T TOUCH ANYTHING FROM HERE ***
// **** 



// ****  Fix Handling Fees
if (handlingFeesCtrl == 0) {	
	handlingFees = 0;
}


// **** 
// *** END OF DON'T TOUCH CODE
// **** 