function show_menu_item(id,lang){
	document.all[id].src = "files/images/menu/"+lang+"_"+id+"_over.gif";
}

function hide_menu_item(id,lang){
	document.all[id].src = "files/images/menu/"+lang+"_"+id+".gif";
}

function kontrola_faq(form){
	if(form.email.value == ""){
		form.email.focus();
		alert("Zadajte Váš e-mail!\nEnter Your e-mail!");
		return false;
	} else {
		if(!checkMail(form)){
			form.email.focus();
			alert("Zadaná e-mailová adresa nie je platná!\nEntered e-mail address is not valid!");
			return false;
		} else 
			if(form.otazka.value == ""){
				form.otazka.focus();
				alert("Zadajte prosím Vašu otázku!\nWrite Your question, please!");
				return false;
			} else
				return true;
	}
}

function checkMail(form){
	var x = form.email.value;
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test(x))
		return true;
	else
		return false;
}

    NewWindow1=null;
    function ShowWin(adreska, w, h) {
    	if(NewWindow1){NewWindow1.close();}
	    if(NewWindow1==null || NewWindow1.closed){
            var top = screen.height/2 - h/2;
			var left = screen.width/2 - w/2;
    	    settings="left=" + left + ",top=" + top + ",width=" + w + ",height=" + h + ",toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes"
	        NewWindow1 = window.open(adreska,'okno',settings);
    	}
	    NewWindow1.focus();
    }
	
	NewWindow=null;
	function ShowItem(src, w, h, title){
		if(NewWindow){NewWindow.close();}
		if(NewWindow==null || NewWindow.closed){
		if (typeof(title)=="undefined") title="Galéria";
			var top = screen.height/2 - h/2;
			var left = screen.width/2 - w/2;
			settings=
				 "left=" + left + ","
				 +"top=" + top + ","
				 +"width=" + w + ","
				 +"height=" + h + ","
				 +"toolbar=no,"
				 +"location=no,"
				 +"directories=no,"
				 +"status=no,"
				 +"menubar=no,"
				 +"scrollbars=no,"
				 +"resizable=no";
			NewWindow = window.open("",'Klose',settings);
		}
		NewWindow.document.open();
		NewWindow.document.clear();
		NewWindow.document.write(
			"<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1250\">"
			+"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1250\"><title>"
			+ title +"</title></head>\n"
			+"<body topmargin=0 leftmargin=0 onclick=window.close(); onblur=\"window.close();\" bgcolor=#FFFFFF>\n"
			+"<table width=\"100%\" height=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=0><tr><td align=\"center\" valign=\"middle\"><img src=" + src + " border=1></td></tr></table>\n"
			+"</body>\n"
			+"</html>"
		);
		NewWindow.document.close();
		NewWindow.focus();
    }
	
	function zobraz(src,id){
	    document.all[id].innerHTML = '<img src="'+src+'" style="border:1px solid black">';
    }
