// CODICE PREDEFINITO

H1ColorDark = '#000000';//tonalità scura
H1ColorLight = '#333333';//tonalità chiara
H2ColorDark = '#800000';//tonalità scura
H2ColorLight = '#700000';//tonalità chiara
H3ColorDark = '#800000';//tonalità scura
H3ColorLight = '#700000';//tonalità chiara

function init(){
	SIFR();
	try{
		document.getElementById("credits").style.height = Math.round(document.getElementById("scheda_img").offsetHeight-10)+'px';
		document.getElementById("credits").style.width = Math.round(document.getElementById("page").offsetWidth-document.getElementById("scheda_img").offsetWidth-50)+'px';
		document.getElementById("opzioni").style.width = Math.round(document.getElementById("page").offsetWidth-document.getElementById("scheda_img").offsetWidth-50)+'px';
		}catch(e){}
}
if (window.location.host == 'www.nataliniarchitetti.com'){
	var path = window.location.host;
} else {
	var path = window.location.host+"/nataliniarchitetti";
}
var futura = {
	src: 'http://'+path+'/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);

var Progetto = "";

function GalleriaFotografica(cat,id){
	window.location = "../galleria.php?Categoria="+cat+"&Progetto="+id;
}
function Indietro(){
	JQ("#galleria").expose().close();
}

function disableRightClick(e){
	var data = new Date();
	var message = "© "+data.getFullYear()+" - Creations Garage";
	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();

sIFR.domains = ['*', '*'];
function SIFR(tag,size) {
	sIFR.replace(futura, {
	selector: 'h1',css: {'.sIFR-root' : {'color': H1ColorLight, 'font-size': '32px', 'width': '200%' }
	,'strong': {'color': H1ColorLight, 'font-weight': 'normal'}}
	,filters: {DropShadow: {knockout:false,distance:1.9,angle:145,color:H1ColorDark,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': H2ColorLight, 'font-size': '22px', 'width': '200%' }
	,'strong': {'color': H2ColorLight, 'font-weight': 'normal'}}
	,filters: {DropShadow: {knockout:false,distance:1.9,angle:145,color:H2ColorDark,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': H3ColorLight, 'font-size': '16px', 'width': '200%' }
	,'strong': {'color': H3ColorLight, 'font-weight': 'bold'}}
	,filters: {DropShadow: {knockout:false,distance:1.9,angle:145,color:H3ColorDark,blurX:2,blurY:2,strength:.20,alpha:20}}
	,tuneHeight:-2,offsetTop:0,fitExactly:true,fixWrap:true,wmode:'transparent'
	});
 }
 //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;
}

