function menu_mover(imgId){
	imgUrl="immagini/menu_"+imgId+"_off.gif";
  document.getElementById("menu_"+imgId).src=imgUrl;
  document.getElementById("abstract_"+imgId).style.display='block';
}
function menu_mout(imgId){
	imgUrl="immagini/menu_"+imgId+"_on.gif";
  document.getElementById("menu_"+imgId).src=imgUrl;
  document.getElementById("abstract_"+imgId).style.display='none';
}

// Basic Element Animator (11-October-2008) DRAFT
// by Vic Phillips http://www.vicsjavascripts.org.uk

// To progressively change the Left, Top, Width, Height or Opacity of an element over a specified period of time.

// **** Application Notes

// **** The HTML Code
//
// when moving an element the inline or class rule style position of the element should be assigned as
// 'position:relative;' or 'position:absolute;'
//
// The element would normally be assigned a unique ID name.
//

// **** Executing the Effect(Script)
//
// The effect is executed by an event call to function 'BAnimator('left','tst1',20,260,2000);'
// where:
// parameter 0 = the mode(see Note 1).                                                                     (string)
// parameter 1 = the unique ID name or element object.                                                     (string or element object)
// parameter 2 = the start position of the effect.                                                         (digits, for opacity minimum 0, maximum 100)
// parameter 3 = the finish position of the effect.                                                        (digits, for opacity minimum 0, maximum 100)
// parameter 4 = (optional) period of time between the start and finish of the effect in milliseconds.     (digits or defaults to 2000 milliSeconds)
//
//  Note 1:  The default units(excepting opacity) are 'px'.
//  Note 2:  Examples modes: 'left', 'top', 'width', 'height', 'opacity.
//           For hyphenated modes, the first character after the hyphen must be upper case, all others lower case.
//  Note 3:  To 'toggle' the effect include '#' in parameter 0.
//           The first call will set the toggle parameters.
//           Subsequent calls with '#' in parameter 0 and the same start and finish parameters will 'toggle' the effect.
//  Note 4:  The function may be re-executed with a different set of parameters (start/finish time or period)
//           whenever required, say from an onclick/mouseover/out event.
//           The period parameter will be retained unless re-specified.
//
// **** Advanced Applications
//
//  It may be required to access the current value of the effect.
//  The element effect is accessible from the element property
//  element effect = elementobject[mode.replace(/[-#]/g,'')+'oop'];
//  where mode is parameter 0 of the initial call.
//  An array storing the current, start and finish values of the element effect may be accessed
//  from the element effect.data as fields 0, 1 and 2 respectively
//

// **** General
//
// All variable, function etc. names are prefixed with 'zxc' to minimise conflicts with other JavaScripts.
// These characters may be changed to characters of choice using global find and replace.
//
// The Functional Code(about 2K) is best as an External JavaScript.
//
// Tested with IE7 and Mozilla FireFox on a PC.
//



// **** Functional Code - NO NEED to Change


function BAnimator(aniMode,objId,opacStart,opacEnd,aniTime){
 if (typeof(objId)=='string'){ objId=document.getElementById(objId); }
 if (!objId||(!opacStart&&!opacEnd)||opacStart==opacEnd) return;
 var oop=objId[aniMode.replace(/[-#]/g,'')+'oop'];
 if (oop){
  clearTimeout(oop.to);
  if (oop.srtfin[0]==opacStart&&oop.srtfin[1]==opacEnd&&aniMode.match('#')) oop.update([oop.data[0],(oop.srtfin[0]==oop.data[2])?opacEnd:opacStart],aniTime);
  else oop.update([opacStart,opacEnd],aniTime);
 }
 else objId[aniMode.replace(/[-#]/g,'')+'oop']=new BAnimatorOOP(aniMode,objId,opacStart,opacEnd,aniTime);
}

function BAnimatorOOP(aniMode,objId,opacStart,opacEnd,aniTime){
 this.srtfin=[opacStart,opacEnd];
 this.to=null;
 this.obj=objId;
 this.mde=aniMode.replace(/[-#]/g,'');
 this.update([opacStart,opacEnd],aniTime);
}

BAnimatorOOP.prototype.update=function(opacStartEnd,aniTime){
 this.time=aniTime||this.time||2000;
 this.data=[opacStartEnd[0],opacStartEnd[0],opacStartEnd[1]];
 this.srttime=new Date().getTime();
 this.cng();
}

BAnimatorOOP.prototype.cng=function(){
 var ms=new Date().getTime()-this.srttime;
 this.data[0]=(this.data[2]-this.data[1])/this.time*ms+this.data[1];
 if (this.mde!='left'&&this.mde!='top'&&this.data[0]<0) this.data[0]=0;
 if (this.mde!='opacity') this.obj.style[this.mde]=this.data[0]+'px';
 else  Opacity(this.obj,this.data[0]);
 if (ms<this.time) this.to=setTimeout(function(oop){return function(){oop.cng();}}(this),10);
 else {
  this.data[0]=this.data[2];
  if (this.mde!='opacity') this.obj.style[this.mde]=this.data[0]+'px';
  else Opacity(this.obj,this.data[0]);
 }
}

function Opacity(objId,opc){
 if (opc<0||opc>100) return;
 objId.style.filter='alpha(opacity='+opc+')';
 objId.style.opacity=objId.style.MozOpacity=objId.style.KhtmlOpacity=opc/100-.001;
}

// Fade Slide Show (28-October-2008) DRAFT
// by Vic Phillips http://www.vicsjavascripts.org.uk

// Utalising
// Basic Element Animator (11-October-2008) DRAFT
// by Vic Phillips http://www.vicsjavascripts.org.uk

// The script may be intialised or parameters changed by any event call to funtion
// FadeSS('tst',1,2000,1000,2000);
// where:
//  parameter 0 = the unique id name of the parent element.               (string)
//  parameter 1 = (if a number) the frame(0 to n) number to be displayed. (digits)
//  parameter 1 = (if a boolen) false = stop, true = start auto rotation. (true of false)
//  parameter 2 = (optional) the time before auto rotation.               (digits)
//  parameter 3 = (optional) the fade effect speed(time).                 (digits, default 1000)
//  parameter 4 = (optional) the time between each rotation.              (digits, default 2000)
//  parameter 5 = (optional) 1 = rotate forward, -1 = rotate back.        (1 or -1, default 1)

// Code Size about 1.8K

// Functional Code - NO NEED to CHANGE

function FadeSS(parentId,frameNum,startTime,fadeTime,holdTime,rotateDirection){
 var p=document.getElementById(parentId);
 var oop=p.oop;
 if (!p.oop){
  oop=p.oop=new FadeSSOOP(p,frameNum,startTime,fadeTime,holdTime,rotateDirection);
  if (typeof(startTime)=='number') oop.srtto=setTimeout(function(){oop.cng(); },startTime);
 }
 else {
  clearTimeout(oop.to);
  clearTimeout(oop.srtto);
  oop.rdir=rotateDirection||oop.rdir;
  oop.fade=fadeTime||oop.fade;
  oop.hold=holdTime||oop.hold;
  if (typeof(frameNum)=='number'){
   if (typeof(startTime)=='number') oop.srtto=setTimeout(function(){oop.cng(); },startTime);
   else  oop.cng(frameNum+1);
  }
  else if (frameNum) oop.cng();
 }
}

function FadeSSOOP(p,frameNum,startTime,fadeTime,holdTime,rotateDirection){
 this.p=p;
 this.ary=[];
 var clds=p.childNodes;
 for (var cnt=0,n0=0;n0<clds.length;n0++){
  if (clds[n0].nodeType==1){
   this.ary[cnt]=clds[n0];
   clds[n0].style.zIndex='0';
	 clds[n0].style.display='block'; /* AGGIUNTA ROBY */
   Opacity(clds[n0],0);
   cnt++;
  }
 }
 this.ary=this.ary.reverse();
 this.cnt=frameNum||0;
 this.lst=this.ary[this.cnt];
 this.lst.style.zIndex='1';
 Opacity(this.lst,100);
 this.rdir=rotateDirection||1;
 this.to=null;
 this.srtto=null;
 this.fade=fadeTime||1000;
 this.hold=holdTime||2000;
}

FadeSSOOP.prototype.cng=function(nu){
 this.lst.style.zIndex=0;
 var oop=this.lst.opacityoop;
 BAnimator('opacity',this.lst,oop?oop.data[0]:100,0,this.fade);
 if (typeof(nu)!='number') this.cnt+=this.rdir;
 else this.cnt=nu-1;
 this.cnt=this.cnt<0?this.ary.length-1:this.cnt==this.ary.length?0:this.cnt;
 this.lst=this.ary[this.cnt];
 this.lst.style.zIndex=1;
 oop=this.lst.opacityoop;
 BAnimator('opacity',this.lst,(oop?oop.data[0]:0)+1,100,this.fade);
 if (!nu) this.to=setTimeout(function(oop){return function(){oop.cng();}}(this),this.hold);
}

