
function init() 
{
  // Verifica se la funzione è utilizzabile...
  
  if (! document.getElementsByTagName ) return;

  var imgTemp = new Array();
  var SaveSrc = "";
  var workarray;

  //----------------------------
  // Per i link con IMG...
  //----------------------------
  
  workarray  = document.getElementsByTagName('IMG');

  for (var i  = 0; i < workarray.length; i++) 
  {
    if(workarray[i].getAttribute('hsrc')) 
    {
        imgTemp[i] = new Image();

        imgTemp[i].src = workarray[i].getAttribute('hsrc');

        // Entra con il mouse...
	
	workarray[i].onmouseover = function() 
        {
          SaveSrc = this.getAttribute('src');  
          this.setAttribute('src',this.getAttribute('hsrc'))
	  return;
        }

	// ...esci con il mouse...
	
        workarray[i].onmouseout = function() 
        {
          if(SaveSrc.length > 0)  this.setAttribute('src',SaveSrc);
	  SaveSrc = "";
	  return;
        }
    }
  
  } // loop...
 
}

//alert("CIAO !");
//window.innerWidth  = 740;
//window.innerHeight = 520;
//window.sizeToContent();
//window.resizeTo(740,520);

onload=init;

//-----------------------------------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------------------------------
function NewWindow(url,w,h)
{
  if(w > 0 && h > 0)
     newWindowIn=window.open(url,"subWin","resizable=yes,statusbar=no,scrollbars=yes,menubar=no,height="+h+",width="+w+" ");
  else
     newWindowIn=window.open(url,"subWin","resizable=yes,statusbar=no,scrollbars=yes,menubar=no");
  
  newWindowIn.focus();
}
//-----------------------------------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------------------------------
function NewFullWindow(url,w,h,wname)
{
  if(w > 0 && h > 0)
     newWindowIn=window.open(url,wname,"height="+h+",width="+w+" ");
  else
     newWindowIn=window.open(url,wname);
  
  newWindowIn.focus();
}

