function validar_rut(e) { // 1
    tecla = (document.all) ? e.keyCode : e.which; // 2
    
	if (tecla==8) return true; // 3
    patron =/[-0-9Kk\t\s]/; // 4
    te = String.fromCharCode(tecla); // 5
	
    return patron.test(te); // 6
} 
function validar_usuario(e) { // 1
    tecla = (document.all) ? e.keyCode : e.which; // 2
    if (tecla==8) return true; // 3
    patron =/[-0-9A-Za-z\s]/; // 4
    te = String.fromCharCode(tecla); // 5
    return patron.test(te); // 6
} 
