function zalobaOn(W, H, L, T) {
   var pct, pcl;
   var wymiar = xySize();
   document.getElementById('zaloba').style.visibility='visible';

   if (L==0) {
      L=((wymiar[0]-W)/2)-390;
      }
   if (T==0) {
      T=((wymiar[1]-H)/2)-15;
      }

   document.getElementById('zaloba').style.left=''+L+'px';
   document.getElementById('zaloba').style.top=''+T+'px';

   }

function oknoOn(URL, IDokno, W, H, L, T, timeOut, expressInstall, params, zamknij) {
   var pct, pcl;
   var wymiar = xySize();

   document.getElementById(IDokno).style.visibility='visible';
   if (zamknij) document.getElementById('close').style.visibility='visible';

   swfobject.embedSWF(URL, IDokno, W, H, "9.0.0", expressInstall, {}, params);

   if (L==0) {
      L=(wymiar[0]-W)/2;
      }
   if (T==0) {
      T=((wymiar[1]-H)/2)-170;
      }

   pct=T-20;
   pcl=W+L-15;
   document.getElementById('close').style.top=''+pct+'px';
   document.getElementById('close').style.left=''+pcl+'px';
   document.getElementById('close').innerHTML='X';

   document.getElementById(IDokno).style.left=''+L+'px';
   document.getElementById(IDokno).style.top=''+T+'px';

   if (timeOut!=0) {
      setTimeout("oknoOff('"+IDokno+"')",timeOut);
      }
   }

function oknoOff(IDokno) {
   document.getElementById(IDokno).style.visibility='hidden';
   document.getElementById('close').style.visibility='hidden';
   }

function xySize() {
   var wynik = new Array();
   var myWidth = 0, myHeight = 0;
   if( typeof( window.innerWidth ) == 'number' ) {
      myWidth = window.innerWidth;
      myHeight = window.innerHeight;
      } else if( document.documentElement && ( document.documentElement.clientWidth ||document.documentElement.clientHeight ) ) {
         myWidth = document.documentElement.clientWidth;
         myHeight = document.documentElement.clientHeight;
         } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
            myWidth = document.body.clientWidth;
            myHeight = document.body.clientHeight;
            }
   wynik[0]=myWidth;
   wynik[1]=myHeight;
   return wynik;
   }

function start() {
   var jscomm="oknoOn('http://www.wbm.wroc.pl/img/wbm_baner_770_150.swf', 'okno', 770, 150, 0, 0, 10000, 'http://www.wbm.wroc.pl/img/expressInstall.swf', {menu:'false'}, true)";
   setTimeout(jscomm, 3000);
   }


