var Open = "";
var Closed = "";

var isDOM  = (typeof(document.getElementsByTagName) != 'undefined') ? 1 : 0;
var isIE4  = ((typeof(document.all) != 'undefined') && (parseInt(navigator.appVersion) >= 4)) ? 1 : 0;
var isNS4 = (typeof(document.layers) != 'undefined') ? 1 : 0;
var capable = (isDOM || isIE4 || isNS4) ? 1 : 0;
// Uggly fix for Konqueror and Opera that are not fully DOM compliant
 if (capable && typeof(navigator.userAgent) != 'undefined') {
  var browserName = ' ' + navigator.userAgent.toLowerCase();
   if (browserName.indexOf('opera') > 0) {
     capable = 0;
   }
}

if (document.images) {
 Open = new Image(16,13); Closed = new Image(16,13);
 Open.src = "/gfx/open.gif"; Closed.src = "/gfx/closed.gif";
}

function shdiv(what,ilosc) {
for (i=0; i<ilosc; i++) {
//  eval('span' + i + '.style.display="none"')
   
  if (isDOM) { var whichEl = document.getElementById('span' + i); whichEl.style.display  = 'none'; }
  else if (isIE4) { var whichEl = document.all('span' + i); whichEl.style.display  = 'none'; }
  else if (isNS4) { var whichEl = document.layers['span' + i]; whichEl.visibility  = 'hide'; }
}
  
  if (isDOM) { var whichEl = document.getElementById(what); whichEl.style.display  = 'block'; }
  else if (isIE4) { var whichEl = document.all(what); whichEl.style.display  = 'block'; }
  else if (isNS4) { var whichEl = document.layers[what]; whichEl.visibility  = 'show'; }
}

function showhide(what, what2){
  if (isDOM) {
    var whichEl = document.getElementById(what);
    if ( whichEl.style.display == 'none' ) { whichEl.style.display  = 'block'; what2.src=Open.src; }
    else { whichEl.style.display  = 'none'; what2.src=Closed.src; }  
  }
  else if (isIE4) {
    var whichEl = document.all(what);
    if (whichEl.style.display == 'none') { whichEl.style.display  = 'block'; what2.src=Open.src;}
    else { whichEl.style.display  = 'none'; what2.src=Closed.src; }
  }
  else if (isNS4) {
    var whichEl = document.layers[what];
    if (whichEl.visibility == 'hide') { whichEl.visibility  = 'show'; what2.src=Open.src;}
    else { whichEl.visibility  = 'hide'; what2.src=Closed.src; }
  }
}

function show5() {
if (!document.layers&&!document.all) return
 var Digital = new Date()
 var     all = Digital

if (document.layers){
 document.layers.liveclock.document.write(all)
 document.layers.liveclock.document.close()
} else if (document.all) liveclock.innerHTML=all

setTimeout("show5()",1000)
}

function divShowHide(what){
  if (isDOM) {
    var whichEl = document.getElementById(what);
    if (whichEl.style.display == 'none') whichEl.style.display  = 'block'
    else whichEl.style.display  = 'none' 
  }
  else if (isIE4) {
    var whichEl = document.all(what);
    if ( whichEl.style.display == 'none' ) { whichEl.style.display  = 'block'; }
    else { whichEl.style.display  = 'none'; }  
  }
  else if (isNS4) {
    var whichEl = document.layers[what];
    if ( whichEl.visibility == 'none' ) { whichEl.visibility  = 'block'; }
    else { whichEl.visibility  = 'none'; }  
  }
}


function tabs(x) {
  for (a in Z) {
    divShowHide(Z[a], 'h');
    document.getElementById(Z[a]+'t').className='tabOff'
  }

  divShowHide(x, 's');
  if (x!=Z[0]) document.getElementById(x).style.top = document.getElementById(Z[0]).offsetTop;
  document.getElementById(x+'t').className='tabOn'
}

