﻿//'****************************************************************************
//'                          Comments Section                                 *
//'****************************************************************************
//'Name               Date        Job Code    Details                         *
//'----               ----        --------    -------                         *
//'Paul Davidson      05/08/2009  T-STM125    creation date                   *
//'                                                                           *
//'                                                                           *
//'                                                                           *
//'                                                                           *
//'                                                                           *
//'****************************************************************************

//get region name for images etc
function setRegionInfo()
{

    if (jQuery('#ddlRegions').val() == '0')
    {
        //no region image, so hide map holder
        jQuery('#ctl00_ContentPlaceHolder1_divMap').hide();
    }
    else
    {
        var strRegionName;
            
        //set the link for the region image
        jQuery('.mapHolder a').attr('href', 'RegionImages/' + jQuery('#ddlRegions option:selected').text() + '.jpg');
        
        //set source and alt text for region
        jQuery('.mapHolder img').attr('src', 'RegionImages/' + jQuery('#ddlRegions option:selected').text() + '-small.jpg');
        jQuery('.mapHolder img').attr('alt', jQuery('#ddlRegions option:selected').text() + ' Region');
        
        //set the region text
        jQuery('#regionname').html(jQuery('#ddlRegions option:selected').text() + ' Region');
        
        jQuery('#ctl00_ContentPlaceHolder1_divMap').show();
    }
    
}