    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 + "px,"
				 +"top=" + top + "px,"
				 +"width=" + w + "px,"
				 +"height=" + h + "px,"
				 +"toolbar=no,"
				 +"location=no,"
				 +"directories=no,"
				 +"status=no,"
				 +"menubar=no,"
				 +"scrollbars=no,"
				 +"resizable=no";
			NewWindow = window.open("",'Klose',settings);
            //NewWindow.resizeTo(w,h);
		}
		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();
	}

	NewWindow1 = null;
	function ShowWin(href, 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;
			var settings =
		 		"left=" + left + "px,"
				+"top=" + top + "px,"
				+"width=" + w + "px,"
				+"height=" + h + "px,"
				+"toolbar=no,"
				+"location=no,"
				+"directories=no,"
				+"status=yes,"
				+"menubar=no,"
				+"scrollbars=yes,"
				+"resizable=no";
			NewWindow1 = window.open(href,'okno',settings);
            //NewWindow1.resizeTo(w,h);
		}
		NewWindow1.focus();
	}
	
	NewWindow2 = null;
	function PrintDetails(content,w,h) {
		if(NewWindow2){NewWindow2.close();}
		if(NewWindow2==null || NewWindow2.closed){
			var top = screen.height/2 - h/2;
			var left = screen.width/2 - w/2;
		 	settings = "left="+left+",top="+top+",width="+w+"px,height="+h+"px,toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes"
	 		NewWindow2 = window.open("",'Detaily',settings);
            NewWindow2.resizeTo(w,h);
		}
		NewWindow2.document.open();
		NewWindow2.document.clear();
		NewWindow2.document.write(
			"<html><head><title>Tlač</title></head><style>table {font-size:11px;}</style>\n"
			+"<body topmargin=10 leftmargin=10 onload=\"window.print();\" bgcolor=#FFFFFF style=\"font-family:Verdana,Arial;font-size:10px;\">\n"
			+ content
			+"</body>\n"
			+"</html>"
		);
		NewWindow2.document.close();
		NewWindow2.focus();
	}
	
	function changeMenuImage(id,type){
		document.getElementById('m'+id).src = 'files/images/menu/m'+id+''+type+'.gif';
	}
	
	function verifyDelete(nazov,presmerovanie) {
    	if (confirm(nazov)) {
	    	location.href=presmerovanie;
    	} else {
		    return false;
	    }
    } 
    
    function check_cart_form(f){
        if(f.meno.value == ""){
	    	alert("Nezadali ste Vaše meno!");
		    f.meno.focus();
    		return false;
    	} else {
            if(f.priezvisko.value == ""){
    	    	alert("Nezadali ste Vaše priezvisko!");
		        f.priezvisko.focus();
        		return false;
        	} else {
                if (f.email.value == ""){
        		    alert("Nezadali ste Vašu e-mailovú adresu!");
	            	f.email.focus();
            		return false;
   		        } else {
                    if (window.RegExp){
            	    	re = new RegExp("^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,3}$");
    		           	if (!re.test(f.email.value)){
               				alert("Zadaná e-mailová adresa je neplatná!");
			           	    f.email.focus();
            		    	return false;
		               	} else {
            	    		return true;
    		           	}
            		} else {
                        return true;
                    }
                }
            }
        }
    }    

