/*function resettaSubmenu() {
	//chiamato dal flash quando eventualmente faccio un back
	//serve solo per i browser non IE
	document.getElementById('flash_submenu').style.height = '39px';
}
function resettaFoto(ID) {
	//chiamato dal flash quando eventualmente faccio un back
	//serve solo per i browser non IE
	document.getElementById(ID).style.height = '116px';
}*/
function apriChiudiSubmenu(h, d){
	objSubmenu = document.getElementById('flash_submenu');
	//
	if (!objSubmenu.style.height) {
		var startH = 39;
		objSubmenu.style.height = startH+'px';
	} else {
		var startH = parseInt(objSubmenu.style.height);
	}
	var endH = parseInt(h);
	//var t = new Tween(object, property, easing, start, end, duration, suffixe);
	//var t = new Tween(objSubmenu.style,'height',Tween.strongEaseIn,startH,endH,d,'px');
	var scale = (endH*100)/startH;
	new Effect.Scale(objSubmenu, scale, {scaleX: false, duration: d, transition: Effect.Transitions.easeIn});
	//
	//t.start();
}
function apriChiudiFoto(ID, h, d){
	objFoto = document.getElementById(ID);
	//
	if (!objFoto.style.height) {
		var startH = 116;
		objFoto.style.height = startH+'px';
	} else {
		var startH = parseInt(objFoto.style.height);
	}
	var endH = parseInt(h);
	//var t = new Tween(object, property, easing, start, end, duration, suffixe);
	var scale = (endH*100)/startH;
	if (endH == 116) {
		//var t = new Tween(objFoto.style,'height',Tween.strongEaseOut,startH,endH,d,'px');
		new Effect.Scale(objFoto, scale, {scaleX: false, duration: d, transition: Effect.Transitions.easeOut});	
	} else {
		//var t = new Tween(objFoto.style,'height',Tween.strongEaseIn,startH,endH,d,'px');
		new Effect.Scale(objFoto, scale, {scaleX: false, duration: d, transition: Effect.Transitions.easeIn});		
	}
	//
	//t.start();
}
function apriChiudiGallery(ID, h, d, azione){
	objFoto = document.getElementById(ID);
	//
	/*if (!objFoto.style.height) {
		var startH = 116;
		objFoto.style.height = startH+'px';
	} else {
		var startH = parseInt(objFoto.style.height);
	}*/
	var startH = parseInt(objFoto.style.height);
	var endH = parseInt(h);
	//
	var scale = (endH*100)/startH;
	if (azione == 'chiudi') {
		new Effect.Scale(objFoto, scale, {scaleX: false, duration: d, transition: Effect.Transitions.easeOut});	
	} else {
		new Effect.Scale(objFoto, scale, {scaleX: false, duration: d, transition: Effect.Transitions.easeIn});		
	}
}
function statusBarMessage(msg) {
	window.status = msg;
}
// DATI TECNICI
function apriChiudiDati(ID) {
	objBtn = document.getElementById('dati_btn'+ID);
	objDivTable = document.getElementById('divTable'+ID);
	if(this['dati'+ID] != 'aperto') {
		objBtn.style.backgroundPosition = '0px -20px';
		//var e = new Effect.BlindDown(objDivTable, {duration: 0.7, scaleFrom: 5, scaleTo: 95, transition: Effect.Transitions.linear});
		var e = new Effect.BlindDown(objDivTable, {duration: 0.7, scaleFrom: 1, scaleTo: 99, transition: Effect.Transitions.easeInOut});
		//var e = new Effect.BlindDown(objDivTable, {duration: 0.5, scaleFrom: 5, scaleTo: 95});
		this['dati'+ID] = 'aperto';
	} else {
		new Effect.BlindUp(objDivTable, {duration: 0.7, scaleFrom: 99, scaleTo: 1, transition: Effect.Transitions.easeInOut,
			afterFinish: function() {objBtn.style.backgroundPosition = '0px 0px';}
		});
		this['dati'+ID] = 'chiuso';
	}
}
/*
//scriptaculous
function apriChiudiDati(ID) {
	objBtn = document.getElementById('dati_btn'+ID);
	objDivTable = document.getElementById('divTable'+ID);
	if(this['dati'+ID] != 'aperto') {
		new Effect.BlindDown(objDivTable, {duration: 0.7});
		this['dati'+ID] = 'aperto';
	} else {
		new Effect.BlindUp(objDivTable, {duration: 0.7});
		this['dati'+ID] = 'chiuso';
	}
}*/

/*function apriChiudiDati(ID) {
	objBtn = document.getElementById('dati_btn'+ID);
	objTable = document.getElementById('table'+ID);
	objDivTable = document.getElementById('divTable'+ID);
	if(this['dati'+ID] != 'aperto') {
		objBtn.style.backgroundPosition = '0px -20px';
		objTable.style.display = 'block';
		objDivTable.style.height = objTable.offsetHeight+'px';
		this['dati'+ID] = 'aperto';
	} else {
		objBtn.style.backgroundPosition = '0px 0px';
		var startH = objTable.offsetHeight;
		objTable.style.display = 'none';
		this['dati'+ID] = 'chiuso';
		//
		var t = new Tween(objDivTable.style,'height',Tween.strongEaseOut,startH,0,0.7,'px');
		t.start();
	}
}*/