var pippo;

function center_me(w,h){
	if(navigator.appName.indexOf('Explorer')+1){
		var win_width=w;
		var win_height=h;
	} else {
		var win_width=window.outerWidth;
		var win_height=window.outerHeight;
	}
	var pos_x=(screen.width-win_width)/2;
	var pos_y=(screen.height-win_height)/2;
	moveTo(pos_x,pos_y);
}

function open_pop(url,w,h){
	if(pippo) pippo.close();
	pippo = window.open(url,'pop','height='+h+',width='+w+'location=no,resizable=no,scrollbars=no');
}

function close_pop(){
	if(pippo) pippo.close();
}


// Script per avere il banner laterale che segue lo scroll della pagina

window.onerror = null;
var topMargin = 0;
var slideTime = 700;
var ns6 = (!document.all && document.getElementById);
var ie4 = (document.all);
var ns4 = (document.layers);
function layerObject(id,left) {
if (ns6) {
this.obj = document.getElementById(id).style;
this.obj.left = left;
return this.obj;
}
else if(ie4) {
this.obj = document.all[id].style;
this.obj.left = left;
return this.obj;
}
else if(ns4) {
this.obj = document.layers[id];
this.obj.left = left;
return this.obj;
   }
}
function layerSetup() {
floatLyr = new layerObject("floatLayer", 785);
window.setInterval("main()", 10)
}
function floatObject() {
if (ns4 || ns6) {
findHt = window.innerHeight;
} else if(ie4) {
findHt = document.body.clientHeight;
   }
} 
function main() {
if (ns4) {
this.currentY = document.layers["floatLayer"].top;
this.scrollTop = window.pageYOffset;
mainTrigger();
}
else if(ns6) {
this.currentY = parseInt(document.getElementById("floatLayer").style.top);
this.scrollTop = scrollY;
mainTrigger();
} else if(ie4) {
this.currentY = floatLayer.style.pixelTop;
this.scrollTop = document.body.scrollTop;
mainTrigger();
   }
}
function mainTrigger() {
var newTargetY = this.scrollTop + this.topMargin;
if ( this.currentY != newTargetY ) {
if ( newTargetY != this.targetY ) {
this.targetY = newTargetY;
floatStart();
}
animator();
   }
}
function floatStart() {
var now = new Date();
this.A = this.targetY - this.currentY;
this.B = Math.PI / ( 2 * this.slideTime );
this.C = now.getTime();
if (Math.abs(this.A) > this.findHt) {
this.D = this.A > 0 ? this.targetY - this.findHt : this.targetY + this.findHt;
this.A = this.A > 0 ? this.findHt : -this.findHt;
}
else {
this.D = this.currentY;
   }
}
function animator() {
var now = new Date();
var newY = this.A * Math.sin( this.B * ( now.getTime() - this.C ) ) + this.D;
newY = Math.round(newY);
if (( this.A > 0 && newY > this.currentY ) || ( this.A < 0 && newY < this.currentY )) {
if ( ie4 )document.all.floatLayer.style.pixelTop = newY;
if ( ns4 )document.layers["floatLayer"].top = newY;
if ( ns6 )document.getElementById("floatLayer").style.top = newY + "px";
   }
}
function start() {
if(ns6||ns4) {
pageWidth = innerWidth;
pageHeight = innerHeight;
layerSetup();
floatObject();
}
else if(ie4) {
pageWidth = document.body.clientWidth;
pageHeight = document.body.clientHeight;
layerSetup();
floatObject();
   }
}



// rollerAttori e tutti gli alti a seguire sono il valore name='rollerNome' che si trova dentro il tag dell'immagine della thumb



// funzione per le thumb degli attori
//################################################################################################
//################################################################################################


checkbr = (parseInt(navigator.appVersion) > 2)?true:false;
	if (checkbr)
		{
		nome = new Array ("images/attori_thumb_maria_sole","images/attori_thumb_luca","images/attori_thumb_mattia","images/attori_thumb_paola","images/attori_thumb_roberta","images/attori_thumb_valeria","images/attori_thumb_sebastiano","images/attori_thumb_valentina","images/attori_thumb_sonia","images/attori_thumb_marzio","images/attori_thumb_naima","images/attori_thumb_davide","images/attori_thumb_marco","images/attori_thumb_manuel","images/attori_thumb_francesco")
		source = new Array ();
		for (conta in nome)
			{
				source[conta] = new Image();
				source[conta].src = nome[conta]+".gif";
			}
		vuoto = new Image(); 
		vuoto.src="images/attori_thumb.gif";
		}
		
function swp(numero)
	{
	if (checkbr)
		{
			document.rollerAttori.src=source[numero].src;
		}
	}

function UNswp(numero)
	{
	if (checkbr)
		{
		document.rollerAttori.src=vuoto.src;
		}
	}
	
function Chiudi()
	{
	self.close()
	}
	
	
// funzione per le thumb del tecnico audio
//################################################################################################
//################################################################################################

checkbr_audio = (parseInt(navigator.appVersion) > 2)?true:false;
	if (checkbr_audio)
		{
		nome_audio = new Array ("images/attori_thumb_massimo")
		source_audio = new Array ();
		for (conta_audio in nome_audio)
			{
				source_audio[conta_audio] = new Image();
				source_audio[conta_audio].src = nome_audio[conta_audio]+".gif";
			}
		vuoto_audio = new Image(); 
		vuoto_audio.src="images/attori_thumb.gif";
		}
		
function swp_audio(numero)
	{
	if (checkbr_audio)
		{
			document.rollerAudio.src=source_audio[numero].src;
		}
	}

function UNswp_audio(numero)
	{
	if (checkbr_audio)
		{
		document.rollerAudio.src=vuoto.src;
		}
	}
	
function Chiudi()
	{
	self.close()
	}
	
	
// funzione per le thumb del tecnico luci
//################################################################################################
//################################################################################################


checkbr_luci = (parseInt(navigator.appVersion) > 2)?true:false;
	if (checkbr_luci)
		{
		nome_luci = new Array ("images/attori_thumb_marzio")
		source_luci = new Array ();
		for (conta_luci in nome_luci)
			{
				source_luci[conta_luci] = new Image();
				source_luci[conta_luci].src = nome_luci[conta_luci]+".gif";
			}
		vuoto_luci = new Image(); 
		vuoto_luci.src="images/attori_thumb.gif";
		}
		
function swp_luci(numero)
	{
	if (checkbr_luci)
		{
			document.rollerLuci.src=source_luci[numero].src;
		}
	}

function UNswp_luci(numero)
	{
	if (checkbr_luci)
		{
		document.rollerLuci.src=vuoto.src;
		}
	}
	
function Chiudi()
	{
	self.close()
	}
	
	
	
// funzione per le thumb della scenografa
//################################################################################################
//################################################################################################


checkbr_scenografie = (parseInt(navigator.appVersion) > 2)?true:false;
	if (checkbr_scenografie)
		{
		nome_scenografie = new Array ("images/attori_thumb_andrea")
		source_scenografie = new Array ();
		for (conta_scenografie in nome_scenografie)
			{
				source_scenografie[conta_scenografie] = new Image();
				source_scenografie[conta_scenografie].src = nome_scenografie[conta_scenografie]+".gif";
			}
		vuoto_scenografie = new Image(); 
		vuoto_scenografie.src="images/attori_thumb.gif";
		}
		
function swp_scenografie(numero)
	{
	if (checkbr_scenografie)
		{
			document.rollerScenografie.src=source_scenografie[numero].src;
		}
	}

function UNswp_scenografie(numero)
	{
	if (checkbr_scenografie)
		{
		document.rollerScenografie.src=vuoto.src;
		}
	}
	
function Chiudi()
	{
	self.close()
	}
	
	
	
// funzione per le thumb della truccatrice
//################################################################################################
//################################################################################################


checkbr_trucco = (parseInt(navigator.appVersion) > 2)?true:false;
	if (checkbr_trucco)
		{
		nome_trucco = new Array ("images/attori_thumb_lara")
		source_trucco = new Array ();
		for (conta_trucco in nome_trucco)
			{
				source_trucco[conta_trucco] = new Image();
				source_trucco[conta_trucco].src = nome_trucco[conta_trucco]+".gif";
			}
		vuoto_trucco = new Image(); 
		vuoto_trucco.src="images/attori_thumb.gif";
		}
		
function swp_trucco(numero)
	{
	if (checkbr_trucco)
		{
			document.rollerTrucco.src=source_trucco[numero].src;
		}
	}

function UNswp_trucco(numero)
	{
	if (checkbr_trucco)
		{
		document.rollerTrucco.src=vuoto.src;
		}
	}
	
function Chiudi()
	{
	self.close()
	}
	
		
	
// funzione per le thumb della sarta
//################################################################################################
//################################################################################################


checkbr_costumi = (parseInt(navigator.appVersion) > 2)?true:false;
	if (checkbr_costumi)
		{
		nome_costumi = new Array ("images/attori_thumb_luana")
		source_costumi = new Array ();
		for (conta_costumi in nome_costumi)
			{
				source_costumi[conta_costumi] = new Image();
				source_costumi[conta_costumi].src = nome_costumi[conta_costumi]+".gif";
			}
		vuoto_costumi = new Image(); 
		vuoto_costumi.src="images/attori_thumb.gif";
		}
		
function swp_costumi(numero)
	{
	if (checkbr_costumi)
		{
			document.rollerCostumi.src=source_costumi[numero].src;
		}
	}

function UNswp_costumi(numero)
	{
	if (checkbr_costumi)
		{
		document.rollerCostumi.src=vuoto.src;
		}
	}
	
function Chiudi()
	{
	self.close()
	}
	
	
		
	
// funzione per le thumb del sup tecnico
//################################################################################################
//################################################################################################


checkbr_sup = (parseInt(navigator.appVersion) > 2)?true:false;
	if (checkbr_sup)
		{
		nome_sup = new Array ("images/attori_thumb_luana")
		source_sup = new Array ();
		for (conta_sup in nome_sup)
			{
				source_sup[conta_sup] = new Image();
				source_sup[conta_sup].src = nome_sup[conta_sup]+".gif";
			}
		vuoto_sup = new Image(); 
		vuoto_sup.src="images/attori_thumb.gif";
		}
		
function swp_sup(numero)
	{
	if (checkbr_sup)
		{
			document.rollerSup.src=source_sup[numero].src;
		}
	}

function UNswp_sup(numero)
	{
	if (checkbr_sup)
		{
		document.rollerSup.src=vuoto.src;
		}
	}
	
function Chiudi()
	{
	self.close()
	}
	
	
	