
   function OpenWindow(url,sizeX,sizeY)
   {
      var width = sizeX + 30;
      var height = sizeY + 30;

      var aw = screen.availWidth;
      var ah = screen.availHeight;

      var msg=window.open(url, "PopUp", 'width=' + width + ',height=' + height + ', left = '+ (aw-width)/2 +', top = '+ (ah-height)/2 +' , resizable=1, scrollbars=yes, menubar=no, toolbars=no');
      msg.window.focus();
   }

   function powiekszenie_zdjecia(url,sizeX,sizeY)
   {
      var width = sizeX + 30;
      var height = sizeY + 30;

      var aw = screen.availWidth;
      var ah = screen.availHeight;

      var msg=window.open(url, "PopUp", 'width=' + width + ',height=' + height + ', left = '+ (aw-width)/2 +', top = '+ (ah-height)/2 +' , resizable=1, scrollbars=no, menubar=no, toolbars=no');
      msg.window.focus();
   }

      function emots(txt)
      {
         document.selection.createRange().text = '['+txt+']';
      }
      function wstaw(txt)
      {
         document.selection.createRange().text=txt;
      }
      function zamien(znacznik)
      {
         txt = document.selection.createRange().text;
         document.selection.createRange().text = '['+znacznik+']'+txt+'[/'+znacznik+']';
      }
      function zamien1(znacznik, align)
      {
         txt = document.selection.createRange().text;
         document.selection.createRange().text = '['+znacznik+' align='+align+']'+txt+'[/'+znacznik+']';
      }
      function zamien2(znacznik)
      {
         txt = document.selection.createRange().text;
         document.selection.createRange().text = '['+znacznik+'=wstaw_url]'+txt+'[/'+znacznik+']';
      }

