function openProtectedPictureWindow(imageName,imageWidth,imageHeight,alt) {
	var w=800, h=600;
	if(screen.width!=null && screen.height!=null) {
		w=screen.width;
		h=screen.height;
	}
	imageName = imageName.replace(/\/k\//,"/Franin_Krka_Waterfall/");
	imageName = imageName.replace(/\/f\//,"/Franin_Dubrava_Falcon/");
	imageName = imageName.replace(/\/g\//,"/Franin_Glavica_archaeology/");
	imageName = imageName.replace(/\/v\//,"/Krka_Roski_Slap/");
	imageName = imageName.replace(/\/p\//,"/Plitvice_lakes/");
	imageName = imageName.replace(/\/s\//,"/Shibenik/");
	imageName = imageName.replace(/\/pp\//,"/Plava_Plaza/");
	newWindow = window.open("","newWindow"+Math.round(Math.random()*10000),"width="+imageWidth+",height="+imageHeight+",left="+(Math.round((w-imageWidth)/2))+",top="+(Math.round((h-imageHeight)/4)));
	newWindow.document.open();
	newWindow.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><title>'+alt+'</title></head><body style="margin: 0px; padding: 0px; background-color: #eeeff4;" onMouseDown="self.close()">');
	newWindow.document.write('<div style="position: absolute; width: 100%; bottom: 1%; text-align: center;">Загружается изображение, пожалуйста, подождите...<br><br><br><br><br><br><br><br></div>');
	newWindow.document.write('<div style="position: absolute; z-index: 2"><img src="images/dot.gif" width='+imageWidth+' height='+imageHeight+' alt="'+alt+'"');	
	newWindow.document.write('<div style="position: absolute; z-index: 1"><img src="'+imageName+'" width='+imageWidth+' height='+imageHeight+' alt="'+alt+'"');
	newWindow.document.write('></div></body></html>');
	newWindow.document.close();
	newWindow.focus();
}
function openPictureWindow(imageName,imageWidth,imageHeight,alt) {
	var w=800, h=600;
	if(screen.width!=null && screen.height!=null) {
		w=screen.width;
		h=screen.height;
	}
	imageName = imageName.replace(/\/k\//,"/Franin_Krka_Waterfall/");
	imageName = imageName.replace(/\/f\//,"/Franin_Dubrava_Falcon/");
	newWindow = window.open("","newWindow"+Math.round(Math.random()*10000),"width="+imageWidth+",height="+imageHeight+",left="+(Math.round((w-imageWidth)/2))+",top="+(Math.round((h-imageHeight)/4)));
	newWindow.document.open();
	newWindow.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><title>'+alt+'</title></head><body style="margin: 0px; padding: 0px; background-color: #eeeff4;">');
	newWindow.document.write('<div style="position: absolute; width: 100%; bottom: 1%; text-align: center;">Загружается изображение, пожалуйста, подождите...<br><br><br><br><br><br><br><br></div>');
	newWindow.document.write('<div style="position: absolute"><img src="'+imageName+'" width='+imageWidth+' height='+imageHeight+' alt="'+alt+'"');
	newWindow.document.write('></div></body></html>');
	newWindow.document.close();
	newWindow.focus();
}
function openPageWindow(URL) {
	newWindow = window.open(""+URL,+Math.round(Math.random()*10000),"location=yes,toolbar=yes,menubar=yes,status=yes,resizable=yes,scrollbars=yes,directories=yes");
	newWindow.focus();
}
function openDescrWindow(descrName) {
	var w=800, h=600;
	if(screen.width!=null && screen.height!=null) {
		w=screen.width;
		h=screen.height;
	}
	newWindow = window.open(""+descrName,+Math.round(Math.random()*10000),"left="+(w/2-320)+",top="+(h/2-300)+",width=640,height=350,location=no,toolbar=no,menubar=yes,status=yes,resizable=yes,scrollbars=yes,directories=no");
	newWindow.focus();
}