﻿var Imageurl = 'http://www.nationalexpress.com/nxportal2/Images/';
var Siteurl = 'http://www.nationalexpress.com/';
var AirportHtmlUrl = 'http://www.nationalexpress.com/airporttransfers/';

//var iExhibitionCount = 0;
var iExhibitionCount = 1;
var bisHomePage = 0;
var OptTotal = 0;
var bisHomePage = 0;
var sElemspan = new Array("page1", "page2", "page3", "page4");

/*********************Lighbox functions***************************/
function changeCoachLocation(from, to) {
    var fromLoc = document.getElementById(from).value;
    var toLoc = document.getElementById(to).value;

    if (fromLoc == '') {
        alert("Please enter where you are travelling from");
        return false;
    }
    if (toLoc == '') {
        alert("Please enter where you are travelling from");
        return false;
    }
    var type = 's';
    if (document.getElementById("selectjtypeSingle").checked)
        type = 's';
    else if (document.getElementById("selectjtypeReturn").checked)
        type = 'r';

    //document.getElementById('divloader').style.display="inline";
    hideLightbox();
    showLightbox();
    $("#lightbox").show();
    $.ajax
    ({
        url: "funfares.aspx",
        data: "fromLoc=" + fromLoc + "&toLoc=" + toLoc + "&jtype=" + type,
        success: function(message1) {
            //document.getElementById('divloader').style.display="none";
            $("#lightbox").html(message1);
        }
    });

}
function changeCoachMonth(fromLoc, toLoc, type, sd) {

    //document.getElementById('divloader').style.display="inline";
    hideLightbox();
    showLightbox();
    $("#lightbox").show();
    $.ajax
    ({
        url: "funfares.aspx",
        data: "fromLoc=" + fromLoc + "&toLoc=" + toLoc + "&jtype=" + type + "&sd=" + sd,
        success: function(message1) {
            //document.getElementById('divloader').style.display="none";

            $("#lightbox").append(message1);
        }
    });
}
function changeCoachMonth2(fromLoc, toLoc, od, month, type, sd) {
    hideLightbox();
    showLightbox();
    $("#lightbox").show();
    //document.getElementById('divloader').style.display="inline";
    $.ajax
    ({
        url: "funfares.aspx",
        data: "fromLoc=" + fromLoc + "&toLoc=" + toLoc + "&od=" + od + "&om=" + month + "&jtype=" + type + "&sd=" + sd,
        success: function(message1) {
            //document.getElementById('divloader').style.display="none";
            $("#lightbox").html(message1);
        }
    });
}
function submitTicketSelection(from, to, od, month, type) {
    //document.getElementById('divloader').style.display="inline";
    hideLightbox();
    showLightbox();
    $("#lightbox").show();
    $.ajax
    ({
        url: "funfares.aspx",
        data: "fromLoc=" + from + "&toLoc=" + to + "&jtype=" + type + "&od=" + od + "&om=" + month,
        success: function(message1) {
            document.getElementById('divloader').style.display = "none";
            $("#lightbox").html(message1);
        }
    });
}
/*********************Lighbox functions Ends***************************/

function setToLocation(dropdownFrom, toID) {
    var dest = document.getElementById(toID);
    switch (dropdownFrom.options[dropdownFrom.selectedIndex].value) {
/*        case "10091": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Birmingham', '33023');
            dest.options[dest.options.length] = new Option('Leeds', '76052');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            dest.options[dest.options.length] = new Option('Manchester', '21131');
            dest.options[dest.options.length] = new Option('Stoke-on-Trent', '20141');
            break;
        case "11081": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "12183": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "12312": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "14225": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Cardiff', '15035');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "15010": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "15035": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Birmingham', '33023');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            dest.options[dest.options.length] = new Option('Swansea', '14225');
            break;
        case "15255": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "17043": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "17263": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "17353": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "19063": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            dest.options[dest.options.length] = new Option('Manchester', '21131');
            break;
        case "20141": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Liverpool', '10091');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "20233": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "21131": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Birmingham', '33023');
            dest.options[dest.options.length] = new Option('Bristol', '41065');
            dest.options[dest.options.length] = new Option('Glasgow', '67157');
            dest.options[dest.options.length] = new Option('Leeds', '76052');
            dest.options[dest.options.length] = new Option('Leicester', '35064');
            dest.options[dest.options.length] = new Option('Liverpool', '10091');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            dest.options[dest.options.length] = new Option('Newcastle upon Tyne', '69092');
            dest.options[dest.options.length] = new Option('Nottingham', '29044');
            dest.options[dest.options.length] = new Option('Sheffield', '25072');
            dest.options[dest.options.length] = new Option('Wolverhampton', '19063');
            break;
        case "25072": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Birmingham', '33023');
            dest.options[dest.options.length] = new Option('Leeds', '76052');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            dest.options[dest.options.length] = new Option('Manchester', '21131');
            dest.options[dest.options.length] = new Option('Newcastle upon Tyne', '69092');
            break;
        case "27044": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "29044": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Birmingham', '33023');
            dest.options[dest.options.length] = new Option('Leeds', '76052');
            dest.options[dest.options.length] = new Option('Leicester', '35064');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            dest.options[dest.options.length] = new Option('Manchester', '21131');
            break; case "33017": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "33019": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "33021": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "33023": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Bristol', '41065');
            dest.options[dest.options.length] = new Option('Blackpool', '77131');
            dest.options[dest.options.length] = new Option('Cardiff', '15035');
            dest.options[dest.options.length] = new Option('Glasgow', '67157');
            dest.options[dest.options.length] = new Option('Leeds', '76052');
            dest.options[dest.options.length] = new Option('Leicester', '35064');
            dest.options[dest.options.length] = new Option('Liverpool', '10091');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            dest.options[dest.options.length] = new Option('Manchester', '21131');
            dest.options[dest.options.length] = new Option('Nottingham', '29044');
            dest.options[dest.options.length] = new Option('Oxford', '49073');
            dest.options[dest.options.length] = new Option('Preston', '77061');
            dest.options[dest.options.length] = new Option('Sheffield', '25072');
            break;
        case "34013": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "35064": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Birmingham', '33023');
            dest.options[dest.options.length] = new Option('Leeds', '76052');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            dest.options[dest.options.length] = new Option('Manchester', '21131');
            dest.options[dest.options.length] = new Option('Nottingham', '29044');
            break; case "35474": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "36114": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "38334": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');

            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "39074": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "40013": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "41065": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Birmingham', '33023');
            dest.options[dest.options.length] = new Option('Exeter', '44035');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            dest.options[dest.options.length] = new Option('Manchester', '21131');
            dest.options[dest.options.length] = new Option('Plymouth', '43345');
            //dest.options[dest.options.length]= new Option('Worcester (Warndon Coachway)','18150');  
            break;
        case "41086": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            dest.options[dest.options.length] = new Option('Birmingham', '33023');
            break; case "42205": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "43015": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Truro', '43595');
            break;
        case "43345": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Bristol', '41065');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "43595": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            dest.options[dest.options.length] = new Option('Penzance', '43015');
            dest.options[dest.options.length] = new Option('Plymouth', '43345');
            break;
        case "44035": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Bristol', '41065');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
        case "87030": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "45155": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "46093": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "49073": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Birmingham', '33023');
            break; case "50124": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "52055": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "52074": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "54174": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Golders Green', '57846');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "56056": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "56236": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "57366": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Aberdeen', '90017');
            dest.options[dest.options.length] = new Option('Aberystwyth', '12183');
            dest.options[dest.options.length] = new Option('Bath Spa', '87025');
            dest.options[dest.options.length] = new Option('Bath University', '87030');
            dest.options[dest.options.length] = new Option('Birmingham', '33023');
            dest.options[dest.options.length] = new Option('Blackpool', '77131');
            dest.options[dest.options.length] = new Option('Bournemouth', '65026');
            dest.options[dest.options.length] = new Option('Bournemouth University', '65656');
            dest.options[dest.options.length] = new Option('Bradford', '76122');
            dest.options[dest.options.length] = new Option('Brighton', '59076');
            dest.options[dest.options.length] = new Option('Bristol', '41065');
            dest.options[dest.options.length] = new Option('Bristol University', '41086');
            dest.options[dest.options.length] = new Option('Cambridge', '52074');
            dest.options[dest.options.length] = new Option('Canterbury', '58056');
            dest.options[dest.options.length] = new Option('Cardiff', '15035');
            dest.options[dest.options.length] = new Option('Cardiff University', '15010');
            dest.options[dest.options.length] = new Option('Cheltenham Spa', '17043');
            dest.options[dest.options.length] = new Option('Chester', '11081');
            dest.options[dest.options.length] = new Option('Cirencester', '17353');
            dest.options[dest.options.length] = new Option('Coventry', '34013');
            dest.options[dest.options.length] = new Option('Darlington', '70142');
            dest.options[dest.options.length] = new Option('Derby', '27044');
            dest.options[dest.options.length] = new Option('Dundee, Scotland', '90097');
            dest.options[dest.options.length] = new Option('Edinburgh, Scotland', '66157');
            dest.options[dest.options.length] = new Option('Exeter', '44035');
            dest.options[dest.options.length] = new Option('Glasgow', '67157');
            dest.options[dest.options.length] = new Option('Gloucester', '17263');
            dest.options[dest.options.length] = new Option('Havant', '64120');
            dest.options[dest.options.length] = new Option('High Wycombe', '56236');
            dest.options[dest.options.length] = new Option('Leeds', '76052');
            dest.options[dest.options.length] = new Option('Leicester', '35064');
            dest.options[dest.options.length] = new Option('Liverpool', '10091');
            dest.options[dest.options.length] = new Option('Loughborough', '35474');
            dest.options[dest.options.length] = new Option('Manchester', '21131');
            dest.options[dest.options.length] = new Option('Middlesbrough', '71062');
            dest.options[dest.options.length] = new Option('Milton Keynes Coachway', '50124');
            dest.options[dest.options.length] = new Option('Newcastle upon Tyne', '69092');
            dest.options[dest.options.length] = new Option('Newport', '15255');
            dest.options[dest.options.length] = new Option('Newquay', '88035');
            dest.options[dest.options.length] = new Option('Northampton', '39074');
            dest.options[dest.options.length] = new Option('Norwich', '38334');
            dest.options[dest.options.length] = new Option('Nottingham', '29044');
            dest.options[dest.options.length] = new Option('Perth, Scotland', '90337');
            dest.options[dest.options.length] = new Option('Peterborough', '36114');
            dest.options[dest.options.length] = new Option('Plymouth', '43345');
            dest.options[dest.options.length] = new Option('Poole', '65416');
            dest.options[dest.options.length] = new Option('Portsmouth', '64186');
            dest.options[dest.options.length] = new Option('Preston', '77061');
            dest.options[dest.options.length] = new Option('Reading - Calcot', '61206');
            dest.options[dest.options.length] = new Option('Ringwood', '65027');
            dest.options[dest.options.length] = new Option('Southall', '57430');
            dest.options[dest.options.length] = new Option('Sheffield', '25072');
            dest.options[dest.options.length] = new Option('Southampton', '65136');
            dest.options[dest.options.length] = new Option('Southampton University', '65167');
            dest.options[dest.options.length] = new Option('Slough', '56056');
            dest.options[dest.options.length] = new Option('Stafford', '20233');
            dest.options[dest.options.length] = new Option('Stoke-on-Trent', '20141');
            dest.options[dest.options.length] = new Option('Sunderland', '71112');
            dest.options[dest.options.length] = new Option('Swansea', '14225');
            dest.options[dest.options.length] = new Option('Swindon', '46093');
            dest.options[dest.options.length] = new Option('Taunton', '42205');
            dest.options[dest.options.length] = new Option('Warwick (University)', '40013');
            dest.options[dest.options.length] = new Option('Wolverhampton', '19063');
            dest.options[dest.options.length] = new Option('Worthing', '63196');
            break; case "57430": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "57456": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Stansted Airport', '54174');
            break; case "57846": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Stansted Airport', '54174');
            break;
        case "58056": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "58136": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "59076": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "61206": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "63196": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "64120": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "64186": dest.length = 0;
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "65026": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "65027": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "65136": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "65167": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "65416": dest.length = 0;
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "65576": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Coventry', '34013');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "65656": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "66157": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Birmingham', '33023');
            dest.options[dest.options.length] = new Option('Blackpool', '77131');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            dest.options[dest.options.length] = new Option('Manchester', '21131');
            break;
        case "67157": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Birmingham', '33023');
            dest.options[dest.options.length] = new Option('Blackpool', '77131');
            dest.options[dest.options.length] = new Option('Leeds', '76052');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            dest.options[dest.options.length] = new Option('Manchester', '21131');
            break;
        case "69092": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Leeds', '76052');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            dest.options[dest.options.length] = new Option('Manchester', '21131');
            dest.options[dest.options.length] = new Option('Sheffield', '25072');
            break; case "70142": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "71062": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "71112": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "74372": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "76002": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "76052": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Birmingham', '33023');
            dest.options[dest.options.length] = new Option('Glasgow', '67157');
            dest.options[dest.options.length] = new Option('Leicester', '35064');
            dest.options[dest.options.length] = new Option('Liverpool', '10091');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            dest.options[dest.options.length] = new Option('Manchester', '21131');
            dest.options[dest.options.length] = new Option('Newcastle upon Tyne', '69092');
            dest.options[dest.options.length] = new Option('Nottingham', '29044');
            dest.options[dest.options.length] = new Option('Sheffield', '25072');
            break;
        case "76122": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "77061": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Birmingham', '33023');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "77131": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('Birmingham', '33023');
            dest.options[dest.options.length] = new Option('Glasgow', '67157');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "87025": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "88035": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break; case "89055": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "90017": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "90097": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "90147": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;
        case "90337": dest.length = 0;
            dest.options[dest.options.length] = new Option('Please select', '-1');
            dest.options[dest.options.length] = new Option('London (central)', '57366');
            break;*/
				case "10091": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Birmingham', '33023');  
					dest.options[dest.options.length] = new Option('Glasgow', '67157');  
					dest.options[dest.options.length] = new Option('Leeds', '76052');  
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
					dest.options[dest.options.length] = new Option('Manchester', '21131');  
					dest.options[dest.options.length] = new Option('Sheffield', '25072');  
					dest.options[dest.options.length] = new Option('Stoke-on-Trent', '20141');  
				break;
				case "11081": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Birmingham', '33023');						
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
					dest.options[dest.options.length] = new Option('Manchester', '21131');
				break;
				case "14225": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Birmingham', '33023'); 
				break;
				case "15010": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "15035": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Birmingham', '33023');
					dest.options[dest.options.length] = new Option('Bristol', '41065');
					dest.options[dest.options.length] = new Option('London (central)', '57366');
				break;
				case "15255": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "17043": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "17263": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "17353": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "19063": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');
					dest.options[dest.options.length] = new Option('Manchester', '21131');  
				break;
				case "20141": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Liverpool', '10091');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "20233": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "21131": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Birmingham', '33023');
					dest.options[dest.options.length] = new Option('Bradford', '76122');
					dest.options[dest.options.length] = new Option('Chester', '11081');
					dest.options[dest.options.length] = new Option('Glasgow', '67157');
					dest.options[dest.options.length] = new Option('Leeds', '76052');
					dest.options[dest.options.length] = new Option('Liverpool', '10091');
					dest.options[dest.options.length] = new Option('London (central)', '57366');
					dest.options[dest.options.length] = new Option('Newcastle upon Tyne', '69092');
					dest.options[dest.options.length] = new Option('Nottingham', '29044');
					dest.options[dest.options.length] = new Option('Sheffield', '25072');
					dest.options[dest.options.length] = new Option('Wolverhampton', '19063');  
				break;
				case "25072": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Birmingham', '33023');
					dest.options[dest.options.length] = new Option('Liverpool', '10091');
					dest.options[dest.options.length] = new Option('London (central)', '57366');
					dest.options[dest.options.length] = new Option('Manchester', '21131');  
					dest.options[dest.options.length] = new Option('Newcastle upon Tyne', '69092');  
				break;
				case "27044": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "29044": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Leeds', '76052');
					dest.options[dest.options.length] = new Option('London (central)', '57366');
					dest.options[dest.options.length] = new Option('Manchester', '21131');  
					dest.options[dest.options.length] = new Option('Newcastle upon Tyne', '69092');  
				break;
				case "33023": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Bristol', '41065');  
					dest.options[dest.options.length] = new Option('Cardiff', '15035');
					dest.options[dest.options.length] = new Option('Chester', '11081');
					dest.options[dest.options.length] = new Option('Exeter', '44035');  
					dest.options[dest.options.length] = new Option('Leeds', '76052');  
					dest.options[dest.options.length] = new Option('Liverpool', '10091');  
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
					dest.options[dest.options.length] = new Option('Manchester', '21131');
					dest.options[dest.options.length] = new Option('Norwich', '38334');  
					dest.options[dest.options.length] = new Option('Oxford', '49073');  
					dest.options[dest.options.length] = new Option('Sheffield', '25072');  
					dest.options[dest.options.length] = new Option('Swindon', '46093');  
					dest.options[dest.options.length] = new Option('Weston-super-mare', '41206');  
				break;
				case "34013": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "35064": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');
				break;
				case "35474": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "36114": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "38334": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Birmingham', '33023');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "39074": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Bristol', '41065');  
				break;
				case "40013": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "41065": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Birmingham', '33023'); 
					dest.options[dest.options.length] = new Option('Cardiff', '15035');
					dest.options[dest.options.length] = new Option('Exeter', '44035');  
					dest.options[dest.options.length] = new Option('London (central)', '57366');
					dest.options[dest.options.length] = new Option('Northampton', '39074');
					dest.options[dest.options.length] = new Option('Oxford', '49073');  
					dest.options[dest.options.length] = new Option('Portsmouth', '64186');  
					dest.options[dest.options.length] = new Option('Salisbury', '89055');  
					dest.options[dest.options.length] = new Option('Southampton', '65136');  
				break;
				case "41086": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "42205": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "44035": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Birmingham', '33023');
					dest.options[dest.options.length] = new Option('Bristol', '41065');  
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "46093": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Birmingham', '33023');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "49073": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Bath Spa', '87025');  
					dest.options[dest.options.length] = new Option('Birmingham', '33023');  
					dest.options[dest.options.length] = new Option('Bournemouth', '65026');  
					dest.options[dest.options.length] = new Option('Bristol', '41065');  
					dest.options[dest.options.length] = new Option('Portsmouth', '64186');  
				break;
				case "52074": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "74092": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366'); 
				break;
				case "41206": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Birmingham', '33023');  
				break;
				case "84053": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');
				break;
				case "75102": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');
				break;
				case "57366": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Bath Spa', '87025'); 
					dest.options[dest.options.length] = new Option('Bexhill', '59768'); 
					dest.options[dest.options.length] = new Option('Birmingham', '33023'); 
					dest.options[dest.options.length] = new Option('Bradford', '76122'); 
					dest.options[dest.options.length] = new Option('Brighton', '59076'); 
					dest.options[dest.options.length] = new Option('Bristol', '41065'); 
					dest.options[dest.options.length] = new Option('Bristol University', '41086'); 
					dest.options[dest.options.length] = new Option('Bury St Edmunds', '53654'); 
					dest.options[dest.options.length] = new Option('Cambridge', '52074'); 
					dest.options[dest.options.length] = new Option('Canterbury', '58056'); 
					dest.options[dest.options.length] = new Option('Cardiff', '15035'); 
					dest.options[dest.options.length] = new Option('Cardiff University', '15010'); 
					dest.options[dest.options.length] = new Option('Chelmsford', '54014');
					dest.options[dest.options.length] = new Option('Cheltenham Spa', '17043'); 
					dest.options[dest.options.length] = new Option('Chester', '11081'); 
					dest.options[dest.options.length] = new Option('Cirencester', '17353'); 
					dest.options[dest.options.length] = new Option('Clacton', '53764');
					dest.options[dest.options.length] = new Option('Colchester', '53074');
					dest.options[dest.options.length] = new Option('Coventry', '34013'); 
					dest.options[dest.options.length] = new Option('Dereham', '37244'); 
					dest.options[dest.options.length] = new Option('Derby', '27044'); 
					dest.options[dest.options.length] = new Option('Devizes', '46145');
					dest.options[dest.options.length] = new Option('Dover', '58136'); 
					dest.options[dest.options.length] = new Option('Eastbourne', '59116'); 
					dest.options[dest.options.length] = new Option('Exeter', '44035'); 
					dest.options[dest.options.length] = new Option('Felixstowe', '53164'); 
					dest.options[dest.options.length] = new Option('Folkstone', '58886'); 
					dest.options[dest.options.length] = new Option('Frome', '87355'); 
					dest.options[dest.options.length] = new Option('Gloucester', '17263'); 
					dest.options[dest.options.length] = new Option('Great Yarmouth', '38174'); 
					dest.options[dest.options.length] = new Option('Hastings', '59766');
					dest.options[dest.options.length] = new Option('Herne Bay', '58236');
					dest.options[dest.options.length] = new Option('Hythe', '58856');
					dest.options[dest.options.length] = new Option('Ipswich', '53234');
					dest.options[dest.options.length] = new Option('Leeds', '76052'); 
					dest.options[dest.options.length] = new Option('Leicester', '35064'); 
					dest.options[dest.options.length] = new Option('Liverpool', '10091');  
					dest.options[dest.options.length] = new Option('Loughborough', '35474');  
					dest.options[dest.options.length] = new Option('Lowestoft', '30044');
					dest.options[dest.options.length] = new Option('Maidstone', '58706');  
					dest.options[dest.options.length] = new Option('Manchester', '21131');  
					dest.options[dest.options.length] = new Option('Margate', '58316');  
					dest.options[dest.options.length] = new Option('Newport', '15255');  
					dest.options[dest.options.length] = new Option('Norwich', '38334');  
					dest.options[dest.options.length] = new Option('Nottingham', '29044');  
					dest.options[dest.options.length] = new Option('Preston', '77061');  
					dest.options[dest.options.length] = new Option('Ramsgate', '58386');
					dest.options[dest.options.length] = new Option('Reading - Calcot', '61206');  
					dest.options[dest.options.length] = new Option('Salisbury', '89055');
					dest.options[dest.options.length] = new Option('Scarborough', '75102');
					dest.options[dest.options.length] = new Option('Sheffield', '25072');
					dest.options[dest.options.length] = new Option('Sheffield Meadowhall', '25092');
					dest.options[dest.options.length] = new Option('Skegness', '31134');
					dest.options[dest.options.length] = new Option('Stratford-upon-Avon', '84053');
					dest.options[dest.options.length] = new Option('Southampton', '65136');  
					dest.options[dest.options.length] = new Option('Southampton University', '65167');  
					dest.options[dest.options.length] = new Option('Stafford', '20233');  
					dest.options[dest.options.length] = new Option('Stoke-on-Trent', '20141');  
					dest.options[dest.options.length] = new Option('Swaffham', '37264');  
					dest.options[dest.options.length] = new Option('Swindon', '46093');  
					dest.options[dest.options.length] = new Option('Trowbridge', '87325');  
					dest.options[dest.options.length] = new Option('Tunbridge Wells', '58586');
					dest.options[dest.options.length] = new Option('Torquay', '44155');
					dest.options[dest.options.length] = new Option('Warwick (University)', '40013');  
					dest.options[dest.options.length] = new Option('Wolverhampton', '19063');
					dest.options[dest.options.length] = new Option('Winchester', '65576');  
					dest.options[dest.options.length] = new Option('York', '74092');
				break;
				case "59076": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "61206": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "64186": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Bristol', '41065'); 
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "65026": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Oxford', '49073');  
					break;
				case "65136": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "65167": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "66157": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Leeds', '76052'); 
					dest.options[dest.options.length] = new Option('Newcastle upon Tyne', '69092');  
				break;
				case "67157": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Liverpool', '10091');  
					dest.options[dest.options.length] = new Option('Manchester', '21131');  
					dest.options[dest.options.length] = new Option('Middlesbrough', '71062');  
					dest.options[dest.options.length] = new Option('Newcastle upon Tyne', '69092');  
					dest.options[dest.options.length] = new Option('Preston', '77061');  
				break;
				case "69092": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Edinburgh', '66157');
					dest.options[dest.options.length] = new Option('Glasgow', '67157');
					dest.options[dest.options.length] = new Option('Leeds', '76052'); 
					dest.options[dest.options.length] = new Option('Manchester', '21131');  
					dest.options[dest.options.length] = new Option('Nottingham', '29044');  
					dest.options[dest.options.length] = new Option('Sheffield', '25072');  
				break;
				case "71062": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Glasgow', '67157');
					dest.options[dest.options.length] = new Option('Leeds', '76052'); 
				break;
				case "76052": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Birmingham', '33023'); 
					dest.options[dest.options.length] = new Option('Edinburgh', '66157');
					dest.options[dest.options.length] = new Option('Liverpool', '10091');  
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
					dest.options[dest.options.length] = new Option('Manchester', '21131');  
					dest.options[dest.options.length] = new Option('Middlesbrough', '71062');  
					dest.options[dest.options.length] = new Option('Newcastle upon Tyne', '69092');  
					dest.options[dest.options.length] = new Option('Nottingham', '29044');
				break;
				case "76122": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
					dest.options[dest.options.length] = new Option('Manchester', '21131');  
				break;
				case "77061": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Glasgow', '67157');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "87025": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
					dest.options[dest.options.length] = new Option('Oxford', '49073');  
				break;
				case "59768": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "53654": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "54014": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "53764": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "53074": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "37244": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "46145": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "58136": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "59116": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "53164": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "58886": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "87355": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "38174": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "59766": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "58236": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "58856": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "53234": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "58316": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "58386": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "89055": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('Bristol', '41065');  
				break;
				case "37264": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "87325": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "58586": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "45155": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "86134": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "58706": dest.length = 0;
					dest.options[dest.options.length] = new Option('Please select', '-1');
					dest.options[dest.options.length] = new Option('London (central)', '57366');  
				break;
				case "0": break;
    }
}

// EAST COAST CHANGES
//function ShowRailCard() {
//    var RailCardDiv = document.getElementById("AddRailCard0");
//    var RailCardLink = document.getElementById("RailCardLink");
//    document.getElementById("chkRailcards").value = "on";
//    if (RailCardDiv.style.display == 'none') {
//        RailCardDiv.style.display = 'block';
//        RailCardLink.style.display = 'none';
//    }
//}
function ShowRailCard() {
    var RailCardDiv = document.getElementById("AddRailCardC2C");
    var RailCardLink = document.getElementById("RailCardLink");
    document.getElementById("chkRailcards").value = "on";
    if (RailCardDiv.style.display == 'none') {
        RailCardDiv.style.display = 'block';
        RailCardLink.style.display = 'none';
    }
}

function AddInput(parentObjID) {
    var parentObj;
    var newFileIndex;
    var newFileInputID;
    var newFileInput;

    if (iExhibitionCount < 9) {
        iExhibitionCount++;
        parentObj = document.getElementById(parentObjID);

        newFileIndex = iExhibitionCount;

        newFileInputID = 'AddRailCard' + newFileIndex;
        newFileInput = document.createElement('div');

        newFileInput.setAttribute("id", newFileInputID);
        newFileInput.className = 'AddRailCardClass';

        var dpdid = 'lstRailcardDetails' + iExhibitionCount;
        var divid = 'SubAddRailCard' + iExhibitionCount;

        newFileInput.innerHTML = '<select id=lstRailcardDetails' + iExhibitionCount + ' name=lstRailcardDetails' + iExhibitionCount + ' class="tr_selectoffer selright" onchange="ShowSubElements(this);"><option value="YNG011">16-25 Railcard</option><option value="DIS121">Disabled </option><option value="FAM141">Family &amp; Friends</option><option value="NGC141">Network Gold Card</option><option value="NEW141">Network </option><option value="HMF111">HM Forces </option><option value="SRY011">Scottish Youth Card</option><option value="SRN011">Senior</option>';
        newFileInput.innerHTML += '<select id=lstRailcardNumber' + iExhibitionCount + ' name=lstRailcardNumber' + iExhibitionCount + ' class="tr_selno"><option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option></select>';
        newFileInput.innerHTML += '<div class="float_left" style="height:20px;"><a id=\'Remove' + iExhibitionCount + '\' class="add" href="javascript:void(0)" onclick="javascript: RemoveInput(this);">Remove</a></div>';
        newFileInput.innerHTML += '<div id=SubAddRailCard' + iExhibitionCount + ' class="AddRailCardClass" style="display:none;"><div class="mbotm float_left" style="width: 84px;"><label class="label label1width1 PaddBottom5" style="width: 84px;">Adults:</label><select id=lstRailcardDetailsAdults' + iExhibitionCount + ' name=lstRailcardDetailsAdults' + iExhibitionCount + ' class="tr_selno" name="NUMBER_OF_ADULTS"></select></div><div class="mbotm float_left" style="width: 84px;"><label class="label label1width1 PaddBottom5" style="width: 84px;">Children:</label><select id=lstRailcardDetailsChildren' + iExhibitionCount + ' name=lstRailcardDetailsChildren' + iExhibitionCount + '  class="tr_selno"  name="NUMBER_OF_CHILDREN"></select></div></div>';

        parentObj.appendChild(newFileInput);
        FillValuesAndSetInitialValues(iExhibitionCount, 'YNG011', 1, 1, 0);
    }

}
function RemoveInput(objRemoveDiv) {
    var objToRemoveID = 'AddRailCard' + objRemoveDiv.id.substring(6, objRemoveDiv.id.length)
    var ObjToRemove = document.getElementById(objToRemoveID);
    var parentObj = ObjToRemove.parentNode;
    var deletedID = ObjToRemove.id.substring(11, ObjToRemove.id.length);
    ObjToRemove.style.display = 'none';
    parentObj.removeChild(ObjToRemove);
    for (var i = deletedID; i < iExhibitionCount; i++) {
        var lastId = parseInt(i) + 1;
        var NewId = parseInt(i);

        document.getElementById('AddRailCard' + lastId).name = 'AddRailCard' + NewId;
        document.getElementById('AddRailCard' + lastId).id = 'AddRailCard' + NewId;
        var divParent = document.getElementById('AddRailCard' + NewId);


        var lstRailCardDetailsvalue = document.getElementById('lstRailcardDetails' + lastId).value;
        var lstRailcardNumbervalue = document.getElementById('lstRailcardNumber' + lastId).value;
        var lstRailcardDetailsAdultsvalue = document.getElementById('lstRailcardDetailsAdults' + lastId).value;
        var lstRailcardDetailsChildren = document.getElementById('lstRailcardDetailsChildren' + lastId).value;

        if (divParent.hasChildNodes()) {
            while (divParent.childNodes.length >= 1) {
                divParent.removeChild(divParent.firstChild);
            }
        }

        divParent.innerHTML = '<select id=lstRailcardDetails' + NewId + ' name=lstRailcardDetails' + NewId + ' class="tr_selectoffer selright" onchange="ShowSubElements(this);"><option value="YNG011">16-25 Railcard</option><option value="DIS121">Disabled </option><option value="FAM141">Family &amp; Friends</option><option value="NGC141">Network Gold Card</option><option value="NEW141">Network </option><option value="HMF111">HM Forces </option><option value="SRY011">Scottish Youth Card</option><option value="SRN011">Senior</option>';
				divParent.innerHTML += '<select id=lstRailcardNumber' + NewId + ' name=lstRailcardNumber' + NewId + ' class="tr_selno"><option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option></select>';
        divParent.innerHTML += '<div class="float_left" style="height:20px;"><a id=\'Remove' + NewId + '\' class="add" href="javascript:void(0)" onclick="javascript: RemoveInput(this);">Remove</a></div>';
        divParent.innerHTML += '<div id=SubAddRailCard' + NewId + ' class="AddRailCardClass" style="display:none;"><div class="mbotm float_left" style="width: 84px;"><label class="label label1width1 PaddBottom5" style="width: 84px;">Adults:</label><select id=lstRailcardDetailsAdults' + NewId + ' name=lstRailcardDetailsAdults' + NewId + ' class="tr_selno" name="NUMBER_OF_ADULTS"></select></div><div class="mbotm float_left" style="width: 84px;"><label class="label label1width1 PaddBottom5" style="width: 84px;">Children:</label><select id=lstRailcardDetailsChildren' + NewId + ' name=lstRailcardDetailsChildren' + NewId + '  class="tr_selno"  name="NUMBER_OF_CHILDREN"></select></div></div>';
        
				FillValuesAndSetInitialValues(NewId, lstRailCardDetailsvalue, lstRailcardNumbervalue, lstRailcardDetailsAdultsvalue, lstRailcardDetailsChildren);

    }
    iExhibitionCount--;
}

function ShowSubElements(lstRailcardDetailsShow) {
    var divToDisplayHide = 'SubAddRailCard' + lstRailcardDetailsShow.id.substring(18, lstRailcardDetailsShow.id.length);
    var divToShow = document.getElementById(divToDisplayHide);
    if (lstRailcardDetailsShow.value == 'DIS121' || lstRailcardDetailsShow.value == 'FAM141' || lstRailcardDetailsShow.value == 'NGC141' || lstRailcardDetailsShow.value == 'NEW141' || lstRailcardDetailsShow.value == 'HMF111') {
        divToShow.style.display = 'block';
        SubOptions();
    }
    else {
        divToShow.style.display = 'none';
    }
}

function FillValuesAndSetInitialValues(iIdNumber, lstRailCardDetailsvalue, lstRailcardNumbervalue, lstRailcardDetailsAdultsvalue, lstRailcardDetailsChildrenvalue) {
    var lstCardDetails = document.getElementById("lstRailcardDetails" + iIdNumber);
    var lstRailcardNumber = document.getElementById("lstRailcardNumber" + iIdNumber);
    var lstRailcardDetailsAdults = document.getElementById("lstRailcardDetailsAdults" + iIdNumber);
    var lstRailcardDetailsChildren = document.getElementById("lstRailcardDetailsChildren" + iIdNumber);
    var SubAddRailCard = document.getElementById("SubAddRailCard" + iIdNumber);

    selectValueInList(lstCardDetails, lstRailCardDetailsvalue);

    var Total = parseInt(jNUMBER_OF_ADULTS1.value) + parseInt(jNUMBER_OF_CHILDREN1.value);

    BindValue(lstRailcardNumber, Total);
    selectValueInList(lstRailcardNumber, lstRailcardNumbervalue);
    BindValue(lstRailcardDetailsAdults, parseInt(jNUMBER_OF_ADULTS1.value));
    selectValueInList(lstRailcardDetailsAdults, "0");

    BindValue(lstRailcardDetailsChildren, parseInt(jNUMBER_OF_CHILDREN1.value));
    selectValueInList(lstRailcardDetailsChildren, lstRailcardDetailsChildrenvalue);

    if (lstRailCardDetailsvalue == 'DIS121' || lstRailCardDetailsvalue == 'FAM141' || lstRailCardDetailsvalue == 'NGC141' || lstRailCardDetailsvalue == 'NEW141' || lstRailCardDetailsvalue == 'HMF111') {
        SubAddRailCard.style.display = 'block';
    }

}
function BindValue(listId, value) {
    for (var i = listId.options.length - 1; i >= 0; i--)
        listId.remove(i);
    for (var k = 0; k <= value; k++) {
        try {
            listId.add(new Option(k, k), null);
        }
        catch (e) {
            listId.add(new Option(k, k), k);
        }
    }
}

function AddValue(NUMBER_OF_ADULTS, NUMBER_OF_CHILDREN) {
    OptTotal = parseInt(jNUMBER_OF_ADULTS1.value) + parseInt(jNUMBER_OF_CHILDREN1.value);
    for (var j = 0; j <= iExhibitionCount; j++) {
        var obj = document.getElementById("lstRailcardNumber" + j);
        var iIntialValue = obj.value;

        for (var i = obj.length - 1; i >= 0; i--)
            obj.remove(i);

        for (var k = 0; k <= OptTotal; k++) {
            try {
                obj.add(new Option(k, k), null);
            }
            catch (e) {
                obj.add(new Option(k, k), k);
            }
        }
        selectValueInList(obj, iIntialValue)
    }
    SubOptions();
}
function SubOptions() {
    for (var j = 0; j <= iExhibitionCount; j++) {
        var obj = document.getElementById("lstRailcardDetailsAdults" + j);
        var iIntialValue = obj.value;
        for (var i = obj.length - 1; i >= 0; i--)
            obj.remove(i);
        for (var k = 0; k <= jNUMBER_OF_ADULTS1.value; k++) {
            try {
                obj.add(new Option(k, k), null);
            }
            catch (e) {
                obj.add(new Option(k, k), k);
            }
        }
        selectValueInList(obj, iIntialValue)
    }
    for (var j = 0; j <= iExhibitionCount; j++) {
        var obj = document.getElementById("lstRailcardDetailsChildren" + j);
        var iIntialValue = obj.value;
        for (var i = obj.length - 1; i >= 0; i--)
            obj.remove(i);
        for (var k = 0; k <= jNUMBER_OF_CHILDREN1.value; k++) {
            try {
                obj.add(new Option(k, k), null);
            }
            catch (e) {
                obj.add(new Option(k, k), k);
            }
        }
        selectValueInList(obj, iIntialValue)
    }
}
function selectValueInList(listId, ValueToSelected) {
    for (i = 0; i < listId.options.length; i++) {
        if (listId.options[i].value == ValueToSelected) {
            listId.selectedIndex = i
        }
    }
}
function SetCalendar() {
    if (currentHour >= 17) {
        selectValueInList(document.getElementById("OUTBOUND_HOUR"), "7");
        selectValueInList(document.getElementById("INBOUND_HOUR"), "11");
        iSelectedday = 1;
    }
    else {
        selectValueInList(document.getElementById("OUTBOUND_HOUR"), parseInt(currentHour) + 3);
        selectValueInList(document.getElementById("INBOUND_HOUR"), parseInt(currentHour) + 7);
        iSelectedday = 0;
    }

    if (parseInt(CurrentMin) >= 45) {
        selectValueInList(document.getElementById("OUTBOUND_MIN"), "00");
        selectValueInList(document.getElementById("INBOUND_MIN"), "00");

    }
    else if (parseInt(CurrentMin) >= 30) {
        selectValueInList(document.getElementById("OUTBOUND_MIN"), "45");
        selectValueInList(document.getElementById("INBOUND_MIN"), "45");
    }
    else if (parseInt(CurrentMin) >= 15) {
        selectValueInList(document.getElementById("OUTBOUND_MIN"), "30");
        selectValueInList(document.getElementById("INBOUND_MIN"), "30");
    }
    else {
        selectValueInList(document.getElementById("OUTBOUND_MIN"), "15");
        selectValueInList(document.getElementById("INBOUND_MIN"), "15");
    }

}

function EmptyBox(txtBox, text) {
    if (txtBox.value == text) {
        txtBox.value = '';
    }

}

function FillBox(txtBox, text) {
    if (txtBox.value == '') {
        txtBox.value = text;
    }
}


function cityTab(tab) {
    for (iCtr = 0; iCtr < sElemspan.length; iCtr++) {
        if ((tab == sElemspan[iCtr])) {
            document.getElementById(sElemspan[iCtr]).style.display = "block";
            document.getElementById(sElemspan[iCtr] + "_lnk").className = "tab_active";
        }
        else {
            document.getElementById(sElemspan[iCtr]).style.display = "none";
            document.getElementById(sElemspan[iCtr] + "_lnk").className = "tab_inactive";
        }
    }
}

/************************************** Splendid *************************************
* Creation Date:	3rd July 2007
* Edited ----------------------------------------------------------------------------
*		By:	    On:
* Description -----------------------------------------------------------------------
*		This file contains the functions for loading/changing the city images
*
*      Called by html page
*          preLoadImages()
*          showSlideshowImage( i )
*
**************************************************************************************/

/********************************** Global Variables *********************************/
// Speed in milliseconds
var fadeSpeed = 1000;

// Specify the image files in an array
var preLoad = new Array();
var currImgIdx = 0;

/********************************** Public Functions *********************************/

/****
* Preloads the images in the array so that they're there to use when needed.
* Image data in imageDataDiv as innerHTML 
* (<image src>:<image alt>|<image src>:<image alt>)
****/
function preLoadImages() {
    for (i = 0; i < Pic.length; i++) {
        preLoad[i] = new Image();
        preLoad[i].src = Pic[i].src;
        preLoad[i].alt = Pic[i].alt;
    }
}

/****
* Takes the position of the image in the image array and displays it in the slideshow mode
****/
function showSlideshowImg(i) {
    // Try to pre-load slideshow images, if not already loaded...
    if (preLoad.length == 0)
        preLoadImages();

    // If not already loaded, then change the image...
    if (currImgIdx != i) {
        // Remove the highlight class from the thumbnail
        $('#cityImg' + currImgIdx).css('border', '1px solid #000000');

        // Update the global variable to say which image to display
        currImgIdx = i;

        // fade current image out
        $('#slideshowImage').fadeOut(fadeSpeed, function() {
            // Change the image and text
            document.getElementById('slideshowImage').src = preLoad[currImgIdx].src;
            document.getElementById('slideshowImage').alt = preLoad[currImgIdx].alt;

            // Can only really have text if 3 pics or less.
            if (preLoad.length < 4)
                document.getElementById('picDesc').innerHTML = preLoad[currImgIdx].alt
            else
                document.getElementById('picDesc').style.display = 'none';

            // Move the highlighter on the thumbnail
            $('#cityImg' + currImgIdx).css('border', '1px solid #FFFFFF');

            // Fade it back in.
            $('#slideshowImage').fadeIn(fadeSpeed);
        });
    }

    // Just stops the href doing anything...
    return false;
}

function GetMonthinMMMFormat(imonth) {
    var MMMFormat;
    switch (imonth) {
        case '01':
            MMMFormat = 'Jan';
            break;
        case '02':
            MMMFormat = 'Feb';
            break;
        case '03':
            MMMFormat = 'Mar';
            break;
        case '04':
            MMMFormat = 'Apr';
            break;
        case '05':
            MMMFormat = 'May';
            break;
        case '06':
            MMMFormat = 'Jun';
            break;
        case '07':
            MMMFormat = 'Jul';
            break;
        case '08':
            MMMFormat = 'Aug';
            break;
        case '09':
            MMMFormat = 'Sep';
            break;
        case '10':
            MMMFormat = 'Oct';
            break;
        case '11':
            MMMFormat = 'Nov';
            break;
        case '12':
            MMMFormat = 'Dec';
            break;
        default:
            MMMFormat = 'Jan';
    }
    return MMMFormat;
}

function TrimUsingWhileLoop(str) {
    while (str.charAt(0) == (" ")) {
        str = str.substring(1);
    }
    while (str.charAt(str.length - 1) == " ") {
        str = str.substring(0, str.length - 1);
    }
    return str;
}
function SetValue(drp, ORIGIN_STATION) {
    if (drp.value != -1) {
        var selected_text = drp.options[drp.selectedIndex].text;
        document.getElementById(ORIGIN_STATION).value = selected_text;
    }
}

function resetErrorMsgs() {

    document.getElementById('ORIGIN_STATION_error').innerHTML = '';
    document.getElementById('DESTINATION_STATION_error').innerHTML = '';
}

var slideMenu = function() {
    var sp, st, t, m, sa, l, w, sw, ot;
    return {
        build: function(sm, sw, mt, s, sl, h) {
            sp = s; st = sw; t = mt;
            m = document.getElementById(sm);
            sa = m.getElementsByTagName('li');
            //ta = document.getElementsByTagName('texttab');
            //document.getElementById('tab_color' + i + '_hover');
            l = sa.length; w = m.offsetHeight; sw = w / l;
            ot = Math.floor((w - st) / (l - 1)); var i = 0;
            //   debugger;

            //----------------->2009-07-06----------------->
            sl = 0;

            for (i; i < l; i++) { s = sa[i]; s.style.height = sw + 'px'; this.timer(s, document.getElementById('tab_color' + (i + 1) + '_hover')) }
            if (sl != null) { m.timer = setInterval(function() { slideMenu.slide(sa[sl]) }, t) }
        },
        timer: function(s, div) {
            div.onmouseover = function()
            { slideMenu.change_class(s); clearInterval(m.timer); m.timer = setInterval(function() { slideMenu.slide(s) }, t) }
        },
        slide: function(s) {
            // debugger;
            var tempID = s.id.substring(3);
            //                        if (tempID > 1) {
            //                           s = document.getElementById("li_" + (tempID - 1));
            //                       }
            var cw = parseInt(s.style.height, '10');
            if (cw < st) {
                var owt = 0; var i = 0;
                for (i; i < l; i++) {
                    if (sa[i] != s) {
                        var o, ow; var oi = 0; o = sa[i]; ow = parseInt(o.style.height, '10');
                        if (ow > ot) { oi = Math.floor((ow - ot) / sp); oi = (oi > 0) ? oi : 1; o.style.height = (ow - oi) + 'px' }
                        owt = owt + (ow - oi)
                    }
                }
                s.style.height = (w - owt) + 'px';
                var b = s.id.split('_');
                prevcolor = b[1];
            } else { clearInterval(m.timer) }
        },
        change_class: function(s) {
            var a = s.id.split('_');
            for (i = 1; i <= 5; i++) {
                document.getElementById('tab_color' + i + '_hover').className = 'tab_color' + i;
                document.getElementById('tab_color' + i + '_hover').style.backgroundImage = 'url(' + imgs[i - 1] + ')';
            }
            document.getElementById('frm1').className = 'Formcoach' + a[1];
            document.getElementById('frm2').className = 'Formtrain' + a[1];
            iCurrentColor = a[1];
            SetTab(iCurrentColor);
            document.getElementById('tab_color' + a[1] + '_hover').className = 'tab_color_over' + a[1];
            document.getElementById('tab_color' + a[1] + '_hover').style.backgroundImage = 'url(' + imgshover[a[1] - 1] + ')';
            /*Code*/
            //debugger;
            //            if (iCurrentColor == 2)
            //                $("#Text_tab1").slideUp(1000);

            //            if (iCurrentColor == 1)
            //                $("#Text_tab1").slideDown(1000);

            //                            if(iCurrentColor == 1)
            //                            {
            //                                document.getElementById("imgtab_1").src = Imageurl + "home_carousel_SeatSale.jpg";     
            //                            }
            //                            else if (iCurrentColor == 2)
            //                            {
            //                                 document.getElementById("imgtab_1").src = Imageurl + "Miniature_pick.jpg";
            //                            }
            /*Code*/
        }

    };

} ();


function onclickslide(li) {
    //                     var tempID = s.id.substring(3);    
    //                    if(tempID >1)
    //                    {
    //                        s=document.getElementById("li_"+(tempID-1));                     
    //                    }
    //debugger;
    //                   var sp = 10;   
    //                    var st = '223'
    //                    var sm = 'basic-accordian';
    //                    m = document.getElementById(sm);
    //                    sa = m.getElementsByTagName('li');
    // 
    //                   var l = sa.length; var w = m.offsetHeight; var sw = w / l;
    //                   var ot = Math.floor((w - st) / (l - 1));var i = 0;
    //                    ot = Math.floor((w - st) / (l - 1)); var i = 0;
    //                    
    //                    var cw = parseInt(s.style.height, '10');
    //                    if (cw < st) {
    //                        var owt = 0; var i = 0;
    //                        for (i; i < l; i++) {
    //                            if (sa[i] != s) {
    //                                var o, ow; var oi = 0; o = sa[i]; ow = parseInt(o.style.height, '10');
    //                                if (ow > ot) { oi = Math.floor((ow - ot) / sp); oi = (oi > 0) ? oi : 1; o.style.height = (ow - oi) + 'px' }
    //                                owt = owt + (ow - oi)
    //                            }
    //                        }
    //                        s.style.height = (w - owt) + 'px';
    //                        var b = s.id.split('_');
    //                        prevcolor = b[1];
    //                    } else { clearInterval(m.timer) }
    var sm = 'basic-accordian';
    var sw = 223;
    var mt = 24;
    var s = 20;
    var sl = 1;
    var h;
    sp = s; st = sw; t = mt;
    m = document.getElementById(sm);
    sa = m.getElementsByTagName('li');
    //ta = document.getElementsByTagName('texttab');
    //document.getElementById('tab_color' + i + '_hover');
    l = sa.length; w = m.offsetHeight; sw = w / l;
    ot = Math.floor((w - st) / (l - 1)); var i = 0;
    s = li;
    s.style.height = sw + 'px'
    // debugger;
    slideMenu.change_class(s); clearInterval(m.timer); m.timer = setInterval(function() { slideMenu.slide(s) }, t);
    // slideMenu.timer(s,document.getElementById('tab_color' + (i + 1) + '_hover'))
}
function SetTab(iCurrentColor) {
    var Map = document.getElementById('Area1');


    if (iCurrentColor == 1) {
        resetMessages();
        document.getElementById('1_lnk').src = Imageurl + "coach_blue_btn_hover.gif";
        document.getElementById('2_lnk').src = Imageurl + "train_blue_btn.gif";
        document.getElementById('frm1').style.display = 'block';
        document.getElementById('frm2').style.display = 'none';
        document.getElementById('coach').className = 'width102';
        document.getElementById('train').className = 'width100';
        document.getElementById('tab_color2_hover').className = 'tab_color2bothborder';
        iMonthLimit = 6;
        //showDropDowns(false);
        //SetTime
        iSelectedday = 0;
        Map.href = springcoachurl;
    }
    else if (iCurrentColor == 2) {

        resetMessages();
        //document.getElementById('1_lnk').src = "<%=ReadConfiguration.ImageUrl%>coach_prpl_btn.gif";
        document.getElementById('1_lnk').src = Imageurl + "coach_blue_btn.gif";
        document.getElementById('2_lnk').src = Imageurl + "moov_train_btn.gif";
        document.getElementById('frm1').style.display = 'none';
        document.getElementById('frm2').style.display = 'block';
        document.getElementById('coach').className = 'width100';
        document.getElementById('train').className = 'width102';

        document.getElementById('tab_color1_hover').className = 'tab_color1leftborder';
        document.getElementById('tab_color3_hover').className = 'tab_color3bothborder';

        iMonthLimit = 3;
        //showDropDowns(false);
        //SetTime
        SetCalendar();
        Map.href = eastcoasturl;
    }
    else if (iCurrentColor == 3) {

        resetMessages();

        document.getElementById('1_lnk').src = Imageurl + "green_coach.gif";
        document.getElementById('2_lnk').src = Imageurl + "train_blue_btn.gif";
        // document.getElementById('2_lnk').src = "<%=ReadConfiguration.ImageUrl%>train_green_btn.gif";
        document.getElementById('frm1').style.display = 'block';
        document.getElementById('frm2').style.display = 'none';
        document.getElementById('coach').className = 'width102';
        document.getElementById('train').className = 'width100';
        document.getElementById('tab_color1_hover').className = 'tab_color1leftborder';
        document.getElementById('tab_color2_hover').className = 'tab_color2leftborder';
        document.getElementById('tab_color4_hover').className = 'tab_color4bothborder';
        iMonthLimit = 6;
        //showDropDowns(false);
        //SetTime
        iSelectedday = 0;
        Map.href = wembleyurl;
    }
    else if (iCurrentColor == 4) {
        //document.getElementById('1_lnk').src = "<%=ReadConfiguration.ImageUrl%>coach_yellow_btn.gif";

        resetMessages();
        document.getElementById('1_lnk').src = Imageurl + "coach_yellow_btn_hover.gif";
        document.getElementById('2_lnk').src = Imageurl + "train_blue_btn.gif";
        document.getElementById('frm1').style.display = 'block';
        document.getElementById('frm2').style.display = 'none';
        document.getElementById('coach').className = 'width102';
        document.getElementById('train').className = 'width100';
        document.getElementById('tab_color1_hover').className = 'tab_color1leftborder';
        document.getElementById('tab_color2_hover').className = 'tab_color2leftborder';
        document.getElementById('tab_color3_hover').className = 'tab_color3leftborder';
        document.getElementById('tab_color5_hover').className = 'tab_color5bothborder';
        iMonthLimit = 6;
        //showDropDowns(false);
        //SetTime
        SetCalendar();
        Map.href = festivalurl;
    }
    else if (iCurrentColor == 5) {

        resetMessages();
        //document.getElementById('1_lnk').src = "<%=ReadConfiguration.ImageUrl%>coach_pink_btn.gif";

        document.getElementById('1_lnk').src = Imageurl + "orange_coach.gif";
        document.getElementById('2_lnk').src = Imageurl + "train_blue_btn.gif";
        document.getElementById('frm1').style.display = 'block';
        document.getElementById('frm2').style.display = 'none';
        document.getElementById('coach').className = 'width102';
        document.getElementById('train').className = 'width100';
        document.getElementById('tab_color1_hover').className = 'tab_color1leftborder';
        document.getElementById('tab_color2_hover').className = 'tab_color2bothborder';
        document.getElementById('tab_color2_hover').className = 'tab_color2leftborder';
        document.getElementById('tab_color3_hover').className = 'tab_color3leftborder';
        //showDropDowns(true);
        iMonthLimit = 6;
        SetCalendar();
        Map.href = stanstedurl;

    }

}

function SetCoachTabSrc(iCurrentColor) {

    if (iCurrentColor == 1) {
        document.getElementById('1_lnk').src = Imageurl + "coach_blue_btn_hover.gif";
        document.getElementById('2_lnk').src = Imageurl + "train_blue_btn.gif";

    }
    else if (iCurrentColor == 2) {
        document.getElementById('1_lnk').src = Imageurl + "coach_prpl_btn_hover.gif";
        document.getElementById('2_lnk').src = Imageurl + "train_blue_btn.gif";

    }
    else if (iCurrentColor == 3) {
        onclickslide(document.getElementById('li_1'));
        //                document.getElementById('1_lnk').src = "<%=ReadConfiguration.ImageUrl%>coach_green_btn_hover.gif";
        //                document.getElementById('2_lnk').src = "<%=ReadConfiguration.ImageUrl%>train_blue_btn.gif";

    }
    else if (iCurrentColor == 4) {
        document.getElementById('1_lnk').src = Imageurl + "coach_yellow_btn_hover.gif";
        document.getElementById('2_lnk').src = Imageurl + "train_blue_btn.gif";
        //showDropDowns(false);

    }
    else if (iCurrentColor == 5) {
        onclickslide(document.getElementById('li_1'));

    }
}
function SetTrainTabSrc(iCurrentColor) {
    if (iCurrentColor == 1) {
        document.getElementById('1_lnk').src = Imageurl + "coach_blue_btn.gif";
        document.getElementById('2_lnk').src = Imageurl + "train_blue_btn_hover.gif";
        //showDropDowns(false);
    }
    else if (iCurrentColor == 2) {
        //                document.getElementById('1_lnk').src = "<%=ReadConfiguration.ImageUrl%>coach_blue_btn.gif";
        //                document.getElementById('2_lnk').src = "<%=ReadConfiguration.ImageUrl%>train_prpl_btn_hover.gif";
        //                showDropDowns(false);
        onclickslide(document.getElementById('li_1'));
    }
    else if (iCurrentColor == 3) {
        // onclickslide(document.getElementById('li_1'));
        document.getElementById('1_lnk').src = Imageurl + "coach_blue_btn.gif";
        document.getElementById('2_lnk').src = Imageurl + "train_green_btn_hover.gif";
        //showDropDowns(false);
    }
    else if (iCurrentColor == 4) {
        onclickslide(document.getElementById('li_1'));
        //                document.getElementById('1_lnk').src = "<%=ReadConfiguration.ImageUrl%>coach_blue_btn.gif";
        //                document.getElementById('2_lnk').src = "<%=ReadConfiguration.ImageUrl%>train_yellow_btn_hover.gif";
        //                showDropDowns(false);
    }
    else if (iCurrentColor == 5) {
        document.getElementById('1_lnk').src = Imageurl + "coach_blue_btn.gif";
        document.getElementById('2_lnk').src = Imageurl + "train_pink_btn_hover.gif";
        //showDropDowns(true);
    }
}

function CheckRule() {
    var standard = document.getElementById("chkStandardClass");
    var first = document.getElementById("chkFirstClass");
    if (!first.checked) {
        standard.checked = true;
        first.checked = false;
    }

}
function CheckRule2() {
    var standard = document.getElementById("chkStandardClass");
    var first = document.getElementById("chkFirstClass");
    if (!standard.checked) {
        first.checked = true;
        standard.checked = false;
    }
}

function RetFields() {
    document.getElementById('txtFrom').value = "";
    document.getElementById('txtTo').value = "";
    document.getElementById('fromLoc').value = "";
    document.getElementById('toLoc').value = "";

}

function CheckOneWayTrain() {
    var rdoOneWay = document.getElementById("rdoOneWay");
    var rdoReturn = document.getElementById("rdoReturn");
    if (rdoOneWay.checked)
        OneWay = 1;
    else if (rdoReturn.checked)
        OneWay = 0;
}

function showDropDowns(bIsvisible) {

    if (bIsvisible) {
        document.getElementById('ORIGIN_STATION').style.display = "none";
        document.getElementById('DESTINATION_STATION').style.display = "none";
        document.getElementById('lstfrom').style.display = "block";
        document.getElementById('lstto').style.display = "block";
        document.getElementById('divadults').style.display = "none";
        document.getElementById('divVia').style.display = "none";
        document.getElementById('divPostButton').style.display = "block";
        document.getElementById('divPromotional').style.display = "block";
    }
    else {
        document.getElementById('ORIGIN_STATION').style.display = "block";
        document.getElementById('DESTINATION_STATION').style.display = "block";
        document.getElementById('lstfrom').style.display = "none";
        document.getElementById('lstto').style.display = "none";
        document.getElementById('divadults').style.display = "block";
				//document.getElementById('divVia').style.display = "block"; - East coast chage
        document.getElementById('divVia').style.display = "none";
        document.getElementById('divPostButton').style.display = "none";
        document.getElementById('divPromotional').style.display = "none";

    }
}

function ChangeImg(id, selimg, unselimg) {
    //debugger;
    document.getElementById(id).src = Imageurl + selimg;

    if (prevTabId != '' && prevTabId != id) {
        document.getElementById(prevTabId).src = Imageurl + prevTabUnselImg;
        prevTabId = id;
        prevTabUnselImg = unselimg;
    }
}
function togglepop(idl, lft, tp) {

    if (document.getElementById(idl).style.display == "none") {
        document.getElementById(idl).style.display = "block";
        document.getElementById(idl).style.left = lft + "px";
        document.getElementById(idl).style.top = tp + "px";
        document.getElementById('err').style.display = "none";
    }
    else
        document.getElementById(idl).style.display = "none";
}
function togglepopClose() {
    document.getElementById('pop').style.display = "none";
    document.getElementById('err').style.display = "none";
}
function ClearErrorMsgs() {
    document.getElementById('from_error').style.display = "none";
    document.getElementById('to_error').style.display = "none";
    document.getElementById('departing_error').style.display = "none";
    document.getElementById('return_error').style.display = "none";
}
function SetImages(imgs, show) {
    //debugger;
    var Images = imgs.split('|');
    var display = 'none';

    if (show == 1) display = 'block';

    for (i = 0; i < Images.length; i++)
        document.getElementById(Images[i]).style.display = display;
}

function URLEncode(clearString) {
    var output = '';
    var x = 0;
    clearString = clearString.toString();
    var regex = /(^[a-zA-Z0-9_.]*)/;
    while (x < clearString.length) {
        var match = regex.exec(clearString.substr(x));
        if (match != null && match.length > 1 && match[1] != '') {
            output += match[1];
            x += match[1].length;
        } else {
            if (clearString[x] == ' ')
                output += '+';
            else {
                var charCode = clearString.charCodeAt(x);
                var hexVal = charCode.toString(16);
                output += '%' + (hexVal.length < 2 ? '0' : '') + hexVal.toUpperCase();
            }
            x++;
        }
    }
    return output;
}
