function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;

preloadFlag = true;

function change(rys, naco) {
	if (preloadFlag == true){
        document.getElementById(rys).src = naco.src;
    }
    return true;
}

function View(fota,x,y,tytul){
	tytul=escape(tytul);
	var newWindow=window.open('photo.html?photo='+fota+'&tytul='+tytul,'Photo','width='+x+',height='+y+',left=10,top=10');
	newWindow.focus();
}

function OpenPopUp(url,x,y){
	var newWindow=window.open(url,'nova','width='+x+',height='+y+',left=30,top=30');
	newWindow.focus();
}

function startList(){
	if (document.all && document.getElementById) {
		navItems = document.getElementById("topMenu").getElementsByTagName("li");
		for (i=0; i<navItems.length; i++) {
			if (navItems[i].nodeName=="LI") {
				navItems[i].onmouseover=function() { this.className+=" over";	}
				navItems[i].onmouseout=function() { this.className=this.className.replace(" over", "");}
			}
		}
	}
}


