    function rollOver(element) {
	    element.className += (element.className?' ':'') + 'hover';
	    for( var x = 0; element.childNodes[x]; x++ ){
	    	if( element.childNodes[x].tagName == 'UL' ) { element.childNodes[x].className += (element.childNodes[x].className?' ':'') + 'hover'; }
    		if( element.childNodes[x].tagName == 'A' ) { element.childNodes[x].className += (element.childNodes[x].className?' ':'') + 'hover'; }
	    }
    }

    function rollOff(element) {
	    element.className = element.className.replace(/ ?hover$/,'');
	    for( var x = 0; element.childNodes[x]; x++ ){
	    	if( element.childNodes[x].tagName == 'UL' ) { element.childNodes[x].className = element.childNodes[x].className.replace(/ ?hover$/,''); }
    		if( element.childNodes[x].tagName == 'A' ) { element.childNodes[x].className = element.childNodes[x].className.replace(/ ?hover$/,''); }
	    }
    }

    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=yes,"
    			+"location=no,"
    			+"directories=no,"
    			+"status=yes,"
    			+"menubar=yes,"
    			+"scrollbars=yes,"
    			+"resizable=yes";
    		NewWindow1 = window.open(href,'okno',settings);
    	}
    	NewWindow1.focus();
    }
    
    timer = null;
	IMG = null;
	NewWindow3 = null;           
	function ViewImage(Isrc,title) {
		IMG = new Image;
		IMG.src = Isrc;
		if (typeof(title)=="undefined" || title=="") title="Gallery";
		if (NewWindow3) { NewWindow3.close(); }
		if (NewWindow3==null || NewWindow3.closed) {
			settings=
			 "left="+50+","
			 +"top="+50+","
			 +"width="+640+","
			 +"height="+480+","
			 +"toolbar=no,"
			 +"location=no,"
			 +"directories=no,"
			 +"status=no,"
			 +"menubar=no,"
			 +"scrollbars=no,"
			 +"resizable=yes"
			 NewWindow3 = window.open("",'Gallery',settings);
		}
		NewWindow3.document.open();
		NewWindow3.document.clear();
		NewWindow3.document.write(
		 	"<html><head><title>"+ title +"</title>"
			+"</head>\n"
			+"<body topmargin=0 leftmargin=0 bgcolor=\"#000\" onclick=\"window.close();\">\n"
			+"<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin:0px;\"><tr><td align=\"center\" valign=\"middle\"><img src=" + IMG.src + " border=0 alt=\""+title+"\" /></td></tr></table>\n"
			+"</body>\n"
			+"</html>"
		);
		NewWindow3.document.close();
		NewWindow3.focus();
		timer = setInterval("resize()",250);
	}

	function resize() {
    	if(!IMG.complete){ return; }
	    clearInterval(timer);
		resizeWindowTo(NewWindow3,IMG.width,(IMG.height+50));
		IMG = null;
	}

	function resizeWindowTo(WindowObject,w,h) {
		if (parseInt(navigator.appVersion)>3) {
			if (navigator.appName=="Netscape") {
				WindowObject.outerWidth=w;
				WindowObject.outerHeight=h;
			} else {
                WindowObject.resizeTo(w,h);
            }
		}
	}
