<!--

function showTooltipDetails(self, e, str) {
    $('bus-pass-fare-base-tooltip-content').innerHTML = str;
    showTooltip(self, 'bus-pass-fare-base-tooltip', e);
}

function initFareBasis() {
    var i = 1;
    
    while (true) {
        if ($(f['uxBusPassFareBases' + i + 'RadioButton']) == null) { break }       
        if ($(f['uxBusPassFareBases' + i + 'RadioButton']).checked) {
            selectFareBasis(i);
            break;
        }
        
        i = i + 1;
    }  
}

function makeBusPassDropDownSelection(self) {
    passTypeNotSureRadioClicked();
    passTypeRadioClicked();
    
    $(self.id + "Radio").checked = true;
}

// Makes sure the not sure radio button is not clicked when the not sure button is clicked.
function passTypeRadioClicked() {
    if ($('uxPassNotSure')) {
        $('uxPassNotSure').checked = false;
    }
}

// Makes sure other radio buttons are not clicked when the not sure button is clicked.
function passTypeNotSureRadioClicked() {
    $('container-body').getElementsByClassName("booking-engine-bus-pass-type-panel").each(function(element) {
        $A(element.getElementsByTagName('input')).each(function(input) {
            input.checked = false;
        })
    });
}

function selectFareBasis(fareBaseId) {
    var id = 'ctl00_cMainContentHolder_uxBusPassTypePanel';
    var i  = 1;
    
    $('bus-pass-types-container').show();
    
    $('container-body').getElementsByClassName("booking-engine-bus-pass-type-panel").each(function(element) {
        if (element.id.endsWith("uxBusPassTypePanel" + fareBaseId)) {
            element.show();
            
            if ($('uxPassNotSure')) {
                $A(element.getElementsByTagName('input')).each(function(input) {
                    input.onclick = passTypeRadioClicked;
                });
            
                $('uxPassNotSure').name    = $A(element.getElementsByTagName('input')).first().name;
                $('uxPassNotSure').onclick = passTypeNotSureRadioClicked;
            }
            
            if ($A(element.getElementsByTagName('input')).first()) {
                $A(element.getElementsByTagName('input')).first().checked = true; 
            }
            
            causeNetscapeRedraw();
            
        } else {
            element.hide();
        }
    });  
}

//-->