﻿sfHover = function() { var sfEls = document.getElementById("navbar").getElementsByTagName("LI"); for (var i = 0; i < sfEls.length; i++) { sfEls[i].onmouseover = function() { var list = this.getElementsByTagName("UL")[0]; if (list) { list.style.left = "auto"; } }; sfEls[i].onmouseout = function() { var list = this.getElementsByTagName("UL")[0]; if (list) { list.style.left = "-999em"; } } } }; if (window.attachEvent) { window.attachEvent("onload", sfHover); } if (window.addEventListener) { window.addEventListener("load", sfHover, false); };
function HideContent(d) { if (d.length < 1) { return; } document.getElementById(d).style.display = 'none'; }
function HideMsgs() {

    // Find the price and change it.
    var ddlVariants = document.getElementById("ctl00_centerColumn_ddlVariants");
    var price = ddlVariants.options[ddlVariants.selectedIndex].value;
    var purchasePrice = price.split("~")[1];

    var priceSpan = document.getElementById("purchasePrice");
    var priceSpan2 = document.getElementById("purchasePrice2");

    if (purchasePrice != undefined) {
        if (priceSpan != null)
            priceSpan.innerHTML = "&#163;" + purchasePrice;
        if (priceSpan2 != null) {
            priceSpan2.innerHTML = "&#163;" + purchasePrice;
        }
    }
        
   
    var msg1 = document.getElementById("selectAnOptionMsg");
    var msg2 = document.getElementById("outOfStockMsg");
    if (msg1 != null) {
        document.getElementById("selectAnOptionMsg").style.display = 'none';
    }
    if (msg2 != null) {
        document.getElementById("outOfStockMsg").style.display = 'none';
    }
}
    
function MutExChkList(chk)
{
    var chkList = chk.parentNode.parentNode.parentNode;
    var chks = chkList.getElementsByTagName("input");

    for(var i=0;i<chks.length;i++)
    {
      if(chks[i] != chk && chk.checked)
      {
        chks[i].checked=false;
      }
    }
}

