function preloadImages()
{
  if ( document.images ) {
    submenu_middle = new Image( 'gfx/submenu_middle.png' );
    submenu_up     = new Image( 'gfx/submenu_up.png' );
    submenu_down   = new Image( 'gfx/submenu_down.png' );
  }
}

function showLocation(id)
{
  klienci = top.document.getElementById( "klienci" );
  lista = klienci.getElementsByTagName( "div" );
  for( i=0; i<lista.length; i++ ) {
    if ( lista[i].id ) {
      top.document.getElementById( lista[i].id ).style.display = "none";
    }
  }
  top.document.getElementById( "localization" + id ).style.display = "block";
}

function changeMenuVisibility(element,ile)
{
  for( i=1; i<=ile; i++) {
    id = "menu_" + i;
    document.getElementById(id).style.display="none";
  }
  if (document.getElementById(element).style.display=="none") {
    document.getElementById(element).style.display="block";
  } else {
    document.getElementById(element).style.display="none";
  }
}

function przycisk(podstawowy, wskazany, klikniety, tekst)
// Autorem skryptu jest: SŁAWOMIR KOKŁOWSKI
// www.kurshtml.boo.pl
{
  if (document.images)
{
    this.name = "img" + przyciski.length;
    if (podstawowy) { this.normal = new Image(); this.normal.src = podstawowy }
    if (wskazany) { this.over = new Image(); this.over.src = wskazany }
    if (klikniety) { this.down = new Image(); this.down.src = klikniety }
}
  if (tekst) this.opis = tekst;

  this.normalizuj = normalizuj;
  this.podswietl = podswietl;
  this.kliknij = kliknij;

  return this;

  function normalizuj() { if (document.images) document.images[this.name].src = this.normal.src; window.status = "" }
  function podswietl() { if (document.images && this.over) document.images[this.name].src = this.over.src; if (this.opis) window.status = this.opis }
  function kliknij() { if (document.images) document.images[this.name].src = this.down.src }
}

function imgshow(url, width, height)
{
  width += 15;
  height += 30;
  LeftPosition=(screen.width)?(screen.width-width)/2:100;
  TopPosition=(screen.height)?(screen.height-height)/2:100;
  var Win = window.open(url,'showpic','width=' + width + ',height=' + height + ',top=' + TopPosition + ',left=' + LeftPosition + ',resizable=0,scrollbars=no,menubar=no,toolbar=no,status=no')
}


function popupprint(url, width, height)
{
  LeftPosition=(screen.width)?(screen.width-width)/2:100;
  TopPosition=(screen.height)?(screen.height-height)/2:100;
  TopPosition = TopPosition - 100;
  var Win = window.open(url,'popup','width=' + width + ',height=' + height + ',top=' + TopPosition + ',left=' + LeftPosition + ',resizable=0,scrollbars=no,menubar=no,toolbar=no,status=no')
}

function popuparticle(url, width, height)
{
  LeftPosition=(screen.width)?(screen.width-width)/2:100;
  TopPosition=(screen.height)?(screen.height-height)/2:100;
  TopPosition = TopPosition - 100;
  var Win = window.open(url,'popup','width=' + width + ',height=' + height + ',top=' + TopPosition + ',left=' + LeftPosition + ',resizable=0,scrollbars=yes,menubar=no,toolbar=no,status=yes')
}

function go() {
  if (document.nawigator.skocz.selectedIndex == 0) {
    location.href='forum.php';
  } else {
    location.href='forum.php?fid=' + document.nawigator.skocz.options[document.nawigator.skocz.selectedIndex].value;
  }
}

function closeBanner()
{
  document.getElementById('floater').style.visibility="hidden";
  document.getElementById('floater').style.display="none";
  document.getElementById('topbanner').style.visibility="visible";
}

function closeSkyscraper()
{
  document.getElementById('floater2').style.visibility="hidden";
  document.getElementById('floater2').style.display="none";
  document.getElementById('towerbanner').style.visibility="visible";
}

function closeScroller()
{
  document.getElementById('floater3').style.display="none";
}

