Viewing scripts.js

function doadvance () {
    var ul = document.getElementById ('target');
    for (var i = 0; i < ul.childNodes.length; ++i) {
        var c = ul.childNodes[i];
        if (c.tagName == 'LI' && c.className == 'hidden') {
            c.className = '';
            return false;
        }
    }
    return true;
}

function clickadvance () {
    var ul = document.getElementById ('target');
    var a = document.getElementById ('next');
    if (! ul || ! a)
        return;
    var didone = 0;
    for (var i = 0; i < ul.childNodes.length; ++i) {
        var c = ul.childNodes[i];
        if (c.tagName == 'LI')
            if (didone++ && c.className != 'nohide')
                c.className = 'hidden';
    }
    a.firstChild.onclick = doadvance;
}