var newwindow;
var wheight = 0, wwidth = 0;

function popitup5(url, title, desc, iwidth, iheight, colour) {
var pwidth, pheight;

if ( !newwindow || newwindow.closed ) {
	pwidth=iwidth+30;
	pheight=iheight+50;
	newwindow=window.open('','htmlname','width=' + pwidth +',height=' +pheight + ',resizable=1,top=50,left=10');
	wheight=iheight;
	wwidth=iwidth;
}

if (wheight!=iheight || wwidth!=iwidth ) {
	pwidth=iwidth+30;
	pheight=iheight+90;
	newwindow.resizeTo(pwidth, pheight);
	wheight=iheight;
	wwidth=iwidth;
}
var body = '<html> <head> <title>' + title + '<\/title><style>body{font:12px Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF;}</style><\/head> <body bgcolor= \"' + colour + '\"> <center>' +
'<a href=\"#\" onclick=\"window.close();\"><img border=\"0\" src=' + url + ' title=\"Chiudi finestra\" alt=\"' + desc + '\" ></a>' + 
'<br>'+desc +
'<\/center>' +
'<script type="text\/javascript">' +
'var gaJsHost = (("https:" == document.location.protocol) ? "https:\/\/ssl." : "http:\/\/www.");' +
'document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com\/ga.js\' type=\'text\/javascript\'%3E%3C\/script%3E\"));' +
'<\/script>' +
'<script type="text\/javascript">' +
'var pageTracker = _gat._getTracker("UA-3373768-1") ' +
'pageTracker._initData();' +
'pageTracker._trackPageview();' +
'<\/script>' +
'<\/body> <\/html>';



newwindow.document.clear();
newwindow.focus();
newwindow.document.writeln(body);
newwindow.document.close();
newwindow.focus();
}



// Routines to tidy up popup windows when page is left
// Call with an onUnload="tidy5()" in body tag

function tidy5() {
if (newwindow && !newwindow.closed) { newwindow.close(); }
}

// Based on JavaScript provided by Peter Curtis at www.pcurtis.com




