function pophtml(tw, th, full ,scroll, title)
{
    window.open(full, "popupwin", "scrollbars="+ scroll +", width="+ tw +", height="+ th +", resizable=no, status=no, location=no, toolbar=no, menubar=no");
    return false;
}
    
function change(color)
{
    var el = event.srcElement;
    if (el.tagName == "INPUT" && el.type == "radio")
    {
        event.srcElement.style.backgroundColor = color;
    }
}

function getWindowWidth()
{
    var ww = 0;
    d = document;
    if (typeof window.innerWidth != 'undefined')
    {
        ww = window.innerWidth;  // NN and Opera version
    }
    else if (d.documentElement &&
            typeof d.documentElement.clientWidth != 'undefined' &&
            d.documentElement.clientWidth != 0)
    {
        ww = d.documentElement.clientWidth;
    }
    else if (d.body && typeof d.body.clientWidth != 'undefined')
    {
        ww = d.body.clientWidth;
    }
    else
    {
        alert("Can't identify window width - please tell me which browser you are using.");
    }
    return ww;
}

function widthSizing()
{
    preloadImages();
    width = getWindowWidth();
    document.images["middlebar0"].width = width - 40;
    document.images["middlebar1"].width = width - 40;
    document.images["middlebar2"].width = width - 40;
    zeroCell = document.getElementById("midcell0");
    frstCell = document.getElementById("midcell1");
    scndCell = document.getElementById("midcell2");
    mainTable = document.getElementById("barLinkTable");
    bar0Table = document.getElementById("barTable0");
    bar1Table = document.getElementById("barTable1");
    linkTable = document.getElementById("linksTable");
    link2Table = document.getElementById("links2Table");
    bar2Table = document.getElementById("barTable2");
    zeroCell.style.width  = width - 40;
    frstCell.style.width  = width - 40;
    scndCell.style.width  = width - 40;
    mainTable.style.width = width - 24;
    bar0Table.style.width = width - 24;
    bar1Table.style.width = width - 24;
    linkTable.style.width = width - 24;
    link2Table.style.width = width - 24;
    bar2Table.style.width = width - 24;
}

function newImage(arg)
{
    if (document.images)
    {
        rslt = new Image();
        rslt.src = arg;
        return rslt;
    }
}

function makeImage(file, title)
{
    return '<img src="'+ file +'" border="0" alt="'+ title +'">';
}