﻿document.domain = "rileys.co.uk";

function selectBanner()
{
    var color = document.getElementById('colorSelect');
    var size = document.getElementById('sizeSelect');
    
    var colorIndex = color.selectedIndex;
    var sizeIndex = size.selectedIndex;
    
    var colorValue = color.options[colorIndex].value;
    var sizeValue = size.options[sizeIndex].value;
    
    document.location.href = "#" + colorValue + sizeValue;
}

// Disable the download flash button if appropriate
function disableFlashButtons(isDisabled)
{
    if (isDisabled)
    {
        try
        {
            var buttonLink = document.getElementById('getFlashButton');
            buttonLink.style.display = 'none';
            var buttonText = document.getElementById('getFlashText');
            buttonText.style.display = 'none';
        }
        catch (e)
        {
        }
    }
}

// User has clicked on an image on the news page.
function popupNewsImage(imageID)
{
    var theImage = document.getElementById(imageID);
    
    var imagePopup = document.getElementById('PopupImage');
    imagePopup.src = theImage.src;
    
    var imagePopupDiv = document.getElementById('newsImagePopup');
    imagePopupDiv.style.display = "block";
    
}

// Popup the div on the darts page.
function popupDartsWherePlay()
{
    var popupDiv = document.getElementById('dartsPopup');
    popupDiv.style.display = "block";
}

function popupClubGalleryImage(srcURL, altText)
{
    var imagePopup = document.getElementById('PopupImage');
    var imagePopupDiv = document.getElementById('clubGalleryImagePopup');
    imagePopup.src = srcURL;
    imagePopup.alt = altText;
    imagePopup.title = altText;
    imagePopupDiv.style.display = "block";   
}

function HideLoadBanner()
{
    var LoadBanner = document.getElementById('loadImage');
    LoadBanner.style.display = "none"; 
}