
// Mootools accordion effect
function startAccordion(divid, header, divclass) {
    window.addEvent('domready', function() {
        var accordion = new Accordion(header, divclass, {
            alwaysHide : true,
            opacity : true,
            display : accordion_show
        }, $(divid));
    });
}

// Show and Hide inputs for add to basket
function showHideBasketBoxes(type, divid, value, amount) {
    
    if (value!=0) {
        divid++;
        if (divid < amount) {
        document.getElementById(type + '_' + divid).style.display='block';
        }
        
        // Cushion Pads
        if (type == 'cushions') { document.getElementById('cushion_pads').style.display='block'; }
    }
    else if (divid!=0) {
        document.getElementById(type + '_' + divid).style.display='none';
    }
    else if (divid==0) {
        // Cushion Pads
        if (type == 'cushions') { document.getElementById('cushion_pads').style.display='none'; }
    }
    
}