function downloads_changeLargeImage(numImages,currImageNum,imageSrc,imageWidth,imageHeight, bigScaledImage, itemid) {
    var itemidTail = ( itemid == null ) ? "" : "_" + itemid;
    var largeScaledImage = document.getElementById('largeScaledImage' + itemidTail);
    largeScaledImage.src = imageSrc;
    largeScaledImage.width = imageWidth;
    largeScaledImage.height = imageHeight;
    
    // Set the correct classes on the list
    for ( var i = 0; i < numImages; i++ ) {
        var li = document.getElementById('smallScaledImage' + i + itemidTail);
        if ( li != null ) {
            if ( i == currImageNum )
                li.className = "si";
            else
                li.className = "";
        }
    }
    var link = document.getElementById("a_largeScaledImage" + itemidTail);
    if ( link != null )
        link.href = bigScaledImage;

    

}

function downloads_toggleSetitems(itemid) {
    var itemidTail = ( itemid == null ) ? "" : "_" + itemid;
    $('setitems' + itemidTail).toggle();
    $('hiddensets' + itemidTail).toggle();
    var a_id = $('showhide_setitems' + itemidTail);
    if ( a_id.className == "showthis" ) {
        a_id.className = "hideitems";
        a_id.innerHTML = "Hide Items";
    } else {
        a_id.className = "showthis";
        a_id.innerHTML = "Show Items";
    }
}

function downloads_toggleItems(type) {
    $(type + 'Items').toggle();
/*
    var a_id = $('showhide_setitems');
    if ( a_id.className == "hideitems" ) {
        a_id.className = "showthis";
        a_id.innerHTML = "Show Them";
    } else {
        a_id.className = "hideitems";
        a_id.innerHTML = "Hide Items";
    }
*/
}


/*
function downloads_searchItems() {

    var cat = "";
    if ( $('downloads_search_category_any').checked )
        cat = topCategory;
    else
        cat = currentCategory;
    var url = downloadsRoot + "category/" + cat + "/";
    
    var searchPhrase = $('downloads_search_searchfield').value;
    if ( searchPhrase.length > 0 )
        url = url + "search/" + searchPhrase + "/";
        
    var artistLevelSelect = $('downloads_search_artistlevel');
    if ( artistLevelSelect.selectedIndex > 0 ) {
        url = url + "artistlevel/" + artistLevelSelect.options[artistLevelSelect.selectedIndex].value + "/";
    }
    
    var orderSelect = $('downloads_search_order');
    if ( orderSelect.selectedIndex > 0 ) {
        url = url + "order/" + orderSelect.options[orderSelect.selectedIndex].value + "/";
    }
    
    var releasedUpcomingSelect = $('downloads_search_releasedUpcoming');
    if ( releasedUpcomingSelect.selectedIndex > 0 ) {
        url = url + releasedUpcomingSelect.options[releasedUpcomingSelect.selectedIndex].value + "/";
    }
    
    
    if ( attributeIDlist != null ) {
        var attributes = "";
        var attributeIDarr = attributeIDlist.split(",");
        for ( i = 0; i < attributeIDarr.length; i++ ) {
            attr = $('attr_' + attributeIDarr[i]);
            if ( attr != null ) {
                if ( attr.selectedIndex > 0 ) {
                    if ( attributes.length > 0 )
                        attributes = attributes + ",";
                    attributes = attributes + "attr" + attributeIDarr[i] + "_" + attr.options[attr.selectedIndex].value;
                } else if ( attr.value.length > 0 ) {
                    if ( attributes.length > 0 )
                        attributes = attributes + ",";
                    attributes = attributes + "attr" + attributeIDarr[i] + "_" + attr.value;
                }
            }
        }
        if ( attributes.length > 0 )
            url = url + "attributes/" + attributes + "/";
    }
         
    document.location.href = url;
}
*/
