//3.0
if (window.ualhpDate)
{}/*do nothing, see else{} statement below, for some reason !window doesnt work*/
else
{
var ff29clientDate = new Date();
if (ff29clientDate.getMonth()==0){ff29clientmonth="Jan"} if (ff29clientDate.getMonth()==1){ff29clientmonth="Feb"}
if (ff29clientDate.getMonth()==2){ff29clientmonth="Mar"} if (ff29clientDate.getMonth()==3){ff29clientmonth="Apr"}
if (ff29clientDate.getMonth()==4){ff29clientmonth="May"} if (ff29clientDate.getMonth()==5){ff29clientmonth="Jun"}
if (ff29clientDate.getMonth()==6){ff29clientmonth="Jul"} if (ff29clientDate.getMonth()==7){ff29clientmonth="Aug"}
if (ff29clientDate.getMonth()==8){ff29clientmonth="Sep"} if (ff29clientDate.getMonth()==9){ff29clientmonth="Oct"}
if (ff29clientDate.getMonth()==10){ff29clientmonth="Nov"} if (ff29clientDate.getMonth()==11){ff29clientmonth="Dec"}
ualhpDate = "NONE "+ff29clientmonth+" "+ff29makedoubledigit(ff29clientDate.getDate())+" NO:NE:NO NONE "+ff29clientDate.getFullYear();
}
var ualHPdateArray = new Array(); ualHPdateArray = ualhpDate.split(' ');
var ualHPtodaysMonth = ualHPdateArray[1]; var ualHPtodaysDay = ualHPdateArray[2]; var ualHPtodaysYear = ualHPdateArray[5];
if (ualHPtodaysMonth=="Jan"){ualHPtodaysMonth=0;} if (ualHPtodaysMonth=="Feb"){ualHPtodaysMonth=1;}
if (ualHPtodaysMonth=="Mar"){ualHPtodaysMonth=2;} if (ualHPtodaysMonth=="Apr"){ualHPtodaysMonth=3;}
if (ualHPtodaysMonth=="May"){ualHPtodaysMonth=4;} if (ualHPtodaysMonth=="Jun"){ualHPtodaysMonth=5;}
if (ualHPtodaysMonth=="Jul"){ualHPtodaysMonth=6;} if (ualHPtodaysMonth=="Aug"){ualHPtodaysMonth=7;}
if (ualHPtodaysMonth=="Sep"){ualHPtodaysMonth=8;} if (ualHPtodaysMonth=="Oct"){ualHPtodaysMonth=9;}
if (ualHPtodaysMonth=="Nov"){ualHPtodaysMonth=10;} if (ualHPtodaysMonth=="Dec"){ualHPtodaysMonth=11;}
var ualHPyesterday=new Date(ualHPtodaysYear, ualHPtodaysMonth, ualHPtodaysDay); ualHPyesterday.setDate(ualHPyesterday.getDate()-1);
//var ualHPdaybeforeyesterday=new Date(ualHPtodaysYear, ualHPtodaysMonth, ualHPtodaysDay); //ualHPdaybeforeyesterday.setDate(ualHPdaybeforeyesterday.getDate()-2);
var ualHPtoday=new Date(ualHPtodaysYear, ualHPtodaysMonth, ualHPtodaysDay); ualHPtoday.setDate(ualHPtoday.getDate());
var ualHPtomorrow=new Date(ualHPtodaysYear, ualHPtodaysMonth, ualHPtodaysDay); ualHPtomorrow.setDate(ualHPtomorrow.getDate()+1)
var ualHPnextWeek=new Date(ualHPtodaysYear, ualHPtodaysMonth, ualHPtodaysDay); ualHPnextWeek.setDate(ualHPnextWeek.getDate()+14);
var ualHPtwoWeeks=new Date(ualHPtodaysYear, ualHPtodaysMonth, ualHPtodaysDay); ualHPtwoWeeks.setDate(ualHPtwoWeeks.getDate()+21);
var todaysYear = ualHPtoday.getFullYear();
var todaysMonth = ualHPtoday.getMonth();
var todaysDate = ualHPtoday.getDate()-1;
var plusFourteenYear = ualHPnextWeek.getFullYear();
var plusFourteenMonth = ualHPnextWeek.getMonth();
var plusFourteenDate = ualHPnextWeek.getDate()-1;
var plusTwentyoneYear = ualHPtwoWeeks.getFullYear();
var plusTwentyoneMonth = ualHPtwoWeeks.getMonth();
var plusTwentyoneDate = ualHPtwoWeeks.getDate()-1;
var ff29FlightStatusOptions = '\n';
ff29FlightStatusOptions += '\n';
ff29FlightStatusOptions += '\n';
// these vars are for the DHTML calendars
var ff29TodayYearMonth=todaysYear+"-";
if (todaysMonth+1>=10){ff29TodayYearMonth+=(todaysMonth+1)} else {ff29TodayYearMonth+="0"+(todaysMonth+1);}
var ff29TodayCalendarDay=todaysDate+1;
var ff29DepYearMonth=plusFourteenYear+"-";
if (plusFourteenMonth+1>=10){ff29DepYearMonth+=(plusFourteenMonth+1)} else {ff29DepYearMonth+="0"+(plusFourteenMonth+1);}
var ff29DepCalendarDay=plusFourteenDate+1;
var ff29RetYearMonth=plusTwentyoneYear+"-";
if (plusTwentyoneMonth+1>=10){ff29RetYearMonth+=(plusTwentyoneMonth+1)} else {ff29RetYearMonth+="0"+(plusTwentyoneMonth+1);}
var ff29RetCalendarDay=plusTwentyoneDate+1;
// ************************************************************************************************************************
ff29mode=1;
ff29tabs = new Array();
ff29tabs[0] = new Image(40,81); ff29tabs[0].src = "/core/images/box_30/en/hp30_tab_BT_on.gif";
ff29tabs[1] = new Image(40,81); ff29tabs[1].src = "/core/images/box_30/en/hp30_tab_BT_off.gif";
ff29tabs[2] = new Image(40,81); ff29tabs[2].src = "/core/images/box_30/en/hp30_tab_BT_off_roll.gif";
ff29tabs[3] = new Image(40,82); ff29tabs[3].src = "/core/images/box_30/en/hp30_tab_CI_on.gif";
ff29tabs[4] = new Image(40,82); ff29tabs[4].src = "/core/images/box_30/en/hp30_tab_CI_off.gif";
ff29tabs[5] = new Image(40,82); ff29tabs[5].src = "/core/images/box_30/en/hp30_tab_CI_off.gif";
ff29tabs[6] = new Image(40,82); ff29tabs[6].src = "/core/images/box_30/en/hp30_tab_CI_off_roll.gif";
ff29tabs[7] = new Image(40,82); ff29tabs[7].src = "/core/images/box_30/en/hp30_tab_CI_off_roll.gif";
ff29tabs[8] = new Image(40,81); ff29tabs[8].src = "/core/images/box_30/en/hp30_tab_FS_off.gif";
ff29tabs[9] = new Image(40,81); ff29tabs[9].src = "/core/images/box_30/en/hp30_tab_FS_off.gif";
ff29tabs[10] = new Image(40,81); ff29tabs[10].src = "/core/images/box_30/en/hp30_tab_FS_off_roll.gif";
ff29tabs[11] = new Image(40,81); ff29tabs[11].src = "/core/images/box_30/en/hp30_tab_FS_off_roll.gif";
ff29tabs[12] = new Image(40,81); ff29tabs[12].src = "/core/images/box_30/en/hp30_tab_FS_on.gif";
//ff29tabs[5] = new Image(40,82); ff29tabs[5].src = "/core/images/box_30/en/hp30_tab_CI2_off.gif";
//ff29tabs[7] = new Image(40,82); ff29tabs[7].src = "/core/images/box_30/en/hp30_tab_CI2_off_roll.gif";
//ff29tabs[9] = new Image(40,81); ff29tabs[9].src = "/core/images/box_30/en/hp30_tab_FS2_off.gif";
//ff29tabs[11] = new Image(40,81); ff29tabs[11].src = "/core/images/box_30/en/hp30_tab_FS2_off_roll.gif";
ffimagepath = "/core/images/ffbt/en/";
var tempmoreoptions = "More searching nice options";
var tempff29Dlabel = "Check-in date";
var tempff29Rlabel = "Check-out date";
if(homePageCheck){
// append body tag with onload attribute
// FOR NON-IE
if (!document.all) { document.getElementsByTagName('body')[0].setAttribute('onload', 'ff29init();'); }
// FOR IE
if (document.all) { window.attachEvent('onload',ff29init); }
//-->
}
//add event to onload event for PB
function addEvent(obj, evType, fn){
if (obj.addEventListener){
obj.addEventListener(evType, fn, false);
return true;
} else if (obj.attachEvent){
var r = obj.attachEvent("on"+evType, fn);
return r;
} else {
return false;
}
}
addEvent(window, 'load', ff29init);
function ff29makedoubledigit(digitString)
{
digitString = digitString.toString();
if (digitString.length==1) { digitString = "0"+digitString; }
return digitString;
}
function ff29init()
{
document.getElementById('flightADTmain').selectedIndex=0;
if (document.getElementById('wayOne').checked)
{
ff29ToggleReturn('wayOne');
}
if (document.getElementById('wayRound').checked)
{
ff29ToggleReturn('wayRound');
}
if ( (document.getElementById('SearchBySCHEDULE').checked==false) && (document.getElementById('SearchByPRICE').checked==false) && (document.getElementById('SearchByFLEXDATE').checked==false) )
{
document.getElementById('SearchByPRICE').checked=true;
}
hideVacations();
}
function ff29roll(currTab,polarity)
{
if (currTab==1 && currTab!=ff29mode) {
if(polarity=="over") {document.images['ff29tab1'].src=ff29tabs[2].src;}
if(polarity=="out") {document.images['ff29tab1'].src=ff29tabs[1].src;}
}
if(currTab==2 && currTab!=ff29mode) {
if(ff29mode==1) {
if(polarity=="over") {document.images['ff29tab2'].src=ff29tabs[6].src;}
if(polarity=="out") {document.images['ff29tab2'].src=ff29tabs[4].src;}
}
if(ff29mode==3) {
if(polarity=="over") {document.images['ff29tab2'].src=ff29tabs[7].src;}
if(polarity=="out") {document.images['ff29tab2'].src=ff29tabs[5].src;}
}
}
if(currTab==3 && currTab!=ff29mode) {
if(ff29mode==1) {
if(polarity=="over") {document.images['ff29tab3'].src=ff29tabs[10].src;}
if(polarity=="out") {document.images['ff29tab3'].src=ff29tabs[8].src;}
}
if(ff29mode==2) {
if(polarity=="over") {document.images['ff29tab3'].src=ff29tabs[11].src;}
if(polarity=="out") {document.images['ff29tab3'].src=ff29tabs[9].src;}
}
}
}
function ff29click(currTab)
{
ff29mode=currTab;
if(homePageCheck){
oCalPopD.ShowCal(false);oCalPopR.ShowCal(false);
}
// Start - FSN Part 2 Tab to button conversion
chgBtn1=document.getElementById('ff29b1')
chgBtn2=document.getElementById('ff29b2')
chgBtn3=document.getElementById('ff29b3')
if (currTab==1) {
chgBtn1.innerHTML="Flights";
chgBtn2.innerHTML="Check-in";
chgBtn3.innerHTML="Flight Status";
chgBtn1.className='ff29on';
chgBtn2.className='';
chgBtn3.className='';
}
if (currTab==2) {
chgBtn1.innerHTML="Flights";
chgBtn2.innerHTML="Check-in";
chgBtn3.innerHTML="Flight Status";
chgBtn1.className='';
chgBtn2.className='ff29on';
chgBtn3.className='';
}
if (currTab==3) {
chgBtn1.innerHTML="Flights";
chgBtn2.innerHTML="Check-in";
chgBtn3.innerHTML="Flight Status";
chgBtn1.className='';
chgBtn2.className='';
chgBtn3.className='ff29on';
}
// End - FSN Part 2
for(i=1;i<4;i++)
{ document.getElementById("ff29pane"+i).style.display="none"; }
document.getElementById("ff29pane"+ff29mode).style.display="block";
// vs | begin
for (i=0;iMore search options';
document.getElementById("dateContainer").style.display="block";
document.getElementById("ff29Dlabel").innerHTML = "Check-in date";
document.getElementById("ff29Rlabel").innerHTML = "Check-out date";
document.getElementById("ff29search").style.display="block";
document.getElementById("ff29search").style.padding="0px 0px 10px 0px;";
document.getElementById("ff29adjacentDep").style.display="none";
document.getElementById("ff29adjacentRet").style.display="none";
document.getElementById("hpHotelsPromo").style.display="block";
document.getElementById("ff29Aftersearchbutton").style.display="none";
document.getElementById("ff29Ritem").style.display="block";
document.getElementById("ff29Rlabel").style.display="block";
document.getElementById("dateContainer").style.backgroundColor="ffffff";
}
if (tsMode==3)
{
document.getElementById("ff29adjacentSearch").innerHTML = "";
document.getElementById("dateContainer").style.display="none"; // hide date picker
document.getElementById("ff29Dlabel").innerHTML = " ";
document.getElementById("ff29Rlabel").innerHTML = " ";
document.getElementById("ff29search").style.display="none";
document.getElementById("ff29search").style.padding="0px 0px 10px 0px;";
document.getElementById("ff29adjacentDep").style.display="none";
document.getElementById("ff29adjacentRet").style.display="none";
document.getElementById("hpHotelsPromo").style.display="none";
document.getElementById("ff29Aftersearchbutton").style.display="none";
document.getElementById("ff29Ritem").style.display="block";
document.getElementById("ff29Rlabel").style.display="block";
document.getElementById("dateContainer").style.backgroundColor="ffffff";
}
if (tsMode==4)
{
document.getElementById("ff29adjacentSearch").innerHTML = 'More search options';
document.getElementById("dateContainer").style.display="block";
document.getElementById("ff29Dlabel").innerHTML = "Departing";
document.getElementById("ff29Rlabel").innerHTML = "Returning";
document.getElementById("ff29search").style.display="block";
document.getElementById("ff29search").style.padding="0px 0px 10px 0px;";
document.getElementById("ff29adjacentDep").style.display="none";
document.getElementById("ff29adjacentRet").style.display="none";
document.getElementById("hpHotelsPromo").style.display="none";
document.getElementById("ff29Aftersearchbutton").style.display="none";
document.getElementById("ff29Ritem").style.display="block";
document.getElementById("ff29Rlabel").style.display="block";
document.getElementById("dateContainer").style.backgroundColor="f5f5f5";
}
var ff29controllerstring="";
ff29controllerstring+='
';
ff29controllerstring+='
';
for(j=1;j<5;j++)
{
if (j!=tsMode){ff29controllerstring+='
';}
else {ff29controllerstring+='
';}
}
ff29controllerstring+='
';
ff29controllerstring+='
';
document.getElementById("ff29pane1controller").innerHTML = ff29controllerstring;
// vs | begin
for (i=0;i 0) && (typeOfsearch=="options") )
{
hotelQueryStr+="&loid=-1";
hotelQueryStr+="&locn="+document.getElementById('hotelD').value;
}
vsCustomItems[vsCustomItems.length] = new Array("v_pc","HP07");
vsCustomItems[vsCustomItems.length] = new Array("v_ln",linkName);
window.location="http://"+hotelQueryStr;
return false;
}
hotelQueryStr+="&olid=&mdpcid=11378-30001.13.";
hotelQueryStr+="&CityName="+document.getElementById('hotelD').value;
hotelQueryStr+="&InDate="+hotelDsplit[1]+"/"+document.getElementById("shop_departday").value+"/"+hotelDsplit[0];
hotelQueryStr+="&OutDate="+hotelRsplit[1]+"/"+document.getElementById("shop_arriveday").value+"/"+hotelRsplit[0];
hotelQueryStr+="&NumRoom=1";
hotelQueryStr+="&NumAdult="+document.getElementById('hotelAdults').value+"&NumChild=0";
window.location="http://"+hotelQueryStr;
return false;
}
if (ff29tsMode==3)
{
//do nothing, this is the car rental section
//if necessary a car-quote HTTP GET could be formulated here
}
if (ff29tsMode==4)
{
if (typeOfsearch=="normal")
{
if (document.getElementById('vacationO').value == "")
{
alert("Departing location (From) is a required field.");
return false;
}
if (document.getElementById('vacationD').value == "")
{
alert("Destination location (To) is a required field");
return false;
}
}
// query vacations (united vacations)
var vacationsD = document.getElementById("shop_departmonth").value;
var vacationsDsplit = new Array(); vacationsDsplit = vacationsD.split('-');
var vacationsR = document.getElementById("shop_arrivemonth").value;
var vacationsRsplit = new Array(); vacationsRsplit = vacationsR.split('-');
var VacationsQueryStr ="";
VacationsQueryStr+="reservations.unitedvacations.com/search/search.aspx?";
VacationsQueryStr+="&gsVendor=UAT&cartid=&customerid=&plcode="; // irrelevant at the moment, but must be in the search string..
if(document.getElementById("vacAHC").checked==true) { VacationsQueryStr+="&gsvacationtype=AHC01"};
if(document.getElementById("vacAH").checked==true) { VacationsQueryStr+="&gsvacationtype=AH01" };
if(document.getElementById("vacAC").checked==true) { VacationsQueryStr+="&gsvacationtype=AC01" };
if(document.getElementById("vacHC").checked==true) { VacationsQueryStr+="&gsvacationtype=HC01" };
if (typeOfsearch=="options")
{
window.location = "http://res.unitedvacations.com/search/Default.aspx?Referrer=Z24";
}
VacationsQueryStr+="&gsOrigin="+document.getElementById('vacationO').value; // orig
VacationsQueryStr+="&gsDestination="+document.getElementById('vacationD').value; // dest
VacationsQueryStr+="&gsNumberOfTravelers="+document.getElementById('vacationsAdults').value; // number of travelers
var qpfdepartMonth=document.getElementById('shop_departmonth').value;
var qpfarriveMonth=document.getElementById('shop_arrivemonth').value;
VacationsQueryStr+="&gsDepartureDate="+qpfdepartMonth.substr(5,2)+"/"+document.getElementById('shop_departday').value+"/"+qpfdepartMonth.substr(2,2); // ret
VacationsQueryStr+="&gslengthofstay="; // irrelevant at the moment, but must be in the search string..
VacationsQueryStr+="&gsReturnDate="+qpfarriveMonth.substr(5,2)+"/"+document.getElementById('shop_arriveday').value+"/"+qpfarriveMonth.substr(2,2); // dep
VacationsQueryStr+="&Referrer=Z24"; // this is really important to have in the string..
window.location="http://"+VacationsQueryStr;
return false;
}
}
function ff29popup(wURL)
{
window.open(wURL,"ff29","width=550,height=400,top=20,left=20,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=yes")
}
function ff30popup(wURL,varToPass)
{
window.open(wURL+varToPass,"ff29","width=550,height=400,top=20,left=20,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=yes")
}
function ff29DatesFlexible() {
var telescopeQuery="";
telescopeQuery+="http://travel.united.com/ube/core/"+ countryTel+ "/shop.do?shop_viewresults=FLEXDATE&shop_triptype=roundtrip";
//try these 3 lines SHD
telescopeQuery+="&changeLanguage=false";
telescopeQuery+="&languageRedisplayPage=%2Fjsp%2Fshop%2FShop.jsp";
telescopeQuery+="&lang="+langUA2GO;
var shopFrom0Val = document.getElementById("shop_from0").value;
var shopTo0Val = document.getElementById("shop_to0").value;
shopFrom0Val = shopFrom0Val.replace("(","");
shopTo0Val = shopTo0Val.replace("(","");
document.getElementById("shop_from0").value=shopFrom0Val;
document.getElementById("shop_to0").value=shopTo0Val;
telescopeQuery+="&shop_from0="+document.getElementById("shop_from0").value;
telescopeQuery+="&shop_to0="+document.getElementById("shop_to0").value;
if (document.getElementById("fromnearby1").checked==true) {telescopeQuery+="&shop_fromnearbyairport0=on";}
if (document.getElementById("tonearby1").checked==true) {telescopeQuery+="&shop_tonearbyairport0=on";}
telescopeQuery+="&shop_departmonth0="+document.getElementById("shop_departmonth").value;
telescopeQuery+="&shop_departday0="+document.getElementById("shop_departday").value;
telescopeQuery+="&shop_departtime0="+document.getElementById("shop_departtime").value;
telescopeQuery+="&shop_arrivemonth0="+document.getElementById("shop_arrivemonth").value;
telescopeQuery+="&shop_arriveday0="+document.getElementById("shop_arriveday").value;
telescopeQuery+="&shop_arrivetime0="+document.getElementById("shop_arrivetime").value;
if (flightschildandseniorvisible!=true) {
telescopeQuery+="&shop_passenger0="+document.getElementById("flightADTmain").value;
telescopeQuery+="&shop_passenger1=0-SRC";
telescopeQuery+="&shop_passenger2=0-CNN";
} else {
telescopeQuery+="&shop_passenger0="+document.getElementById("flightADT").value;
telescopeQuery+="&shop_passenger1="+document.getElementById("flightSRC").value;
telescopeQuery+="&shop_passenger2="+document.getElementById("flightCNN").value;
}
//Code added for FSNE Part 2 - starts
var isRefundable="off";
var tempServiceVal = document.getElementById("serviceclass").value +"-NON-REFUNDABLE";
if(document.getElementById("refundable").checked)
{
isRefundable="on";
var tempServiceVal = document.getElementById("serviceclass").value +"-REFUNDABLE";
}
else
{
isRefundable="off";
var tempServiceVal = document.getElementById("serviceclass").value +"-NON-REFUNDABLE";
}
if (affType==2 || affType==3)
{
telescopeQuery+="&shop_serviceclass="+document.getElementById("affserviceclass").value;
telescopeQuery+="&shop_stops="+document.getElementById("affstops").value;
}
else
{
telescopeQuery+="&shop_serviceclass="+tempServiceVal;
}
telescopeQuery+="&shop_cabinclass="+ document.getElementById("serviceclass").value;
telescopeQuery+="&shop_cabinrefundable="+isRefundable;
if (affType==1) {
telescopeQuery+="&shop_promotioncode="+document.getElementById("flightPromocode").value;
}
//Code added for FSNE Part 2 - ends
window.location=telescopeQuery;
}