// CODICE PREDEFINITO AREA PUBBLICA
Cookies = "";
function disableRightClick(e){
	var data = new Date();
	var message = "© "+data.getFullYear()+" - Siti Web Firenze®";
	if(!document.rightClickDisabled){
		if(document.layers){
			document.captureEvents(Event.MOUSEDOWN);
			document.onmousedown = disableRightClick;
		} else {
			document.oncontextmenu = disableRightClick;
		}
		return document.rightClickDisabled = true;
	}
	if(document.layers || (document.getElementById && !document.all)){
		if (e.which==2||e.which==3){
			alert(message);
			return false;
		}
	} else {
		alert(message);
		return false;
	}
}
disableRightClick();

var btn_over = null;
$(document).ready(function(){
	//alert(location.pathname);
	$("#menu a").mouseover(function(){
		if(btn_over != $(this).attr("id")){
			$(this).effect("bounce",{times:3},300);
			btn_over = $(this).attr("id");
		}		
	});
	$("#menu a").mouseout(function(){
		if(btn_over == $(this).attr("id")){
			btn_over = null;
		}		
	});
	$("a[href='"+location.pathname+"']").addClass("hover");
	selected_menu = $("a[href='"+location.pathname+"']").attr("id");
	try{document.getElementById(selected_menu).href = 'javascript:void(0);';}catch(e){}
});
$(document).ready(function() {
	$('#slider').s3Slider({
		timeOut: 3000
	});
});
//AJAX
function CreateXmlHttpReq(handler) {//invia la richiesta compatibile con tutti i browsers
  var xmlhttp = null;
  try {
    xmlhttp = new XMLHttpRequest();
  } catch(e) {
    try {
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch(e) {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
  xmlhttp.onreadystatechange = handler;
  return xmlhttp;
}

function precaricaimmagini(){
	if (document.images) {
		var filediimmagini = precaricaimmagini.arguments;
		var matriceprecaricate = new Array();
		for (var i=0; i<filediimmagini.length; i++) {
			matriceprecaricate[i] = new Image;
			matriceprecaricate[i].src = filediimmagini[i];
		}
	}
}
sIFR.domains = ['*', '*'];
//sIFR.domains = ['http://localhost', 'localhost'];
function SIFR(tag,size) {
	sIFR.replace(futura, {
	selector: 'h1',css: {'.sIFR-root' : {'color': ColorLight, 'font-size': '30px', 'width': '200%' }
	,'strong': {'color': ColorLight, 'font-weight': 'normal'}}
	,filters: {DropShadow: {knockout:false,distance:1.9,angle:145,color:ColorDark,blurX:2,blurY:2,strength:.20,alpha:20}}
	,tuneHeight:-2,offsetTop:0,fitExactly:true,fixWrap:true,wmode:'transparent'
	});
	sIFR.replace(futura, {
	selector: 'h2',css: {'.sIFR-root' : {'color': ColorLight, 'font-size': '30px', 'width': '200%' }
	,'strong': {'color': ColorLight, 'font-weight': 'normal'}}
	,filters: {DropShadow: {knockout:false,distance:1.9,angle:145,color:ColorDark,blurX:2,blurY:2,strength:.20,alpha:20}}
	,tuneHeight:-2,offsetTop:0,fitExactly:true,fixWrap:true,wmode:'transparent'
	});
	sIFR.replace(futura, {
	selector: 'h3',css: {'.sIFR-root' : {'color': ColorLight, 'font-size': '18px', 'width': '200%' }
	,'strong': {'color': ColorLight, 'font-weight': 'bold'}}
	,filters: {DropShadow: {knockout:false,distance:1.9,angle:145,color:ColorDark,blurX:2,blurY:2,strength:.20,alpha:20}}
	,tuneHeight:-2,offsetTop:0,fitExactly:true,fixWrap:true,wmode:'transparent'
	});
	sIFR.replace(futura, {
	selector: 'h4',css: {'.sIFR-root' : {'color': ColorLight, 'font-size': '14px', 'width': '200%' }
	,'strong': {'color': ColorLight, 'font-weight': 'bold'}}
	,filters: {DropShadow: {knockout:false,distance:1.9,angle:145,color:ColorDark,blurX:2,blurY:2,strength:.20,alpha:20}}
	,tuneHeight:-2,offsetTop:0,fitExactly:true,fixWrap:true,wmode:'transparent'
	});
 }
ColorDark = '#0039be';//tonalità scura
ColorLight = '#295f96';//tonalità chiara

function init() {
	SIFR();
}
var futura = {
	src: '/sifr.swf',ratios: [8,1.41,10,1.33,11,1.31,15,1.29,19,1.28,26,1.25,35,1.24,46,1.23,67,1.22,70,1.21,72,1.22,75,1.21,76,1.22,80,1.21,81,1.22,1.21]
};
sIFR.useDomContentLoaded = !sIFR.ua.ie;
sIFR.activate(futura);

