function select(typ, id, aId)
{
  if(typ == 'moto')
  {
    document.getElementById('urceni').disabled = false;
    document.getElementById('urceni2').disabled = false;
  }
  else
  {
    document.getElementById('urceni').disabled = true;
    document.getElementById('urceni2').disabled = true;
  }
  
  if(aId == 'zal1')
  {
    document.getElementById(aId).style.color = '#D51415';
    document.getElementById(aId).style.backgroundColor = '#F1F1F1';
    document.getElementById(aId).style.backgroundPosition = '0 -52px';
    document.getElementById(aId+'2').style.color = '#D51415';
    document.getElementById(aId+'2').style.backgroundColor = '#F1F1F1';
    document.getElementById(aId+'2').style.backgroundPosition = '0 -52px';

    document.getElementById('zal2').style.color = '#000';
    document.getElementById('zal2').style.backgroundColor = '#FFF';
    document.getElementById('zal2').style.backgroundPosition = '0 0';
    document.getElementById('zal22').style.color = '#000';
    document.getElementById('zal22').style.backgroundColor = '#FFF';
    document.getElementById('zal22').style.backgroundPosition = '0 0';

    document.getElementById('zal3').style.color = '#000';
    document.getElementById('zal3').style.backgroundColor = '#FFF';
    document.getElementById('zal3').style.backgroundPosition = '0 0';
    document.getElementById('zal32').style.color = '#000';
    document.getElementById('zal32').style.backgroundColor = '#FFF';
    document.getElementById('zal32').style.backgroundPosition = '0 0';

    document.getElementById('zal4').style.color = '#000';
    document.getElementById('zal4').style.backgroundColor = '#FFF';
    document.getElementById('zal4').style.backgroundPosition = '0 0';
    document.getElementById('zal42').style.color = '#000';
    document.getElementById('zal42').style.backgroundColor = '#FFF';
    document.getElementById('zal42').style.backgroundPosition = '0 0';
  }
  if(aId == 'zal2')
  {
    document.getElementById(aId).style.color = '#D51415';
    document.getElementById(aId).style.backgroundColor = '#F1F1F1';
    document.getElementById(aId).style.backgroundPosition = '0 -52px';
    document.getElementById(aId+'2').style.color = '#D51415';
    document.getElementById(aId+'2').style.backgroundColor = '#F1F1F1';
    document.getElementById(aId+'2').style.backgroundPosition = '0 -52px';

    document.getElementById('zal1').style.color = '#000';
    document.getElementById('zal1').style.backgroundColor = '#FFF';
    document.getElementById('zal1').style.backgroundPosition = '0 0';
    document.getElementById('zal12').style.color = '#000';
    document.getElementById('zal12').style.backgroundColor = '#FFF';
    document.getElementById('zal12').style.backgroundPosition = '0 0';

    document.getElementById('zal3').style.color = '#000';
    document.getElementById('zal3').style.backgroundColor = '#FFF';
    document.getElementById('zal3').style.backgroundPosition = '0 0';
    document.getElementById('zal32').style.color = '#000';
    document.getElementById('zal32').style.backgroundColor = '#FFF';
    document.getElementById('zal32').style.backgroundPosition = '0 0';

    document.getElementById('zal4').style.color = '#000';
    document.getElementById('zal4').style.backgroundColor = '#FFF';
    document.getElementById('zal4').style.backgroundPosition = '0 0';
    document.getElementById('zal42').style.color = '#000';
    document.getElementById('zal42').style.backgroundColor = '#FFF';
    document.getElementById('zal42').style.backgroundPosition = '0 0';
  }
  if(aId == 'zal3')
  {
    document.getElementById(aId).style.color = '#D51415';
    document.getElementById(aId).style.backgroundColor = '#F1F1F1';
    document.getElementById(aId).style.backgroundPosition = '0 -52px';
    document.getElementById(aId+'2').style.color = '#D51415';
    document.getElementById(aId+'2').style.backgroundColor = '#F1F1F1';
    document.getElementById(aId+'2').style.backgroundPosition = '0 -52px';

    document.getElementById('zal1').style.color = '#000';
    document.getElementById('zal1').style.backgroundColor = '#FFF';
    document.getElementById('zal1').style.backgroundPosition = '0 0';
    document.getElementById('zal12').style.color = '#000';
    document.getElementById('zal12').style.backgroundColor = '#FFF';
    document.getElementById('zal12').style.backgroundPosition = '0 0';

    document.getElementById('zal2').style.color = '#000';
    document.getElementById('zal2').style.backgroundColor = '#FFF';
    document.getElementById('zal2').style.backgroundPosition = '0 0';
    document.getElementById('zal22').style.color = '#000';
    document.getElementById('zal22').style.backgroundColor = '#FFF';
    document.getElementById('zal22').style.backgroundPosition = '0 0';

    document.getElementById('zal4').style.color = '#000';
    document.getElementById('zal4').style.backgroundColor = '#FFF';
    document.getElementById('zal4').style.backgroundPosition = '0 0';
    document.getElementById('zal42').style.color = '#000';
    document.getElementById('zal42').style.backgroundColor = '#FFF';
    document.getElementById('zal42').style.backgroundPosition = '0 0';
  }
  if(aId == 'zal4')
  {
    document.getElementById(aId).style.color = '#D51415';
    document.getElementById(aId).style.backgroundColor = '#F1F1F1';
    document.getElementById(aId).style.backgroundPosition = '0 -52px';
    document.getElementById(aId+'2').style.color = '#D51415';
    document.getElementById(aId+'2').style.backgroundColor = '#F1F1F1';
    document.getElementById(aId+'2').style.backgroundPosition = '0 -52px';

    document.getElementById('zal1').style.color = '#000';
    document.getElementById('zal1').style.backgroundColor = '#FFF';
    document.getElementById('zal1').style.backgroundPosition = '0 0';
    document.getElementById('zal12').style.color = '#000';
    document.getElementById('zal12').style.backgroundColor = '#FFF';
    document.getElementById('zal12').style.backgroundPosition = '0 0';

    document.getElementById('zal2').style.color = '#000';
    document.getElementById('zal2').style.backgroundColor = '#FFF';
    document.getElementById('zal2').style.backgroundPosition = '0 0';
    document.getElementById('zal22').style.color = '#000';
    document.getElementById('zal22').style.backgroundColor = '#FFF';
    document.getElementById('zal22').style.backgroundPosition = '0 0';

    document.getElementById('zal3').style.color = '#000';
    document.getElementById('zal3').style.backgroundColor = '#FFF';
    document.getElementById('zal3').style.backgroundPosition = '0 0';
    document.getElementById('zal32').style.color = '#000';
    document.getElementById('zal32').style.backgroundColor = '#FFF';
    document.getElementById('zal32').style.backgroundPosition = '0 0';
  }
  
  if(typ == 'dodávky' || typ == 'moto' || typ == 'offroad')
  {
    document.getElementById('typ').value = typ;
    document.getElementById('typ2').value = typ;
  }
  else
  {
    document.getElementById('typ').value = 'osobní';
    document.getElementById('typ2').value = 'osobní';
  }
}
