function parContent() {
	//imposto il contenuto centrale
//	var submenu = $('#submenu');
//	var subcontent = $('#subcontent');
//	var max = Math.max(submenu.height(), subcontent.height());
//	submenu.height(max);
//	subcontent.height(max);
//	submenu = null;
//	subcontent = null;

	//imposto le colonne del footer
	var col1 = $('#footer .col1');
	var col2 = $('#footer .col2');
	var col3 = $('#footer .col3');
	var maxCol = Math.max(col1.height(), col2.height(), col3.height());
	col1.height(maxCol);
	col2.height(maxCol);
	col3.height(maxCol);
	col1 = null;
	col2 = null;
	col3 = null;
}

/****************************************************************
*   Funzioni di visualizzazione modal popup
****************************************************************/
function showModal(pagina, larghezza, altezza, classe, stile, scrollabile, youtube) {
	var clientWidth = $(window).width();
	var clientHeight = $(window).height();
	var scrolla = scrollabile = '' ? 'auto' : scrollabile;
	var w = larghezza >= clientWidth ? clientWidth - 40 : larghezza;
	var h = altezza >= clientHeight ? clientHeight - 40 : altezza;
	var destinazione = pagina.indexOf("http://") == -1 ? baseURI + pagina : pagina;

	//sfondo
	var sfondo = $('<div id="popUpBackGround" />');
	sfondo.height((document.documentElement.scrollHeight ? document.documentElement.scrollHeight : document.body.scrollHeight) + 'px');
	sfondo.width((document.documentElement.scrollWidth ? document.documentElement.scrollWidth : document.body.scrollWidth) + 'px');
	sfondo.appendTo(document.body);

	//finestra
	//var modal = $('<iframe id="popUp" frameborder="0" scrolling="' + scrolla + '" src="' + destinazione + '" style="' + stile + '" class="' + classe + '" width="' + w + '" height="' + h + '" />');
	//if (youtube == 'si') {
	//modal = $('<iframe id="popUp" title="YouTube video player" width="' + w + '" height="' + h + '" src="' + destinazione + '" frameborder="0" style="' + stile + '" class="' + classe + '" allowfullscreen="no"></iframe>');
	//}
	var modal = $(pagina);
	if (youtube == 'si') {
		modal = $('<iframe id="popUp" title="YouTube video player" width="' + w + '" height="' + h + '" src="' + destinazione + '" frameborder="0" style="' + stile + '" class="' + classe + '" allowfullscreen="no"></iframe>');
	}
	modal.appendTo(document.body);
	modal.addClass("popUpBody");
	modal.css("left", ((clientWidth / 2) - (w / 2) + 'px'));
	modal.css("top", ((clientHeight / 2) - (h / 2) + 'px'));
	modal.show();

	//pulsante chiusura
	var close = $('<a id="closeModalButton" href="javascript:hideModal();"><img width="30" height="30" src="' + baseURI + 'images/close.png" /></a>');
	close.appendTo(document.body);
	close.addClass("close-modal-button");
	close.css("left", ((clientWidth / 2) - (w / 2) + w - 15) + 'px');
	close.css("top", ((clientHeight / 2) - (h / 2) - 15) + 'px');
	close.show();

	window.onresize = function () {
		sfondo.height((document.documentElement.scrollHeight ? document.documentElement.scrollHeight : document.body.scrollHeight) + 'px');
		sfondo.width((document.documentElement.scrollWidth ? document.documentElement.scrollWidth : document.body.scrollWidth) + 'px');
		var clientWidth = $(window).width();
		var clientHeight = $(window).height();
		modal.css("left", ((clientWidth / 2) - (w / 2) + 'px'));
		modal.css("top", ((clientHeight / 2) - (h / 2) + 'px'));
		close.css("left", ((clientWidth / 2) - (w / 2) + w - 15) + 'px');
		close.css("top", ((clientHeight / 2) - (h / 2) - 15) + 'px');
	}
}

function hideModal() {
	$('#popUpBackGround').remove();
	$('#popUp').remove();
	$('#closeModalButton').remove();
	$('.dettagli').hide();
	window.onresize = null;
}

/****************************************************************
*   Funzioni di utility
****************************************************************/
// funzioni per l'apertura di popUp
function privacy(){
	w = 580;
	h = screen.height-50;
	LeftPosition = 0;//(screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = 0;//(screen.height) ? (screen.height-h)/2 : 0;
	settings = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+w+',height='+h+',left='+LeftPosition+', top='+TopPosition+',screenX='+LeftPosition+',screenY='+TopPosition+'';
	window.open(baseURI + 'modules/privacy.html', 'privacy', settings)
}
