/*
 *	mostraMenu: mostra/nasconde dei div nascosti, l'effetto e' quello di aprire/chiudere dei menu
 *			Input: menuCorrente e' l'id del div da mostrare
 */
function mostraMenu(menuCorrente) 
{
	//intShow=setInterval("mostraMenu()",10)
	if (document.getElementById) 
	{
		questoMenu = document.getElementById(menuCorrente).style; //recupero lo stato del div
		
		if (questoMenu.display == "block") questoMenu.display = "none"; //se il div e' mostrato(menu aperto), lo nascondo(menu chiuso)
		else	questoMenu.display = "block"; // altrimenti lo mostro
		
		return false;
	}
	else return true;
}

/*
 *	mostraNascondi: mostra il div 'divMostra' nasconde i div 'divNascondi', l'effetto e' quello di aprire/chiudere dei menu
 *			Input:
 *				- divMostra e' l'id del div da mostrare
 *			    - divNascondi e' un Array di id dei div da nascondere
 */
function mostraNascondi(divMostra, divNascondi) 
{
	if (document.getElementById) 
	{
		
		if (document.getElementById(divMostra).style.display == "block") document.getElementById(divMostra).style.display = "none"; //se divMostra ? mostrato lo nascondo.. 
		else	document.getElementById(divMostra).style.display = "block"; //..altrimenti lo nascondo
		
		for (i = 0; i<divNascondi.length; i++)
			document.getElementById(divNascondi[i]).style.display = "none"; //nascondo gli altri div
			
		
		return false;
	}
	else return true;
}



function openClose(image) 
{
	if (document.getElementById) 
	{
		imgCorrente = image.src;
		
		var i = imgCorrente.lastIndexOf("/vivelavie");
		if ( i>-1 ) imgCorrente = imgCorrente.substr(i); //se imgCorrente e' un path assoluto si estrapola solo il path relativo dell'immagine
		
		if (imgCorrente == "/vivelavie/layouts/images/close.gif") imgCorrente = "/vivelavie/layouts/images/open.gif"; 
		else	imgCorrente = "/vivelavie/layouts/images/close.gif"; 
		
		image.src = imgCorrente;
		
		return false;
	}
	else return true;
}

/* marinella per footer ie */
function setFooter()
{ 	if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer") 
	{
		if (document.getElementById('footer').style.bottom =='0') document.getElementById('footer').style.bottom ='0'; 
		else document.getElementById('footer').style.bottommargin ='auto'; 
	}
}


