<!-- funzione popup centrata
function newWindow(mypage,myname,w,h,features) {
  if(screen.width){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}

/*<a href="JavaScript:newWindow('imagefoto/evita.jpg','popup',430,300,'')">*/
// -->
// ----------------------------------------------------------------------------------------------

<!-- funzione popup pagina normale
function popup(page) {
	window.open(page,'popup','width=797,height=600,toolbar=0,scrollbars=yes,resizable=yes');	
}
/*<A href='javascript:popup("nomeFile.htm")'>*/
// -->

// ----------------------------------------------------------------------------------------------

<!-- funzione data ultimo aggiornamento
function MakeArray(n) {
this.length = n
return this
}
function FormatDate(ltime) {
var lm = ltime.getMinutes();
nomJour = new MakeArray(7);
nomJour[1] = "Domenica" ; nomJour[2] = "Lunedi" ; nomJour[3] = "Martedi"; nomJour[4] = "Mercoledi";
nomJour[5] = "giovedi" ; nomJour[6] = "Venerdi" ; nomJour[7] = "Sabato";
nomMois = new MakeArray(12);
nomMois[1] = "Gennaio" ; nomMois[2] = "Febbraio" ; nomMois[3] = "Marzo" ; nomMois[4] = "Aprile";
nomMois[5] = "Maggio" ; nomMois[6] = "giugno" ; nomMois[7] = "Luglio" ; nomMois[8] = "Agosto";
nomMois[9] = "Settembre" ; nomMois[10] = "Ottobre" ; nomMois[11] = "Novembre" ; nomMois[12] ="Dicembre";
var ltext =nomJour[ltime.getDay()+1]+" "+ltime.getDate()+" "+nomMois[ltime.getMonth()+1]+" "+ltime.getYear()+" ore "+ltime.getHours()+"h";
ltext += ((lm < 10) ? "0" : "")+lm;
return ltext;
}
/*<SCRIPT language="JavaScript" type="text/javascript">document.writeln("Ultima Modifica : " + FormatDate(new Date(document.lastModified)));</script>*/

// -->
// ----------------------------------------------------------------------------------------------

<!-- funzione select codica banner
function SelectIt(What){
if (What.value=="") {
alert('nulla da selezionare')
}else{
What.focus();
What.select();
if (document.all){
What.createTextRange().execCommand("Copy");
alert("Lo Script e stato copiato negli Appunti   (   Usa il Ctrl V sulla Tastiera per incollare  )");
}}}

// -->
// ----------------------------------------------------------------------------------------------

<!-- Pagina Su - GIU
function in_basso(){
var dimension = screen.height;
window.scroll(0,dimension);
}
function in_alto(){
window.scroll(0,0);
}
/*<input type="button" value="Torna Su &#9650;" OnClick="in_alto()" style="background-image: url('sfondi/cellscavata.gif')">*/
// -->
// ----------------------------------------------------------------------------------------------
<!-- funzione popup explosion
function explosion(url)
{
 if (!document.layers&&!document.all&&!document.getElementById)
  {
   paramstp="height=585,width=798,top=0,left=0,scrollbars=yes,location=no"+
   ",directories=no,status=no,menubar=no,toolbar=no,resizable=no"
   var crw=window.open(url,"",paramstp);
   if (crw.focus){crw.focus();}
   return;
  }
 var winwidth=100;
 var winheight=100;
 var winreswidth=798;
 var winresheight=585;
 var LeftPosition=(winreswidth-winwidth)/2;
 var TopPosition=winresheight-winheight/2;

 var paramstr="left="+LeftPosition+",top="+TopPosition+",width="+winwidth+
              ",height="+winheight+",toolbar=no,menubar=no,location=no,"+
              "status=no,scrollbars=yes,resizable=no";
 var crw=open(url,"",paramstr);

 crw.resizeBy(0,-40);

 var resspeed=50;
 var wspeed=winreswidth/resspeed;
 var hspeed=winresheight/resspeed;
 var x=wspeed;
 
 while (x)
 {
  crw.resizeBy(x,0);
  winwidth+=x;
  LeftPosition=(winreswidth-winwidth)/2;
  TopPosition-=wspeed;
  if (LeftPosition<0) LeftPosition=0;
  if (TopPosition<0) TopPosition=0;
  crw.moveTo(LeftPosition,TopPosition);
  if (winwidth>=winreswidth) x=0;

 }
 crw.moveTo(0,0);
 
 var y=hspeed;
 winheight=40;
 while(y)
 {
  crw.resizeBy(0,y);
  winheight+=y;
  if (winheight>=winresheight) y=0;
 }
 crw.resizeTo(winreswidth,winresheight);
 if (crw.focus){crw.focus();}
}

/*collegamento:  <a href="#" onClick="explosion('mappa/mappa2_latisana.htm','pop')"> */

// -->
// ----------------------------------------------------------------------------------------------

<!-- fuunzione menu combo a tendina
function fal(val)
{
  if(val != "none")
  {
    index = val.split("|")
    window.open(index[0],index[1],"scrollbars=yes,toolbar=yes,resizable=yes");
  }
}
// -->
// ----------------------------------------------------------------------------------------------

<!-- fuunzione menu combo a tendina
function fal(val)
{
  if(val != "none")
  {
    index = val.split("|")
    window.open(index[0],index[1],"scrollbars=yes,toolbar=yes,resizable=yes");
  }
}
// -->
// ----------------------------------------------------------------------------------------------

<!-- funzione expanding windows
function expandingWindow2(website) {
var heightspeed = 6; // vertical scrolling speed (higher = slower)
var widthspeed = 8;  // horizontal scrolling speed (higher = slower)
var leftdist = 0;    // distance to left edge of window
var topdist = 0;     // distance to top edge of window

var winwidth = window.screen.availWidth - leftdist;
var winheight = window.screen.availHeight - topdist;
var sizer = window.open("","","left=" + leftdist + ",top=" + topdist + ",width=1,height=1,scrollbars=yes");
for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed) {
sizer.resizeTo("1", sizeheight);
}
for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed) {
sizer.resizeTo(sizewidth, sizeheight);
}
sizer.location = website;
}

// -->
// ----------------------------------------------------------------------------------------------
<!-- funzione table highlight

function changeto(highlightcolor){
source=event.srcElement
if (source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TD")
source=source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}

function changeback(originalcolor){
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
return
if (event.toElement!=source)
source.style.backgroundColor=originalcolor
}

// -->
// ----------------------------------------------------------------------------------------------

 <!--
  var stile = "top=1, left=1, width=797, height=600, status=no, menubar=no, toolbar=no, scrollbars=yes, resizable=yes";
     function Popup(apri) {
        window.open(apri, "", stile);
     }
 //-->
// <a href="javascript:Popup('mioFile.htm')">Apri la popup</a> 

// ----------------------------------------------------------------------------------------------
<!--
// popup che si apre da sopra a Dx e si espande verso la SX
function expandingWindow(website) {
var windowprops='width=1,height=1,scrollbars=yes,status=no,resizable=yes,toolbar=yes,location=no'
var heightspeed = 20; 
var widthspeed = 20; 
var leftdist = 0;   
var topdist = 0; 
var lunghezza = 798;
var altezza = 598;

if(lunghezza == 0){
lunghezza = window.screen.availWidth;
		}
if(altezza == 0){
altezza = window.screen.availHeight;
}

if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1) {
var winwidth = lunghezza;
var winheight = altezza;
var sizer = window.open("","","left=" + leftdist + ",top=" + topdist +","+ windowprops);
for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed)
sizer.resizeTo("1", sizeheight);
for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed)
sizer.resizeTo(sizewidth, sizeheight);
sizer.location = website;
}
else
window.open(website,'mywindow');
}
// -->
// ----------------------------------------------------------------------------------------------