function showBig(imgName, label, w, h) {
    if (document.getElementById) {
        var imgTable = document.getElementById('bigTable');
        var bigImg = document.getElementById('bigImg');
        var imgLabel = document.getElementById('imgLabel');
        bigImg.src = '/images/productlines/'+imgName;
        imgTable.style.display = 'block';
        imgTable.style.visibility = 'visible';
        if (w != null) { bigImg.width = w; }
        if (h != null) { bigImg.height = h; }
        if (!document.all && document.getElementById) {
            imgTable.style.width = bigImg.width;
            imgTable.style.marginLeft = 'auto';
            imgTable.style.marginRight = 'auto';
        } else if (document.all) {
            imgTable.style.width = '100%';
            imgTable.style.textAlign = 'center';
        }
        imgLabel.innerHTML = label;
    }
}

var bigOnSrc = new String();
var bigOffSrc = new String();

function bigOn(e) {
    var imgElm = (e.target) ? e.target : (e.srcElement) ? e.srcElement : null;

    if (imgElm) {
        imgElm.src = bigOnSrc;
    }
}

function bigOff(e) {
    var imgElm = (e.target) ? e.target : (e.srcElement) ? e.srcElement : null;

    if (imgElm) {
        imgElm.src = bigOffSrc;
    }
}

function showBig2(tableId, imgId, imgName, w, h) {
    if (document.getElementById) {
        var imgTable = document.getElementById(tableId);
        var bigImg = document.getElementById(imgId);
        bigImg.src = '/images/productlines/'+imgName;
        if (w != null) { bigImg.width = w; }
        if (h != null) { bigImg.height = h; }
        imgTable.style.display = 'block';
        imgTable.style.visibility = 'visible';
        imgTable.style.width = bigImg.width;
        imgTable.style.marginLeft = 'auto';
        imgTable.style.marginRight = 'auto';

        // the one image for clearscan requires a rollover
        if (imgName == 'promoclipanchorRO2_0.gif') {
            bigOffSrc = '/images/productlines/promoclipanchorRO2_0.gif';
            bigOnSrc = '/images/productlines/promoclipanchorRO2_1.gif';
            if (bigImg.addEventListener) {
                bigImg.addEventListener('mouseover', bigOn, false);
                bigImg.addEventListener('mouseout', bigOff, false);
            } else if (bigImg.attachEvent) {
                bigImg.attachEvent('onmouseover', bigOn);
                bigImg.attachEvent('onmouseout', bigOff);
            } else if (bigImg.onmouseover) {
                bigImg.onmouseover = bigOn;
                bigImg.onmouseout = bigOff;
            }
        } else {
            if (bigImg.removeEventListener) {
                bigImg.removeEventListener('mouseover', bigOn, false);
                bigImg.removeEventListener('mouseout', bigOff, false);
            } else if (bigImg.detachEvent) {
                bigImg.detachEvent('onmouseover', bigOn);
                bigImg.detachEvent('onmouseout', bigOff);
            } else if (bigImg.onmouseover) {
                bigImg.onmouseover = null;
                bigImg.onmouseout = null;
            }
        }
    }
}

function sfToggle(onId, offId) {
    if (document.getElementById) {
        var onTable = document.getElementById(onId);
        var offTable = document.getElementById(offId);
        offTable.style.display      = 'none';
        offTable.style.visibility   = 'hidden';
        onTable.style.display       = 'block';
        onTable.style.visibility    = 'visible';
    }
}