// changes the chosen size
function changeSize(node, sizeId)
{
    // get the ul
    var children = node.parentNode.parentNode.childNodes;
    
    // loop through the child nodes and turn off the highlighting
    for (var i = 0; i < children.length; i++)
        if (children[i].nodeName.toLowerCase() == 'li')
            children[i].firstChild.className = children[i].firstChild.className.replace(/\ssize_on$/, '');
    
    // turn on the needed node
    node.className += ' size_on';
    
    // store the needed colour
    $('sizeId').value = sizeId;
}

function updateQuantity(node)
{
    node.parentNode.submit();
}

function showPasswords(element)
{
    $('newPassword1').style.display = element.checked ? 'block' : 'none';
    $('newPassword2').style.display = element.checked ? 'block' : 'none';
}