/*
 * journal.js 
 * 
 * File di supporto per la gestione della interattiva della rivista
 * specialmente la parte di amministrazione
 *
 * Author: Gianluca Franco
 * Created: 24.12.2006
 * Rev. 24.12.2006 
 * Last rev. 8.12.2007 
 */

window.onload = function(){
	
	// Centra il contenuto
	var width = window.screen.width;
	var content = $('content');
	var copy = $('copyright');
	if (content){
		var left = ((width - 920) / 2);
		if (navigator.appVersion.indexOf('MSIE 6.0') != -1){
			left /= 2;
		}
		content.style.marginLeft = left + 'px';
	}
	if (copy){
		copy.style.marginLeft = left + 'px';
	}

}

/*
 * flip
 *
 * Mostra/nasconde un elemento il cui id è passato
 * come parametro
 *
 */
function flip(div_id){
	var divelem = $(div_id);
	if (divelem){
		if (divelem.style.display == 'none'){
			divelem.style.display = 'block';
		} else {
			divelem.style.display = 'none';
		}
	}
}	