configImages = new Array();

function updateConfigProdImage(evt)
{
    slct = evt.target;
    img = $$("p.product-image")[0].childElements()[0];
    img.src = configImages[slct.id][slct[slct.selectedIndex].value];
}

function addConfigImages()
{
    for (var attrib in configImages) {
        sel = $$('#'+attrib);
        sel = sel[0];
        if (sel != null) {
            Event.observe(sel.id, 'change', function(elem) {
                updateConfigProdImage(elem);
            });
        }
    }
}
