//	FORMULARIOS /////////////////////////////////////////////////////////////////////////////////////////////////

//funcion que cambia los botones al enviar un formulario
function FormChangeButtons(Botton)
{	$("id_"+ Botton+ "_submit").toggle();
	$("id_"+ Botton+ "_submit_loading").toggle();																}

//	CONTACTO ////////////////////////////////////////////////////////////////////////////////////////////////////

//funcion que envia un mail de contacto
function ContactoSend()
{	//ocultamos el boton
	$("id_contacto_submit").hide();
	$("id_contacto_submit_loading").show();
	$("contacto_error").innerHTML="";
	//enviamos el ajax
	MiAjax=new Ajax.Updater("contacto_error", RaizGet()+ "system/web/php/web_acciones.php",
	{	parameters: 
		{	funcion: "WebContacto",
			contacto_name: 		$("id_contacto_name").getValue(),
			contacto_telefono: 	$("id_contacto_telefono").getValue(),
			contacto_mail: 		$("id_contacto_mail").getValue(),
			contacto_mensaje: 	$("id_contacto_mensaje").getValue()}});
	$("id_contacto_submit").show();
	$("id_contacto_submit_loading").hide();																		}

//	SUGERENCIAS /////////////////////////////////////////////////////////////////////////////////////////////////

//funcion que envia un mail de contacto
function SugerenciasSend()
{	FormChangeButtons("sugerencias");
	//enviamos el ajax
	MiAjax=new Ajax.Updater("sugerencias_error", RaizGet()+ "system/web/php/web_acciones.php",
	{	parameters: 
		{	funcion: "WebSugerencias",
			sugerencias_mensaje: 	$("id_sugerencias_mensaje").getValue()}});
	FormChangeButtons("sugerencias");																			}

//	ERRORES /////////////////////////////////////////////////////////////////////////////////////////////////////

//funcion que envia un mail de contacto
function ErroresSend()
{	FormChangeButtons("errores");
	$("errores_error").innerHTML="";
	//enviamos el ajax
	MiAjax=new Ajax.Updater("errores_error", RaizGet()+ "system/web/php/web_acciones.php",
	{	parameters: 
		{	funcion: "WebErrores",
			errores_url: 		$("id_errores_url").getValue(),
			errores_mensaje: 	$("id_errores_mensaje").getValue()}});
	FormChangeButtons("errores");																				}

//	RECOMENDAR //////////////////////////////////////////////////////////////////////////////////////////////////

//funcion que envia un mail de contacto
function RecomendarSend()
{	FormChangeButtons("recomendar");
	$("recomendar_error").innerHTML="";
	//enviamos el ajax
	MiAjax=new Ajax.Updater("recomendar_error", RaizGet()+ "system/web/php/web_acciones.php",
	{	parameters: 
		{	funcion: "Recomendar",
			recomendar_url:			document.location.href,
			recomendar_remite: 		$("id_recomendar_remite").getValue(),
			recomendar_destino: 	$("id_recomendar_destino").getValue(),
			recomendar_mensaje: 	$("id_recomendar_mensaje").getValue()}});
	FormChangeButtons("recomendar");																			}
