 // Con esto sustituimos cualquier funcion del body onload

String.prototype.trim = function() {
	a = this.replace(/^\s+/, '');
	return a.replace(/\s+$/, '');
	};
	
function iSubmitEnter(oEvento, campo,oFormulario, accio){
    var iAscii;
	
	if (oEvento.keyCode)
        iAscii = oEvento.keyCode;
    else if (oEvento.which)
        iAscii = oEvento.which;
    else
        return false;
        
    if (iAscii == 13) {
		campo.value = campo.value.toUpperCase(); 
		campo.value = campo.value.trim();
		if (accio.trim() != ''){
			oFormulario.action = accio;
		}
		oFormulario.submit();
	}

    return true;
}
function esEntero (s)
{   
	var r = parseInt(s,10);
	if (isNaN(r)) return false;
	else return true;
}
function validar_edadnin(campo) {
	if (campo.value.trim().length > 0) {
		campo_anterior = campo;
		if (!esEntero(campo.value)) {
			alert("Edad del niņo entre 0 - 12");
			campo.value = "";
			window.focus();
			campo.focus();
		} else {
			var s = "" + parseInt(campo.value,10);
			campo.value=s.replace(/\./, ",");	
		}
	}
}
