
function tgl(whichLayer)
{
if (document.getElementById)
{
// this is the way the standards work
var style2 = document.getElementById(whichLayer).style;
style2.display = style2.display?"":"block";
}
else if (document.all)
{
// this is the way old msie versions work
var style2 = document.all[whichLayer].style;
style2.display = style2.display?"":"block";
}
else if (document.layers)
{
// this is the way nn4 works
var style2 = document.layers[whichLayer].style;
style2.display = style2.display?"":"block";
}
}

var oldLayer;

function info(whichLayer)
{
if (document.getElementById)
{
// this is the way the standards work

if (oldLayer && oldLayer!=whichLayer) {
var style2 = document.getElementById(oldLayer).style;
style2.display = style2.display?"":"none";

var styleq = document.getElementById("d"+oldLayer);
styleq.className = styleq.className?"":"highlite";

}

var style2 = document.getElementById(whichLayer).style;
style2.display = style2.display?"":"block";

var styleq = document.getElementById("d"+whichLayer);
styleq.className = styleq.className?"":"highlite";

oldLayer = whichLayer;

}
else if (document.all)
{
// this is the way old msie versions work
var style2 = document.all[whichLayer].style;
style2.display = style2.display?"":"block";
}
else if (document.layers)
{
// this is the way nn4 works
var style2 = document.layers[whichLayer].style;
style2.display = style2.display?"":"block";
}
}


function change(co, tekst) {
  document.all[co].innerHTML = tekst;
}

function WinOpen(url,x,y) {
  var options = "toolbar=no,menubar=no,scrollbars=no,resizable=no,width=" + x + ",height=" + y;
//  if (msgWindow != "mutex") {
//    msgWindow.close();
//  }
  msgWindow=window.open(url,"WinOpen",options);
  msgWindow.focus();
}

function WinOpen2(url,x,y) {
  var options = "toolbar=no,menubar=no,scrollbars=yes,resizable=no,width=" + x + ",height=" + y;
//  if (msgWindow != "mutex") {
//    msgWindow.close();
//  }
  msgWindow=window.open(url,"WinOpen",options);
  msgWindow.focus();
}

function writeFlash(nazwa,x,y,kolor) {

  t = '<object class="flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" ';
  t = t + 'width="';
  t = t + x;
  t = t + '" height="';
  t = t + y;
  t = t + '" align="middle">\n';
  
  t = t + '<param name="allowScriptAccess" value="sameDomain" />\n';
  t = t + '<param name="movie" value="' + nazwa + '" />\n';
  t = t + '<param name="quality" value="high" />\n';

  if (kolor) {
    t = t + '<param name="bgcolor" value="' + kolor + '" />\n';
  } else {
    t = t + '<param name="wmode" value="transparent" />\n';  
  }

  t = t + '<embed src="' + nazwa + '" quality="high" width="';
  t = t + x +'" height="' + y + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"';
  
  if (kolor) {
    t = t + ' bgcolor="' + kolor + '"';
  } else {
    t = t + ' wmode="transparent"';
  }  
  
  t = t + '/>\n';
  
  t = t + '</object>';
    
  document.write (t);

}
