function switchLayer_od_pobranie (ID, masa_paczki) 
{

  if (masa_paczki == 'do 0,5 kg' ||
      masa_paczki == 'ponad 0,5 kg do 1 kg' ||
      masa_paczki == 'ponad 1 kg do 2 kg' ||
      masa_paczki == 'ponad 2 kg do 5 kg' ||
      masa_paczki == 'ponad 5 kg do 10 kg' )
  {
    switchLayer(ID, 'hide');
    switchLayer('opek_dziura','show');
  }
  else
  {
    switchLayer(ID, 'show');
    switchLayer('opek_dziura','hide');
  }
}

function switchLayer(ID,tryb,parentID) {

  var ie;
  var nn;
  
  if (tryb=='show') 
  {
    ie = 'show';
    nn = '';
  }
  else 
  {
    ie = 'hide';
    nn = 'none';
  }
  
  if (document.layers) 
  {
    var oLayer;
    if(parentID)
    {
      oLayer = eval('document.' + parentID + '.document.' + ID);
    }
    else
    {
      oLayer = document.layers[ID];
    }
    oLayer.visibility = ie;
  }
  else if (parseInt(navigator.appVersion)>=5&&navigator.appName=="Netscape") 
  {
    oLayer = document.getElementById(ID);
    oLayer.style.display=nn;
  }
  else if (document.all) 
  {
    oLayer = document.all[ID];
    oLayer.style.display=nn;
  }
}

function OpenPicture(theURL,winName,features) 
{ 
   window.open(theURL,winName,features);
}

