function meniu_button_hide()
	{
		elem1 = document.getElementById("lentele_1");
		elem2 = document.getElementById("lentele_2");
		elem3 = document.getElementById("lentele_3");
		elem4 = document.getElementById("lentele_4");
		elem5 = document.getElementById("lentele_5");
			elem1.style.top = '-10px';
			elem1.style.background = 'url(\'style/button_off.png\')';
			elem2.style.top = '-10px';
			elem2.style.background = 'url(\'style/button_off.png\')';
			elem3.style.top = '-10px';
			elem3.style.background = 'url(\'style/button_off.png\')';
			elem4.style.top = '-10px';
			elem4.style.background = 'url(\'style/button_off.png\')';
			elem5.style.top = '-10px';
			elem5.style.background = 'url(\'style/button_off.png\')';
			$("#sub_meniu_1").slideUp("normal");
			$("#sub_meniu_2").slideUp("normal");
			$("#sub_meniu_3").slideUp("normal");
			$("#sub_meniu_4").slideUp("normal");
			$("#sub_meniu_5").slideUp("normal");
	}
function meniu_button_1()
	{
		elem1 = document.getElementById("lentele_1");
		elem2 = document.getElementById("lentele_2");
		elem3 = document.getElementById("lentele_3");
		elem4 = document.getElementById("lentele_4");
		elem5 = document.getElementById("lentele_5");
			elem1.style.top = '-1px';
			elem1.style.background = 'url(\'style/button_on.png\')';
			
			elem2.style.top = '-10px';
			elem2.style.background = 'url(\'style/button_off.png\')';
			elem3.style.top = '-10px';
			elem3.style.background = 'url(\'style/button_off.png\')';
			elem4.style.top = '-10px';
			elem4.style.background = 'url(\'style/button_off.png\')';
			elem5.style.top = '-10px';
			elem5.style.background = 'url(\'style/button_off.png\')';
		if ($("#sub_meniu_1").is(":hidden")) {
			$("#sub_meniu_1").slideDown("normal");
			
			$("#sub_meniu_2").slideUp("normal");
			$("#sub_meniu_3").slideUp("normal");
			$("#sub_meniu_4").slideUp("normal");
			$("#sub_meniu_5").slideUp("normal");
		}
	};
	
function meniu_button_2()
	{
		elem1 = document.getElementById("lentele_1");
		elem2 = document.getElementById("lentele_2");
		elem3 = document.getElementById("lentele_3");
		elem4 = document.getElementById("lentele_4");
		elem5 = document.getElementById("lentele_5");
			elem2.style.top = '-1px';
			elem2.style.background = 'url(\'style/button_on.png\')';
			
			elem1.style.top = '-10px';
			elem1.style.background = 'url(\'style/button_off.png\')';
			elem3.style.top = '-10px';
			elem3.style.background = 'url(\'style/button_off.png\')';
			elem4.style.top = '-10px';
			elem4.style.background = 'url(\'style/button_off.png\')';
			elem5.style.top = '-10px';
			elem5.style.background = 'url(\'style/button_off.png\')';
		if ($("#sub_meniu_2").is(":hidden")) {
			$("#sub_meniu_2").slideDown("normal");
			
			$("#sub_meniu_1").slideUp("normal");
			$("#sub_meniu_3").slideUp("normal");
			$("#sub_meniu_4").slideUp("normal");
			$("#sub_meniu_5").slideUp("normal");
		}
	};
	
function meniu_button_3()
{
		elem1 = document.getElementById("lentele_1");
		elem2 = document.getElementById("lentele_2");
		elem3 = document.getElementById("lentele_3");
		elem4 = document.getElementById("lentele_4");
		elem5 = document.getElementById("lentele_5");
			elem3.style.top = '-1px';
			elem3.style.background = 'url(\'style/button_on.png\')';
			
			elem2.style.top = '-10px';
			elem2.style.background = 'url(\'style/button_off.png\')';
			elem1.style.top = '-10px';
			elem1.style.background = 'url(\'style/button_off.png\')';
			elem4.style.top = '-10px';
			elem4.style.background = 'url(\'style/button_off.png\')';
			elem5.style.top = '-10px';
			elem5.style.background = 'url(\'style/button_off.png\')';
		if ($("#sub_meniu_3").is(":hidden")) {
			$("#sub_meniu_3").slideDown("normal");
			
			$("#sub_meniu_2").slideUp("normal");
			$("#sub_meniu_4").slideUp("normal");
			$("#sub_meniu_1").slideUp("normal");
			$("#sub_meniu_5").slideUp("normal");
		}
	};

function meniu_button_4()
	{
		elem1 = document.getElementById("lentele_1");
		elem2 = document.getElementById("lentele_2");
		elem3 = document.getElementById("lentele_3");
		elem4 = document.getElementById("lentele_4");
		elem5 = document.getElementById("lentele_5");
			elem4.style.top = '-1px';
			elem4.style.background = 'url(\'style/button_on.png\')';
			
			elem2.style.top = '-10px';
			elem2.style.background = 'url(\'style/button_off.png\')';
			elem3.style.top = '-10px';
			elem3.style.background = 'url(\'style/button_off.png\')';
			elem1.style.top = '-10px';
			elem1.style.background = 'url(\'style/button_off.png\')';
			elem5.style.top = '-10px';
			elem5.style.background = 'url(\'style/button_off.png\')';
		if ($("#sub_meniu_4").is(":hidden")) {
			$("#sub_meniu_4").slideDown("normal");
			
			$("#sub_meniu_2").slideUp("normal");
			$("#sub_meniu_3").slideUp("normal");
			$("#sub_meniu_1").slideUp("normal");
			$("#sub_meniu_5").slideUp("normal");
		}
	};

function meniu_button_5()
	{
		elem1 = document.getElementById("lentele_1");
		elem2 = document.getElementById("lentele_2");
		elem3 = document.getElementById("lentele_3");
		elem4 = document.getElementById("lentele_4");
		elem5 = document.getElementById("lentele_5");
			elem5.style.top = '-1px';
			elem5.style.background = 'url(\'style/button_on.png\')';
			
			elem2.style.top = '-10px';
			elem2.style.background = 'url(\'style/button_off.png\')';
			elem3.style.top = '-10px';
			elem3.style.background = 'url(\'style/button_off.png\')';
			elem4.style.top = '-10px';
			elem4.style.background = 'url(\'style/button_off.png\')';
			elem1.style.top = '-10px';
			elem1.style.background = 'url(\'style/button_off.png\')';
		if ($("#sub_meniu_5").is(":hidden")) {
			$("#sub_meniu_5").slideDown("normal");
			
			$("#sub_meniu_2").slideUp("normal");
			$("#sub_meniu_3").slideUp("normal");
			$("#sub_meniu_4").slideUp("normal");
			$("#sub_meniu_1").slideUp("normal");
		}
	};

function calendar()
	{
	if ($("#calendar").is(":hidden")) {
			$("#calendar").show().animate({opacity: 1,left: '0'}, 700);
		}else{
			$("#calendar_note_background").slideUp("fast");
			$("#calendar").animate({opacity: 1}, 200).animate({opacity: 1,left: '-195'}, 700).hide('fast');
		}
	};
	

			
function gallery_foto(link, link_s, title, autor, data) {
			elem = document.getElementById("gallery_foto");
			elem1 = document.getElementById("foto_galery");
				var newImg = new Image();
				newImg.src = link_s;
				var height = newImg.height;
				var width = newImg.width;
				if(width > height){
					width = 660;
					height = 495;
				}else{
					width = 372;
					height = 495;
				}
				var w_height = document.documentElement.clientHeight;
				var w_width = document.documentElement.clientWidth;
				var top = Math.ceil((w_height-height)/2);
				var left = Math.ceil((w_width-width)/2);
				
				foto = '<center><strong><i><span style="color: #ccc; font-size: 14px;">'+title+'</span></center></i></strong><img src="' + link + '"/><br/><span style="font-size:12px; color: #999; position: reletive; width: '+width+'px;">autorius: <strong>'+autor+'<span style="position: absolute; right: 10px;">'+data+'</span></strog><span>';
				
				elem1.style.height = w_height+'px';
				elem1.style.width = w_width+'px';
			
			 if ($("#gallery_foto:first").is(":hidden")) {
				elem.innerHTML= foto;
				elem.style.top = top+'px';
				elem.style.left = left+'px';
				$("#foto_galery").fadeIn("fast");
				$("#gallery_foto").fadeIn("slow");
			} else {
				$("#gallery_foto").fadeOut("slow");
				$("#foto_galery").fadeOut("fast");
			}
		};
		
	function Winopen(link,width,height){
				if(!width){
					width=150;
				}
				if(!height){
					height=50;
				}
				myWindow=window.open(link,'','scrollbars=no,width='+width+'px,height='+height+'px,menubar=no,resizable=yes,toolbar=no,location=no,status=no');
				myWindow.focus();
			}
