function validateEmail(e){

	reg = /^[-_a-zA-Z0-9]+@[-_a-zA-Z0-9]+\.[a-zA-Z]+$/;
	return reg.test(e); // TRUE si es correcto, FALSE en caso contrario

}


function validateRegWebmaster()
{
	var ko         = 0;
	var email      = document.getElementById('email');
	var web        = document.getElementById('web');
	var login      = document.getElementById('reg_login');
	var password   = document.getElementById('reg_password');
	var password2  = document.getElementById('reg_password2');
	if (!validateEmail(email.value)) {
		ko = 1;
		alert('Rellena un email válido');
		email.focus();
		return false;
	}
	if (web.value == '') {
		ko = 1;
		alert('Indícanos tu web, nos ayudará a ofrecerte un mejor servicio');
		web.focus();
		return false;
	}
	if (login.value == '') {
		ko = 1;
		alert('Escribe un login');
		login.focus();
		return false;
	}
	if (password.value == '') {
		ko = 1;
		alert('Escribe un password');
		password.focus();
		return false;
	}
	if (password.value != password2.value) {
		ko = 1;
		alert('Error al repetir el password');
		password.focus();
		return false;
	}
	return true;
}

function pulsar(e) {
	tecla = (document.all) ? e.keyCode :e.which;
	
	return (tecla!=13);
}
