// This function toggles display style of children elements of given parent
// linkList: identifies parent element
// childID: identifies child elements to be toggled
function toggleLinkListVisibility(linkList) {
    for (i=0 ; i < linkList.childNodes.length ; i++ ) {
        var currentNode = linkList.childNodes.item(i)
        if ( currentNode.nodeType == 1 ) { // Is it an HTMLElement ?
            if ( currentNode.className == 'linkkilistateksti' ) { // Only toggle class X
                if ( currentNode.style.display != 'none' ) { // Which way to toggle?
                    currentNode.style.display = 'none' // Display was undefined or not 'none'
                }
                else { // Display was explicitly set to 'none' so make it block
                    currentNode.style.display = 'block'
                }
            }
        }
    }
}

