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 setCookie(nazwa, wartosc, expire) {
   if (expire==null) {
     exp=expire;
   } else {
    exp = new Date();
    exp.setTime(exp.getTime() + (expire*1000));
    }
   document.cookie = nazwa + "=" + escape(wartosc) + ((exp==null)?"" : ("; expires=" + exp.toGMTString()));
   }

function getCookie(nazwa) {
   if (document.cookie!="") {
      var toCookie=document.cookie.split("; ");
      for (i=0; i<toCookie.length; i++) {
          var nazwaCookie=toCookie[i].split("=")[0];
          var wartoscCookie=toCookie[i].split("=")[1];
          if (nazwaCookie==nazwa) return unescape(wartoscCookie);
          }
      }
   }

function delCookie(nazwa) {
   var teraz = new Date();
   teraz.setTime(teraz.getTime() - 1 );
   document.cookie = nazwa += "=; expires=" + teraz.toGMTString();
   }

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

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

   swfobject.embedSWF(URL, IDokno, W, H, "9.0.0", expressInstall, {}, {menu:"false", wmode:"transparent"});

   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/Zyczenia2.swf', 'okno', 320, 240, 0, 200, 15300, 'http://www.wbm.wroc.pl/img/expressInstall.swf')";
   var jscomm="oknoOn('img/WIG-zaproszenie1.swf', 'okno', 1010, 130, 0, 1, 8334, 'http://www.wbm.wroc.pl/img/expressInstall.swf')";
   setTimeout(jscomm, 3000);
   }
   
