function init()
{
 if(document.getElementsByTagName)
 {
  var is=document.getElementsByTagName("img"),i,cl,a;
  for(var n=0; n<is.length; n++)
  {
   i=is.item(n);
   cl=i.className;
   if(!cl) cl=i.getAttribute("class");
   if(cl && cl.search(/over/)!=-1)
   {
    a=i.parentNode;
    if(a.nodeType==1 && a.nodeName.toLowerCase()=="a")
    {
     if(a.addEventListener) { a.addEventListener("mouseover",over,false); a.addEventListener("mouseout",out,false); }
     else { a.onmouseover=over; a.onmouseout=out; }
    }
   }
  }
  if(document.getElementById("listarassegna"))
  {
   var as=document.getElementById("listarassegna").getElementsByTagName("a");
   for(var m=0; m<as.length; m++)
   if(as[m].className=="conimm")
   {
    if(as[m].addEventListener)
    {
     as[m].addEventListener("mouseover",mostraImm,false);
     as[m].addEventListener("mouseout",mostraImm,false);
    }
    else
    {
     as[m].onmouseover=mostraImm;
     as[m].onmouseout=mostraImm;
    }
   }
  }
  if(document.getElementById("news"))
  {
   var as=document.getElementById("news").getElementsByTagName("a");
   for(var m=0; m<as.length; m++)
   if(as[m].className=="conimm")
   {
    if(as[m].addEventListener)
    {
     as[m].addEventListener("mouseover",mostraImm,false);
     as[m].addEventListener("mouseout",mostraImm,false);
    }
    else
    {
     as[m].onmouseover=mostraImm;
     as[m].onmouseout=mostraImm;
    }
   }
  }
 }
}

function over(e)
{
 var n;
 if(!e) var e=window.event;
 if(e.target) n=e.target;
 else if(e.srcElement) n=e.srcElement;
 if(n.nodeType==1 && n.nodeName.toLowerCase()=="a" && n.hasChildNodes()) try { for(var img=n.firstChild; img; img=img.nextSibling) if(img.nodeType==1 && img.nodeName.toLowerCase()=="img") { n=img; break; } } catch(e) {}
 if(n.nodeType==1 && n.nodeName.toLowerCase()=="img")
 {
  if(n.src.search(/\.png$/)!=-1) n.src=n.src.replace(/\.png$/,"_hover.png");
  else if(n.src.search(/\.gif$/)!=-1) n.src=n.src.replace(/\.gif$/,"_hover.gif");
 }
}

function out(e)
{
 var n,i;
 if(!e) var e=window.event;
 if(e.target) n=e.target;
 else if(e.srcElement) n=e.srcElement;
 if(n.nodeType==1 && n.nodeName.toLowerCase()=="a" && n.hasChildNodes()) try { for(var img=n.firstChild; img; img=img.nextSibling) if(img.nodeType==1 && img.nodeName.toLowerCase()=="img") { n=img; break; } } catch(e) {}
 if(n.nodeType==1 && n.nodeName.toLowerCase()=="img")
 {
  if(n.src.search(/_hover\.png$/)!=-1) n.src=n.src.replace(/_hover\.png$/,".png");
  else if(n.src.search(/_hover\.gif$/)!=-1) n.src=n.src.replace(/_hover\.gif$/,".gif");
 }
}

var zum=null;
function zoom(url,w,h,s)
{
 if (zum && !zum.closed) zum.close();
 return !(zum=window.open(url,"zum","width="+w+",height="+h+",screenX=0,screenY=0,top=0,left=0,directories=no,menubar=no,resizeable=0,scrollbars="+s+",status=no,toobar=no"));
 zum.focus();
}

function mostraImm(e)
{
 if(!e) var e=window.event;
 var a;
 if(e.target) a=e.target;
 else if(e.srcElement) a=e.srcElement;
 if(!a || a.nodeType!=1 || (a.nodeName.toLowerCase()!="a" && a.nodeName!="html:a")) return false;
 var is=a.parentNode.getElementsByTagName("img");
 for(var n=0; n<is.length; n++)
  if(is[n].className=="imgrass"){
   is[n].setAttribute("class","imgrassvis");
   }
  else if(is[n].className=="imgrassvis") is[n].setAttribute("class","imgrass");
 return false;
}
