var globalVideoId = Math.round(Math.random() * 2345);

var _AdPlayer =               new Array();
var _AdSmallPlayer =          new Array();
var _SmallPlayer =            new Array();
var _MiniPlayer =             new Array();
var _MidiPlayer =             new Array();
var _GreenMidiPlayer =             new Array();
var _GreenMaxPlayer =             new Array();
var _UserMaxPlayer =             new Array();

var _FaktyPlayer =            new Array();
var _FullPlayer =             new Array();
var _BigPlayer =              new Array();
var _AudioPlayer =            new Array();
var _AddPlaylist =            new Array();
var _SportTable =             new Array();
var _WIG20 =                  new Array();
var _WynikSond =              new Array();
var _SEFobject = 				   new Array();

function DefaultFlashObject()
{
   this.width_object =           1;
   this.height_object =          1;
   this.wmode =                  '';
   this.flash_vars =             '';
   this.bgcolor =                '#000000';
   this.color =                  '#FFFFFF';
   this.movie =                  '';
   
   this.mini_file =              '/_d/wideo/flash/player_mini_035.swf'; //srodtekst - 2007-08-07
   this.midi_file =              '/_d/wideo/flash/player_news_002.swf'; //news - 2007-08-07
   this.ad_file =                '/_d/wideo/flash/player_news_upc.swf'; //news ad -  2008-08-18
   this.adsmall_file =           '/_d/wideo/flash/player_prawy_samsung.swf'; //prawy ad - 2008-07-03
   this.small_file =             '/_d/wideo/flash/player_prawy_002.swf'; // prawy - 2008-08-07
   this.wybory_file =            '/_d/wybory/player_wybory_11.swf'; // 2007-11-13
   this.fakty_file =             '/_d/wideo/flash/player_fakty_031.swf'; //fakty - 2008-08-07
   this.full_file =              this.midi_file;
   this.big_file =               '/_d/wideo/flash/player_big_78.swf'; //wideo - 2008-08-07
   this.sport_file =             '/_d/tabele/tab_sport_006.swf';
   this.add_file =               '/_d/wideo/flash/nowy_wpis_007.swf';
   this.wig20_file =             '/_d/biz/line.swf';
   this.sonda_file =             '/_d/sondy/bar2d.swf';
   this.audio_file =              '/_d/wideo/flash/psound_001.swf';

   // TVN Warszawa
   this.max_file        =        '/_d/wideo/flash/wawa/player440_013.swf';
   this.green_midi_file =        '/_d/wideo/flash/wawa/smallplayer_008.swf';
   this.user_max_file   =        '/_d/wideo/flash/wawa/playeruser_008.swf';
   this.user_max_file   =        '/_d/wideo/flash/wawa/player440_009.swf';

   this.requiredMajorVersion =   8;
   this.requiredMinorVersion =   0;
   this.requiredRevision =       0;

   this.cdn_array =              [1];

   this.DrawPlayer = function()
   {
      var r =                    '';
      globalVideoId = globalVideoId+10;
      var fo =                   new SWFObject(this.movie, 'flash_obj'+globalVideoId, this.width_object, this.height_object,
                                                this.requiredMajorVersion+'.'+this.requiredMinorVersion+'.'+this.requiredRevision, this.bgcolor);

      if (fo.installedVer.versionIsValid(fo.getAttribute('version')))
      {
         fo.addParam('allowScriptAccess',    'sameDomain');
         if (this.wmode)
         {
            fo.addParam('wmode',             this.wmode);
         }
         if (this.flash_vars)
         {
            fo.addParam('FlashVars',         this.flash_vars);
         }

         r += fo.getSWFHTML();
      }
      else
      {
         r += '<div style="border: 1px solid #DADADA; height: 100%; text-align: center; width: 100%;">';
            r += '<br><a href="http://www.macromedia.com/go/getflashplayer">Musisz uaktualnić Flash Player\'a do wersji min. '+
                     this.requiredMajorVersion+'.'+this.requiredMinorVersion+'.'+this.requiredRevision+'</a>';
         r += '</div>';
      }

      return r;
   };
   
   this.PickCDN = function()
   {
      return this.cdn_array[Math.floor(Math.random() * this.cdn_array.length)];
   };
}




function AdSmallPlayer(flash_id, oid, image, width_object, height_object, auto_play, return_mode)
{

   this.index =                  _AdSmallPlayer.length;
   _AdSmallPlayer[this.index]         =     this;
   this.obj =                    '_AdSmallPlayer['+this.index+']';

   if (typeof(width_object) == 'undefined')
   {
      width_object =             300;
   }
   if (typeof(height_object) == 'undefined')
   {
      height_object =            260;
   }
   this.width_object =           width_object;
   this.height_object =          height_object;
   this.wmode =                  'transparent';

   if (typeof(auto_play) == 'undefined')
   {
      auto_play =                0;
   }
   this.auto_play =              auto_play;
   if ((AUTOPLAY_OFF) && (return_mode != 1))
   {
      this.auto_play =           0;
   }
   this.player_html =            '';

   this.ShowPlayer = function(flash_id, oid, image)
   {
   var r =                    '';
   var adv =                  '';

      if (!VIDEO_OFF)
      {
         if ((typeof(spotturl) != 'undefined') && (typeof(spotturl.ad_id) != 'undefined') && (typeof(spotturl.ad_url) != 'undefined'))
         {
            adv = '&a='+spotturl.ad_id+'&al='+spotturl.ad_url
         }
         this.flash_vars =       'flashId='+flash_id+'&ap='+this.auto_play+'&v='+oid+'&i='+image+adv+'&cdn='+this.PickCDN();
         this.movie =            this.adsmall_file;

         r += this.DrawPlayer();

         if (return_mode == 1)
         {
            this.player_html = r;
         }
         else
         {
            document.write(r);
         }
         if(typeof adv != "undefined"){
            adv = '';
            spotturl = '';
         }
         
      }
      else
      {
         document.write('<img src="http://m.onet.pl/_m/'+image+'">');
      }

      return false;
   }

   this.showPlayerHtml = function()
   {
      return this.player_html;
   }

   return this.ShowPlayer(flash_id, oid, image);
}

/*****/


function AdPlayer(flash_id, oid, image, width_object, height_object, auto_play, return_mode, add_flashvars)
{

   this.index =                  _AdPlayer.length;
   _AdPlayer[this.index]         =     this;
   this.obj =                    '_AdPlayer['+this.index+']';

   if (typeof(width_object) == 'undefined')
   {
      width_object =             450;
   }
   if (typeof(height_object) == 'undefined')
   {
      height_object =            322;
   }
   this.width_object =           width_object;
   this.height_object =          height_object;
   this.wmode =                  'transparent';

   if (typeof(auto_play) == 'undefined')
   {
      auto_play =                0;
   }
   this.auto_play =              auto_play;
   if ((AUTOPLAY_OFF) && (return_mode != 1))
   {
      this.auto_play =           0;
   }
   this.player_html =            '';

   this.ShowPlayer = function(flash_id, oid, image)
   {
   var r =                    '';
   var adv =                  '';

      if (!VIDEO_OFF)
      {
         if ((typeof(spotturl) != 'undefined') && (typeof(spotturl.ad_id) != 'undefined') && (typeof(spotturl.ad_url) != 'undefined'))
         {
            adv = '&a='+spotturl.ad_id+'&al='+spotturl.ad_url
         }
         this.flash_vars =       'flashId='+flash_id+'&ap='+this.auto_play+'&v='+oid+'&i='+image+adv+'&cdn='+this.PickCDN();
         if (add_flashvars)
         {
            this.flash_vars += '&' + add_flashvars;
         }
         this.movie =            this.ad_file;

         r += this.DrawPlayer();

         if (return_mode == 1)
         {
            this.player_html = r;
         }
         else
         {
            document.write(r);
         }
         if(typeof adv != "undefined"){
            adv = '';
            spotturl = '';
         }
      }
      else
      {
         document.write('<img src="http://m.onet.pl/_m/'+image+'">');
      }

      return false;
   }

   this.showPlayerHtml = function()
   {
      return this.player_html;
   }

   return this.ShowPlayer(flash_id, oid, image);
}




/***/
function MiniPlayer(flash_id, oid, image, title)
{

   this.index =                  _MiniPlayer.length;
   _MiniPlayer[this.index] =     this;
   this.obj =                    '_MiniPlayer['+this.index+']';
   
   this.width_object =           209;
   this.height_object =          188;
   this.wmode =                  'transparent';
   
   this.auto_play =              0;
   if (AUTOPLAY_OFF)
   {
      this.auto_play =           0;
   }

   this.ShowPlayer = function(flash_id, oid, image, title)
   {
   var r =                    '';

      if (!VIDEO_OFF)
      {
         this.flash_vars =       'flashId='+flash_id+'&ap='+this.auto_play+'&v='+oid+'&i='+image+'&t='+(title+1)+'&cdn='+this.PickCDN();
         this.movie =            this.mini_file;

         r += this.DrawPlayer();
         document.write(r);
      }
      else
      {
         document.write('<img src="http://m.onet.pl/_m/'+image+'">');
      }

      return false;
   }

   return this.ShowPlayer(flash_id, oid, image, title);
}

function MidiPlayer(flash_id, oid, image, width_object, height_object, auto_play, return_mode)
{
   this.index =                  _MidiPlayer.length;
   _MidiPlayer[this.index] =     this;
   this.obj =                    '_MidiPlayer['+this.index+']';
   
   if (typeof(width_object) == 'undefined')
   {
      width_object =             450;
   }
   if (typeof(height_object) == 'undefined')
   {
      height_object =            322;
   }
   this.width_object =           width_object;
   this.height_object =          height_object;
   this.wmode =                  'transparent';
   
   if (typeof(auto_play) == 'undefined')
   {
      auto_play =                0;
   }
   this.auto_play =              auto_play;
   if ((AUTOPLAY_OFF) && (return_mode != 1))
   {
      this.auto_play =           0;
   }
   this.player_html =            '';

   this.ShowPlayer = function(flash_id, oid, image)
   {
   var r =                    '';
   var adv =                  '';

      if (!VIDEO_OFF)
      {
         if ((typeof(spotturl) != 'undefined') && (typeof(spotturl.ad_id) != 'undefined') && (typeof(spotturl.ad_url) != 'undefined'))
         {
            adv = '&a='+spotturl.ad_id+'&al='+spotturl.ad_url
            //adv = '&a=33233&al=http://www.onet.pl/';
         }
         this.flash_vars =       'flashId='+flash_id+'&ap='+this.auto_play+'&v='+oid+'&i='+image+adv+'&cdn='+this.PickCDN();
         this.movie =            this.midi_file;

         r += this.DrawPlayer();

         if (return_mode == 1)
         {
            this.player_html = r;
         }
         else
         {
            document.write(r);
         }
         if(typeof adv != "undefined"){
            adv = '';
            spotturl = '';
         }
      }
      else
      {
         document.write('<img src="http://m.onet.pl/_m/'+image+'">');
      }

      return false;
   }

   this.showPlayerHtml = function()
   {
      return this.player_html;
   }

   return this.ShowPlayer(flash_id, oid, image);
}

function GreenMidiPlayer(flash_id, oid, image, width_object, height_object, auto_play, return_mode)
{
   this.index =                  _GreenMidiPlayer.length;
   _GreenMidiPlayer[this.index] =     this;
   this.obj =                    '_GreenMidiPlayer['+this.index+']';

   if (typeof(width_object) == 'undefined')
   {
      width_object =             450;
   }
   if (typeof(height_object) == 'undefined')
   {
      height_object =            322;
   }
   this.width_object =           width_object;
   this.height_object =          height_object;
   this.wmode =                  'transparent';

   if (typeof(auto_play) == 'undefined')
   {
      auto_play =                0;
   }
   this.auto_play =              auto_play;
   if ((AUTOPLAY_OFF) && (return_mode != 1))
   {
      this.auto_play =           0;
   }
   this.player_html =            '';

   this.ShowPlayer = function(flash_id, oid, image)
   {
   var r =                    '';
   var adv =                  '';

      if (!VIDEO_OFF)
      {
         if ((typeof(spotturl) != 'undefined') && (typeof(spotturl.ad_id) != 'undefined') && (typeof(spotturl.ad_url) != 'undefined'))
         {
            adv = '&a='+spotturl.ad_id+'&al='+spotturl.ad_url
            //adv = '&a=33233&al=http://www.onet.pl/';
         }
         this.flash_vars =       'flashId='+flash_id+'&ap='+this.auto_play+'&v='+oid+'&i='+image+adv+'&cdn='+this.PickCDN();
         this.movie =            this.green_midi_file;

         r += this.DrawPlayer();

         if (return_mode == 1)
         {
            this.player_html = r;
         }
         else
         {
            document.write(r);
         }
         if(typeof adv != "undefined"){
            adv = '';
            spotturl = '';
         }
      }
      else
      {
         document.write('<img src="http://m.onet.pl/_m/'+image+'">');
      }

      return false;
   }

   this.showPlayerHtml = function()
   {
      return this.player_html;
   }


   return this.ShowPlayer(flash_id, oid, image);
}


function GreenMaxPlayer(flash_id, oid, image, width_object, height_object, auto_play, return_mode)
{
   this.index =                  _GreenMaxPlayer.length;
   _GreenMaxPlayer[this.index] =     this;
   this.obj =                    '_GreenMaxPlayer['+this.index+']';

   if (typeof(width_object) == 'undefined')
   {
      width_object =             450;
   }
   if (typeof(height_object) == 'undefined')
   {
      height_object =            322;
   }
   this.width_object =           width_object;
   this.height_object =          height_object;
   this.wmode =                  'transparent';

   if (typeof(auto_play) == 'undefined')
   {
      auto_play =                0;
   }
   this.auto_play =              auto_play;
   if ((AUTOPLAY_OFF) && (return_mode != 1))
   {
      this.auto_play =           0;
   }
   this.player_html =            '';

   this.ShowPlayer = function(flash_id, oid, image)
   {
   var r =                    '';
   var adv =                  '';

      if (!VIDEO_OFF)
      {
         if ((typeof(spotturl) != 'undefined') && (typeof(spotturl.ad_id) != 'undefined') && (typeof(spotturl.ad_url) != 'undefined'))
         {
            adv = '&a='+spotturl.ad_id+'&al='+spotturl.ad_url
            //adv = '&a=33233&al=http://www.onet.pl/';
         }
         this.flash_vars =       'flashId='+flash_id+'&ap='+this.auto_play+'&v='+oid+'&i='+image+adv+'&cdn='+this.PickCDN();
         this.movie =            this.max_file;

         r += this.DrawPlayer();

         if (return_mode == 1)
         {
            this.player_html = r;
         }
         else
         {
            document.write(r);
         }
         if(typeof adv != "undefined"){
            adv = '';
            spotturl = '';
         }

      }
      else
      {
         document.write('<img src="http://m.onet.pl/_m/'+image+'">');
      }

      return false;
   }

   this.showPlayerHtml = function()
   {
      return this.player_html;
   }


   return this.ShowPlayer(flash_id, oid, image);
}

function UserMaxPlayer(flash_id, oid, image, width_object, height_object, auto_play, return_mode)
{
   this.index =                  _UserMaxPlayer.length;
   _UserMaxPlayer[this.index] =     this;
   this.obj =                    '_UserMaxPlayer['+this.index+']';

   if (typeof(width_object) == 'undefined')
   {
      width_object =             450;
   }
   if (typeof(height_object) == 'undefined')
   {
      height_object =            322;
   }
   this.width_object =           width_object;
   this.height_object =          height_object;
   this.wmode =                  'transparent';

   if (typeof(auto_play) == 'undefined')
   {
      auto_play =                0;
   }
   this.auto_play =              auto_play;
   if ((AUTOPLAY_OFF) && (return_mode != 1))
   {
      this.auto_play =           0;
   }
   this.player_html =            '';

   this.ShowPlayer = function(flash_id, oid, image)
   {
   var r =                    '';
   var adv =                  '';

      if (!VIDEO_OFF)
      {
         if ((typeof(spotturl) != 'undefined') && (typeof(spotturl.ad_id) != 'undefined') && (typeof(spotturl.ad_url) != 'undefined'))
         {
            adv = '&a='+spotturl.ad_id+'&al='+spotturl.ad_url
            //adv = '&a=33233&al=http://www.onet.pl/';
         }
         this.flash_vars =       'flashId='+flash_id+'&ap='+this.auto_play+'&s1=17&s2=5&v='+oid+'&i='+image+adv+'&cdn='+this.PickCDN();
         this.movie =            this.user_max_file;

         r += this.DrawPlayer();

         if (return_mode == 1)
         {
            this.player_html = r;
         }
         else
         {
            document.write(r);
         }
         if(typeof adv != "undefined"){
            adv = '';
            spotturl = '';
         }
      }
      else
      {
         document.write('<img src="http://m.onet.pl/_m/'+image+'">');
      }

      return false;
   }

   this.showPlayerHtml = function()
   {
      return this.player_html;
   }


   return this.ShowPlayer(flash_id, oid, image);
}


function SmallPlayer(flash_id, oid, image, width_object, height_object, auto_play, return_mode)
{

   this.index =                  _SmallPlayer.length;
   _SmallPlayer[this.index]         =     this;
   this.obj =                    '_SmallPlayer['+this.index+']';

   if (typeof(width_object) == 'undefined')
   {
      width_object =             300;
   }
   if (typeof(height_object) == 'undefined')
   {
      height_object =            260;
   }
   this.width_object =           width_object;
   this.height_object =          height_object;
   this.wmode =                  'transparent';

   if (typeof(auto_play) == 'undefined')
   {
      auto_play =                0;
   }
   this.auto_play =              auto_play;
   if ((AUTOPLAY_OFF) && (return_mode != 1))
   {
      this.auto_play =           0;
   }
   this.player_html =            '';

   this.ShowPlayer = function(flash_id, oid, image)
   {
   var r =                    '';
   var adv =                  '';

      if (!VIDEO_OFF)
      {
         if ((typeof(spotturl) != 'undefined') && (typeof(spotturl.ad_id) != 'undefined') && (typeof(spotturl.ad_url) != 'undefined'))
         {
            adv = '&a='+spotturl.ad_id+'&al='+spotturl.ad_url
         }
         this.flash_vars =       'flashId='+flash_id+'&ap='+this.auto_play+'&v='+oid+'&i='+image+adv+'&cdn='+this.PickCDN();
         this.movie =            this.small_file;

         r += this.DrawPlayer();

         if (return_mode == 1)
         {
            this.player_html = r;
         }
         else
         {
            document.write(r);
         }
         if(typeof adv != "undefined"){
            adv = '';
            spotturl = '';
         }
      }
      else
      {
         document.write('<img src="http://m.onet.pl/_m/'+image+'">');
      }

      return false;
   }

   this.showPlayerHtml = function()
   {
      return this.player_html;
   }

   return this.ShowPlayer(flash_id, oid, image);
}


function FaktyPlayer(flash_id, oid, image, width_object, height_object, auto_play)
{

   this.index =                  _FaktyPlayer.length;
   _FaktyPlayer[this.index] =    this;
   this.obj =                    '_FaktyPlayer['+this.index+']';
   
   if (typeof(width_object) == 'undefined')
   {
      width_object =             271;
   }
   if (typeof(height_object) == 'undefined')
   {
      height_object =            315;
   }
   this.width_object =           width_object;
   this.height_object =          height_object;
   this.wmode =                  'transparent';
   
   if (typeof(auto_play) == 'undefined')
   {
      auto_play =                0;
   }
   this.auto_play =              auto_play;
   if (AUTOPLAY_OFF)
   {
      this.auto_play =           0;
   }

   this.ShowPlayer = function(flash_id, oid, image)
   {
   var r =                    '';
   var adv =                  '';

      if (!VIDEO_OFF)
      {
         if ((typeof(spotturl) != 'undefined') && (typeof(spotturl.ad_id) != 'undefined') && (typeof(spotturl.ad_url) != 'undefined'))
         {
            adv = '&a='+spotturl.ad_id+'&al='+spotturl.ad_url
         }
         this.flash_vars =       'flashId='+flash_id+'&ap='+this.auto_play+'&v='+oid+'&i='+image+adv+'&cdn='+this.PickCDN();
         this.movie =            this.fakty_file;

         r += this.DrawPlayer();
         if(typeof adv != "undefined"){
            adv = '';
            spotturl = '';
         }

         document.write(r);
      }

      return false;
   }

   return this.ShowPlayer(flash_id, oid, image);
}

function FullPlayer(flash_id, oid)
{
   this.index =                  _FullPlayer.length;
   _FullPlayer[this.index] =     this;
   this.obj =                    '_FullPlayer['+this.index+']';

   this.width_object =           '100%';
   this.height_object =          '100%';
   this.auto_play =              1;
   this.width_win =              screen.availWidth;
   this.height_win =             screen.availHeight;
   this.name =                   'TVN24_Wideo';
   if(navigator.appName == "Microsoft Internet Explorer")
   {
      this.parameters =             'top=0, left=0, status=no, toolbar=no, location=no, menubar=no, directories=no, scrollbars=no, resizable=yes, fullscreen=no, width='+
                                 (this.width_win-10)+', height='+(this.height_win-30);
   }
   else
   {
      this.parameters =             'status=no, toolbar=no, location=no, menubar=no, directories=no, scrollbars=no, resizable=yes, fullscreen=yes, width='+
                                 this.width_win+', height='+this.height_win;
   }

   this.ShowPlayer = function(flash_id, oid)
   {
   var r =                    '';
   var new_win;

      if (!VIDEO_OFF)
      {
         this.flash_vars =       'flashId='+flash_id+'&ap='+this.auto_play+'&v='+oid+'&cdn='+this.PickCDN();
         this.movie =            this.full_file;

         r += '<html>';
         r += '<head>';
            r += '<meta http-equiv="content-type" content="text/html; charset=utf-8">';
         r += '</head>';
         r += '<script language="javascript" type="text/javascript">';
            r += "function FullPlayer(a,b){window.close();}";
         r += '</script>';
         r += '<body style="background: '+this.bgcolor+'; color: '+this.color+'; margin: 0; padding: 0;">';
            r += this.DrawPlayer();
         r += '</body>';
         r += '</html>';
      }

      new_win = window.open('', this.name, this.parameters);
      new_win.document.open();
      new_win.document.write(r);
      new_win.document.close();
      if (window.focus)
      {
         new_win.focus();
      }
   }


   this.ShowPlayer(flash_id, oid);
   return void(0);
}



function BigPlayer(flash_id, oid, auto_play)
{

   this.index =                  _BigPlayer.length;
   _BigPlayer[this.index] =      this;
   this.obj =                    '_BigPlayer['+this.index+']';
   
   this.width_object =           670;
   this.height_object =          372;
   this.wmode =                  'transparent';
   
   if (typeof(auto_play) == 'undefined')
   {
      auto_play =                0;
   }
   this.auto_play =              auto_play;
   if (AUTOPLAY_OFF)
   {
      this.auto_play =           0;
   }

   this.ShowPlayer = function(flash_id, oid)
   {
   var r =                    '';
   var adv =                  '';

      if ((typeof(spotturl) != 'undefined') && (typeof(spotturl.ad_id) != 'undefined') && (typeof(spotturl.ad_url) != 'undefined'))
      {
         adv = '&a='+spotturl.ad_id+'&al='+spotturl.ad_url
      }
      this.flash_vars =       'flashId='+flash_id+'&ap='+this.auto_play+'&d='+oid+'&off='+VIDEO_OFF+adv+'&cdn='+this.PickCDN();
      this.movie =            this.big_file;

      r += this.DrawPlayer();
      document.write(r);

      return false;
   }


   return this.ShowPlayer(flash_id, oid);
}

function AudioPlayer(flash_id, url_a)
{

   this.index =                  _AudioPlayer.length;
   _AudioPlayer[this.index] =     this;
   this.obj =                    '_AudioPlayer['+this.index+']';
   
   this.width_object =           209;
   this.height_object =          35;
   this.wmode =                  'transparent';
   
   this.auto_play =              0;
   if (AUTOPLAY_OFF)
   {
      this.auto_play =           0;
   }

   this.ShowPlayer = function(flash_id, url_a)
   {
   var r =                    '';

      if (!VIDEO_OFF)
      {
         this.flash_vars =       'flashId='+flash_id+'&autoplay='+this.auto_play+'&plik='+url_a;
         this.movie =            this.audio_file;

         r += this.DrawPlayer();
         document.write(r);
      }

      return false;
   }

   return this.ShowPlayer(flash_id, url_a);
}


function AddPlaylist()
{

   this.index =                  _AddPlaylist.length;
   _AddPlaylist[this.index] =    this;
   this.obj =                    '_AddPlaylist['+this.index+']';
   
   this.width_object =           1;
   this.height_object =          1;
   this.wmode =                  'transparent';
   
   this.div_flash_id =           'flash_add_item';
   this.div_ajax_id =            'ajax';

   this.AddItem = function(flash_id, oid, vid, name)
   {
   var r =                    '';

      this.flash_vars =       'flashId='+flash_id+'&oid='+oid+'&vid='+vid+'&nazwa='+name;
      this.movie =            this.add_file;

      r += this.DrawPlayer();
      document.getElementById(this.div_flash_id).innerHTML = r;
      AjaxRequest('1,'+oid+',0,playlista_akcja.html', this.div_ajax_id, 3);

      return false;
   }
}



function SportTable(flash_id)
{

   this.index =                  _SportTable.length;
   _SportTable[this.index] =     this;
   this.obj =                    '_SportTable['+this.index+']';
   
   this.width_object =           338;
   this.height_object =          800;
   this.wmode =                  'transparent';
   
   this.data =                   '/sport.xml';

   this.ShowTable = function(flash_id)
   {
   var r =                    '';

      this.flash_vars =       'flashId='+flash_id+'&l='+this.data;
      this.movie =            this.sport_file;

      r += this.DrawPlayer();
      document.write(r);

      return false;
   }

   return this.ShowTable(flash_id);
}

function WIG20()
{
   
   this.index =                  _WIG20.length;
   _WIG20[this.index] =     this;
   this.obj =                    '_WIG20['+this.index+']';
   
   this.width_object =           275;
   this.height_object =          130;
   this.wmode =                  'transparent';

   this.ShowTable = function()
   {
   var r =                    '';

      this.flash_vars =       'dataURL=/xtb/wig20.xml&chartWidth=275&chartHeight=130';
      this.movie =            this.wig20_file;

      r += this.DrawPlayer();
      document.write(r);

      return false;
   }

   return this.ShowTable();
}


function WynikiSondy(oid,width,height)
{
   this.index =                  _WynikSond.length;
   _WynikSond[this.index] =     this;
   this.obj =                    '_WynikSond['+this.index+']';
   
   this.width_object =           width;
   this.height_object =          height;
   this.wmode =                  'transparent';
   
   this.data =                   '/'+oid+',sonda_wyn.xml';

   this.ShowTable = function()
   {
   var r =                    '';

      this.flash_vars =       'dataURL='+this.data+'&chartWidth='+this.width_object+'&chartHeight='+this.height_object;
      this.movie =            this.sonda_file;

      r += this.DrawPlayer();
      document.write(r);

      return false;
   }

   return this.ShowTable();
}

function VideoList()
{
   this.http =          null;
   this.destName =      'ajax_video_list';

   this.AjaxRequest = function(url)
   {
   var dest = document.getElementById(this.destName);

      http = new mkwHTTP(2);
      http.Get(
                  {
                     'url':         url,
                     'onLoading' :  function(o)
                                    {
                                       dest.innerHTML = '<div class="a1" style="color: #AAAAAA; text-align: center;">Proszę czekać...</div>';
                                    },
                     'onSuccess' :  function(o)
                                    {
                                       res = o.ResponseText;
                                       if (typeof(res) == 'string')
                                       {
                                          dest.innerHTML = res;
                                       }
                                    },
                     'onError' :    function(i)
                                    {
                                       dest.innerHTML = '<div class="a1" style="text-align: center;"></div>';
                                    }
                  }
               );
   }
}

function CategoryList(id, active, className)
{
   this.http =          null;
   this.destName =      'ajax_video_list';
   this.id =            id;
   this.active =        typeof(active) == 'undefined' ? 0 : active;
   this.className =     typeof(className) == 'undefined' ? 'zakladki' : className;

   this.Show = function(n)
   {
      var underscore = '_';
      while (document.getElementById('' + this.id + underscore + this.active))
      {
         document.getElementById('' + this.id + underscore + this.active).className = this.className + underscore + 'n';
         document.getElementById('' + this.id + underscore + n).className = this.className + underscore + 'a';
         underscore += '_';
      }
      this.active = n;
   }

   this.AjaxRequest = function(url)
   {
   var dest = document.getElementById(this.destName);

      http = new mkwHTTP(2);
      http.Get(
                  {
                     'url':         url,
                     'onLoading' :  function(o)
                                    {
                                       dest.innerHTML = '<div class="a1" style="color: #AAAAAA; text-align: center;">Proszę czekać...</div>';
                                    },
                     'onSuccess' :  function(o)
                                    {
                                       res = o.ResponseText;
                                       if (typeof(res) == 'string')
                                       {
                                          dest.innerHTML = res;
                                       }
                                    },
                     'onError' :    function(i)
                                    {
                                       dest.innerHTML = '<div class="a1" style="text-align: center;"></div>';
                                    }
                  }
               );
   }
}


function SWFobject(swf, flashVars, szerokosc, wysokosc, backgroundcolor, no_write)
{
   this.width_object    = ''+szerokosc+'';
   this.height_object   = ''+wysokosc+'';
   this.bgColor         = ''+backgroundcolor+'';
   this.flash_vars      = ''+flashVars+'';
   this.movie           = ''+swf+'';

   this.r = this.DrawPlayer();
   if (!no_write)
   {
      document.write(this.r);
   }
}

AdPlayer.prototype =          new DefaultFlashObject();
AdSmallPlayer.prototype =     new DefaultFlashObject();
SmallPlayer.prototype =       new DefaultFlashObject();
MiniPlayer.prototype =        new DefaultFlashObject();
MidiPlayer.prototype =        new DefaultFlashObject();
FaktyPlayer.prototype =       new DefaultFlashObject();
FullPlayer.prototype =        new DefaultFlashObject();
BigPlayer.prototype =         new DefaultFlashObject();
AudioPlayer.prototype =       new DefaultFlashObject();
AddPlaylist.prototype =       new DefaultFlashObject();
SportTable.prototype =        new DefaultFlashObject();
WIG20.prototype =             new DefaultFlashObject();
WynikiSondy.prototype =       new DefaultFlashObject();
SWFobject.prototype = 		   new DefaultFlashObject();
GreenMidiPlayer.prototype =          new DefaultFlashObject();
GreenMaxPlayer.prototype =          new DefaultFlashObject();
UserMaxPlayer.prototype =          new DefaultFlashObject();

var play_list =               new AddPlaylist();