
var pic = null;
var popImg = null;
var imgCount = 0;

function winOpen() { return (popImg != null && popImg.closed != true) ? true : false; }

function MeteoPopUp(picName,winWidth,winHeight) {

	if (pic == picName && winOpen()) {
		popImg.focus();
	} else {
		if (navigator.appName != "Microsoft Internet Explorer" || parseInt(navigator.appVersion) >=4)
			if (popImg != null && !popImg.closed) popImg.close();

		pic = picName;
		imgWinName = "popImg" + imgCount++;
		
		popImg = window.open("",imgWinName, "toolbar=no,scrollbars=no,resizable=no,width=" + winWidth + ",height=" + winHeight);
		var htmlString = "<html><head><title></title></head><body LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0><iframe name=framenode width=700 height=430 frameborder=0 hspace=0 vspace=0 marginheight=0 marginwidth=0 scrolling=no src=http://www.ilmeteo.it/datimeteo/indextris.htm class=extlink></iframe></body></html>";

		popImg.document.open();
		popImg.document.write(htmlString);
		popImg.document.close();
	}

	return false;
}