//<![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,nome,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 (checkFlashVersion){
		var hasReqestedVersion=DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision); 
		if (hasReqestedVersion) { 
			flashSupported=true;
			inserisciSWF();
		} else { 
			document.location.href="noFlash.htm";
			flashSupported=false;
		} 
	}
	
	if (version < 7)  {
		
		pngfix();
	}

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

		
	if (typeof(do_init)=='function'){
		
		do_init();
		
	}
	
}
	

function enterNewsletter(){
	
	var newsletterEntra = new Fx.Tween($('newsletter'),{duration: 'long'});
	newsletterEntra.start('top',-65,0);
	
}



var sezioneAperta;

function accordionMenu(sezioneAperta){
	$$('.stmCont').setStyle('display','block');
	var myAccordion = new Fx.Accordion($$('.slide'), $$('.stmCont'), {
   	display: sezioneAperta,
    	alwaysHide: true
	});


	
}

function menu_init(){
					
	/*** INIZIALIZZAZIONE DEL MENU ************/
	if(tags_ = document.getElementsByTagName('ul'))
		for(i=0; i<tags_.length; i++) 
			if (tags_[i].className==menuClassName) closeSub(tags_[i]);
	if(tags_ = document.getElementsByTagName('ol'))
		for(i=0; i<tags_.length; i++) 
			if (tags_[i].className==menuClassName) closeSub(tags_[i]);
	
	document.getElementById("menu").style.visibility="visible";
	
}

function closeSub(menu) {
	for (var i=0; i<menu.childNodes.length; i++)
		if (menu.childNodes[i].nodeName.toLowerCase()=="li") {
			li = menu.childNodes[i];
			li.onmouseover = li.onactivate = li.onfocus = function() { 
				if (this.subMenu) {
					this.subMenu.className = this.subMenu.className.replace(/subMenu-off/g,"subMenu-on");
				}
			};
			li.onmouseout = li.ondeactivate = li.onblur = function() { if (this.subMenu) closeSub(this.subMenu) };
			for (j=0; j<li.childNodes.length; j++)
				if (li.childNodes[j].nodeName.toLowerCase()=="ul" || li.childNodes[j].nodeName.toLowerCase()=="ol") closeSub(li.subMenu = li.childNodes[j]);
		}
	menu.className = menu.className.replace(/\s?subMenu-on/g,"")+" subMenu-off";
}

//]]>