
var toStations = [
["AMS","Amsterdam"],
["BCN","Barcelona"],
["DUB","Dublin"],
["EDI","Edinburgh"],
["FRA","Frankfurt"],
["GLA","Glasgow"],
["MAD","Madrid (Barajas)"],
["NCE","Nice"],
["WAW","Warsaw"],
["ZRH","Zurich","EUR"]
];
var fromStations = [
["LCY","London (City Airport)"]
];
$(pageSetup);
function pageSetup() {
$("#underground1").show();
$("#undergroundContent").show();
$("#dlrContent").hide();
$("#carContent").hide();
$("#taxiContent").hide();


$("#underground1").toggle(function () {
$("#undergroundContent").slideToggle("slow");
$("#underground1 .twistie img").attr("src","http://ecp-uat2.baplc.com/cms/global/assets/images/site/icon/collapsedTwisty.gif");
},
function () {
$("#undergroundContent").slideToggle("slow");
$("#underground1 .twistie img").attr("src","http://ecp-uat2.baplc.com/cms/global/assets/images/site/icon/expandedTwisty.gif");
}
);

$("#dlr1").toggle(function () {
$("#dlrContent").slideToggle("slow");
$("#dlr1 .twistie img").attr("src","http://ecp-uat2.baplc.com/cms/global/assets/images/site/icon/expandedTwisty.gif");
},
function () {
$("#dlrContent").slideToggle("slow");
$("#dlr1 .twistie img").attr("src","http://ecp-uat2.baplc.com/cms/global/assets/images/site/icon/collapsedTwisty.gif");
}
);

$("#car1").toggle(function () {
$("#carContent").slideToggle("slow");
$("#car1 .twistie img").attr("src","http://ecp-uat2.baplc.com/cms/global/assets/images/site/icon/expandedTwisty.gif");
},
function () {
$("#carContent").slideToggle("slow");
$("#car1 .twistie img").attr("src","http://ecp-uat2.baplc.com/cms/global/assets/images/site/icon/collapsedTwisty.gif");
}
);

$("#taxi1").toggle(function () {
$("#taxiContent").slideToggle("slow");
$("#taxi1 .twistie img").attr("src","http://ecp-uat2.baplc.com/cms/global/assets/images/site/icon/expandedTwisty.gif");
},
function () {
$("#taxiContent").slideToggle("slow");
$("#taxi1 .twistie img").attr("src","http://ecp-uat2.baplc.com/cms/global/assets/images/site/icon/collapsedTwisty.gif");
}
);
}
function setupLeavingFrom() {
var leavingFromHTML = '<select class="country" id="from" name="from">'
var stationRec = ["", ""];
for (var i = 0; i < fromStations.length; i++) {
stationRec = fromStations[i];
leavingFromHTML += '<option value="' + stationRec[0] + '" selected>' + stationRec[1] + '</option>';
}
leavingFromHTML += '</select>';
document.getElementById("fromDIV").innerHTML = leavingFromHTML;
}
function setupGoingTo() {
var goingToHTML = '<select class="country" id="to" name="to">'
var stationRec = ["", ""];
var destinationName = "";
for (var i = 0; i < toStations.length; i++) {
stationRec = toStations[i];
goingToHTML += '<option value="' + stationRec[0] + '" >' + stationRec[1] + '</option>';
}
goingToHTML += '</select>';
document.getElementById("toDIV").innerHTML = goingToHTML;
}
function displayDayDropdown(dayName, dayId, daysToAdd, tabbingOrder, id) {
var dayHTML;
myDate = new Date();
myDate.setDate(myDate.getDate() + daysToAdd);

dayHTML = '<select name="' + dayName + '" id="' + dayId + '" tabindex="' + tabbingOrder + '">';
for(i=1; i <= 31; i++)
{
var selected = (myDate.getDate() == i) ? "selected " : "";
dayHTML += '<option value="' + i + '" ' + selected + '>' + i + '</option>';
}
dayHTML += '</select>';
document.getElementById(id).innerHTML = dayHTML;
}
function displayMonthDropdown(mthName, daysToAdd, tabbingOrder, id) {
var monthList = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
var monthHTML;
myDate = new Date();
myDate.setDate(myDate.getDate() + daysToAdd);

monthHTML = '<select name="' + mthName + '" tabindex="' + tabbingOrder + '">';
for(i=0; i < monthList.length; i++)
{
var selected = (myDate.getMonth() == i) ? "selected " : "";
monthHTML += '<option value="' + (i + 1) + '" ' + selected + '>' + monthList[i] + '</option>';
}
monthHTML += '</select>';
document.getElementById(id).innerHTML = monthHTML;
}
function displayYearDropdown(yearName, tabbingOrder, id) {
var yearListCount = 3;
var yearHTML;
myDate = new Date();

yearHTML = '<select name="' + yearName + '" tabindex="' + tabbingOrder + '">';
for(i=0; i < yearListCount; i++)
{
var selected = (myDate.getFullYear() == i) ? "selected " : "";
yearHTML += '<option value="' + (myDate.getFullYear() + i) + '" ' + selected + '>' + (myDate.getFullYear() + i) + '</option>';
}
yearHTML += '</select>';
document.getElementById(id).innerHTML = yearHTML;
}
function loadfareexplorer() {
fr = "&from=" + document.journey.from[document.journey.from.selectedIndex].value;
to = "&to=" + document.journey.to[document.journey.to.selectedIndex].value;
dd = "&depDay=" + document.journey.depDay[document.journey.depDay.selectedIndex].value;
dm = "&depMon=" + document.journey.depMon[document.journey.depMon.selectedIndex].value;
dr = "&depRng=" + document.journey.depRng[document.journey.depRng.selectedIndex].value;
rd = "&retDay=" + document.journey.retDay[document.journey.retDay.selectedIndex].value;
rm = "&retMon=" + document.journey.retMon[document.journey.retMon.selectedIndex].value;
rr = "&retRng=" + document.journey.retRng[document.journey.retRng.selectedIndex].value;
ad = "&ad=" + document.journey.ad[document.journey.ad.selectedIndex].value;
ch = "&ch=" + document.journey.ch[document.journey.ch.selectedIndex].value;
inf = "&inf=" + document.journey.inf[document.journey.inf.selectedIndex].value;
promo = "&source=woffers_sept06_map_book_" + document.journey.from[document.journey.from.selectedIndex].value + "_" + document.journey.to[document.journey.to.selectedIndex].value + "&BAHPromo_Code=sepwoff06";
if (document.nav_form.logintype.value == 'public') {
cug = "?eId=111042";
}
else
{
cug = "/cugAlias-za075?source=CUG_za075&eId=111042";
}
document.location.href = '/' + document.nav_form.audience.value + '/fx/' + document.nav_form.logintype.value + '/' +
document.nav_form.language.value + '_' + document.nav_form.country.value + cug + fr + to + dd + dm + rd + rm + ad + ch + inf + promo;
}
function showProduct(cat) {
document.getElementById('flightPanel').style.display='none';
document.getElementById('hotelPanel').style.display='none';
document.getElementById('carPanel').style.display='none';
panelToShow=cat+'Panel';
document.getElementById(panelToShow).style.display='block';
document.getElementById('flightTab').style.backgroundPosition='top left';
document.getElementById('hotelTab').style.backgroundPosition='top left';
document.getElementById('carTab').style.backgroundPosition='top left';
tabToHighlight=cat+'Tab';
document.getElementById(tabToHighlight).style.backgroundPosition='-87px 0px';
}
function checkDisableRet() {
with(document)
{
if (plan_trip.journeyType.checked==true)
{
plan_trip.retDate.disabled=true;
}
else
{
plan_trip.retDate.disabled=false;
}
}
}
function functionalPageLoad() {

document.getElementById('from').value = 'LCY';




















}
function toggleDestinations(){

}

