//Script to make the price update automatically when select
//options are changed and to extend the select width

function oUpdatePrice(){
    document.getElementsByName('btnupdateprice')[0].click();
}
if(document.location.href.toLowerCase().indexOf('-p/')>-1||document.location.href.toLowerCase().indexOf('productdetails.asp')>-1)
{
    for(x=0;x<document.getElementsByTagName('select').length;x++)
    {
        document.getElementsByTagName('select')[x].style.width="29em";
        if(document.addEventListener)
        {
            document.getElementsByTagName('select')[x].addEventListener('change',oUpdatePrice,false);
        }
        else if(document.attachEvent)
        {
             document.getElementsByTagName('select')[x].attachEvent('onchange',oUpdatePrice);
        }
    }
}
if(document.location.href.toLowerCase().indexOf('-s/')>-1||document.location.href.toLowerCase().indexOf('searchresults.asp')>-1)
{
    oSpaceProductDescriptionsOut();
}

//End Update Price script

if (photoGallery) {
    setProductPhotosToGallery();
}