/*************************************************************************************************************************** UTILITIES JS LIBRARY V2.0 IMP DATE: 13/11/2007 LAST MODIFIED: 08/11/2007 AUTHOR: OLIVER AMMANN (1.) CALENDAR AND DATE VALIDATION FUNCTIONS (2.) E-RETAIL CONNECTOR FUNCTIONS ***************************************************************************************************************************/ /********************* (1.) CALENDAR AND DATE VALIDATION FUNCTIONS *********************/ // Gets and sets current day and month for departures function initDate(fName, depMonth, depDay, ap) { var theForm = fName; var today = new Date(); var numDaysInfuture = new Date(); numDaysInfuture.setDate(today.getDate()+parseInt(ap)); fMonth = numDaysInfuture.getMonth(); fDay = numDaysInfuture.getDate(); // Set our departure day and month depMonth.selectedIndex = fMonth; depDay.selectedIndex = fDay-1; // Update day and month values updateReturnDate(theForm); } // Checks that selected dates do not exceed 329 days from today and that dates are in chronological order function checkDateRange(getMonth, getDay, getObYear, getObMonth, getObDay, maxRange, orIbCheck) { var isValid = true; // Selected date values var year = getYear(getMonth, getDay); var month = parseInt(getMonth); var day = parseInt(getDay); // Outbound date values var obYear = parseInt(getObYear); var obMonth = parseInt(getObMonth); var obDay = parseInt(getObDay); var legalRange = new Date(); if (!orIbCheck) { if (obYear > year) { year++; } if (obYear == year) { if (month < obMonth) { year++; } else if (month == obMonth && day < obDay) { year++; } } } legalRange.setDate(legalRange.getDate() + maxRange); var lrYear = legalRange.getUTCFullYear(); var lrMonth = legalRange.getUTCMonth()+1; var lrDay = legalRange.getUTCDate(); var lrDate = new Date(lrYear, lrMonth, lrDay); var selectedDate = new Date(year, month, day); if (selectedDate > lrDate) { isValid = false; } return isValid; } // Determines year depending on selected dates function getYear(getMonth, getDay) { var year; var month = parseInt(getMonth); var day = parseInt(getDay); var date = new Date(); if (month <= date.getUTCMonth()+1) { if (month == date.getUTCMonth()+1 && day < date.getUTCDate()) { year = date.getUTCFullYear() + 1; } else if (month < date.getUTCMonth()+1) { year = date.getUTCFullYear() + 1; } else { year = date.getUTCFullYear(); } } else { year = date.getUTCFullYear(); } return year; } // Launch language specific calendar popup (adapted from aa.com) function launchCalendar(calForm, formName,langVal){ var urlVer; if (langVal == 'll') { urlVer = '/intl/de/apps/common/calendar.jsp'; } else if (langVal == 'en') { urlVer = '/intl/de/apps/common/calendar_en.jsp'; } eval('document.'+formName+'.currentCalForm.value = calForm'); var calWin = window.open(urlVer,formName,'scrollbars=no,menu=no,width=300,height=165,top=125,left=325'); calWin.focus(); } // Date validation for selected dates (Adapted from aa.com) function leapYear(theYear) { if ( ((theYear % 4 == 0) && (theYear % 100 != 0)) || (theYear % 400 == 0) ) { return true; } else { return false; } } /* *** Set the return month and day to two days after the departure month and day. [chalsted] ER #9196 *** */ function updateReturnDate(formName) { var d = new Date(); var dYear = d.getFullYear(); var dDay = formName.departureDay.selectedIndex; var dMonth = formName.departureMonth.selectedIndex; var today = new Date(); var threeDaysInfuture = new Date(); threeDaysInfuture.setDate(today.getDate() + 3); /* Start of ER 12182 :ER - Return Date should not default to Outbound + 2 * if return date has been specified by user */ var rDy = formName.returnDay.selectedIndex; var rMon = formName.returnMonth.selectedIndex; //var changed = true; //if((rDy == threeDaysInfuture.getDate() - 1) && (rMon == threeDaysInfuture.getMonth())) //changed = false; /** * */ //if(changed == true && formName.changed == null) //new page - keep date changes // return; var rYr = d.getFullYear(); // for next year if (formName.returnMonth.selectedIndex < d.getMonth()){ rYr = rYr+1; } // for next year if (formName.departureMonth.selectedIndex < d.getMonth()){ dYear = dYear+1; } rDate = new Date(rYr, rMon, rDy); dDate = new Date(dYear, dMonth, dDay+2); // end of ER 12182 : var rYear = dYear; var rMonth = '0'; var rDay = '0'; // 30 Days: April-3 June-5 September-8 November-10 // 31 Days: January-0, March-2, May-4, July-6, August-7, October-9, December-11 // 28 Days: February-1 // For Months with 31 days if ( (dMonth == '0' || dMonth == '2' || dMonth == '4' || dMonth == '6' || dMonth == '7' || dMonth == '9' || dMonth == '11' )){ if (dDay == '29') { rDay = '0'; // If December, set month back to '0' for January if (dMonth == '11') { rMonth = '0'; } else { rMonth = dMonth + 1; } } else if (dDay == '30') { rDay = '1'; // If December, set month back to '0' for January if (dMonth == '11') { rMonth = '0'; } else { rMonth = dMonth + 1; } } else { rDay = dDay + 2; rMonth = dMonth; } // For Months with 30 days } else if ((dMonth == '3' || dMonth == '5' || dMonth == '8' || dMonth == '10' )) { /* test for invalid dates */ if (dDay == '30' || dDay == '31') { dDay = '29'; eval (formName.departureDay.selectedIndex = dDay); } if (dDay == '28') { rDay = '0'; rMonth = dMonth + 1; } else if (dDay == '29') { rDay = '1'; rMonth = dMonth + 1; } else { rDay = dDay + 2; rMonth = dMonth; } // For February, check for leapyear. } else if (dMonth == '1') { /*********************************************************** 13 Apr 07 - Updated validation to take account of leap year [O.Ammann] ***********************************************************/ // Check to see if Feb 29, 30, or 31 is selected for NON-leapyear. // If so, set departure date to Feb 28. if (!leapYear(rYear)) { if (dDay == '28' || dDay == '29' || dDay == '30') { dDay = '27'; eval (formName.departureDay.selectedIndex = dDay); } } else if (leapYear(rYear)) { if (dDay == '29' || dDay == '30') { dDay = '28'; eval (formName.departureDay.selectedIndex = dDay); } } if ((leapYear(rYear) && dDay == '27') || (!leapYear(rYear) && dDay == '26')) { rDay = '0'; rMonth = dMonth + 1; } else if ((leapYear(rYear) && dDay == '28') || (!leapYear(rYear) && dDay == '27')) { rDay = '1'; rMonth = dMonth + 1; } else { rDay = dDay + 2; rMonth = dMonth; } } //check to see if on different page if(formName.dateChanged != null && formName.dateChanged.value == 'true') return; if(formName.returnDay.changed == null && formName.changed == null){ eval (formName.returnDay.selectedIndex = rDay); } if( formName.returnMonth.changed == null && formName.changed == null){ eval (formName.returnMonth.selectedIndex = rMonth); } return; } function validateReturn(theForm) { var formName = eval('document.' + theForm); var dMonth = formName.returnMonth.selectedIndex; var dDay = formName.returnDay.selectedIndex; var dYear = getYear(dMonth, dDay); // For Months with 31 days if ( (dMonth == '0' || dMonth == '2' || dMonth == '4' || dMonth == '6' || dMonth == '7' || dMonth == '9' || dMonth == '11' )){ if (dDay == '30' || dDay == '31') { dDay = '29'; //eval (formName.returnDay.selectedIndex = dDay); } // For Months with 30 days } else if ((dMonth == '3' || dMonth == '5' || dMonth == '8' || dMonth == '10' )) { if (dDay == '30' || dDay == '31') { dDay = '29'; eval (formName.returnDay.selectedIndex = dDay); } /*********************************************************** 13 Apr 07 - Updated validation to take account of leap year [O.Ammann] ***********************************************************/ // For February, check for leapyear. } else if (dMonth == '1') { if (!leapYear(dYear)) { if (dDay == '28' || dDay == '29' || dDay == '30') { dDay = '27'; eval (formName.returnDay.selectedIndex = dDay); } } else if (leapYear(dYear)) { if (dDay == '29' || dDay == '30') { dDay = '28'; eval (formName.returnDay.selectedIndex = dDay); } } } } function updateChangedDate(selectObject){ selectObject.changed = true; if(selectObject.form.dateChanged) selectObject.form.dateChanged.value = true; } /********************* (2.) E-RETAIL CONNECTOR FUNCTIONS **********************/ /*** * formatdateStr function Added 07/05/07 * Converts month and day string from 1 digit to 2 digit value, which is required for the e-retail date string. * Fix was implemented as passing a 2 digit value directly from the day/month dropdown caused date * validation errors for numberic values below 10. */ function formatDateStr(getVal) { if (getVal < 10) { getVal = 0 + getVal; } return getVal; } // Connector object site settings interface function function cossi(cossi_url, cossi_et, cossi_site, cossi_eid, cossi_lang, cossi_so_pointOfSale, cossi_so_officeId, cossi_so_amOfficeId, cossi_so_qofficeId, cossi_hostPCC, cossi_tripFlow, cossi_cff1, cossi_cff2, cossi_QDefList, cossi_qDef, cossi_qcty, cossi_qNbr, cossi_qAct, cossi_holdMsg, cossi_activateOsI, cossi_activateAsI, cossi_encoding) { validParam = true; if (cossi_url == "default" || cossi_url == "") { validParam = false; } if (cossi_et == "default" || cossi_et == "") { validParam = false; } if (cossi_site == "default" || cossi_site == "") { validParam = false; } if (cossi_eid == "default" || cossi_eid == "") { validParam = false; } if (cossi_lang == "default" || cossi_lang == "") { validParam = false; } if (cossi_so_pointOfSale == "default" || cossi_so_pointOfSale == "") { validParam = false; } if (cossi_so_officeId == "default" || cossi_so_officeId == "") { validParam = false; } if (cossi_so_amOfficeId == "default" || cossi_so_amOfficeId == "") { validParam = false; } if (cossi_so_qofficeId == "default" || cossi_so_qofficeId == "") { validParam = false; } if (cossi_hostPCC == "default" || cossi_hostPCC == "") { validParam = false; } if (cossi_tripFlow == "default" || cossi_tripFlow == "") { validParam = false; } if (cossi_cff1 == "default" || cossi_cff1 == "") { validParam = false; } if (cossi_cff2 == "default" || cossi_cff2 == "") { validParam = false; } if (cossi_QDefList == "default" || cossi_QDefList == "") { validParam = false; } if (cossi_qDef == "default" || cossi_qDef == "") { validParam = false; } if (cossi_qcty == "default" || cossi_qcty == "") { validParam = false; } if (cossi_qNbr == "default" || cossi_qNbr == "") { validParam = false; } if (cossi_qAct == "default" || cossi_qAct == "") { validParam = false; } if (cossi_holdMsg == "default" || cossi_holdMsg == "") { validParam = false; } if (cossi_activateOsI == "default" || cossi_activateOsI == "") { validParam = false; } if (cossi_activateAsI == "default" || cossi_activateAsI == "") { validParam = false; } if (cossi_encoding == "default" || cossi_encoding == "") { validParam = false; } /** if (validParam) { return { cossi_url:cossi_url, cossi_et:cossi_et, cossi_site:cossi_site, cossi_eid:cossi_eid, cossi_lang:cossi_lang, cossi_so_pointOfSale:cossi_so_pointOfSale, cossi_so_officeId:cossi_so_officeId, cossi_so_amOfficeId:cossi_so_amOfficeId, cossi_so_qofficeId:cossi_so_qofficeId, cossi_hostPCC:cossi_hostPCC, cossi_tripFlow:cossi_tripFlow, cossi_cff1:cossi_cff1, cossi_cff2:cossi_cff2, cossi_QDefList:cossi_QDefList, cossi_qDef:cossi_qDef, cossi_qcty:cossi_qcty, cossi_qNbr:cossi_qNbr, cossi_qAct:cossi_qAct, cossi_holdMsg:cossi_holdMsg, cossi_activateOsI:cossi_activateOsI, cossi_activateAsI:cossi_activateAsI, cossi_encoding:cossi_encoding } } else { return false; } ***/ return validParam; } // Connector object override settings interface function function coosi(def_sds, def_priceType, def_nonStop, def_drv1, def_drv2, def_drq1, def_drq2, def_fromPage, coos_sds, coos_priceType, coos_nonStop, coos_drv1, coos_drv2, coos_drq1, coos_drq2, coos_fromPage) { var validStr = true; var count = 0; if (coos_sds != "default" && coos_sds != "") { coos_sds = coos_sds; count++; switch (coos_sds) { case 'YES': break; case 'NO': break; default: validStr = false; } } else { coos_sds = def_sds; } if (coos_priceType != "default" && coos_priceType != "") { coos_priceType = coos_priceType; count++; switch (coos_priceType) { case 'O': break; case 'I': break; default: validStr = false; } } else { coos_priceType = def_priceType; } if (coos_nonStop != "default" && coos_nonStop != "") { coos_nonStop = coos_nonStop; count++; switch (coos_nonStop) { case 'FALSE': break; case 'TRUE': break; default: validStr = false; } } else { coos_nonStop = def_nonStop; } if (coos_drv1 != "default" && coos_drv1 != "") { coos_drv1 = coos_drv1; count++; switch (coos_drv1) { case '1': break; case '2': break case '3': break; default: validStr = false; } } else { coos_drv1 = def_drv1; } if (coos_drv2 != "default" && coos_drv2 != "") { coos_drv2 = coos_drv2; count++; switch (coos_drv2) { case '1': break; case '2': break; case '3': break; default: validStr = false; } } else { coos_drv2 = def_drv2; } if (coos_drq1 != "default" && coos_drq1 != "") { coos_drq1 = coos_drq1; count++; switch (coos_drq1) { case 'M': break; case 'P': break; case 'C': break; default: validStr = false; } } else { coos_drq1 = def_drq1; } if (coos_drq2 != "default" && coos_drq2 != "") { coos_drq2 = coos_drq2; count++; switch (coos_drq2) { case 'M': break; case 'P': break; case 'C': break; default: validStr = false; } } else { coos_drq2 = def_drq2; } if (coos_fromPage != "default" && coos_fromPage != "") { coos_fromPage = coos_fromPage; count++; switch (coos_fromPage) { case 'ADVS': break; default: validStr = false; } } else { coos_fromPage = def_fromPage; } if (parseInt(count) == 0) { return count; } else if (validStr) { return { coos_sds:coos_sds, coos_priceType:coos_priceType, coos_nonStop:coos_nonStop, coos_drv1:coos_drv1, coos_drv2:coos_drv2, coos_drq1:coos_drq1, coos_drq2:coos_drq2, coos_fromPage:coos_fromPage } } else { return false; } } // Connector object additional settings interface function function coasi(coasi_custParamName1, coasi_custParamVal1, coasi_custParamName2, coasi_custParamVal2, coasi_custParamName3, coasi_custParamVal3, coasi_custParamName4, coasi_custParamVal4, coasi_custParamName5, coasi_custParamVal5, coasi_custParamName6, coasi_custParamVal6, coasi_custParamName7, coasi_custParamVal7, coasi_custParamName8, coasi_custParamVal8) { var validPair = true; if ((coasi_custParamName1 != "default" && coasi_custParamName1 != "") || (coasi_custParamVal1 != "default" && coasi_custParamVal1 != "")) { if (coasi_custParamName1 != "default" && coasi_custParamName1 != "") { if (coasi_custParamVal1 != "default" && coasi_custParamVal1 != "") { coasi_custParamName1 = coasi_custParamName1; coasi_custParamVal1 = coasi_custParamVal1; } else { validPair = false; } } else { validPair = false; } } else { coasi_custParamName1 = "notinit"; coasi_custParamVal1 = "notinit"; } if ((coasi_custParamName2 != "default" && coasi_custParamName2 != "") || (coasi_custParamVal2 != "default" && coasi_custParamVal2 != "")) { if (coasi_custParamName2 != "default" && coasi_custParamName2 != "") { if (coasi_custParamVal2 != "default" && coasi_custParamVal2 != "") { coasi_custParamName2 = coasi_custParamName2; coasi_custParamVal2 = coasi_custParamVal2; } else { validPair = false; } } else { validPair = false; } } else { coasi_custParamName2 = "notinit"; coasi_custParamVal2 = "notinit"; } if ((coasi_custParamName3 != "default" && coasi_custParamName3 != "") || (coasi_custParamVal3 != "default" && coasi_custParamVal3 != "")) { if (coasi_custParamName3 != "default" && coasi_custParamName3 != "") { if (coasi_custParamVal3 != "default" && coasi_custParamVal3 != "") { coasi_custParamName3 = coasi_custParamName3; coasi_custParamVal3 = coasi_custParamVal3; } else { validPair = false; } } else { validPair = false; } } else { coasi_custParamName3 = "notinit"; coasi_custParamVal3 = "notinit"; } if ((coasi_custParamName4 != "default" && coasi_custParamName4 != "") || (coasi_custParamVal4 != "default" && coasi_custParamVal4 != "")) { if (coasi_custParamName4 != "default" && coasi_custParamName4 != "") { if (coasi_custParamVal4 != "default" && coasi_custParamVal4 != "") { coasi_custParamName4 = coasi_custParamName4; coasi_custParamVal4 = coasi_custParamVal4; } else { validPair = false; } } else { validPair = false; } } else { coasi_custParamName4 = "notinit"; coasi_custParamVal4 = "notinit"; } if ((coasi_custParamName5 != "default" && coasi_custParamName5 != "") || (coasi_custParamVal5 != "default" && coasi_custParamVal5 != "")) { if (coasi_custParamName5 != "default" && coasi_custParamName5 != "") { if (coasi_custParamVal5 != "default" && coasi_custParamVal5 != "") { coasi_custParamName5 = coasi_custParamName5; coasi_custParamVal5 = coasi_custParamVal5; } else { validPair = false; } } else { validPair = false; } } else { coasi_custParamName5 = "notinit"; coasi_custParamVal5 = "notinit"; } if ((coasi_custParamName6 != "default" && coasi_custParamName6 != "") || (coasi_custParamVal6 != "default" && coasi_custParamVal6 != "")) { if (coasi_custParamName6 != "default" && coasi_custParamName6 != "") { if (coasi_custParamVal6 != "default" && coasi_custParamVal6 != "") { coasi_custParamName6 = coasi_custParamName6; coasi_custParamVal6 = coasi_custParamVal6; } else { validPair = false; } } else { validPair = false; } } else { coasi_custParamName6 = "notinit"; coasi_custParamVal6 = "notinit"; } if ((coasi_custParamName7 != "default" && coasi_custParamName7 != "") || (coasi_custParamVal7 != "default" && coasi_custParamVal7 != "")) { if (coasi_custParamName7 != "default" && coasi_custParamName7 != "") { if (coasi_custParamVal7 != "default" && coasi_custParamVal7 != "") { coasi_custParamName7 = coasi_custParamName7; coasi_custParamVal7 = coasi_custParamVal7; } else { validPair = false; } } else { validPair = false; } } else { coasi_custParamName7 = "notinit"; coasi_custParamVal7 = "notinit"; } if ((coasi_custParamName8 != "default" && coasi_custParamName8 != "") || (coasi_custParamVal8 != "default" && coasi_custParamVal8 != "")) { if (coasi_custParamName8 != "default" && coasi_custParamName8 != "") { if (coasi_custParamVal8 != "default" && coasi_custParamVal8 != "") { coasi_custParamName8 = coasi_custParamName8; coasi_custParamVal8 = coasi_custParamVal8; } else { validPair = false; } } else { validPair = false; } } else { coasi_custParamName8 = "notinit"; coasi_custParamVal8 = "notinit"; } if (validPair) { return {coasi_custParamName1:coasi_custParamName1, coasi_custParamVal1:coasi_custParamVal1, coasi_custParamName2:coasi_custParamName2, coasi_custParamVal2:coasi_custParamVal2, coasi_custParamName3:coasi_custParamName3, coasi_custParamVal3:coasi_custParamVal3, coasi_custParamName4:coasi_custParamName4, coasi_custParamVal4:coasi_custParamVal4, coasi_custParamName5:coasi_custParamName5, coasi_custParamVal5:coasi_custParamVal5, coasi_custParamName6:coasi_custParamName6, coasi_custParamVal6:coasi_custParamVal6, coasi_custParamName7:coasi_custParamName7, coasi_custParamVal7:coasi_custParamVal7, coasi_custParamName8:coasi_custParamName8, coasi_custParamVal8:coasi_custParamVal8} } else { return false; } } // E-Retail connector Object function erc() { var ercObj = new Object(); /* BEGINS FLEXPRICER FUNCTION */ function flexPricerBuild(url, et, site, eid, lang, so_pointOfSale, so_officeId, so_amOfficeId, so_qofficeId, hostPCC, tripFlow, cff1, cff2, QDefList, qDef, qcty, qNbr, qAct, holdMsg, activateOsI, activateAsI, origin, destination, tripType, depMonth, depDay, depTime, retMonth, retDay, retTime, classOfService, numAdt, numChd, sds, priceType, nonStop, drv1, drv2, drq1, drq2, fromPage, custParamName1, custParamVal1, custParamName2, custParamVal2, custParamName3, custParamVal3, custParamName4, custParamVal4, custParamName5, custParamVal5, custParamName6, custParamVal6, custParamName7, custParamVal7, custParamName8, custParamVal8, flexSearch, enc) { var coiHandler = true; var coiErrors = ''; var ssv = cossi(url, et, site, eid, lang, so_pointOfSale, so_officeId, so_amOfficeId, so_qofficeId, hostPCC, tripFlow, cff1, cff2, QDefList, qDef, qcty, qNbr, qAct, holdMsg, activateOsI, activateAsI, enc); var osv; var asv = coasi(custParamName1, custParamVal1, custParamName2, custParamVal2, custParamName3, custParamVal3, custParamName4, custParamVal4, custParamName5, custParamVal5, custParamName6, custParamVal6, custParamName7, custParamVal7, custParamName8, custParamVal8); if (ssv == false) { coiHandler = false; coiErrors += '

An error occured in the connector objects site settings interface (COSSI)!
You attempted to execute an incomplete call. COSS parameters could not be applied to this flow

'; } // Default COOS values var default_sds = "YES"; var default_priceType = "O"; var default_nonStop = "FALSE"; var default_drv1 = "3"; var default_drv2 = "3"; var default_drq1 = "C"; var default_drq2 = "C"; var default_fromPage = "ADVS"; // If true activate the connector object override interface if (activateOsI == "TRUE") { osv = coosi(default_sds, default_priceType, default_nonStop, default_drv1, default_drv2, default_drq1, default_drq2, default_fromPage, sds, priceType, nonStop, drv1, drv2, drq1, drq2, fromPage); if (osv != false && osv != 0) { default_sds = osv.coos_sds; default_priceType = osv.coos_priceType; default_nonStop = osv.coos_nonStop; default_drv1 = osv.coos_drv1; default_drv2 = osv.coos_drv2; default_drq1 = osv.coos_drq1; default_drq2 = osv.coos_drq2; default_fromPage = osv.coos_fromPage; } else if (parseInt(osv) == 0) { coiHandler = false; coiErrors += '

An error occured in the connector objects override settings interface (COOSI)!
You attempted to execute an empty or incomplete call. COOS parameters could not be applied to this flow

'; } else { coiHandler = false; coiErrors += '

An error occured in the connector objects override settings interface (COOSI)!
You attempted to execute a call containing an illegal value. COOS parameters could not be applied to this flow

'; } } // Determine outbound and inbound year for selected dates and create dep and ret dates var obYear = getYear(depMonth, depDay); var ibYear = getYear(retMonth, retDay); var depDate; var retDate; var obAnyTime; var ibAnyTime; if (depTime != "ANY") { depDate = obYear+formatDateStr(depMonth)+formatDateStr(depDay)+depTime; obAnyTime = false; } else { depDate = obYear+formatDateStr(depMonth)+formatDateStr(depDay)+"0000"; obAnyTime = true; } if (retTime != "ANY") { retDate = ibYear+formatDateStr(retMonth)+formatDateStr(retDay)+retTime; ibAnyTime = false; } else { retDate = ibYear+formatDateStr(retMonth)+formatDateStr(retDay)+"0000"; ibAnyTime = true; } var adtCount = parseInt(numAdt); var chdCount = parseInt(numChd); // Display processing request message document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''+holdMsg+''); document.writeln(''); document.writeln(' '); document.writeln(''); document.writeln('
'); document.writeln(''); document.writeln('
'); /*** New transition splash page code (Not ready for implementation) document.writeln(''); document.writeln(''); document.writeln('
'); document.writeln('
'); document.writeln('
'); document.writeln('
'); document.writeln('
'); document.writeln('
'); document.writeln('
'); document.writeln('
'); document.writeln('
'); document.writeln('
'); document.writeln('
'); ***/ // Transition page code document.writeln('
'); document.writeln('
'); document.writeln('
'); document.writeln('
'+holdMsg+'
'); document.writeln('
'); document.writeln('
'); document.writeln('
'); document.writeln('
'); document.writeln('
'); /*** * Build FlexPricer form */ document.writeln('
'); document.writeln('
'); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); // Determine which commercial fare family to use based on selected booking class and external id if (classOfService == 'P') { document.writeln(''); } else { document.writeln(''); } /* Determine if we should use calendar or upsell display (1 = Calendar display 2 = upsell panel display) */ // Condition 1 - user selects around these dates and time is set to any time for both dates if (flexSearch == 'flexSearch') { document.writeln(''); // Sets display to calendar display document.writeln(''); // Orders default display by number of stops } else { document.writeln(''); // Sets display to upsell panel document.writeln(''); // Orders default display by number of stops } document.writeln(''); document.writeln(''); // O = oneway display I = roundtrip matrix if (default_priceType == "O") { document.writeln(''); } else if (default_priceType == "I") { document.writeln(''); } document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); // C = search around dates document.writeln(''); document.writeln(''); // Passenger type logic based on number of adults and children selected in the UI var adult; for (var i = 0; i < adtCount; i++) { adult = i+1; document.writeln(''); } var children = adtCount+1; for (var i = 0; i < chdCount; i++) { document.writeln(''); children++; } // If true activate the connector object additional settings interface if (activateAsI == "TRUE") { if (asv != false) { if (asv.coasi_custParamName1 != "notinit" && asv.coasi_custParamVal1 != "notinit") { document.writeln(''); } if (asv.coasi_custParamName2 != "notinit" && asv.coasi_custParamVal2 != "notinit") { document.writeln(''); } if (asv.coasi_custParamName3 != "notinit" && asv.coasi_custParamVal3 != "notinit") { document.writeln(''); } if (asv.coasi_custParamName4 != "notinit" && asv.coasi_custParamVal4 != "notinit") { document.writeln(''); } if (asv.coasi_custParamName5 != "notinit" && asv.coasi_custParamVal5 != "notinit") { document.writeln(''); } if (asv.coasi_custParamName6 != "notinit" && asv.coasi_custParamVal6 != "notinit") { document.writeln(''); } if (asv.coasi_custParamName7 != "notinit" && asv.coasi_custParamVal7 != "notinit") { document.writeln(''); } if (asv.coasi_custParamName8 != "notinit" && asv.coasi_custParamVal8 != "notinit") { document.writeln(''); } } else { coiHandler = false; coiErrors += '

An error occured in the connector objects additional settings interface (COASI)!
You attempted to execute an incomplete call. COAS parameters could not be applied to this flow

'; } } // Global list overide parameters if (QDefList == "TRUE") { document.writeln(''); } document.writeln('
'); document.writeln('
'); if (coiHandler) { document.writeln(''); // Begins web analytics ER - added 19/08/09 document.writeln(''+'<\/scr'+'ipt>'); } else { document.writeln('

We were unable to submit your tripflow request due to the following errors:

'); document.writeln(coiErrors); document.writeln('
'); } document.writeln(''); document.writeln(''); } ercObj.flexPricerBuild = flexPricerBuild; return ercObj; } // Preload and cache module & splash screen images function preloadImgs(img1, w1, h1, img2, w2, h2, img3, w3, h3, img4, w4, h4, img5, w5, h5, img6, w6, h6, img7, w7, h7, img8, w8, h8, img9, w9, h9, img10, w10, h10, img11, w11, h11) { image1 = new Image(w1,h1); image1.src = img1; image2 = new Image(w2,h2); image2.src = img2; image3 = new Image(w3,h3); image3.src = img3; image4 = new Image(w4,h4); image4.src = img4; image5 = new Image(w5,h5); image5.src = img5; image6 = new Image(w6,h6); image6.src = img6; image7 = new Image(w7,h7); image7.src = img7; image8 = new Image(w8,h8); image8.src = img8; image9 = new Image(w9,h9); image9.src = img9; image10 = new Image(w10,h10); image10.src = img10; image11 = new Image(w11,h11); image11.src = img11; }