///// Onload stuff, will have to be called in body tag's onLoad (in the Layout JSP)///////
    function doLocationSearchOnLoad(mapRegionClicked) {
        // Address search, so supress the location/airport code search content
        if(document.forms[0].inputLink.value.toLowerCase() == "addresssearch" && isAddressSearch()) {
            //alert('is address search');
            hideLocCodeSearch();
        }
        else {
            // if clicked on a region in map or country-state dropdowns change --> supress location/airport search content
            if(mapRegionClicked != null) {
                if(!mapRegionClicked) {
                    displayLocCodeSearch();
                }
                else if(mapRegionClicked) {
                    hideLocCodeSearch();
                }
                else {
                    displayLocCodeSearch();
                }
            }
            else{
                displayLocCodeSearch();
            }  
        }
    }
////////////END Onload stuff//////////////////////
    
    // Returns true if the user is doing search by city/state/zip etc...
    // i.e. they're not performing a location/airport code search
    function isAddressSearch() {
        var ddlState;
        var ddlCity;
        var txtAddress;
        var txtZip;
        var txtCity;
        
        if(document.getElementById('select')) {
           ddlState = document.getElementById('select').value;
        }

        if(document.getElementById('selectCity')) {
           ddlCity = document.getElementById('selectCity').value;
        }

        if(document.getElementById('address')) {
            txtAddress = document.getElementById('address').value;
        }

        if(document.getElementById('zipCode')) {
            txtZip = document.getElementById('zipCode').value;
        }

        // default txt box for city
        if(document.getElementById('city')) {
            txtCity = document.getElementById('city').value;
        }
        
        // return true when when a cityname that maps to several states is entered
        // or when entering data into address, city, zip fields
        if(document.forms[0].showCity) {
            if(txtAddress != "" || txtCity != "" || txtZip != "" || ddlState != "") {
                return true;
            }
        }
        else {
            return false;
        }

    }
    
    // displays the 'LocCodeSearchBlock' div element
    function displayLocCodeSearch() {
        document.getElementById('LocCodeSearchBlock').style.display = 'block';
    }
    
    // hides the 'LocCodeSearchBlock' div element
    function hideLocCodeSearch() {
        document.getElementById('LocCodeSearchBlock').style.display = 'none';
    }
