forked from hiltonbruce/Igreja
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfuncoes.js
executable file
·63 lines (53 loc) · 1.95 KB
/
funcoes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// JavaScript Document
function lancarSubmenu(n){
window.open("adm/pesq_membro.php?"+n+"","janela1","width=400,height=700,scrollbars=YES,top=100");
}
function lancarRecibo(n){
window.open("tesouraria/pesq_recibo.php?"+n+"","janela1","width=600,height=700,scrollbars=YES,top=100");
}
function formatar(mascara, documento){
var i = documento.value.length;
var saida = mascara.substring(0,1);
var texto = mascara.substring(i);
if (texto.substring(0,1) != saida){
documento.value += texto.substring(0,1);
}
}
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else
countfield.value = maxlimit - field.value.length;
}
var ancho=550;
function progreso_tecla(obj,max) {
var progreso = document.getElementById("progreso");
if (obj.value.length < max) {
progreso.style.backgroundColor = "#C2E6F7";
progreso.style.backgroundImage = "url(img/textarea.png)";
progreso.style.color = "#000000";
var pos = ancho-parseInt((ancho*parseInt(obj.value.length))/max);
progreso.style.backgroundPosition = "-"+pos+"px 0px";
} else {
progreso.style.backgroundColor = "#CC0000";
progreso.style.backgroundImage = "url()";
progreso.style.color = "#FFFFFF";
}
progreso.innerHTML = "("+obj.value.length+" / "+max+")";
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
function PMA_focusInput()
{
var input_username = document.getElementById('cpf');
var input_password = document.getElementById('senha');
if (input_username.value == '') {
input_username.focus();
} else {
input_password.focus();
}
}
window.setTimeout('PMA_focusInput()', 500);