var SELECTCITY="selectacity";var SEPARATOR="separator";var CKE_SEPARATOR="|";var EQUAL="=";var DELIMITER=":";var C_COOKIE_SECURE="secure";var C_COOKIE_NAME="promoFareSearch";var C_PATH="path";var C_PAGE="page";var C_TAB_INDEX="tabIndex";var CURRENT_PRICING_TYPE="currentPricingType";var C_TRIP_TYPE="intTripType";var C_PORTS="ports";var C_DATES="dates";var C_PASSENGERS="passengers";var C_FARE_FAMILY="fareFamily";var C_SEARCH_OPTION="intFlexiDates";var C_ARRANGE_BY="sortByShown";var C_PROMO_CODE="promoCode";var C_ADDITIONAL_INFO="additionalInfo";var MAX_PAX=9;function PromoFareFlightSearch(g,e,h,f){this.earliestBookingDate=g;this.formId=e;this.departCalendar=h;this.returnCalendar=f;this.invalidLocationOptions=[SELECTCITY,SEPARATOR];this.fromCity=null;this.toCity=null}PromoFareFlightSearch.prototype.isProduction=function(){return(window.location.host.indexOf("www.qantas")==0||window.location.host.indexOf("qantas")==0||window.location.host.indexOf("www")==0)};PromoFareFlightSearch.prototype.isReturn=function(){var d=document.getElementsByTagName("input");for(var f=0;f<d.length;f++){if(d[f].name==C_TRIP_TYPE){var e=d[f].type.toLowerCase();break}}if(e=="hidden"){if(this.tripType.value=="R"){return true}}else{if(e=="radio"){for(var f=0;f<this.tripType.length;f++){if(this.tripType[f].value=="R"&&this.tripType[f].checked){return true}}if(this.tripType.value!=null&&this.tripType.value=="R"){return true}}}return false};PromoFareFlightSearch.prototype.isFlexible=function(){var e=new RegExp("(T)(RUE)?","ig");var h=document.getElementsByTagName("input");for(var g=0;g<h.length;g++){if(h[g].name==C_FLEXIBLE){var f=h[g].type.toLowerCase();break}}if(f=="hidden"){if(e.test(this.flexiDates.value)){return true}}else{if(f=="radio"){for(var g=0;g<this.flexiDates.length;g++){if(e.test(this.flexiDates[g].value)&&this.flexiDates[g].checked){this.dateRangeValue.value=3;return true}else{this.dateRangeValue.value=0}}}}return false};PromoFareFlightSearch.prototype.isHidden=function(e){if(document.getElementById(e)!=null||document.getElementsByName(e)!=null){var d=document.getElementsByTagName("input");for(var f=0;f<d.length;f++){if(d[f].name==e){return d[f].type.toLowerCase()=="hidden";break}}return false}else{return false}};PromoFareFlightSearch.prototype.getPath=function(){var c=new RegExp("/([^/]+)/([^/]+)","ig");var d=c.exec(window.location.pathname);return d[0]};PromoFareFlightSearch.prototype.validateTripType=function(){if(this.tripType.type!="hidden"){var c=false;for(var d=0;d<this.tripType.length;d++){if(this.tripType[d].checked){c=true;break}}if(this.tripType.value!=null){return true}if(!c){alert("Please select a trip type.");return false}}return true};PromoFareFlightSearch.prototype.validateLocations=function(){for(var b=0;b<this.invalidLocationOptions.length;b++){if(this.from.value==this.invalidLocationOptions[b]){alert("Please select a departure location.");this.from.focus();return false}}for(var b=0;b<this.invalidLocationOptions.length;b++){if(this.to.value==this.invalidLocationOptions[b]){alert("Please select an arrival location.");this.to.focus();return false}}if(this.from.value.split("^")[0]==this.to.value.split("^")[0]){alert("Departure and arrival locations must be different.");this.from.focus();return false}return true};PromoFareFlightSearch.prototype.validateDates=function(){if(this.departCalendar.getDate().getTime()<this.earliestBookingDate.getTime()){alert("Online bookings must be made for flights departing after "+this.earliestBookingDate.format("DDDD D mmmm YYYY HH:00")+".\nDeparture date needs to be on or after this date.");this.departCalendar.monthYearField.focus();return false}if(this.tripTypeSelection.value=="1"&&(this.returnCalendar.getDate().getTime()<this.departCalendar.getDate().getTime())){alert("Return date cannot be before depart date.");this.returnCalendar.monthYearField.focus();return false}return true};PromoFareFlightSearch.prototype.validatePax=function(){var t=document.getElementById(this.formId);var y=parseInt(t.intAdults.value);var r=parseInt(t.intChildren.value);var v=parseInt(t.intInfants.value);var u=y+r+v;var x=this.paxChildrenValidate;if(x=="true"&&u<MAX_PAX){if(v>y){alert("Only 1 infant can be booked for every 1 adult.");t.intInfants.focus();return false}else{if(r>y){if(this.region=="au"){var w="You have requested more children (aged between 2 and 11 years) than adults.";var n="\n\n";var o="Please complete your Kids Fly Free booking for an equal number of adults and children / infants,\n";var p="then call us on 1300 659 134 to book any additional children onto the same flights.\n";var q="Call centre booking fee will be waived if you have made your Kids Fly Free booking online.";var s=w+n+o+p+q;alert(s)}if(this.region=="sp"){var w="You have requested more children (aged between 2 and 11 years) than adults. ";var n="\n\n";var o="Please complete your Kids Fly Free booking for an equal number of adults and children / infants,\n";var p="then call us on 0800 767 400 to book any additional children onto the same flights.\n";var q="Call centre booking fee will be waived if you have made your Kids Fly Free booking online.";var s=w+n+o+p+q;alert(s)}t.intInfants.focus();return false}else{if(y>=v&&y<=(r+v)){return true}else{var w="You have requested more adults than children / infants.";var n="\n\n";var o="Please complete your Kids Fly Free booking for an equal number of adults and children / infants,\n";var p="then book any additional adults onto the same flights from the qantas.com homepage.";alert(w+n+o+p);t.intInfants.focus();return false}}}}else{if(u>MAX_PAX){alert("Only "+MAX_PAX+" passengers can be booked at a time.");t.intAdults.focus();return false}if(v>y){alert("Only 1 infant can be booked for every 1 adult.");t.intInfants.focus();return false}return true}};PromoFareFlightSearch.prototype.validatePromoCode=function(){var q="0123456789";var A="abcdefghijklmnopqrstuvwxyz";var r="ABCDEFGHIJKLMNOPQRSTUVWXYZ";var z=document.getElementById(this.formId);function y(a,b){if(a==""){return true}for(i=0;i<a.length;i++){if(b.indexOf(a.charAt(i),0)==-1){return false}}return true}function s(a){return y(a,q)}function t(a){return y(a,A)}function C(a){return y(a,r)}function v(a){return y(a,A+r)}function u(a){return y(a,A+r+q)}var p=(z.validationType==null?"":z.validationType.value);var x=(z.promoCode==null?"":z.promoCode.value);var w=(z.codeEditable==null?false:z.codeEditable.value);var B=(z.isPromoShown==null?false:z.isPromoShown.value);if((B=="true"||B==true)&&(w==false||w=="false")){if("G"==p||"V"==p){if(x.length!=6||!s(x)){alert(z.inputFormatErrorMsg.value);return false}}else{if("SC"==p){if(x.length<1||x.length>20||!u(x)){alert(z.inputFormatErrorMsg.value);return false}}else{if("No"==p){if(x.length<1||x.length>20){alert(z.inputFormatErrorMsg.value);return false}}}}}return true};PromoFareFlightSearch.prototype.setCookie=function(){var d="";var c=document.getElementById(this.formId);d+=C_PAGE+"="+window.location.pathname.substring(window.location.pathname.lastIndexOf("/")+1);d+=CKE_SEPARATOR;d+=C_TAB_INDEX+"="+this.tabIndex;d+=CKE_SEPARATOR;d+=C_TRIP_TYPE+EQUAL+this.tripTypeSelection.value;d+=CKE_SEPARATOR;d+=C_PORTS+EQUAL+this.from.value+DELIMITER+this.to.value;d+=CKE_SEPARATOR;d+=C_DATES+EQUAL+this.departCalendar.serialize();d+=DELIMITER+this.returnCalendar.serialize();d+=CKE_SEPARATOR;d+=C_PASSENGERS+EQUAL+this.intAdults.value;if(null!=c.intChildren){d+=DELIMITER+this.intChildren.value}else{d+=DELIMITER+0}if(null!=c.intInfants){d+=DELIMITER+this.intInfants.value}else{d+=DELIMITER+0}if(this.fareFamily!=undefined){if(!this.isHidden(C_FARE_FAMILY)){d+=CKE_SEPARATOR;d+=C_FARE_FAMILY+EQUAL+this.fareFamily.value}}if(!this.isHidden(C_SEARCH_OPTION)){d+=CKE_SEPARATOR;d+=C_SEARCH_OPTION+EQUAL+this.searchOptionSelection.value}if(this.promoCode){d+=CKE_SEPARATOR;d+=C_PROMO_CODE+EQUAL+this.promoCode.value;d+=CKE_SEPARATOR;d+=C_ADDITIONAL_INFO+EQUAL+this.additionalInfo.value}document.cookie=C_COOKIE_NAME+"="+d};PromoFareFlightSearch.prototype.restoreSelections=function(n){var m;if(document.cookie.indexOf(C_COOKIE_NAME)!=-1){var h=getCookieValue(C_COOKIE_NAME);var k=false;var j=window.location.pathname.substring(window.location.pathname.lastIndexOf("/")+1);myCookieValue=h.split(CKE_SEPARATOR);for(var l=0;l<myCookieValue.length;l++){var o=myCookieValue[l].split(EQUAL);if(o[0]==C_PAGE){if(o[1]==j){k=true}}if(o[0]==C_TAB_INDEX){m=o[1];if(o[1]==n){this.init(o[1])}break}}if(m==n){if(k){for(var l=0;l<myCookieValue.length;l++){var o=myCookieValue[l].split(EQUAL);this.restoreValue(o[0],o[1])}}}}};PromoFareFlightSearch.prototype.restoreValue=function(q,m){var k=/:/;if((q==C_TRIP_TYPE)&&(!this.isHidden(C_TRIP_TYPE))){if(m=="1"){m="R"}else{if(m=="2"){m="O"}}for(var p=0;p<this.tripType.length;p++){if(this.tripType[p].value==m){this.tripType[p].checked=true;break}}}if(q==C_PORTS){var j=m.split(k);this.fromCity=j[0];this.toCity=j[1];this.set(this.from,j[0]);changeList(this.from,this.tabIndex);this.set(this.to,j[1])}if(q==CURRENT_PRICING_TYPE){this.set(this.currentPricingType,m)}if(q==C_DATES){var l=m.split(k);this.departCalendar.deserialize(l[0]);if(this.isReturn()){this.returnCalendar.deserialize(l[1]);if(this.returnCalendar.getDate().getTime()<this.departCalendar.getDate().getTime()){this.returnCalendar.update(this.departCalendar.getDate())}}}if(q==C_PASSENGERS){var n=m.split(k);this.set(this.intAdults,n[0]);if(null!=this.intChildren){this.set(this.intChildren,n[1])}if(null!=this.intInfants){this.set(this.intInfants,n[2])}}if(this.fareFamily!=undefined){if((q==C_FARE_FAMILY)&&(!this.isHidden(C_FARE_FAMILY))){loadFareFamily(this.tabIndex,this.showFareFamily,this.isFareFamily1Override);this.set(this.fareFamily,m)}}if(q==C_SEARCH_OPTION){var o=document.getElementById("tab"+this.tabIndex+"_SearchOption");if(o==null){for(var p=0;p<this.searchOption.length;p++){if(m-1==p){this.searchOption[p].checked=true;this.searchOptionSelection.value=m;break}}}}if((q==C_ARRANGE_BY)&&(!this.isHidden(C_ARRANGE_BY))){if(this.arrangeBy!=undefined){this.set(this.arrangeBy,m)}}if(q==C_PROMO_CODE){this.set(this.promoCode,m)}if(q==C_ADDITIONAL_INFO){this.set(this.additionalInfo,m)}};PromoFareFlightSearch.prototype.set=function(d,e){if(e){if(d.type=="hidden"||d.type=="text"){d.value=e}else{for(var f=0;f<d.length;f++){if(d.options[f].value==e){d.options[f].selected=true;break}}}}};PromoFareFlightSearch.prototype.getFromCity=function(){return this.fromCity};PromoFareFlightSearch.prototype.getToCity=function(){return this.toCity};PromoFareFlightSearch.prototype.init=function(d){this.tabIndex=d;var c=document.getElementById(this.formId);this.fromCity=null;this.toCity=null;this.region=c.regionCode.value;this.isDomestic=c.isDomestic.value;this.intTransTasman=c.intTransTasman.value;this.tripType=c.intTripType;this.tripTypeSelection=c.tripTypeSelection;this.from=c.intFrom;this.to=c.intTo;this.searchOption=c.intFlexiDates;this.searchOptionSelection=c.searchOptionSelection;this.arrangeBy=c.sortByShown;this.dateRangeQualifier=c.dateRangeQualifier;this.assignPax();this.fareFamily=c.intTravelClass;this.showFareFamily=c.commFareFamily.value;this.isFareFamily1Override=c.isFareFamily_1_Override.value;this.isFareFamily2Override=c.isFareFamily_2_Override.value;this.isSoSiteOfficeIdOverride=c.isOfficeIdOverride.value;this.fareFamily2=c.pfsFareFamily_2;this.soSiteOfficeId=c.pfsSoSiteOfficeId;this.intDepFormatted=c.intDepFormatted;this.intDepBookLeadFormatted=c.intDepBookLeadFormatted;this.intRetFormatted=c.intRetFormatted;this.intRetBookLeadFormatted=c.intRetBookLeadFormatted;this.paxChildrenValidate=c.paxChildrenValidate.value;if(null!=c.promoCode){this.promoCode=c.promoCode;this.additionalInfo=c.additionalInfo}};PromoFareFlightSearch.prototype.validateAndSubmit=function(tabIndex){var tabForm="document.tab"+this.tabIndex+"Form";this.init(tabIndex);if(!this.validateTripType()){return false}if(!this.validateLocations()){return false}if(!this.validateDates()){return false}if(!this.validatePax()){return false}if(!this.validatePromoCode()){return false}this.setCookie();this.assignOverrides();this.assignLeadTimes();var form=document.getElementById(this.formId);eval(form).submit();return true};PromoFareFlightSearch.prototype.printAlert=function(b){if(!this.isProduction()){alert(b)}};PromoFareFlightSearch.prototype.assignLeadTimes=function(){var form=document.getElementById(this.formId);var country=eval("tab"+this.tabIndex+"_country")[this.from.value];var bookLeadTime;if(this.region=="au"||this.region=="sp"){if(this.isDomestic=="true"){if(country=="AU"){bookLeadTime=3}else{if(country=="NZ"){bookLeadTime=5}else{bookLeadTime=169}}if(isSameDay(eval("tab"+this.tabIndex+"_departCalendar").getDate().format("YYYYmmDD"))){this.intDepFormatted.value=new Date(serverDatePFS.getTime()+(bookLeadTime*60*60*1000)).format("YYYYmmDDHH00");this.intDepBookLeadFormatted.value=new Date(serverDatePFS.getTime()+(bookLeadTime*60*60*1000)).format("YYYYmmDDHH00")}else{this.intDepFormatted.value=eval("tab"+this.tabIndex+"_departCalendar").getDate().format("YYYYmmDD")+"1200";this.intDepBookLeadFormatted.value=eval("tab"+this.tabIndex+"_departCalendar").getDate().format("YYYYmmDD")+"1200"}if(isSameDay(eval("tab"+this.tabIndex+"_returnCalendar").getDate().format("YYYYmmDD"))){this.intRetFormatted.value=new Date(serverDatePFS.getTime()+(bookLeadTime*60*60*1000)).format("YYYYmmDDHH00");this.intRetBookLeadFormatted.value=new Date(serverDatePFS.getTime()+(bookLeadTime*60*60*1000)).format("YYYYmmDDHH00")}else{this.intRetFormatted.value=eval("tab"+this.tabIndex+"_returnCalendar").getDate().format("YYYYmmDD")+"1200";this.intRetBookLeadFormatted.value=eval("tab"+this.tabIndex+"_returnCalendar").getDate().format("YYYYmmDD")+"1200"}}else{if(this.intTransTasman=="true"){if(country=="AU"){bookLeadTime=5}else{if(country=="NZ"){bookLeadTime=13}else{bookLeadTime=169}}if(isSameDay(eval("tab"+this.tabIndex+"_departCalendar").getDate().format("YYYYmmDD"))){this.intDepFormatted.value=new Date(serverDatePFS.getTime()+(bookLeadTime*60*60*1000)).format("YYYYmmDDHH00");this.intDepBookLeadFormatted.value=new Date(serverDatePFS.getTime()+(bookLeadTime*60*60*1000)).format("YYYYmmDDHH00")}else{this.intDepFormatted.value=eval("tab"+this.tabIndex+"_departCalendar").getDate().format("YYYYmmDD")+"0000";this.intDepBookLeadFormatted.value=eval("tab"+this.tabIndex+"_departCalendar").getDate().format("YYYYmmDD")+"0000"}if(isSameDay(eval("tab"+this.tabIndex+"_returnCalendar").getDate().format("YYYYmmDD"))){this.intRetFormatted.value=new Date(serverDatePFS.getTime()+(bookLeadTime*60*60*1000)).format("YYYYmmDDHH00");this.intRetBookLeadFormatted.value=new Date(serverDatePFS.getTime()+(bookLeadTime*60*60*1000)).format("YYYYmmDDHH00")}else{this.intRetFormatted.value=eval("tab"+this.tabIndex+"_returnCalendar").getDate().format("YYYYmmDD")+"0000";this.intRetBookLeadFormatted.value=eval("tab"+this.tabIndex+"_returnCalendar").getDate().format("YYYYmmDD")+"0000"}}else{if(country=="AU"){bookLeadTime=5}else{if(country=="NZ"){bookLeadTime=13}else{bookLeadTime=169}}if(isSameDay(eval("tab"+this.tabIndex+"_departCalendar").getDate().format("YYYYmmDD"))){this.intDepFormatted.value=new Date(serverDatePFS.getTime()+(bookLeadTime*60*60*1000)).format("YYYYmmDDHH00");this.intDepBookLeadFormatted.value=new Date(serverDatePFS.getTime()+(bookLeadTime*60*60*1000)).format("YYYYmmDDHH00")}else{this.intDepFormatted.value=eval("tab"+this.tabIndex+"_departCalendar").getDate().format("YYYYmmDD")+"0000";this.intDepBookLeadFormatted.value=eval("tab"+this.tabIndex+"_departCalendar").getDate().format("YYYYmmDD")+"0000"}if(isSameDay(eval("tab"+this.tabIndex+"_returnCalendar").getDate().format("YYYYmmDD"))){this.intRetFormatted.value=new Date(serverDatePFS.getTime()+(bookLeadTime*60*60*1000)).format("YYYYmmDDHH00");this.intRetBookLeadFormatted.value=new Date(serverDatePFS.getTime()+(bookLeadTime*60*60*1000)).format("YYYYmmDDHH00")}else{this.intRetFormatted.value=eval("tab"+this.tabIndex+"_returnCalendar").getDate().format("YYYYmmDD")+"0000";this.intRetBookLeadFormatted.value=eval("tab"+this.tabIndex+"_returnCalendar").getDate().format("YYYYmmDD")+"0000"}}}}else{if(this.region=="am"||this.region=="as"||this.region=="af"||this.region=="eu"){if(this.region=="af"){bookLeadTime=169}else{if(this.region=="am"){if(country=="CL"){bookLeadTime=169}else{bookLeadTime=13}}else{if(this.region=="eu"){if(country=="DE"){bookLeadTime=240}else{bookLeadTime=168}}else{if(this.region=="as"){if(country=="HK"){bookLeadTime=72}else{if(country=="IN"){bookLeadTime=72}else{if(country=="MY"){bookLeadTime=72}else{if(country=="TH"){bookLeadTime=72}else{if(country=="SG"){bookLeadTime=12}else{bookLeadTime=168}}}}}}}}}if(!isSameDay(eval("tab"+this.tabIndex+"_departCalendar").getDate().format("YYYYmmDD"))){this.intDepFormatted.value=eval("tab"+this.tabIndex+"_departCalendar").getDate().format("YYYYmmDD")+"0000";eval("tab"+this.tabIndex+"_departCalendar").bookLeadFormattedField.value=this.intDepFormatted.value}if(isSameDay(eval("tab"+this.tabIndex+"_departCalendar").getDate().format("YYYYmmDD"))){this.intDepFormatted.value=eval("tab"+this.tabIndex+"_departCalendar").getDate().format("YYYYmmDD")+"1200";eval("tab"+this.tabIndex+"_departCalendar").bookLeadFormattedField.value=this.intDepFormatted.value}if(!isSameDay(eval("tab"+this.tabIndex+"_returnCalendar")!=null&&eval("tab"+this.tabIndex+"_returnCalendar").getDate().format("YYYYmmDD"))){this.intRetFormatted.value=eval("tab"+this.tabIndex+"_returnCalendar").getDate().format("YYYYmmDD")+"0000";eval("tab"+this.tabIndex+"_returnCalendar").bookLeadFormattedField.value=this.intRetFormatted.value}if(isSameDay(eval("tab"+this.tabIndex+"_returnCalendar")!=null&&eval("tab"+this.tabIndex+"_returnCalendar").getDate().format("YYYYmmDD"))){this.intRetFormatted.value=eval("tab"+this.tabIndex+"_returnCalendar").getDate().format("YYYYmmDD")+"1200";eval("tab"+this.tabIndex+"_returnCalendar").bookLeadFormattedField.value=this.intRetFormatted.value}}}};PromoFareFlightSearch.prototype.assignOverrides=function(){var form=document.getElementById(this.formId);var country=eval("tab"+this.tabIndex+"_country")[this.from.value];if(this.isSoSiteOfficeIdOverride=="true"){var so_site_office_id_Array=eval("tab"+this.tabIndex+"_so_site_office_id");for(i=0;i<so_site_office_id_Array.length;i++){if(so_site_office_id_Array[i][0]==country){form.pfsSoSiteOfficeId.value=so_site_office_id_Array[i][1];break}}}if(this.isFareFamily2Override=="true"){var fareFamily2_Array;var fareFamily1;if(this.region=="au"||(this.region=="sp"&&country=="NZ")){if(this.isDomestic=="true"){fareFamily2_Array=eval("tab"+this.tabIndex+"_comm_fare_family_2_"+country+"DOM")}else{if(this.intTransTasman=="true"){fareFamily2_Array=eval("tab"+this.tabIndex+"_comm_fare_family_2_"+country+"TT")}else{fareFamily2_Array=eval("tab"+this.tabIndex+"_comm_fare_family_2_"+country+"INT")}}}else{fareFamily2_Array=eval("tab"+this.tabIndex+"_comm_fare_family_2_"+country)}fareFamily1=document.getElementById("tab"+this.tabIndex+"_fareFamily");if(fareFamily1!=null){for(i=0;i<fareFamily2_Array.length;i++){if(fareFamily2_Array[i][1]==fareFamily1[this.fareFamily.selectedIndex].text){this.fareFamily2.value=fareFamily2_Array[i][0];break}}}else{for(i=0;i<fareFamily2_Array.length;i++){if(fareFamily2_Array[0][1]=="DEFAULT"){this.fareFamily2.value=fareFamily2_Array[0][0];break}}}}};PromoFareFlightSearch.prototype.paxCountChk=function(){var element=getTabbedElement(this.tabIndex,"paxCountMultiplier");if(element!=undefined){var paxCountIncludePT1=eval("getTabbedElementValue(this.tabIndex, 'paxCountIncludePT1')");var paxCountIncludePT2=eval("getTabbedElementValue(this.tabIndex, 'paxCountIncludePT2')");var paxCountIncludePT3=eval("getTabbedElementValue(this.tabIndex, 'paxCountIncludePT3')");var paxCountMultiplier=element.value;var objPT1=document.getElementById("tab"+this.tabIndex+"_PT1");var objPT2=document.getElementById("tab"+this.tabIndex+"_PT2");var objPT3=document.getElementById("tab"+this.tabIndex+"_PT3");if(this.validatePax()){var value=0;if(paxCountIncludePT1){if(objPT1!=null&&objPT1.type!="hidden"){var selection=objPT1.selectedIndex;value=eval((objPT1.options[selection]).value)}else{value=eval((objPT1.value))}}if(paxCountIncludePT2){if(objPT2!=null&&objPT2.type!="hidden"){var selection=objPT2.selectedIndex;value=value+eval((objPT2.options[selection]).value)}else{value=eval((objPT2.value))}}if(paxCountIncludePT3){if(objPT3!=null&&objPT3.type!="hidden"){var selection=objPT3.selectedIndex;value=value+eval((objPT3.options[selection]).value)}else{value=eval((objPT3.value))}}if(paxCountIncludePT1||paxCountIncludePT2||paxCountIncludePT3){if(value<paxCountMultiplier){var paxCountErrorMsg=getTabbedElementValue(this.tabIndex,"paxCountErrorMsg");alert(paxCountErrorMsg);return false}}}else{return false}}return true};PromoFareFlightSearch.prototype.changeSortDefault=function(d,f){var e=document.getElementById("tab"+d+"_sortByShown");if(e!=null){if(f=="no"){e.selectedIndex=0}else{e.selectedIndex=1}}};PromoFareFlightSearch.prototype.switchSort=function(m,h){var n=getTabbedElement(m,"PT1SO1")!=undefined?getTabbedElementValue(m,"PT1SO1"):null;var o=getTabbedElement(m,"PT1SO2")!=undefined?getTabbedElementValue(m,"PT1SO2"):null;var j=getTabbedElement(m,"PT2SO1")!=undefined?getTabbedElementValue(m,"PT2SO1"):null;var l=getTabbedElement(m,"PT2SO2")!=undefined?getTabbedElementValue(m,"PT2SO2"):null;var k=getTabbedElement(m,"searchOptionSelection");if(h=="FlexiDatesNo"){k.value="1"}else{k.value="2"}};PromoFareFlightSearch.prototype.populateValues=function(){var tabForm="document.tab"+this.tabIndex+"Form";eval(tabForm+".intDepFormatted").value=eval(tabForm+".tab"+this.tabIndex+"_departFormatted").value;eval(tabForm+".returnFormatted").value=eval(tabForm+".tab"+this.tabIndex+"_returnFormatted").value;eval(tabForm+".departHour").value=eval(tabForm+".tab"+this.tabIndex+"_departHour").value;eval(tabForm+".returnHour").value=eval(tabForm+".tab"+this.tabIndex+"_returnHour").value};PromoFareFlightSearch.prototype.assignPax=function(){var b=document.getElementById(this.formId);this.intAdults=b.intAdults;this.intAdults.value=b.intAdults.value;if(null!=b.intChildren){this.intChildren=b.intChildren;this.intChildren.value=b.intChildren.value}if(null!=b.intInfants){this.intInfants=b.intInfants;this.intInfants.value=b.intInfants.value}};
