// JavaScript Document
// <![CDATA[
				document.observe('dom:loaded', function() {
					
					function sendForm(event){
						error =0;
						Event.stop(event);
						//validar
						if (!$('email_destino').getValue()) {
							error=1;
							alert("Debes escribir un email");
						}
						else {
							if (validateEmail($('email_destino').getValue())==null) {
								error=1;
								alert("La direcci\u00F3n de correo no es v\u00E1lida");
							}	
		
						}
												
						if (error==0) {
						
						var oOptions = {
							method: "POST",
							parameters: Form.serialize("Form1"),
							asynchronous: true,
							onFailure: function (oXHR) {
								$('bv1').update('<div style="height:125px;" onClick="abre(\'bv1\');">'+oXHR.statusText+'</div>');
							},
							onLoading: function (oXHR) {
								$('bv1').update('<p>Procesando ... <img src="img/loading_indicator.gif" title="Enviando..." alt="Enviando..." border="0" /></p>');
							},							
							onSuccess: function(oXHR) {
							   $('bv1').update('<div style="height:125px;" onClick="abre(\'bv1\');">'+oXHR.responseText+'</div>');
							}				
						};
						var oRequest = new Ajax.Updater({success: oOptions.onSuccess.bindAsEventListener(oOptions)}, "email_prensa", oOptions);
						
						}
					}
					Event.observe('submitButton', 'click', sendForm, false);
					
					function sendForm2(event){
						error =0;
						Event.stop(event);
						//validar
						if (!$('email_destino2').getValue()) {
							error=1;
							alert("Debes escribir un email");
						}
						else {
							if (validateEmail($('email_destino2').getValue())==null) {
								error=1;
								alert("La direcci\u00F3n de correo no es v\u00E1lida");
							}	

						}
												
						if (error==0) {
						
						var oOptions = {
							method: "POST",
							parameters: Form.serialize("Form2"),
							asynchronous: true,
							onFailure: function (oXHR) {
								$('bv2').update('<div style="height:125px;" onClick="abre(\'bv2\');">'+oXHR.statusText+'</div>');
							},
							onLoading: function (oXHR) {
								$('bv2').update('<p>Procesando ... <img src="img/loading_indicator.gif" title="Enviando..." alt="Enviando..." border="0" /></p>');
							},							
							onSuccess: function(oXHR) {
							   $('bv2').update('<div style="height:125px;" onClick="abre(\'bv2\');">'+oXHR.responseText+'</div>');
							}				
						};
						var oRequest = new Ajax.Updater({success: oOptions.onSuccess.bindAsEventListener(oOptions)}, "email_prensa", oOptions);
						
						}
					}
					Event.observe('submitButton2', 'click', sendForm2, false);
					
					
					function sendForm3(event){
						error =0;
						Event.stop(event);
						//validar
						if (!$('email_destino3').getValue()) {
							error=1;
							alert("Debes escribir un email");
						}
						else {
							if (validateEmail($('email_destino3').getValue())==null) {
								error=1;
								alert("La direcci\u00F3n de correo no es v\u00E1lida");
							}	

						}
												
						if (error==0) {
						
						var oOptions = {
							method: "POST",
							parameters: Form.serialize("Form3"),
							asynchronous: true,
							onFailure: function (oXHR) {
								$('bv3').update('<div style="height:125px;" onClick="abre(\'bv3\');">'+oXHR.statusText+'</div>');
							},
							onLoading: function (oXHR) {
								$('bv3').update('<p>Procesando ... <img src="img/loading_indicator.gif" title="Enviando..." alt="Enviando..." border="0" /></p>');
							},							
							onSuccess: function(oXHR) {
							   $('bv3').update('<div style="height:125px;" onClick="abre(\'bv3\');">'+oXHR.responseText+'</div>');
							}				
						};
						var oRequest = new Ajax.Updater({success: oOptions.onSuccess.bindAsEventListener(oOptions)}, "email_prensa", oOptions);
						
						}
					}
					Event.observe('submitButton3', 'click', sendForm3, false);
					
					
					function sendForm4(event){
						error =0;
						Event.stop(event);
						//validar
						if (!$('email_destino4').getValue()) {
							error=1;
							alert("Debes escribir un email");
						}
						else {
							if (validateEmail($('email_destino4').getValue())==null) {
								error=1;
								alert("La direcci\u00F3n de correo no es v\u00E1lida");
							}	

						}
												
						if (error==0) {
						
						var oOptions = {
							method: "POST",
							parameters: Form.serialize("Form4"),
							asynchronous: true,
							onFailure: function (oXHR) {
								$('bv4').update('<div style="height:125px;" onClick="abre(\'bv4\');">'+oXHR.statusText+'</div>');
							},
							onLoading: function (oXHR) {
								$('bv4').update('<p>Procesando ... <img src="img/loading_indicator.gif" title="Enviando..." alt="Enviando..." border="0" /></p>');
							},							
							onSuccess: function(oXHR) {
							   $('bv4').update('<div style="height:125px;" onClick="abre(\'bv4\');">'+oXHR.responseText+'</div>');
							}				
						};
						var oRequest = new Ajax.Updater({success: oOptions.onSuccess.bindAsEventListener(oOptions)}, "email_prensa", oOptions);
						
						}
					}
					Event.observe('submitButton4', 'click', sendForm4, false);
					
					function sendForm5(event){
						error =0;
						Event.stop(event);
						//validar
						if (!$('email_destino5').getValue()) {
							error=1;
							alert("Debes escribir un email");
						}
						else {
							if (validateEmail($('email_destino5').getValue())==null) {
								error=1;
								alert("La direcci\u00F3n de correo no es v\u00E1lida");
							}	

						}
												
						if (error==0) {
						
						var oOptions = {
							method: "POST",
							parameters: Form.serialize("Form5"),
							asynchronous: true,
							onFailure: function (oXHR) {
								$('bv5').update('<div style="height:125px;" onClick="abre(\'bv5\');">'+oXHR.statusText+'</div>');
							},
							onLoading: function (oXHR) {
								$('bv5').update('<p>Procesando ... <img src="img/loading_indicator.gif" title="Enviando..." alt="Enviando..." border="0" /></p>');
							},							
							onSuccess: function(oXHR) {
							   $('bv5').update('<div style="height:125px;" onClick="abre(\'bv5\');">'+oXHR.responseText+'</div>');
							}				
						};
						var oRequest = new Ajax.Updater({success: oOptions.onSuccess.bindAsEventListener(oOptions)}, "email_prensa", oOptions);
						
						}
					}
					Event.observe('submitButton5', 'click', sendForm5, false);
					
					
					function sendForm6(event){
						error =0;
						Event.stop(event);
						//validar
						if (!$('email_destino6').getValue()) {
							error=1;
							alert("Debes escribir un email");
						}
						else {
							if (validateEmail($('email_destino6').getValue())==null) {
								error=1;
								alert("La direcci\u00F3n de correo no es v\u00E1lida");
							}	

						}
												
						if (error==0) {
						
						var oOptions = {
							method: "POST",
							parameters: Form.serialize("Form6"),
							asynchronous: true,
							onFailure: function (oXHR) { 
								$('bv6').update('<div style="height:125px;" onClick="abre(\'bv6\');">'+oXHR.statusText+'</div>');
							},
							onLoading: function (oXHR) {
								$('bv6').update('<p>Procesando ... <img src="img/loading_indicator.gif" title="Enviando..." alt="Enviando..." border="0" /></p>');
							},							
							onSuccess: function(oXHR) {
							   $('bv6').update('<div style="height:125px;" onClick="abre(\'bv6\');">'+oXHR.responseText+'</div>');
							}				
						};
						var oRequest = new Ajax.Updater({success: oOptions.onSuccess.bindAsEventListener(oOptions)}, "email_prensa", oOptions);
						
						}
					}
					Event.observe('submitButton6', 'click', sendForm6, false);
					
				});	
// ]]>

function validateEmail(email) 
{ 
 var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
 return email.match(re) 
};


