       
      // -- dynamic code --
      
          
      
      var mainBoxActivePages = new Array ;
      var mainBoxBusy = new Array ;
      function main_box_goto_rel ( boxName, shift )
      {
        if ( mainBoxActivePages [ boxName ] == undefined ) mainBoxActivePages [ boxName ] = 0 ;
        var i ;
        var lastPage = 0 ;
        for ( i = 0 ; i < 10 ; i++ )
        {
          try {
            document.getElementById ( 'pgn_' + boxName + i ).style.color = '#444444' ;
          } catch ( err ) {
            lastPage = parseInt ( i ) - 1 ;            
            break ;
          }
        }
        var newPage = parseInt ( mainBoxActivePages [ boxName ] ) + parseInt ( shift ) ;
        if ( newPage < 0 ) newPage = lastPage ;
        if ( newPage > lastPage ) newPage = 0 ;
        main_box_page_goto ( boxName, newPage ) ;
      }
      
      function main_box_set_paginator ( boxName, page )
      {
        var i ;
        for ( i = 0 ; i < 10 ; i++ )
        {
          try {
            document.getElementById ( 'pgn_' + boxName + i ).style.color = '#444444' ;
          } catch ( err ) {
            // nic
          }
        }        
        document.getElementById ( 'pgn_' + boxName + page ).style.color = '' ;
      }
      
      function main_box_page_goto ( boxName, page )
      {
        if ( mainBoxBusy [ boxName ] == 'yes' ) return 0 ;
        mainBoxBusy [ boxName ] = 'yes' ;
        main_box_page_goto_slider ( boxName, page ) ;
      }
      
      function main_box_page_goto_slider ( boxName, page )
      {        
        var mainBoxesBoxWidth = 186 ;        
        var currPos = parseInt ( document.getElementById ( boxName ).style.left ) ;
        var destPos = - page * mainBoxesBoxWidth ;
        mainBoxActivePages [ boxName ] = page ;
        if ( destPos == currPos ) 
        {
          main_box_set_paginator ( boxName, page ) ;
          mainBoxBusy [ boxName ] = 'no' ;
          return ( 0 ) ;
        }
        else
        {          
          var newPos = currPos + ( destPos - currPos ) / 2 ;
          if ( Math.abs ( destPos - currPos ) < 5 ) newPos = destPos ;          
          newPos = parseInt ( newPos ) ;
          document.getElementById ( boxName ).style.left = newPos+'px';
          setTimeout ( 'main_box_page_goto_slider ( "' + boxName + '", "' + page + '" );', 25 ) ;
        }
      }

      $(document).ready( function() {
        main_box_page_goto ( 'b1', 0 ) ;
        main_box_page_goto ( 'b2', 0 ) ;
        main_box_page_goto ( 'b3', 0 ) ;
        main_box_page_goto ( 'b4', 0 ) ;
      });
      
           
      // -- dynamic code --
      
      $(document).ready ( function (){
        eval ( document.getElementById ( 'transportSearchParams_wyszGlowna_' ).innerHTML ) ;
      } );
           
      // -- dynamic code --
      
      ExtComponents.updateFunctions['wyszGlowna_countryRegion'] = 'SearchWindowCountryRegion_default.updateValue' ;       
      // -- dynamic code --
      
      ExtComponents.updateFunctions['wyszGlowna_departureFrom'] = 'SearchWindowDepartureFrom_default.updateValue' ;       
      // -- dynamic code --
      
      ExtComponents.updateFunctions['wyszGlowna_departureDateFrom'] = 'CalendarDatePicker_departureDateFrom.updateValue';       
      // -- dynamic code --
      
      ExtComponents.updateFunctions['wyszGlowna_returnDateTo'] = 'CalendarDatePicker.updateValue';       
      // -- dynamic code --
      
      ExtComponents.updateFunctions['wyszGlowna_adults'] = 'SearchWindowAdults_default.updateValue' ;       
      // -- dynamic code --
      
      ExtComponents.updateFunctions['wyszGlowna_children'] = 'SearchWindowChildren_default.updateValue' ;       
      // -- dynamic code --
      
      ExtComponents.updateFunctions['wyszGlowna_feeding'] = 'SearchWindowFeeding_default.updateValue' ;       
      // -- dynamic code --
      
      ExtComponents.updateFunctions['wyszGlowna_transport'] = 'SearchWindowTransport_default.updateValue' ;       
      // -- dynamic code --
      
      PageGenerator.preloadImage('data/images/UDDS_001/search_button_over.png');       
      // -- dynamic code --
      
       
  function wysz_tr_sel ( id ) 
  {
    document.getElementById ( 'wysz_tr_0' ).style.background='#F5820F';
    document.getElementById ( 'wysz_tr_1' ).style.background='#F5820F';
    document.getElementById ( 'wysz_tr_2' ).style.background='#F5820F';        
    if ( id == 0 )
    {
      document.getElementById ( 'wysz_tr_0' ).style.background='#22B3D4';
      ExtComponents.setValue ( 'wyszGlowna_transport', 'samolot' ) ;
    }        
    if ( id == 1 )
    {
      document.getElementById ( 'wysz_tr_1' ).style.background='#22B3D4';
      ExtComponents.setValue ( 'wyszGlowna_transport', 'autokar' ) ;
    }        
    if ( id == 2 )
    {
      document.getElementById ( 'wysz_tr_2' ).style.background='#22B3D4';
      ExtComponents.setValue ( 'wyszGlowna_transport', 'wlasny' ) ;
    }
  }  
  $(document).ready(function(){
    SearchWindow_mini.activateHiddenFields("wyszGlowna_");
    SearchWindow.updateComponentsValues("wyszGlowna_");
    wysz_tr_sel(0);
  });
       
      // -- dynamic code --
      
      
  function _rotate_flash_box( id )
  {    
    if ( id == 1 )
    {      
      document.getElementById ( 'flash_box_0' ).style.display = 'none' ;
      document.getElementById ( 'flash_box_1' ).style.display = 'block' ;
      setTimeout ( "_rotate_flash_box('0')", 6000 ) ;
    }
    if ( id == 0 )
    {
      document.getElementById ( 'flash_box_1' ).style.display = 'none' ;
      document.getElementById ( 'flash_box_0' ).style.display = 'block' ;
      setTimeout ( "_rotate_flash_box('1')", 6000 ) ;
    }
  }
  
  $(document).ready( function() {
    _rotate_flash_box('1') ;
  });
       
      // -- dynamic code --
      
      
function menu_top_active ( id ) 
{
  document.getElementById ( id ).style.background='url(_multita/images/1140/img.png) no-repeat scroll -225px -140px transparent';
  document.getElementById ( id ).style.color='#000000';
  menu_top_show( id );
}

function menu_top_unactive ( id ) 
{
  document.getElementById ( id ).style.background='url(_multita/images/1140/img.png) no-repeat scroll -225px -100px transparent';
  document.getElementById ( id ).style.color='#444444';
  menu_top_hide( id );
}

function menu_top_show ( id ) 
{
  document.getElementById ( id + '_sub' ).style.display='block';
}

function menu_top_hide ( id ) 
{
  document.getElementById ( id + '_sub' ).style.display='none';
}

function schowek_licznik_odswiez( timeout )
{
  var listExtOfferIdStr ;
  var listExtOfferIdTab ;
  var ilosc ;
  listExtOfferIdStr = $.cookie ( 'KSIofferNotesList' ) ;
  try {
    if ( listExtOfferIdStr != null )
    {
      listExtOfferIdTab = listExtOfferIdStr.split( ',' );
    }
  } catch ( err ) {
    listExtOfferIdTab = null ;
  }
  if (listExtOfferIdStr != null)
  {
    ilosc = listExtOfferIdTab.length - 1 ;
  }
  else
  {
    ilosc = 0 ;
  }
  
  if ( ilosc > 0 )
  {
    document.getElementById ( 'schowek_napis_licznik' ).style.color = '#33bb33' ;
    document.getElementById ( 'schowek_napis' ).style.color = '#333333' ;
    document.getElementById ( 'schowek_napis_licznik' ).innerHTML = ilosc ;
  }
  else
  {
    document.getElementById ( 'schowek_napis_licznik' ).style.color = '#aaaaaa' ;
    document.getElementById ( 'schowek_napis' ).style.color = '#aaaaaa' ;
    document.getElementById ( 'schowek_napis_licznik' ).innerHTML = '0' ;
  }
  
  setTimeout ( 'schowek_licznik_odswiez ( true );', 1500 ) ;
  return ilosc ;
}

function schowek_wywolaj()
{
  if ( schowek_licznik_odswiez( false ) > 0 )
  {
    location.href=OfferNotes_default.generateOfferLink();
  }
  else
  {
    alert ( 'Schowek ofert jest pusty' ) ;
  }
}

function szukaj_tekst()
{
  var tekst = document.getElementById ( 'wyszukiwany_tekst' ).value ;
  if ( tekst != '' )
  {
    location.href = 'index.php?module=bp/offersList&srchForceClearParams=yes&srchText[]=' + tekst ;
  }
}

$(document).ready(function(){
  schowek_licznik_odswiez ( true );
});
       
      // -- dynamic code --
      
             
      // -- dynamic code --
      
      
  $(document).ready(function(){    
    TouroperatorSlideBar_default.start('touroperatorsSlideBar_01', 704, 948, 50);
  });
