function addmsg(msg,newmsg) {
    if (msg!="") {
        msg=msg+"\n";
    }
    return msg+newmsg;
}

function toggle(o)
{
    var e = document.getElementById(o);
    e.style.display = (e.style.display == 'none') ? 'block' : 'none';
}

function actionask(text,url) {
    if (confirm(text)) {
        window.location=url;
    }
}

function iterateall(o,newdisplay)
{
    var list;
    var x;
    var e;
    
    list = o.split("|");
    
    for (x=0;x<list.length;x++) {
        e=document.getElementById(list[x]);
        try {
            e.style.display = newdisplay;
        } catch (e) {
        }
    }
}

function expandall(o) {
    iterateall(o,'block');
}

function collapseall(o)
{
    iterateall(o,'none');    
}

