/////////////////////////////////////////////////
///// flash javascript //////////////////////////
/////////////////////////////////////////////////
var beIE = document.all?true:false
function movieobject(moviename){
	if (beIE) {
		return window[moviename];
	}else{
		return document[moviename];
	}
}
function playmovie(moviename){
	movieobject(moviename).Play();
}
function stopmovie(moviename){
	movieobject(moviename).StopPlay();
}
function goframe(moviename,frame){
	movieobject(moviename).GotoFrame(frame);
}
function setVariable(moviename,variable,value){
	movieobject(moviename).SetVariable("/:"+variable, value);
}
function askFrom(){
	var from = document.location.href;
	var fromArray = from.split('/');
	var lastFrom = fromArray[fromArray.length-1];
	var lastFromArray = lastFrom.split('.');
	var pageFrom = lastFromArray[0];
	setVariable('resizer','from',pageFrom);
}
///////////////////////////////////////////////////////////////////////////
////// dimensioni schermo ///////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
var W = screen.availWidth;
var H = screen.availHeight;
function maximize(){
	self.moveTo(0,0);
	self.resizeTo(W,H);
	traceResize();
}
/////////////////////////////////////////////////
//////// browser detect /////////////////////////
/////////////////////////////////////////////////
var isNav4, isIE4;
if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
	isNav4 = (navigator.appName == "Netscape") ? 1 : 0;
	isIE4 = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;
}
/////////////////////////////////////////////////////////////////////////////
// utility generiche ////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
function addBookmark(title,url) {
	if (window.sidebar) { 
		window.sidebar.addPanel(title, url,""); 
	} else if( document.all ) {
		window.external.AddFavorite( url, title);
	} else if( window.opera && window.print ) {
		return true;
	}
}
///////////////////////////////////////////////////////
//////////////////////////////////// pieno schermo
var w = 0;
var h = 0;
function traceResize() {
	if (isIE4) {
		w = document.body.clientWidth;
		h = document.body.clientHeight;
	} else {
		w = self.innerWidth;
		h = self.innerHeight;
	}
	changeProp('flashid','','style.width',w);
	changeProp('flashid','','style.height',h);
}
function findObj(n, d) { //v4.01
	var p,i,x;
	if(!d){
		d=document;
	}
	if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
	}
	if(!(x=d[n])&&d.all){
		x=d.all[n];
	}
	for (i=0;!x&&i<d.forms.length;i++){
		x=d.forms[i][n];
	}
	for(i=0;!x&&d.layers&&i<d.layers.length;i++){
		x=findObj(n,d.layers[i].document);
	}
	if(!x && d.getElementById){
		x=d.getElementById(n);
	}
	return x;
}
function changeProp(objName,x,theProp,theValue) {
	var obj = findObj(objName);
	if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
		if (theValue == true || theValue == false){
			eval("obj."+theProp+"="+theValue);
		} else {
			eval("obj."+theProp+"='"+theValue+"'");
		}
	}
}
///////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////// dimensioni fisse
function setFlashWidth(divid, newW){
	document.getElementById(divid).style.width = newW+"px";
}
function setFlashHeight(divid, newH){
	document.getElementById(divid).style.height = newH+"px";
}
function setFlashSize(divid, newW, newH){
	setFlashWidth(divid, newW);
	setFlashHeight(divid, newH);
}
function canResizeFlash(){
	var ua = navigator.userAgent.toLowerCase();
	var opera = ua.indexOf("opera");
	if( document.getElementById ){
		if(opera == -1) return true;
		else if(parseInt(ua.substr(opera+6, 1)) >= 7) return true;
	}
	return false;
}
///////////////////////////////////////////////////////////////////////////
//////////////////////////////// made by miller/freddox ///////////////////
///////////////////////////////////////////////////////////////////////////