// JavaScript Document


function InviaMail(Indirizzo,TitoloEvento,Testo1,Testo2)
{
	
	//Esempio costruzione Body
	//body=The message's first paragraph.%0A%0aSecond paragraph.%0A%0AThird Paragraph
	//Use "%0A" for a new line, use "%0A%0A" for a new line preceded by a blank line
	//"" %0A%0A"+encodeURIComponent(URLDoc);
	var mail = document.getElementById("Indirizzo_mail").value;
	var richiesta = document.getElementById("richiesta_mail").value;
	
	
	 window.location = "mailto:"+Indirizzo+"?subject="+TitoloEvento+"&body="+Testo1+"%0A"+mail+"%0A%0A"+Testo2+"%0A"+richiesta;
	 setTimeout('ShowMail()',23000);
}

function ShowMail()
{
	if(document.getElementById('hideMail1') != null){
			document.getElementById('hideMail1').style.visibility = 'hidden'; 
			document.getElementById('hideMail1').style.display = 'none'; 
			document.getElementById('hideMail2').style.visibility = 'visible'; 
			document.getElementById('hideMail2').style.display = 'block'; 
	}
	
}
