t = 10;

needhide = new Array();


function f(id)
{
 document.getElementById(id).style.visibility = 'hidden';
}


function roll(id)
{
 document.getElementById(id).style.visibility = 'visible';
 needhide[id] = 0;
}


function hide(id)
{
 needhide[id] = 1;
 setTimeout("if(needhide['" + id + "']){f('" + id + "')}", t);
}


function unroll(id)
{
 hide(id);
}


function overSub(id)
{
 needhide[id] = 0;
 document.getElementById(id + "a").className = "sma";
}


function outSub(id, p)
{
 needhide[id] = 1;
 document.getElementById(id + "a").className = "sm" + (p == 1 ? " light": "");
 hide(id);
}