function IsBrowserCompatible () { 
	agent = navigator.userAgent 
	browser_Explorer_name = "MSIE" 
	browser_Explorer_version = 4.01 
	browser_Netscape_name = "Netscape" 
	browser_Netscape_version = 4.0
	if (agent.indexOf(browser_Explorer_name) !=-1) 
		browser_name = browser_Explorer_name
	else if (agent.indexOf(browser_Netscape_name) !=-1)
		browser_name = browser_Netscape_name
	else
		return "no"
	tmp = agent.charAt(agent.indexOf(browser_name) + 5)
	tmp = tmp + agent.charAt(agent.indexOf(browser_name) + 6)
	tmp = tmp + agent.charAt(agent.indexOf(browser_name) + 7)
	tmp = tmp + agent.charAt(agent.indexOf(browser_name) + 8)
	browser_version = parseFloat(tmp)
	if (((browser_name == browser_Explorer_name) && (browser_version >= browser_Explorer_version)) ||
	   ((browser_name == browser_Netscape_name) && (browser_version >= browser_Netscape_version)))
		return "yes"
	else
		return "old" 
}
 
function BrowserError (error) {
	browser = navigator.appName + ' ' + parseFloat(navigator.appVersion);
	document.write('<HTML>');
	document.write('<HEAD>');
	document.write("<TITLE>Comune di Vicopisano - Home Page</TITLE>");
	document.write('</HEAD>');
	document.write('<BODY BGCOLOR="#f0f0e0" LINK="navy">');
	document.write('<CENTER>');
	document.write('<P><FONT FACE="Verdana,Tahoma,Arial,Helvetica,Sans-Serif" SIZE="5"><BR>');
	//document.write('<BR>');
	document.write('Spiacente<BR>');
	document.write('ma il tuo browser <I><FONT COLOR=#c00000>' + browser + '</FONT></I><BR>');
	if (error == 'old')
		document.write('risulta <B>obsoleto</B><BR>');
	else
		document.write('risulta <B>incompatibile</B><BR>');
	document.write('per poter navigare in questo sito.<BR>');
	document.write('<BR>');
	document.write('Se ti vuoi dotare di uno compatibile<BR>');
 	document.write('puoi prelevarlo dai seguenti siti:<BR>');
	document.write('<BR>')
	document.write('<TABLE BORDER="0">');
 	document.write('<TR>');
	document.write('<TD ALIGN="center" WIDTH="40%"><A HREF="http://www.microsoft.com/ie/download/">');
	document.write('<IMG SRC="/immagini/misc/explorer.gif" WIDTH="48" HEIGHT="48" VSPACE="4" ALT="Internet Explorer">');
	document.write('<BR><FONT FACE="Verdana,Tahoma,Arial,Helvetica" SIZE="1">Internet<BR>');
	document.write('Explorer</FONT>');
	document.write('</A></TD>');
	document.write('<TD WIDTH="20%">&nbsp;</TD>');	
 	document.write('<TD ALIGN="center" WIDTH="40%"><A HREF="http://home.netscape.com/computing/download/">');
	document.write('<IMG SRC="/immagini/misc/netscape.gif" WIDTH="48" HEIGHT="48" VSPACE="4" ALT="Netscape Navigator" >');
	document.write('<BR><FONT FACE="Verdana,Tahoma,Arial,Helvetica" SIZE="1">Netscape<BR>');
	document.write('Navigator</FONT>');
	document.write('</A></TD>');
	document.write('</TR>');
	document.write('</TABLE>');
	document.write('</FONT>');
	document.write('</CENTER>');
	document.write('</BODY>');
	document.write('</HTML>');
}
 
function ApriImmagine(Img, Larghezza, Altezza, Bordo, Titolo) {
	Larghezza = Larghezza + 2 * Bordo;
	Altezza = Altezza + 2 * Bordo;
	ImgWin = window.open("", "_", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,left=0,top=0,width=" + Larghezza + ",height=" + Altezza)
	ImgWin.document.open();
	ImgWin.document.writeln("<HTML>");
	ImgWin.document.writeln("<HEAD>");
	ImgWin.document.writeln("<STYLE>");
	ImgWin.document.writeln("BODY");
	ImgWin.document.writeln("{"); 
  ImgWin.document.writeln("background:black url(" + Img + ") no-repeat;"); 
  ImgWin.document.writeln("margin: 0px;");
	ImgWin.document.writeln("}");
	ImgWin.document.writeln("</STYLE>");
	ImgWin.document.writeln("<TITLE>" + Titolo + "</TITLE>");
	ImgWin.document.writeln("</HEAD>");
	ImgWin.document.writeln("<BODY onBlur=javascript:self.focus()>");
	ImgWin.document.writeln("</BODY>");	ImgWin.document.writeln("</HTML>");
	ImgWin.focus();
	return false;
}

function ApriDWF(Mappa, Larghezza, Altezza, Bordo, Titolo) {
	Larghezza = Larghezza + 2 * Bordo;
	Altezza = Altezza + 2 * Bordo;
	ImgWin = window.open("", "_", "left=0,top=0,width=" + Larghezza + ",height=" + Altezza + ",resizable=no")
	ImgWin.document.open();
	ImgWin.document.write("<HTML>");
	ImgWin.document.write("<HEAD>");
	ImgWin.document.write("<STYLE>");
	ImgWin.document.write("BODY"); 
	ImgWin.document.write("{");
	ImgWin.document.write("BACKGROUND-COLOR:white;"); 
	ImgWin.document.write("MARGIN: 0px;");
	ImgWin.document.write("}");
	ImgWin.document.write("</STYLE>");
	ImgWin.document.write("<TITLE>" + Titolo + "</TITLE>");
	ImgWin.document.write("</HEAD>");
	ImgWin.document.write("<BODY ONLOAD='self.focus();'>");
	ImgWin.document.write("<DIV ALIGN='center'>");
	ImgWin.document.write("<object id='mydwf' classid='clsid:B2BE75F3-9197-11CF-ABF4-08000996E931' codebase='ftp://ftp.autodesk.com/pub/whip/english/whip.cab#version=4,0,42,82' width=100% height=100%>");
 	ImgWin.document.write("<param name='Filename' value='" + Mappa + "'>");
	ImgWin.document.write("<embed pluginspage='http://www.autodesk.com/products/whip' width=100% height=100% src='" + Mappa + "'>");
 	ImgWin.document.write("</embed>");
 	ImgWin.document.write("</object>");
	ImgWin.document.write("</DIV>");
	ImgWin.document.write("</BODY>");
	ImgWin.document.write("</HTML>");
	ImgWin.document.close();
	return false
}

function ApriPDF(Img, Larghezza, Altezza, Bordo, Titolo) {
	Larghezza = Larghezza + 2 * Bordo;
	Altezza = Altezza + 2 * Bordo;
	ImgWin = window.open("", "_", "left=0,top=0,width=" + Larghezza + ",height=" + Altezza + ",resizable=no")
	ImgWin.document.open();
	ImgWin.document.write("<HTML>");
	ImgWin.document.write("<HEAD>");
	ImgWin.document.write("<STYLE>");
	ImgWin.document.write("BODY"); 
	ImgWin.document.write("{"); 
  ImgWin.document.write("BACKGROUND-COLOR:black;"); 
  ImgWin.document.write("MARGIN: 0px;");
	ImgWin.document.write("}");
	ImgWin.document.write("</STYLE>");
	ImgWin.document.write("<TITLE>" + Titolo + "</TITLE>");
	ImgWin.document.write("</HEAD>");
	ImgWin.document.write("<BODY ONLOAD='self.focus();'>");
	ImgWin.document.write("<DIV ALIGN='center'>");
	ImgWin.document.write("<IMG SRC='" + Img + "' BORDER='0'>");
	ImgWin.document.write("</DIV>");
	ImgWin.document.write("</BODY>");
	ImgWin.document.write("</HTML>");
	ImgWin.document.close();
	return true;
}

function ApriPopup (Url, Larghezza, Altezza) {
	if (Altezza == "")
	 	Altezza = screen.height - 78;
	id = window.open(Url, "popup", "scrollbars=1,width=" + Larghezza + ",height=" + Altezza);
	id.focus();
	return false;
}

function ApriDoc(Str) {
  larghezza = screen.width - 10;
  altezza = screen.height - 78;
	DocWin = window.open(Str, "displayWindow", "toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,copyhistory=0,left=0,top=0,width="+larghezza+",height="+altezza);
	DocWin.creator = self;
}

function ApriPDF2(Str) {
	PDFWin = window.open(Str, "displayWindow", "resizable=1;left=0,top=0,width=350,height=495");
	PDFWin.creator = self;
}

function MaxAltFinestra() {
	return screen.height - 30;
}

function PieDiPagina() {
  document.write("<table width=100% border=0 cellspacing=2 cellpadding=2 align=center>");
  document.write("<tr>");
  document.write("<td class=piedipagina><br><b>COMUNE DI VICOPISANO</b><br>");
  document.write("Via del Pretorio, 1 - 56010 Vicopisano PI<br>");
  document.write("tel. 050 79.65.11 - fax 050 79.65.40<br>");
  document.write("<a class=piedipagina href=mailto:info@comune.vicopisano.pi.it>info@comune.vicopisano.pi.it</a><br>");
  document.write("<br>");
  document.write("&copy; 2000 Comune di Vicopisano<br>");
  document.write("Tutti i diritti riservati</font></td><br>");
  document.write("</tr></table>");
  return false;
}

/*
function click(e) {
  var message = "              Sorry, that function is disabled.\nThis Page (Pictures & Text) is copyrighted & protected !\n            (C) 2002 - ALL RIGHTS RESERVED !"; 
  if (document.all) {
		if (event.button == 2) {
	    alert(message);
	    return false;
		}
   }
  if (document.layers) {
		if (e.which == 3) {
	    alert(message);
	    return false;
		}
  }
}
if (document.layers) {
	document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
*/