﻿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>Dancefloor</title></head><body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0""><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>Dancefloor</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 style="width: 136px; height: 41px; background: url(\'images/cz/engine/pasek_horni_copy.gif\') top left repeat-x;"><img src="images/cz/engine/logo_pop_up.jpg" alt="Kliknutím zavřete okno" width="136" height="41" border="0" align="left" style="margin: 0px; padding: 0px;"></td>'+
		       '</tr><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="Kliknutím zavřete okno"><img src="'+src+'" width="'+w+'" height="'+h+'" alt="Kliknutím zavřete okno" 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 ControlUserStepDisable(){
  
  var aDisabled;
  var bDisabled;
  
  if(document.UserDataFormStep.user_or_firma.checked == true)
    aDisabled=true;
  else
    aDisabled=false;
    
  if(document.UserDataFormStep.user_or_firma.checked == true)
    bDisabled=false;
  else
    bDisabled=true;
  
	document.UserDataFormStep.user_name.readOnly = aDisabled;
	document.UserDataFormStep.user_surname.readOnly = aDisabled;
	document.UserDataFormStep.user_title.readOnly = aDisabled;
	document.UserDataFormStep.user_street.readOnly = aDisabled;
	document.UserDataFormStep.user_city.readOnly = aDisabled;
	document.UserDataFormStep.user_zip.readOnly = aDisabled;
	document.UserDataFormStep.user_state.readOnly = aDisabled;
	document.UserDataFormStep.user_email.readOnly = aDisabled;
	document.UserDataFormStep.user_telefon.readOnly = aDisabled;
	if(aDisabled == true){
		document.UserDataFormStep.user_name.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.user_surname.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.user_title.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.user_street.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.user_city.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.user_zip.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.user_state.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.user_email.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.user_telefon.style.backgroundColor = '#E8E8E8';
	}
	else{
		document.UserDataFormStep.user_name.style.backgroundColor = 'white';
		document.UserDataFormStep.user_surname.style.backgroundColor = 'white';
		document.UserDataFormStep.user_title.style.backgroundColor = 'white';
		document.UserDataFormStep.user_street.style.backgroundColor = 'white';
		document.UserDataFormStep.user_city.style.backgroundColor = 'white';
		document.UserDataFormStep.user_zip.style.backgroundColor = 'white';
		document.UserDataFormStep.user_state.style.backgroundColor = 'white';
		document.UserDataFormStep.user_email.style.backgroundColor = 'white';
		document.UserDataFormStep.user_telefon.style.backgroundColor = 'white';
	}
	
	
	
  document.UserDataFormStep.firma_name.readOnly = bDisabled;
	document.UserDataFormStep.firma_street.readOnly = bDisabled;
	document.UserDataFormStep.firma_city.readOnly = bDisabled;
	document.UserDataFormStep.firma_zip.readOnly = bDisabled;
	document.UserDataFormStep.firma_state.readOnly = bDisabled;
	document.UserDataFormStep.firma_email.readOnly = bDisabled;
	document.UserDataFormStep.firma_telefon.readOnly = bDisabled;
	document.UserDataFormStep.firma_ico.readOnly = bDisabled;
	document.UserDataFormStep.firma_dic.readOnly = bDisabled;
	document.UserDataFormStep.firma_ucet.readOnly = bDisabled;
	if(bDisabled == true){
	  document.UserDataFormStep.firma_name.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.firma_street.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.firma_city.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.firma_zip.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.firma_state.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.firma_email.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.firma_telefon.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.firma_ico.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.firma_dic.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.firma_ucet.style.backgroundColor = '#E8E8E8';
	}
	else{
	  document.UserDataFormStep.firma_name.style.backgroundColor = 'white';
		document.UserDataFormStep.firma_street.style.backgroundColor = 'white';
		document.UserDataFormStep.firma_city.style.backgroundColor = 'white';
		document.UserDataFormStep.firma_zip.style.backgroundColor = 'white';
		document.UserDataFormStep.firma_state.style.backgroundColor = 'white';
		document.UserDataFormStep.firma_email.style.backgroundColor = 'white';
		document.UserDataFormStep.firma_telefon.style.backgroundColor = 'white';
		document.UserDataFormStep.firma_ico.style.backgroundColor = 'white';
		document.UserDataFormStep.firma_dic.style.backgroundColor = 'white';
		document.UserDataFormStep.firma_ucet.style.backgroundColor = 'white';
	}

}

function ControlUserDataStepDisable(bDisabled){
	document.UserDataFormStep.deliver_title.readOnly = bDisabled;
	document.UserDataFormStep.deliver_street.readOnly = bDisabled;
	document.UserDataFormStep.deliver_city.readOnly = bDisabled;
	document.UserDataFormStep.deliver_zip.readOnly = bDisabled;
	document.UserDataFormStep.deliver_state.readOnly = bDisabled;
	document.UserDataFormStep.deliver_name.readOnly = bDisabled;
	document.UserDataFormStep.deliver_surname.readOnly = bDisabled;
	document.UserDataFormStep.deliver_email.readOnly = bDisabled;
	document.UserDataFormStep.deliver_telefon.readOnly = bDisabled;
	if(bDisabled == true){
		document.UserDataFormStep.deliver_title.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.deliver_street.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.deliver_city.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.deliver_zip.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.deliver_state.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.deliver_name.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.deliver_surname.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.deliver_email.style.backgroundColor = '#E8E8E8';
		document.UserDataFormStep.deliver_telefon.style.backgroundColor = '#E8E8E8';
	}
	else{
		document.UserDataFormStep.deliver_title.style.backgroundColor = 'white';
		document.UserDataFormStep.deliver_street.style.backgroundColor = 'white';
		document.UserDataFormStep.deliver_city.style.backgroundColor = 'white';
		document.UserDataFormStep.deliver_zip.style.backgroundColor = 'white';
		document.UserDataFormStep.deliver_state.style.backgroundColor = 'white';
		document.UserDataFormStep.deliver_name.style.backgroundColor = 'white';
		document.UserDataFormStep.deliver_surname.style.backgroundColor = 'white';
		document.UserDataFormStep.deliver_email.style.backgroundColor = 'white';
		document.UserDataFormStep.deliver_telefon.style.backgroundColor = 'white';
	}

}
