// JavaScript Document
function showNews(id){
	/*//nascondo le preview
	getElement("small1").style.display='none';
	getElement("small2").style.display='none';
	getElement("small3").style.display='none';
	//visualizzo solo la news richiesta
	getElement("big"+ id).style.display='';	
	*/
	//nascondo il collegamento
	hideElement("small_all");
	//nascondo le preview
	openAndClose("small1");
	openAndClose("small2");
	openAndClose("small3");
	//visualizzo solo la news richiesta
	showElement("big"+ id);
}
function hiddenNews(id){
	//nascondo solo la news richiesta
	//getElement("big"+ id).style.display='none';
	//visualizzo le preview
	/*getElement("small1").style.display='';
	getElement("small2").style.display='';
	getElement("small3").style.display='';	*/
	//nascondo le preview
	hideElement('big'+ id);
	openAndClose("small1");
	openAndClose("small2");
	openAndClose("small3");
	
	//visualizzo il collegamento
	showElement("small_all");
	//setTimeout("openAndClose('small2')", 1000);
	//setTimeout("openAndClose('small3')", 2000);
	//setTimeout(function () { hideElement('big'+ id); }, 3000);
	
}
/**********************************************
* funzioni per mostrare e nascondere elementi
**********************************************/

//mostra oggetti nascosti
function showElement(id_elem)
{
$("#"+id_elem).slideDown("normal");
//getElement(id_elem).style.display='';
}

//nasconda oggetti
function hideElement(id_elem)
{
$("#"+id_elem).slideUp("normal");
//getElement(id_elem).style.display='none';
}

//mostra o nasconde a seconda dello stato dell'oggetto
function openAndClose(id_elem)
{

if($("#"+id_elem).is(":hidden"))
showElement(id_elem);
else
hideElement(id_elem);
}

