// ***
// *** Engine Javascript Setup ***
// ***


// *** Array of Supported browsers (uses the navigator.userAgent function) ***
var browser = new Array ('MSIE', 'Opera', 'Firefox');
// *** Array of Supported Platforms (uses the navigator.platform function) ***
var os = new Array ('Win32', 'Linux');
// *** Redirect URL for unsupported Browsers and Platforms
unsuppRedirURL = 'http://www.forth-crs.gr/notcomp2.htm';

// *** Passenger Values ***
var totPass = 6;
var defPass = 2;

// *** Vehicle Values ***
var totVeh  = 2;
var defVeh  = 0;

// *** RoundTrip Engine ***
// RoundTrip = 'R' (roundtrip engine) or 
// 						 'M' (multileg engine)  or
// 						 'L' (multileg engine Locked on leg2i)
var roundtrip = 'M';

// *** 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        = '_master_kosova_lines.css';  

// *** Various Consts  ***
var sitelanguage       = 'EN';	  // The Language of the site (EN, IT) in order to build the calendar captions
var rvDaysGap          = 1;       // 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    = false;   // 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 showHandlingFees   = false;   // If show the division with the Included Handling Fees on Step 5
                                  // If false, I don't care about the value of the var 'handlingFees' 
                                  // Changed with '0' in following routines
var handlingFees       = 0;       // Handling Fees %, INCLUCED on the total Price
var showContactComments= false;   // If the <#CONTACTCOMMENTS> on Step 5 will be visible 
var showVehicleSelect  = true;    // If we're showing the vehicle select
var cbmDimension       = 165;     //Change dimension cmb trip oneway, rountrip, multileg 
var showRouteAtTitle   = false;   // If the Route is shown on ViewAllRoutes.
var autoSelectRoute    = true;    // If the autoSelect (check) from Vasilis of the unique route will work or will be reseted. 



// 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 autoSelectWhole    = true;         // Auto Select "Whole" on Step2 when "Class of Type > 1"
var OnlyInfantOnType9  = true;		// Only Infants are traveling on Accomodation with type 9
var cbmDimension       = 165;          //Change dimension cmb trip oneway, rountrip, multileg 


// *** Code for Logo
                var headerLogo = '<table width=\"784\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">';
       headerLogo = headerLogo + '<tr>';
       headerLogo = headerLogo + '<td>';
       headerLogo = headerLogo + '<img width=\"784\" height=\"110\" src=\"_images/logo.gif\">';
       headerLogo = headerLogo + '<div style=\"position:absolute;top:40px;left:100px;overflow:hidden;font-size:27px;font-weight:bold;\" class=\"mainTitleLight\">Kosovo Lines</div>';
       headerLogo = headerLogo + '</td></tr>';
       headerLogo = headerLogo + '</table>';
// *** End of Code for Logo


// **** DON'T TOUCH ANYTHING FROM HERE ***
// **** 


// ****  Initialize Dates according "dtValidation"
var Today = new Date();
var dateFrom = new Date(Today.getFullYear(), Today.getMonth(), Today.getDate() + rvDaysGap);
var dateFromF = formatDate(dateFrom, 'dd/MM/yyyy');

//added 27-09-2005 (recall process)
var dateFrom2 = new Date(Today.getFullYear(), Today.getMonth(), Today.getDate() + lnDaysGap);
var dateFromF2 = formatDate(dateFrom2, 'dd/MM/yyyy');


if ( dtValidation == 'GT' ) {
	dtValidErrMessage = 'Inbound date must be after the outbound date.';
	var dateTo = new Date(dateFrom.getFullYear(), dateFrom.getMonth(), dateFrom.getDate() + 1);
} else {
	dtValidErrMessage = 'Outbound date cannot be after the inbound date.';
	var dateTo = dateFrom;
}
var dateToF = formatDate(dateTo, 'dd/MM/yyyy'); 


// ****  Fix Handling Fees
if (! showHandlingFees) {	
	handlingFees = 0;
}


// **** 
// *** END OF DON'T TOUCH CODE
// **** 
