var popup = null;

function pop(tit,descr,dw,dh,n) {
	var copyr = "Opera originale del pittore Giorgio Piga.\r\nVietata la duplicazione, anche parziale, senza l&#146espressa autorizzazione dell&#146autore.";
	var dleft = (screen.width / 2) - (dw / 2);
	var dtop = (screen.height / 2) - (dh / 2);
	prop = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resize=no,width=' + dw + ',height=' + (dh + 40) + ',left=' + dleft + ',top=' + dtop;
	if(popup && !popup.closed) popup.close();
	popup = window.open('', '', prop);
	docx = popup.document;
	docx.writeln("<HTML><HEAD><TITLE>Giorgio Piga</TITLE>");
	docx.writeln("<link rel='stylesheet' href='styles.css' type='text/css'>");
	docx.writeln("</HEAD><BODY BGCOLOR=#333333 leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>");
	docx.writeln("<TABLE BORDER=0 cellpadding=0 cellspacing=0 WIDTH=100% HEIGHT=100% ALIGN=CENTER><TR><TD VALIGN=TOP ALIGN=CENTER>");
	docx.writeln("<IMG NAME='pix' SRC='" + "img/pic" + n + ".jpg" + "' ALT='" + copyr +"'>");
	docx.writeln("</TD></TR><TR><TD VALIGN=TOP ALIGN=CENTER>");
	docx.writeln("<SPAN CLASS='qtit'>" + tit + "</SPAN><BR><SPAN CLASS='qdesc'>" + descr + "</SPAN>");
	docx.writeln("</TD></TR></TABLE>");
	docx.writeln("</BODY></HTML>");
}
function resize() {
	resizeTo(screen.availWidth, screen.availHeight);
	moveTo(0,0);	
}