function upozorni(naco) {
  var navrat=false;
  if (alert(naco)) {
    navrat=true;
  }
  return navrat;
}

function sn(id,affect){
/*
var con=nov.getElementsByTagName("div");
var imag=nov.getElementsByTagName("img");
*/
	if (affect==1) {
		var text=document.getElementById(id);
		text.style.display=(text.style.display=="block") ? "none" : "block"; 
	}
}

function go_to(url) {
	document.location.href=url;
}
function over(co) {
  var navrat=false;
  if (confirm('Opravdu chcete '+co+'?')) {
    navrat=true;
  }
  return navrat;
}

function over_custom(co) {
  var navrat=false;
  if (confirm(co)) {
    navrat=true;
  }
  return navrat;
}

function over_prejdi(txt,kam) {
	if (over(txt)) {
		document.location.href=kam;
	}
	return false; 
}

String.prototype.trim = function() { return this.replace(/^\s+|\s+$/, ''); };

function searchFocus() {
	var search_text = (search_text_id == null ? 'search_text' : search_text_id);
  var el = document.getElementById(search_text);
  if (el.value) if (el.value == search_keyword) el.value = '';
}

function searchBlur() {
	var search_text = (search_text_id == null ? 'search_text' : search_text_id);
  var el = document.getElementById(search_text);
	if (el.value.trim() == '') el.value = search_keyword;
}

function searchSubmit() {
	var search_text = (search_text_id == null ? 'search_text' : search_text_id);
  var keyword = document.getElementById(search_text).value;
	if (keyword == search_keyword || keyword.trim() == '') {
		window.alert(search_keyword_alert);
		return false;
	}
}


//Highlight form element- Â© Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com

var highlightcolor="lightyellow"

var ns6=document.getElementById&&!document.all
var previous=''
var eventobj

//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|SELECT|OPTION/

//Function to check whether element clicked is form element
function checkel(which){
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else
return false
}

//Function to highlight form element
function highlight(e){
eventobj=ns6? e.target : event.srcElement
if (previous!=''){
if (checkel(previous))
previous.style.backgroundColor=''
previous=eventobj
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
eventobj.style.borderColor=black
}
else{
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
previous=eventobj
}
}

function kontrola() 
{
var a = document.getElementById('jmeno').value;
if (a=="") {
	window.alert("Prosíme vyplňte jméno a příjmení"); 
	document.getElementById('jmeno').focus();
	return false; 
}

var a = document.getElementById('email').value;
if (a=="") {
	window.alert("Prosíme o vyplnení vaší e-mailové schránky"); 
	document.getElementById('email').focus();
	return false; 
} 

var a = document.getElementById('telefon').value;
if (a=="") {
	window.alert("Prosíme o vyplnění kontaktního telefonu (nejlépe mobilního)"); 
	document.getElementById('telefon').focus();
	return false; 
} 


var a = document.getElementById('zprava').value;
if (a=="") {
	window.alert("Prosíme o vyplnení zprávy v dotazu"); 
	document.getElementById('zprava').focus();
	return false; 
} 

else return true; 
}


