function checkRequiredFields(form_id)
{
  ok = true;
  fields = document.getElementsByTagName('input');
  for(var i in fields) if(fields[i].className=='text required')
  {
    if(fields[i].parentNode.parentNode.parentNode.id==form_id && !fields[i].value) ok = false;
  }
  fields = document.getElementsByTagName('textarea');
  for(var i in fields) if(fields[i].className=='required')
  {
    if(fields[i].parentNode.parentNode.parentNode.id==form_id && !fields[i].value) ok = false;
  }
  if(ok) return true;
  alert('Musisz wypełnić wszystkie wymagane pola (oznaczone gwiazdką).');
  return false;
}

onload = function()
{
  if(document.body.offsetHeight < document.getElementsByTagName('html')[0].clientHeight)
  {
    document.body.style.height = document.getElementsByTagName('html')[0].clientHeight+'px';
  }
}

function fix_IE6_width()
{
  if(document.getElementById('central').offsetWidth < 1066) document.getElementById('central').style.width = '1066px';
  if(document.body.offsetWidth > 1066) document.getElementById('central').style.width = '';
  setTimeout('fix_IE6_width()', 100);
}