function OpenImg(src,alt,width,height) {

  image = window.open('','','left=50, top=50, toolbar=no, width='+width+', height='+height+', resizable=no, scrollbars=no, status=no');
  image.focus();
  image.document.write('<html><head><title>WSFF 2007 - '+alt+'</title></head><body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" style="background-image: url(\'images/cz/engine/iko_loading.gif\'); background-repeat: no-repeat; background-position: center center; "><a href="javascript: window.close();"><img src="'+src+'" width="'+width+'" height="'+height+'" alt="'+alt+'" border="0"></a></body></html>');
  image.document.close();

}

function OpenImg2(src,datum,nazev,popis,width,height) {

  image = window.open('','','left=50, top=20, toolbar=no, width='+width+', height='+height+', resizable=no, scrollbars=no, status=no');
  w = width-10;	
  h = height-101;
  tdh = height-91;
  image.focus();


  image.document.write('<html><head><title>'+nazev+'</title><META HTTP-EQUIV="imagetoolbar" CONTENT="no"><meta http-equiv="Content-Type" content="text/html; charset=windows-1250">'+
		       '<link rel="stylesheet" href="style.css" type="text/css" media="all"><script language="JavaScript" src="click.js"></script>'+
		       '</head><body><table width="'+width+'" border="0" cellspacing="0" cellpadding="0" style="height: '+height+'px; background-color: F4F4F4;">'+
		       '<tr><td align="left" style="background: url(\'images/cz/engine/loading.gif\') center center no-repeat; vertical-align: middle;"><a href="javascript: window.close();" title=Click to close the window"><img src="'+src+'" width="'+w+'" height="'+h+'" alt="Click to close the window" border="0" style="margin: 5px;"></a></td>'+
  		       '</tr><tr><td style="background-color: F4F4F4; height: 50px; vertical-align: top;"><div style="height: 50px; width: auto; overflow: auto;"><div style="margin: 0px 20px 0px 6px; text-align: justify; width: auto; height: 50px; display: block;"><span style="color: #000; font-weight: bold; font-size: 12px; font-family: arial;">'+datum+'<br /><span class = "big_gallery_title">'+nazev+'</span></span></div></div></td>'+
		       '</tr></table></body></html>');
  image.document.close();

}
  function ControlOther(promena){
    if(promena == '3'){
      document.formular.other2.readOnly = false;
      document.formular.other2.style.backgroundColor = '#F5F5F5';
    }else{
      document.formular.other2.readOnly = true;
      document.formular.other2.style.backgroundColor = '#A0A0A0';
      document.formular.other2.value = '';
    }  
    if(promena == '2'){
      document.formular.a_number.readOnly = false;
      document.formular.a_number.style.backgroundColor = '#F5F5F5';
      document.formular.d_number.readOnly = false;
      document.formular.d_number.style.backgroundColor = '#F5F5F5';
    }else{
      document.formular.a_number.readOnly = true;
      document.formular.a_number.style.backgroundColor = '#A0A0A0';
      document.formular.a_number.value = '';
      document.formular.d_number.readOnly = true;
      document.formular.d_number.style.backgroundColor = '#A0A0A0';
      document.formular.d_number.value = '';
    }  
  }

function ControlFarm(promena){
    if(promena == '1'){
      document.formular.west_person.readOnly = false;
      document.formular.west_person.style.backgroundColor = '#F5F5F5';
    }else{
      document.formular.west_person.readOnly = true;
      document.formular.west_person.style.backgroundColor = '#A0A0A0';
      document.formular.west_person.value = '';
    } 
    if(promena == '2'){
      document.formular.beef_person.readOnly = false;
      document.formular.beef_person.style.backgroundColor = '#F5F5F5';
    }else{
      document.formular.beef_person.readOnly = true;
      document.formular.beef_person.style.backgroundColor = '#A0A0A0';
      document.formular.beef_person.value = '';
    } 
}    


function ControlLadies(){
  if(document.formular.ladies.checked == true){
    document.formular.ladies_person.readOnly = false;
    document.formular.ladies_person.style.backgroundColor = '#F5F5F5';
  }else{
    document.formular.ladies_person.readOnly = true;
    document.formular.ladies_person.style.backgroundColor = '#A0A0A0';
    document.formular.ladies_person.value = '';
  }
}

function ControlCost(){
  var cena
  cena = document.formular.single_before.value * 450 + document.formular.single_after.value * 500 + document.formular.double_before.value * 400 + document.formular.double_after.value * 450;
  document.formular.cost.value = cena + ' €';

}

