/**
 * This function will show or hide a div where the user can select a country.
 * @param {Object}  $link       The link that has been clicked for showing/hiding the div.
 */
function showHideCountrySelect($link) {

    // Show the country select div and set the position.
    var $element = getElement('countrySelect');
    $element.style.display  = $element.style.display == 'none' ? '' : 'none';
    $element.style.left     = $link.offsetLeft + 'px';
    $element.style.top      = ($link.offsetTop + 15)  + 'px';

    // Swap image for the link.
    $image = getElement('countryChangeImage');
    if ($image.src.search('up.gif') != -1) {
        $image.src = '/Images/Modules/CallCredit/All/down.gif';
    } else {
        $image.src = '/Images/Modules/CallCredit/All/up.gif';
    }
}