function windowOpen ( szUrl, szName, iWidth, iHeight )
{
	var iTop, iLeft;

	var szFeatures = "";
	
	if (iWidth != null)	{
		szFeatures += "width=" + iWidth + ",";
		iLeft = (window.screen.availWidth - iWidth) >> 1;
		szFeatures += "left=" + iLeft + ",";
	}
	if (iHeight != null) {
		szFeatures += "height=" + iHeight + ",";
		iHeight = (window.screen.availHeight - iHeight) >> 1;
		szFeatures += "top=" + iHeight + ",";
	}

	szFeatures += "scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no,fullscreen=no,resizable=yes";

	window.open(szUrl, szName, szFeatures);
}


function fnImgOpenPop ( pstrImg1, pstrDida1, pstrImg2, pstrDida2)
{

var strOUT =  "	<tr>"
			+ "		<td valign=top >"
			+ "			<table cellpadding=0 cellspacing=0 border=0 width=100% >"
			+ "				<tr>"
			+ "					<td><img src=images/aisxtop.gif width=2 height=2 border=0></td>"
			+ "					<td bgcolor=#ffffff width=99% ><img src=images/dummy.gif width=1 height=1 border=0></td>"
			+ "					<td><img src=images/aidxtop.gif width=2 height=2 border=0></td>"
			+ "				</tr>"
			+ "				<tr>"
			+ "					<td bgcolor=#ffffff><img src=images/dummy.gif width=1 height=1 border=0></td>"
			+ "					<td align=center ><a href='javascript:fnOpenPop(\"" + pstrImg1 + "\", \"" + pstrDida1 + "\");'><img src=images/th_" + pstrImg1 + ".jpg width=78 height=65 border=0></a></td>"
			+ "					<td bgcolor=#ffffff><img src=images/dummy.gif width=1 height=1 border=0></td>"
			+ "				</tr>"
			+ "				<tr>"
			+ "					<td><img src=images/aisxbot.gif width=2 height=2 border=0></td>"
			+ "					<td bgcolor=#ffffff ><img src=images/dummy.gif width=1 height=1 border=0></td>"
			+ "					<td><img src=images/aidxbot.gif width=2 height=2 border=0></td>"
			+ "				</tr>"
			+ "			</table>"
			+ "		</td>"
			+ "		<td><img src=images/dummy.gif width=7 height=1 border=0></td>"			
			+ "		<td valign=top >"
			+ "			<table cellpadding=0 cellspacing=0 border=0 width=100% >"
			+ "				<tr>"
			+ "					<td><img src=images/aisxtop.gif width=2 height=2 border=0></td>"
			+ "					<td bgcolor=#ffffff width=99% ><img src=images/dummy.gif width=1 height=1 border=0></td>"
			+ "					<td><img src=images/aidxtop.gif width=2 height=2 border=0></td>"
			+ "				</tr>"
			+ "				<tr>"
			+ "					<td bgcolor=#ffffff><img src=images/dummy.gif width=1 height=1 border=0></td>"
			+ "					<td align=center ><a href='javascript:fnOpenPop(\"" + pstrImg2 + "\", \"" + pstrDida2 + "\");'><img src=images/th_" + pstrImg2 + ".jpg width=78 height=65 border=0></a></td>"
			+ "					<td bgcolor=#ffffff><img src=images/dummy.gif width=1 height=1 border=0></td>"
			+ "				</tr>"
			+ "				<tr>"
			+ "					<td><img src=images/aisxbot.gif width=2 height=2 border=0></td>"
			+ "					<td bgcolor=#ffffff ><img src=images/dummy.gif width=1 height=1 border=0></td>"
			+ "					<td><img src=images/aidxbot.gif width=2 height=2 border=0></td>"
			+ "				</tr>"
			+ "			</table>"
			+ "		</td>"
			+ "	</tr>"
			+ "	<tr><td colspan=3><img src=imaes/dummygif width=1 height=7 border=0></td></tr>";
			
	document.write(strOUT);
	}
	
	
	function openCredits(URL,W,H)
	{
		L = parseInt((window.screen.width - W) / 2);
		T = parseInt((window.screen.height - H) / 2);
		var Wnd = window.open(URL, "", "left=" + L + ",top=" + T + ",width=" + W + ",height=" + H + ",toolbar=no,resizable=no,location=no,directories=no,status=no,menubar=no,scrollbars=no");
	}


		
function fnMail ( pstrMail )
{

var strOUT =  "	<tr>"
			+ "		<td valign=top  >"
			+ "			<table cellpadding=0 cellspacing=0 border=0 width=100% >"
			+ "				<tr>"
			+ "					<td><img src=images/ico_freccia.gif width=15 height=12 border=0></td>"
			+ "					<td><img src=images/dummy.gif width=3 height=1 border=0></td>"
			+ "					<td bgcolor=#eaeaea ><img src=images/dummy.gif width=2 height=1 border=0></td>"
			+ "					<td bgcolor=#eaeaea class=grigioScuro11b width=99% ><a href='mailto:" + pstrMail + "'>" + pstrMail + "</a></td>"
			+ "				</tr>"
			+ "			</table>"
			+ "		</td>"
			+ "	</tr>";
			
	document.write(strOUT);
	}
	
	
	


	
		
	
function fnAttivita ( pstrName, pstrDesc, pstrLink )
{

var strOUT =  "	<tr>"
			+ "		<td>"
			+ "			<table cellpadding=0 cellspacing=1 border=0 width=100% >"
			+ "				<tr>"
			+ "			 		<td valign=top width=99% >"
			+ "			 			<table cellpadding=0 cellspacing=0 border=0 width=100% >"
			+ "			 				<tr>"
			+ "			 					<td><img src=images/ico_freccia.gif width=15 height=12 border=0></td>"
			+ "			 					<td><img src=images/dummy.gif width=3 height=1 border=0></td>"
			+ "			 					<td bgcolor=#eaeaea ><img src=images/dummy.gif width=2 height=1 border=0></td>"
			+ "			 					<td width=99%  bgcolor=#eaeaea class=grigioScuro11b >" + pstrName + "</td>"
			+ "			 				</tr>"
			+ "							<tr>"
			+ "								<td colspan=3 ><img src=images/dummy.gif width=1 height=1 border=0></td>"
			+ "			 					<td><table cellpadding=0 cellspacing=3 border=0 width=100% ><tr><td class=grigio11n >" + pstrDesc + "</td></tr></table></td>"
			+ "			 				</tr>"
			+ "			 			</table>"
			+ "			 		</td>"
			+ "					<td valign=top><a href='" + pstrLink + "'><img src=images/ico_orari.gif width=29 height=27 border=0></a></td>"
			+ "			 	</tr>"
			+ "			</table>"
			+ "		</td>"
			+ "	</tr>";
			
	document.write(strOUT);
	}


	
function fnBox ( pstrIco, pstrTxt, pstrLink )
{

var strOUT =  "	<tr>"
			+ "		<td>"
			+ "			<table cellpadding=0 cellspacing=0 border=0 width=100% height=100% >"
			+ "				<tr>"
			+ "					<td><img src=images/asxtopbox.gif width=2 height=2 border=0></td>"
			+ "					<td background=images/Bkg_ctopbox.gif width=99% ><img src=images/dummy.gif width=1 height=1 border=0></td>"
			+ "					<td><img src=images/adxtopbox.gif width=2 height=2 border=0></td>"
			+ "				</tr>"
			+ "				<tr>"
			+ "					<td background=images/Bkg_csxbox.gif><img src=images/dummy.gif width=1 height=1 border=0></td>"
			+ "					<td height=99%  valign=top width=100% align=center bgcolor=#f2f2f2  >"
			+ "						<table cellpadding=0 cellspacing=1 border=0 width=100% >"
			+ "							<tr>"
			+ "								<td valign=top><img src=images/" + pstrIco + ".gif  border=0></td>"
			+ "								<td><img src=images/dummy.gif width=3 height=1 border=0></td>"
			+ "								<td class=grigioScuro10b width=99% ><a href='" + pstrLink + "'>" + pstrTxt + "</a></td>"
			+ "							</tr>"
			+ "						</table>"
			+ "					</td>"
			+ "					<td background=images/Bkg_cdxbox.gif><img src=images/dummy.gif width=1 height=1 border=0></td>"
			+ "				</tr>"
			+ "				<tr>"
			+ "					<td><img src=images/asxbotbox.gif width=2 height=2  border=0></td>"
			+ "					<td background=images/Bkg_cbotbox.gif ><img src=images/dummy.gif width=1 height=1 border=0></td>"
			+ "					<td><img src=images/adxbotbox.gif width=2 height=2 border=0></td>"
			+ "				</tr>"
			+ "			</table>"
			+ "		</td>"
			+ "	</tr>"
			+ "	<tr><td><img src=images/dummy.gif width=1 height=6 border=0></td></tr>";
			
	document.write(strOUT);
	}	
	
		
function fnBoxStat ( pstrIco, pstrTxt )
{

var strOUT =  "	<tr>"
			+ "		<td>"
			+ "			<table cellpadding=0 cellspacing=0 border=0 width=100% height=100% >"
			+ "				<tr>"
			+ "					<td><img src=images/asxtopbox.gif width=2 height=2 border=0></td>"
			+ "					<td background=images/Bkg_ctopbox.gif width=99% ><img src=images/dummy.gif width=1 height=1 border=0></td>"
			+ "					<td><img src=images/adxtopbox.gif width=2 height=2 border=0></td>"
			+ "				</tr>"
			+ "				<tr>"
			+ "					<td background=images/Bkg_csxbox.gif><img src=images/dummy.gif width=1 height=1 border=0></td>"
			+ "					<td height=99%  valign=top width=100% align=center bgcolor=#f2f2f2  >"
			+ "						<table cellpadding=0 cellspacing=1 border=0 width=100% >"
			+ "							<tr>"
			+ "								<td valign=top><img src=images/" + pstrIco + ".gif  border=0></td>"
			+ "								<td><img src=images/dummy.gif width=3 height=1 border=0></td>"
			+ "								<td class=grigioScuro10b width=99% >" + pstrTxt + "</td>"
			+ "							</tr>"
			+ "						</table>"
			+ "					</td>"
			+ "					<td background=images/Bkg_cdxbox.gif><img src=images/dummy.gif width=1 height=1 border=0></td>"
			+ "				</tr>"
			+ "				<tr>"
			+ "					<td><img src=images/asxbotbox.gif width=2 height=2  border=0></td>"
			+ "					<td background=images/Bkg_cbotbox.gif ><img src=images/dummy.gif width=1 height=1 border=0></td>"
			+ "					<td><img src=images/adxbotbox.gif width=2 height=2 border=0></td>"
			+ "				</tr>"
			+ "			</table>"
			+ "		</td>"
			+ "	</tr>"
			+ "	<tr><td><img src=images/dummy.gif width=1 height=2 border=0></td></tr>";
			
	document.write(strOUT);
	}

function fnOpenPop(pstrFoto, pstrDida)
{
	var W = 470;
	var H = 500;
	var L = parseInt((window.screen.width - W) / 2);
	var T = parseInt((window.screen.height - H) / 2);
	window.open("pop_chisiamo.asp?FOTO=" + pstrFoto + "&DIDA=" + pstrDida, "PopImage", "left=" + L + ",top=" + T + ",width=" + W + ",height=" + H + ",toolbar=no,resizable=no,location=no,directories=no,status=no,menubar=no,scrollbars=no");
}
