This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // a simple js function to validate CPF numbers | |
| function iscpf(c){ | |
| if(!isNaN(c)) | |
| c = ""+c; | |
| var re = /^(\d{1})(\d{1})(\d{1})(\d{1})(\d{1})(\d{1})(\d{1})(\d{1})\d{3}$/.exec(c); | |
| if(!re) | |
| return false; | |
| var i = 2, j = 0, k = 0, g = re[1]; | |
| for(;i<re.length;i++) | |
| if(re[i]!=g) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getStyleClass(className) { | |
| for (var s = 0; s < document.styleSheets.length; s++) { | |
| if(document.styleSheets[s].rules) { | |
| for (var r = 0; r < document.styleSheets[s].rules.length; r++) { | |
| if (document.styleSheets[s].rules[r].selectorText == '.' + className) { | |
| return document.styleSheets[s].rules[r]; | |
| } | |
| } | |
| } else if(document.styleSheets[s].cssRules) { | |
| for (var r = 0; r < document.styleSheets[s].cssRules.length; r++) { |
NewerOlder