// Funzioni JS implementate da ROBY deoo ROBMAN

<!--
function ApriFinestra(imagePath,alt,posLeft,posTop) {
	hMargin = 5;
	vMargin = 50;
	
	newWindow = window.open("","newWindow","left="+posLeft+",top="+posTop+",screenX="+posLeft+",screenY="+posTop+",menubar=no,toolbar=no,location=no,location=0,scrollbars=no,resizable=yes,status=1,width=300,height=200");
	newWindow.document.open();
	newWindow.document.writeln('<html><title>'+alt+'</title>');
	/* INIZIO head */
	newWindow.document.writeln('<head>');
	/* INIZIO css */
	newWindow.document.writeln('<style type="text/css">');
	newWindow.document.writeln('<!--');
	newWindow.document.writeln('body {');
	newWindow.document.writeln('\tfont-family: Verdana, Arial, Helvetica, sans-serif;');
	newWindow.document.writeln('\tfont-size: 12px;');
	newWindow.document.writeln('\tmargin: 0px;');
	newWindow.document.writeln('\tpadding: 0px;');
	newWindow.document.writeln('\toverflow: hidden;');
	newWindow.document.writeln('}');
	newWindow.document.writeln('#loading {');
	newWindow.document.writeln('\tposition: absolute;');
	newWindow.document.writeln('\twidth: 100px;');
	newWindow.document.writeln('\theight: 50px;');
	newWindow.document.writeln('\tleft:50%;');
	newWindow.document.writeln('\tmargin-left:-50px;');
	newWindow.document.writeln('\t/* IE5 MAC CSS HACK \*/');
	newWindow.document.writeln('\ttop:50%;');
	newWindow.document.writeln('\t/* IE5 MAC CSS HACK \*/');
	newWindow.document.writeln('\tmargin-top: -25px;');
	newWindow.document.writeln('}');
	newWindow.document.writeln('#fotoFrame {');
	newWindow.document.writeln('\tposition: absolute;');
	newWindow.document.writeln('\twidth: 100%;');
	newWindow.document.writeln('\theight: 100%;');
	newWindow.document.writeln('\tleft: 0px;');
	newWindow.document.writeln('\ttop: 0px;');
	newWindow.document.writeln('\ttext-align: center;');
	newWindow.document.writeln('\tvisibility: hidden;');
	newWindow.document.writeln('}');
	newWindow.document.writeln('#foto {');
	newWindow.document.writeln('\tvertical-align: middle;');
	newWindow.document.writeln('}');
	newWindow.document.writeln('-->');
	newWindow.document.writeln('</style>');
	/* FINE css */

	/* INIZIO javascript */
	newWindow.document.writeln('<script type="text/javascript"> ');
		newWindow.document.writeln('\tfunction getObj(objID) {');
			newWindow.document.writeln('\t\tif (typeof objID == "string") {');
				newWindow.document.writeln('\t\t\tisNS4 = (document.layers) ? true : false;');
				newWindow.document.writeln('\t\t\tisIE4 = (document.all && !document.getElementById) ? true : false;');
				newWindow.document.writeln('\t\t\tisIE5 = (document.all && document.getElementById) ? true : false;');
				newWindow.document.writeln('\t\t\tisNS6 = (!document.all && document.getElementById) ? true : false;');
				newWindow.document.writeln('\n\t\t\tif (isNS4) {');
					newWindow.document.writeln('\t\t\t\tobj = document.layers[objID];');
				newWindow.document.writeln('\t\t\t}');
				newWindow.document.writeln('\t\t\telse if (isIE4) {');
					newWindow.document.writeln('\t\t\t\tobj = document.all[objID];');
				newWindow.document.writeln('\t\t\t}');
				newWindow.document.writeln('\t\t\telse if (isIE5 || isNS6) {');
					newWindow.document.writeln('\t\t\t\tobj = document.getElementById(objID);');
				newWindow.document.writeln('\t\t\t}');
				newWindow.document.writeln('\t\t\treturn obj;');
			newWindow.document.writeln('\t\t}');
			newWindow.document.writeln('\t\telse {');
				newWindow.document.writeln('\t\t\treturn objID;');
			newWindow.document.writeln('\t\t}');
		newWindow.document.writeln('\t}');
		newWindow.document.writeln('\tfunction loadingComplete() {');
			newWindow.document.writeln('\t\tvar Xpos;');
			newWindow.document.writeln('\t\tvar Ypos;');
			newWindow.document.writeln('\n\t\tdocument.body.style.overflow="hidden";');
			newWindow.document.writeln('\t\twindow.resizeTo(document.images["foto"].width + ' + hMargin + ',document.images["foto"].height + ' + vMargin + ');'); 
			/* Rendo VISIBILE l'IMMAGINE */
    		newWindow.document.writeln('\t\tgetObj("fotoFrame").style.visibility = "visible";');
			/* Rendo INVISIBILE il loading */
    		newWindow.document.writeln('\t\tgetObj("loading").style.visibility = "hidden";');
		newWindow.document.writeln('\t}');
	newWindow.document.writeln('</script>');
	/* FINE javascript */
	newWindow.document.writeln('<link rel="stylesheet" href="stili/default.css" type="text/css">');
	newWindow.document.writeln('</head>');
	/* FINE head */

	/* INIZIO body */
	newWindow.document.writeln('<body>'); 
	newWindow.document.writeln('\t<div id="loading">loading...</div>'); 
	newWindow.document.writeln('\t<div id="fotoFrame"><img src="' + imagePath + '" id="foto" name="foto" alt="' + alt +'" onLoad="javascript:loadingComplete();"></div>'); 
	newWindow.document.writeln('</body>');
	/* FINE body */
	newWindow.document.writeln('</html>');
	newWindow.document.close();
	newWindow.focus();
}
//-->
