function send_card() 
{ 					
	if (document.cards.text.value == "") 
  	{
  		document.cards.text.disabled = true;
  		document.cards.send.disabled = true;
  		document.cards.text.value = '\n\n\n\n\n\n\n\n' + "         scrivere qui" +'\n\n' +"             il testo" +'\n\n' +"         della cartolina";
  		setTimeout("setMsg()",1000);
  		return false;
  	}
  	
	if (document.cards.from.value == "")
  	{				  		
  		document.cards.from.disabled = true;
  		document.cards.from.value = " inserire nome";
  		setTimeout("setFrom()",1000);
  		return false;
  	}

	if (document.cards.from_email.value == "")
  	{				  		
  		document.cards.from_email.disabled = true;
  		document.cards.from_email.value = " inserire e-mail";
  		setTimeout("setFromEmail()",1000);
  		return false;
  	}
  	
	if (document.cards.to.value == "")
  	{				  		
  		document.cards.to.disabled = true;
  		document.cards.to.value = " inserire nome";
  		setTimeout("setTo()",1000);
  		return false;
  	}

	if (document.cards.to_email.value == "")
  	{				  		
  		document.cards.to_email.disabled = true;
  		document.cards.to_email.value = " inserire e-mail";
  		setTimeout("setToEmail()",1000);
  		return false;
  	} 	 

  document.cards.submit();
  document.cards.send.disabled = true;
  setTimeout("reset_msg()",1000);
  return true;
}

function reset_msg()
{
  document.cards.chatmsg.focus();
  document.cards.chatmsg.value = "";	  
}

function setMsg()
{
	document.cards.send.disabled = false;			  
	document.cards.text.disabled = false;	
	document.cards.text.value = "";
	document.cards.text.focus();
}

function setFrom()
{
	document.cards.from.disabled = false;	
	document.cards.from.value = "";
	document.cards.from.focus();
}

function setFromEmail()
{
	document.cards.from_email.disabled = false;	
	document.cards.from_email.value = "";
	document.cards.from_email.focus();
}

function setTo()
{
	document.cards.to.disabled = false;	
	document.cards.to.value = "";
	document.cards.to.focus();
}

function setToEmail()
{
	document.cards.to_email.disabled = false;	
	document.cards.to_email.value = "";
	document.cards.to_email.focus();
}
