var id = 0;
var IntervallID;
var maxID = 1;

function getMaxID() {
         while (document.getElementById('u'+maxID)) {
                maxID++;
         }
         maxID--;
}

function show(id) {
         hide('all');
         if (document.layers) document.layers[''+id+''].visibility = "show"
         else if (document.all) document.all[''+id+''].style.visibility = "visible"
         else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"
         window.clearInterval(IntervallID);
}

function hide(id,time) {
         function hide_instant() {
                    if (document.layers) document.layers[''+id+''].visibility = "hide"
                    else if (document.all) document.all[''+id+''].style.visibility = "hidden"
                    else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden"
                    window.clearInterval(IntervallID);
         }
         if (id == 'all') {
             for (i=1; i<=maxID; i++) {
                  id = ('u'+i);
                  hide_instant();
             }
         }
         else
         {
           if (time != 0) {
               IntervallID = window.setInterval(hide_instant,time);
           }
           else
           {
             hide_instant();
           }
         }
}