function validarEntero(valor){ 
      //intento convertir a entero. 
     //si era un entero no le afecta, si no lo era lo intenta convertir 
     valor = parseInt(valor) 

      //Compruebo si es un valor numérico 
      if (isNaN(valor)) { 
            //entonces (no es numero) devuelvo el valor cadena vacia 
            return "" 
      }else{ 
            //En caso contrario (Si era un número) devuelvo el valor 
            return valor 
      } 
} 
function CheckRegisterFormR(renew) {

        if (renew.Name.value == "" ) {
            alert( "Please insert your name." );
            renew.Name.focus();
            return false;
        }


		 checkEmail = renew.Email.value;
	    if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.'))) {
	        alert("The Email is not correct.");
	        renew.Email.focus();
	        return false;
	    }

       /* if (renew.id.value == "" ) {
            alert( "Please insert your Order ID number." );
            renew.id.focus();
            return false;
        }
		*/
		
		order = document.renew.order.value
		order = validarEntero(order)
		document.renew.id.value=order
		if (order == ""){
			alert("You need enter the Orden ID .")
			renew.order.focus();
			return false;
		}


}



function CheckRegisterFormT(tell) {


        if (tell.nombre.value == "" ) {
            alert( "Please insert your name." );
            tell.nombre.focus();
            return false;
        }


		 checkEmail = tell.Email.value;
	    if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.'))) {
	        alert("The Email is not correct.");
	        tell.Email.focus();
	        return false;
	    }

        if (tell.nombre1.value == "" ) {
            alert( "Please insert your friend name." );
            tell.nombre1.focus();
            return false;
        }


		 checkEmail = tell.Email1.value;
	    if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.'))) {
	        alert("The Email is not correct.");
	        tell.Email1.focus();
	        return false;
	    }

		
}