/*
  (C) by KSI media sp. z o.o. ( www.ksimedia.pl )  
  Description : SearchWindowLengthPresentation class.
  Author      : MS
  Create date : 2010-08-22
  Comment     :
*/

function classSearchWindowDepartureFrom_default()
{

  this.updateValue = function ( name )
  {
    if ( ExtComponents.getValue( name ) == '' )
    {
      document.getElementById( 'vis_'+name ).value = ' - dowolny - ' ;
    }
    else
    {
      document.getElementById( 'vis_'+name ).value = ExtComponents.getValue( name ).replace ( /;/g, ',' );
    }
    try
    {
      this.itemsUpdateValues ( name ) ;
    }
    catch(err)
    { 
      // alert ( 'noItems' ) ;
    }
  }
  
  //
  // Akcje z interfejsu okna Items
  //
  
  this.itemsUpdateValues = function ( name )
  {
    ExtComponents.setValue ( 'mb_'+name, ExtComponents.getValue ( name ), true ) ;
  }
    
  
  this.itemsCloseWindow = function ( name )
  {
    EditBox.itemsHideWindow( name ) ;
    ExtComponents.setValue ( name, ExtComponents.getValue ( 'mb_'+name ), true );
  }
  
  this.itemsClear = function ( name )
  {
    ExtComponents.setValue ( name, '', true ) ;
    this.itemsUpdateValues ( name ) ;
  }

}

SearchWindowDepartureFrom_default = new classSearchWindowDepartureFrom_default ;
