﻿<!--
function Convertir(objeto) {
var index;
var tmpStr;
var tmpChar;
var preString;
var postString;
var strlen;
tmpStr = objeto.value.toLowerCase();
strLen = tmpStr.length;
if (strLen > 0)
{
for (index = 0; index < strLen; index++)
{
if (index == 0)
{
tmpChar = tmpStr.substring(0,1).toUpperCase();
postString = tmpStr.substring(1,strLen);
tmpStr = tmpChar + postString;
}
else
{
tmpChar = tmpStr.substring(index, index+1);
if (tmpChar == " " && index < (strLen-1))
{
tmpChar = tmpStr.substring(index+1, index+2).toUpperCase();
preString = tmpStr.substring(0, index+1);
postString = tmpStr.substring(index+2,strLen);
tmpStr = preString + tmpChar + postString;
}
}
}
}
objeto.value = tmpStr;
}
function Validar(form)
{
if (form.nombre.value == "" || form.nombre.value == "escribe tu nombre aquí") {
alert("Olvidaste ingresar tu nombre"); form.nombre.focus(); return (false);
}
if (form.apellido.value == "" || form.apellido.value == "escribe tu apellido aquí") {
alert("Olvidaste ingresar tus apellidos"); form.apellido.focus(); return (false);
}
if (form.email.value == "" || form.email.value == "escribe tu e-mail aquí") {
alert("Olvidaste ingresar tu e-mail"); form.email.focus(); return (false);
}
if (form.email.value.indexOf('@', 0) == -1 || form.email.value.indexOf('.', 0) == -1) {
alert("Haz introducido una dirección de e-mail inválida"); form.email.focus(); return (false);
}
if (form.pais.value == "") {
alert("Olvidaste ingresar tu país"); form.pais.focus(); return (false);
}
if (form.code.value == "" || form.code.value == "escribe el código de la imagen aquí") {
alert("Olvidaste ingresar el código de la imagen."); form.code.focus(); return (false);
}
return (true);
}
//-->


