//<![CDATA

function shot(str,w,h,nome){    
	
	var option;
	var href;
	
	option="scrollbars=yes, resizable=yes, status=no, location=no, toolbar=no";
		
	if (w && w>0) option+=",width="+w;
	if (h && h>0) option+=",height="+h;
	
	window.open(str,'',option);
	
}

function centerPopUp(url,width,height,scrollbars) {

	str = "";
	str += "resizable=no,";
	str += "scrollbars=" + scrollbars + ",";
	str += "width=" + width + ",";
	str += "height=" + height + ",";
	
	if ( window.screen ) {
	var ah = screen.availHeight - 30;
	var aw = screen.availWidth - 10;
	
	var xc = ( aw - width ) / 2;
	var yc = ( ah - height ) / 2;
	
	str += ",left=" + xc + ",screenX=" + xc;
	str += ",top=" + yc + ",screenY=" + yc;
	}
	window.open(url,name,str);
} 

window.onload=function(){

	var arVersion = navigator.appVersion.split("MSIE");
	var version = parseFloat(arVersion[1]);
	
	if (version < 7)  {
		
		pngfix();
	}

	for (var i=0; i<document.links.length; i++)
   	if (document.links[i].rel=="external") {
      	document.links[i].target="_blank";
      } 

	rolloverMenu();
	
	inserisciSWF();
	
	if (typeof(do_init)=='function'){
		
		do_init();
		
	}
	
}
	
var effetto;
var effetto1;

function rolloverMenu() {

	var i=1;
	oggetto=$("n"+i);
	
	while (oggetto){
		
		$(oggetto).addEvent('mouseenter', bottoneDown);
		$(oggetto).addEvent('mouseleave', bottoneUp); 
		
		i++;
		oggetto=$("n"+i);
	};
}

function bottoneDown() {
	
	effetto = new Fx.Tween($('bt'+this.id));
	effetto.start('margin-top','8');
				
	effetto1 = new Fx.Tween($('bt'+this.id));
	effetto1.start('opacity','0');

}

function bottoneUp() {

	effetto.cancel();
	effetto1.cancel();
			
	//alert("fuori");
			
	effetto = new Fx.Tween($('bt'+this.id));
	effetto.start('margin-top','0');
	
	effetto1 = new Fx.Tween($('bt'+this.id));
	effetto1.start('opacity','1');
}





function inserisciSWF(){
	
 if (typeof(insertFlash)!='undefined'){
  for (swf in insertFlash){
   var flash = document.getElementById(swf);
   if (flash){
    flash.innerHTML=insertFlash[swf];
    flash.style.visibility="visible";
   }
  }
 } 
}

function nascondiMostraFlash(visualizza){
 if (insertFlash){
  for (swf in insertFlash){  
   var flash = document.getElementById(swf);
	if (flash){
	   flash.style.visibility=visualizza;
	}
  }
 } 
}

//]]>
