function CheckRegister() {

	if(document.f1.names.value=="")
	{
		alert('Introduce tu nombre por favor!');
		document.f1.names.focus();
		return false;
	}

	if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.f1.email.value))
	{
		alert('Email incorrecto! Por favor escribelo de nuevo.\n\nLo usaras como login para la cuenta!');
		document.f1.email.value="";
		document.f1.email.focus();
		return false;
	}

	if(document.f1.password.value=="")
	{
		alert('Introduce tu contraseņa por favor!');
		document.f1.password.focus();
		return false;
	}

	if(document.f1.password2.value=="")
	{
		alert('Confirma tu contraseņa por favor!');
		document.f1.password2.focus();
		return false;
	}

	if(document.f1.password.value != document.f1.password2.value)
	{
		alert('Escribe bien la contraseņa dos veces por favor!');
		document.f1.password.value="";
		document.f1.password2.value="";
		document.f1.password.focus();
		return false;
	}

}

function NewFriend() {

	if(document.f1.FriendName.value=="")
	{
		alert('Escribe el nombre de tu amigo por favor!');
		document.f1.FriendName.focus();
		return false;
	}

	if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.f1.FriendEmail.value))
	{
		alert('Correo incorrecto, escribelo otra vez.');
		document.f1.FriendEmail.value="";
		document.f1.FriendEmail.focus();
		return false;
	}

}

function cdel(n, e) {

	if(confirm('Estas seguro que lo quieres borrar '+n+' ( '+e+' ) ?'))
	{
		return true;
	}
	else
	{
		return false;
	}

}


function SelectAddress(url) {

	window.open(url, 'MyWin', 'top=1, height=250, width=550');

}

function CheckSend() {

	if(document.send1.SendToName.value=="")
	{
		alert("Escribe el nombre por favor!");
		document.send1.SendToName.focus();
		return false;
	}

	if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.send1.SendToEmail.value))
	{
		alert('Escribe el correo por favor!');
		document.send1.SendToEmail.value="";
		document.send1.SendToEmail.focus();
		return false;
	}

}