function noenter() {
  return !(window.event && window.event.keyCode == 13); 
}

function count_plocha() {
  if (isNaN(document.getElementById("delka").value)) {
    alert("Zadejte prosím číselnou hodnotu.");
    document.getElementById("delka").value = 0;
  }
  if ((isNaN(document.getElementById("hloubka").value)) || ((document.getElementById("hloubka").value!=3) && (document.getElementById("hloubka").value!=4) )) {
    if (document.getElementById("hloubka").value != 0) alert("Zadejte prosím číselnou hodnotu 3 nebo 4.");
    document.getElementById("hloubka").value = 0;
  }
  obsah = document.getElementById("delka").value * document.getElementById("hloubka").value;
  document.getElementById("plocha").value = obsah;

  pronajem = obsah * 990;
  document.getElementById("pronajem").value = pronajem;
}


function count_plocha_stred() {
  if (isNaN(document.getElementById("delka_stred").value)) {
    alert("Zadejte prosím číselnou hodnotu.");
    document.getElementById("delka_stred").value = 0;
  }
  if ((isNaN(document.getElementById("hloubka_stred").value)) || ((document.getElementById("hloubka_stred").value!=3) && (document.getElementById("hloubka_stred").value!=4) )) {
    if (document.getElementById("hloubka_stred").value != 0) alert("Zadejte prosím číselnou hodnotu 3 nebo 4.");
    document.getElementById("hloubka_stred").value = 0;
  }
  obsah = document.getElementById("delka_stred").value * document.getElementById("hloubka_stred").value;
  document.getElementById("plocha_stred").value = obsah;

  pronajem = obsah * 1290;
  document.getElementById("pronajem_stred").value = pronajem;
}


function count_plocha_venkovni() {
  if (isNaN(document.getElementById("delka_venkovni").value)) {
    alert("Zadejte prosím číselnou hodnotu.");
    document.getElementById("delka_venkovni").value = 0;
  }
  if ((isNaN(document.getElementById("hloubka_venkovni").value)) || ((document.getElementById("hloubka_venkovni").value!=3) && (document.getElementById("hloubka_venkovni").value!=4) )) {
    if (document.getElementById("hloubka_venkovni").value != 0) alert("Zadejte prosím číselnou hodnotu 3 nebo 4.");
    document.getElementById("hloubka_venkovni").value = 0;
  }
  obsah = document.getElementById("delka_venkovni").value * document.getElementById("hloubka_venkovni").value;
  document.getElementById("plocha_venkovni").value = obsah;

  pronajem = obsah * 590;
  document.getElementById("pronajem_venkovni").value = pronajem;
}



function count_it(co,cena) {
  if (isNaN(document.getElementById(co).value)) {
    alert("Zadejte prosím číselnou hodnotu.");
    document.getElementById(co).value = 0;
  }
  document.getElementById(co+"_kc").value = document.getElementById(co).value * cena;
}

	var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
		function countdown(yr,m,d) {
		  theyear=yr;
		  themonth=m;
		  theday=d;
		
		  var today=new Date();
		  var todayy=today.getYear();
		
		  if (todayy < 1000) todayy+=1900;
		
		  var todaym=today.getMonth();
		  var todayd=today.getDate();
		  var todayh=today.getHours();
		  var todaymin=today.getMinutes();
		  var todaysec=today.getSeconds();
		  var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec;
		
		  futurestring=montharray[m-1]+" "+d+", "+yr;
		  dd=Date.parse(futurestring)-Date.parse(todaystring);
		  dday=Math.floor(dd/(60*60*1000*24)*1);
		  dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1);
		  dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1);
		
		  document.getElementById("dny").innerHTML = dday;
		  document.getElementById("hod").innerHTML = dhour;
		  document.getElementById("min").innerHTML = dmin;
		
		  setTimeout("countdown(theyear,themonth,theday)",1000)
		}