function guardanews(){
//alert('llego');
$('graciasnews').innerHTML = '<h2>Procesando... </h2>';
if ( $('correo').value != '' && $('nombres').value != ''){ //alert('todo ok');
var dataformins = Form.serialize('newsins');

var opt = {
    // Use POST
    method: 'post',
    // Send this lovely data
    postBody: dataformins,
    // Handle successful response
    onSuccess: function(t) {
        //alert(t.responseText);
		$('graciasnews').innerHTML = t.responseText;
		Form.reset('newsins');
		$('correo').style.background = '#ffffff';
    },
    // Handle 404
    on404: function(t) {
        alert('Error 404: location "' + t.statusText + '" was not found.');
    },
    // Handle other errors
    onFailure: function(t) {
        alert('Error ' + t.status + ' -- ' + t.statusText);
    }
}

new Ajax.Request('insertnews.php', opt);
 } else{ alert('faltan datos'); }
//$('graciasnws').innerHTML = 'Agregado con exito!!';
}

function validarEmail(cadena) {
var a = $(cadena).value;
var filter=/^[A-Za-z][A-Za-z0-9_]*@[A-Za-z0-9_]+.[A-Za-z0-9_.]+[A-za-z]$/;
if (a.length == 0 )
return true;
if (filter.test(a)){
$('graciasnews').innerHTML ='Correo Validado !!!';
$('correo').style.background = '#00ff00';}
else{
//alert("Porfavor, debe ingresar una dirección de correo válida");
//cadena.focus();
$('graciasnews').innerHTML = 'Correo Invalido !!!';
$('correo').style.background = '#ff0000';
 }
}