var OknoPopupu = "";
var KolorTla_ = "";
var KolorTxt_ = "";


/// otwiera popup o podanych parametrach
// ******************************************
function OtworzPopup( Plik_ , Szer_ , Wys_, DodParam_ )
{
DodParam_ = ( DodParam_ == null ) ? "" : DodParam_;
if ( Wys_>600 )
  {
  Szer_ += 16;
  Wys_   = 600;  
  DodParam_ += ',scrollbars=yes';  
}

if ( Szer_>800 )
  {
  Wys_ += 16;
  Szer_   = 800;  
  DodParam_ += ',scrollbars=yes';  
}

PozTop_  = Math.ceil( ( screen.height - Wys_ ) / 2 );
PozLeft_ = Math.ceil( ( screen.width - Szer_ ) / 2 );

if ( OknoPopupu )
  {
  OknoPopupu.close();
}

OknoPopupu = window.open( Plik_, 'popup','width='+Szer_+',height='+Wys_+',top='+PozTop_+',left='+PozLeft_+''+DodParam_);

return false;
} // koniec OtworzPopup()






// ********************************************
function PodswietlPozycje( Obj_ , Stan_ , Kolor_ )
{
tKolor = new Array();
tKolor[1] = new Array();
tKolor[1]['tlo'] = '#0072bc';
tKolor[1]['txt'] = '#ffffff';
tKolor[2] = new Array();
tKolor[2]['tlo'] = '#f8f3bb';
tKolor[2]['txt'] = '#0072bc';

if ( Obj_ )
  {
  if ( Stan_ == 1 )
    {
    KolorTla_ = Obj_.style.backgroundColor;
    Obj_.style.backgroundColor = tKolor[Kolor_]['tlo'];
    KolorTxt_ = Obj_.style.color;
    Obj_.style.color = tKolor[Kolor_]['txt'];    
  }
  if ( Stan_ == 0 )
    {
    Obj_.style.backgroundColor = KolorTla_;
    Obj_.style.color = KolorTxt_;
  }
}
  
} // koniec PodswietlPozycje()


