﻿function changeColour()
{
    var sc = document.getElementById("SelColour");
    var si = sc.selectedIndex;
    
    if (si > 0)
    {
        location.href = sc.options[si].value;
    }
}

function a2b(price)
{
    var ss = document.getElementById("SelSize");
    var si = ss.selectedIndex;
    
    if (si == 0)
    {
        alert("Please choose a size.");
        return;
    }
    
    //location.href = "/Qs.aspx?uv=" + UV() + "&a2b=" + ss.options[si].value + "&price=" + price;
    
    var v = ss.options[si].value;
    
    if (v.indexOf("_") > -1 && confirm("This item has already been added to your basket.\n\nIf you wish to order 2 of these please click OK.\n\nIf not, please click Cancel.") == false)
    {
        return;
    }
    
    location.href = "/Qs.aspx?uv=" + UV() + "&a2b=" + v + "&price=" + price;
}

function zoom(productId, image)
{
    window.open('/Zoom.aspx?productId=' + productId + '&image=' + image, UV(), 'width=660,height=420,screenX=200,screenY=200,top=200,left=200,toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0');
}

//function size()
//{
//    document.getElementById("Size").className = (document.getElementById("Size").className == "message") ? "menuclose" : "message";
//}

function retdel(which)
{
    var dh = document.getElementById("delhead");
    var rh = document.getElementById("rethead");
    //var xh = document.getElementById("xmashead");
    var d = document.getElementById("del");
    var r = document.getElementById("ret");
    //var x = document.getElementById("xmas");
    
    if (which == "delivery")
    {
        dh.style.backgroundColor = "#000";
        rh.style.backgroundColor = "#666";
        //xh.style.backgroundColor = "#666";
        d.style.display = "block";
        r.style.display = "none";
        //x.style.display = "none";
    }
    else if (which == "returns")
    {
        dh.style.backgroundColor = "#666";
        rh.style.backgroundColor = "#000";
        //xh.style.backgroundColor = "#666";
        d.style.display = "none";
        r.style.display = "block";
        //x.style.display = "none";
    }
    else
    {
        dh.style.backgroundColor = "#666";
        rh.style.backgroundColor = "#666";
        //xh.style.backgroundColor = "#000";
        d.style.display = "none";
        r.style.display = "none";
        //x.style.display = "block";    
    }
}

function delivery()
{
    window.open('/Delivery.aspx', UV(), 'width=660,height=420,screenX=200,screenY=200,top=200,left=200,toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0');
}

function returns()
{
    window.open('/Returns.aspx', UV(), 'width=660,height=420,screenX=200,screenY=200,top=200,left=200,toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0');
}
function why()
{
    window.open('/Why.aspx', UV(), 'width=660,height=420,screenX=200,screenY=200,top=200,left=200,toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0');
}