﻿function showhideDiv(ID)
{       
    if(ID == "ctl00_ContentPlaceHolder1_divDescription")
    {
        if(document.getElementById("ctl00_ContentPlaceHolder1_divUsage").style.display != "none")
        {
            document.getElementById("ctl00_ContentPlaceHolder1_divUsage").style.display = "none";
        }
        if(document.getElementById(ID).style.display == "none")
        {
            document.getElementById(ID).style.display = "block";
        }
        
        document.getElementById("imgUsage").src = "../images/hed_usage_ov.gif";
        document.getElementById("imgDescription").src = "../images/hed_description_up.gif";
    }
    if(ID == "ctl00_ContentPlaceHolder1_divUsage")
    {
        if(document.getElementById("ctl00_ContentPlaceHolder1_divDescription").style.display != "none")
        {
            document.getElementById("ctl00_ContentPlaceHolder1_divDescription").style.display = "none";
        }
        if(document.getElementById(ID).style.display == "none")
        {
            document.getElementById(ID).style.display = "block";
        }
        
        document.getElementById("imgUsage").src = "../images/hed_usage_up.gif";
        document.getElementById("imgDescription").src = "../images/hed_description_ov.gif";
    }
}

function isNumberKey(evt)
{
    var charCode = (evt.which) ? evt.which : event.keyCode
    if (charCode > 31 && (charCode < 48 || charCode > 57) && charCode != 46)
        return false;

    return true;
}

function showAlert()
{
    alert("Standard Installation for All Free Standing Products* - £15" + '\n' + "Collection of Old Appliances - £10" + '\n' + "* T & C`s apply." + '\n' + "* Please note we only deliver to Ground Floor." + '\n' + "* For upstairs delivery - please call our customer services to confirm.");
}

//Function that chage the backgorund image on mouse over & on mouse out
function funChangeOnMouseOver(tdID)
{   
    document.getElementById(tdID).className = "CategorymouseOver";
}

function funChangeOnMouseOut(tdID)
{
    document.getElementById(tdID).className = "CategorymouseOut";
}

function funTDOnClick(tdURL)
{
    window.location = tdURL;
}

