function open_MaxWindow(url,boxname) 
   {
	w = (screen.width-60) 	
	h = (screen.height-210)
	l = 30
	t = 30
	mywin = window.open(url,boxname,'toolbar=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=' + w + ',height=' + h + ',top=' + t + ',left=' + l);
	mywin.focus();
   }
function open_CentreWindow(url,w,h,boxname) 
   {
	var myleft = (screen.width-w)/2
	var mytop = (screen.height-50-h)/2
	mywin = window.open(url,boxname,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=' + w + ',height=' + h + ',top=' + mytop + ',left=' + myleft);
	mywin.focus();
   }
function open_FixedWindow(url,l,t,w,h,boxname) 
   {
	mywin = window.open(url,boxname,'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=' + w + ',height=' + h + ',top=' + t + ',left=' + l);
	mywin.focus();
   }
function toggle(menuId)
   {
	imgId = menuId + "_img";
	thisId=document.all(menuId);
	thisImgId=document.all(imgId);
	if (thisId.style.display =="none")
	{
		thisImgId.src = "images/minus.gif";
		thisId.style.display ="";
	}
	else
	{
		thisImgId.src = "images/plus.gif";
		thisId.style.display ="none";
	}
   }
function ed(item)
   {
	thisId=document.all(item);
	if (thisId.style.display =="none")
	{
		thisId.style.display ="";
	}
	else
	{
		thisId.style.display ="none";
	}
   }
function OpenFoto(img){
  foto1= new Image();
  foto1.src=(img);
  Controlla(img);
}
function Controlla(img){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img);
  }
  else{
    funzione="Controlla('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}
function viewFoto(img){
  largh=foto1.width+20;
  altez=foto1.height+27;
  stringa="width="+largh+",height="+altez;
  finestra=window.open(img,"",stringa);
  //finestra.focus();
}
function SwapImg(el)
{	
	document.all(el.name).src = 'images/' + el.name + 'b.jpg'
}
function RestImg(el)
{
	document.all(el.name).src = 'images/' + el.name + 'a.jpg'
}
function FlashImage1(el)
{	
	document.all(el).src = 'images/' + el + '_1.jpg'
}
function FlashImage2(el)
{	
	document.all(el).src = 'images/' + el + '_2.jpg'
}
function FlashImage3(el)
{	
	document.all(el).src = 'images/' + el + '_3.jpg'
}
function FlashRest(el)
{	
	document.all(el).src = 'images/' + el + '.jpg'
}