1Number.prototype.formatMoney = function(c, d, t){ 2var n = this, 3 c = isNaN(c = Math.abs(c)) ? 2 : c, 4 d = d == undefined ? "." : d, 5 t = t == undefined ? "," : t, 6 s = n < 0 ? "-" : "", 7 i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + "", 8 j = (j = i.length) > 3 ? j % 3 : 0; 9 return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : ""); 10 }; 11 12 13function numValidate(strid) { 14 var output = document.getElementById(strid).value; 15 output = output.replace(/\,/g,''); 16 output = output.replace(/%/g,''); 17 output = output.replace(/mm/g,''); 18 output = output.replace(/\$/g,''); 19 20 if (isNumber(output)) { 21 document.getElementById(strid).value = output; 22 } 23 else { 24 document.getElementById(strid).value = ''; 25 } 26} 27 28function isNumber(n) { 29 return !isNaN(parseFloat(n)) && isFinite(n); 30} 31 32function formatString(strid) { 33 var output = document.getElementById(strid).value; 34 output = output.trim(); 35 document.getElementById(strid).value = output; 36} 37 38function toggle_visibility(id) { 39 var e = document.getElementById(id); 40 var a = "a" + id; 41 if(e.style.display == 'block'){ 42 e.style.display = 'none'; 43 document.getElementById(a).innerHTML = '<input type="button" value="Show" class="btn btn-xs btn-primary" style="font-size: xx-small;">'; 44 } 45 else { 46 e.style.display = 'block'; 47 document.getElementById(a).innerHTML = '<input type="button" value="Hide" class="btn btn-xs btn-warning" style="font-size: xx-small;">'; 48 } 49} 50 51function Start_Over(){ 52 window.location = window.location.href.split("?")[0]; 53} 54 55function formClose() { 56 window.close(); 57} 58 59// The function actually applying the offset 60function offsetAnchor() { 61 if(location.hash.length !== 0) { 62 window.scrollTo(window.scrollX, window.scrollY - 70); 63 } 64} 65
66function newPopup(Page, Keys, Vals, H, W, Title) { 67 var unique = new Date().getTime() / 1000; 68 Title = typeof Title !== 'undefined' ? Title : 'popuppage' + unique; 69 var intLeft = (screen.width/2)-(W/2); 70 var intTop = (screen.height/2)-(H/2); 71 var strString = Page; 72 if (Keys.length > 0) { 73 for (var i=0; i < Keys.length; i++) { 74 if (i == 0) { 75 strString += "?" + Keys[i] + "=" + encodeURIComponent(Vals[i]); 76 } 77 else { 78 strString += "&" + Keys[i] + "=" + encodeURIComponent(Vals[i]); 79 } 80 } 81 } 82 window.open(strString, Title, 'width=' + W + ', toolbar=1, resizable=1, scrollbars=yes, height=' + H + ', top=' + intTop + ', left=' + intLeft + ''); 83} 84 85function ValidateFields(Fields, Mat) { 86 Mat = Mat || 0; 87 var Val; 88 for (i = 0; i < Fields.length; i++) { 89 Val = Fields[i][0]; 90 if (document.getElementById(Val).value == null || document.getElementById(Val).value == "") { 91 if (Fields[i][1] != "" ) { 92 (Mat ? Materialize.toast('<span style="">' + Fields[i][1] + '</span>', 3000, 'red darken-2') : alert(Fields[i][1])); 93 } 94 console.log(Val + " failed field validation"); 95 return false; 96 } 97 } 98 return true; 99} 100 101function DisplayPhone(Phone, id) { 102 Phone = Phone.split("(").join(""); 103 Phone = Phone.split(")").join(""); 104 Phone = Phone.split("-").join(""); 105 Phone = Phone.split(" ").join(""); 106 Phone = Phone.split("_").join(""); 107 Phone = Phone.split(".").join(""); 108 Phone = Phone.split("/").join(""); 109 var inp = document.getElementById(id); 110 var arr = Array.from(Phone); 111 var len = arr.length; 112 var output = ''; 113 if (len > 10) { len = 10; } 114 for (var i = 0; i < len; i++) { 115 if (i == 0) { output = output + "("; } 116 if (i == 3) { output = output + ") "; } 117 if (i == 6) { output = output + "-"; } 118 output = output + arr[i]; 119 } 120 inp.value = output; 121} 122 123function AddQuickLink(ID, URL, UserID) { 124 URL = encodeURIComponent(URL); 125 var strData = encodeURI("https://illinoiselectiondata.com/ajax/addquicklink.php?UserID=" + UserID + '&URL=' + URL + '&Name=' + document.title); 126 $.get(strData, function(data, status){ 127 //data = JSON.parse(data); 128 }); 129 document.getElementById(ID).onclick = ""; 130 document.getElementById(ID).innerHTML = '<img src="https://illinoiselectiondata.com/images/Star_Gold.png" height="13" width="13">'; 131} 132 133function make_base_auth(user, password) { 134 var tok = user + ':' + password; 135 var hash = btoa(tok); 136 return 'Basic ' + hash; 137} 138 139function GoToTop() { 140 window.scrollTo(0,0); 141} 142 143function OpenPDF(landscape = 0) { 144 var strURL = 'http://illinoiselectiondata.com/genpdf.php?landscape=' + landscape + '&url=' + encodeURIComponent(document.URL); 145 window.open(strURL, '_blank'); 146} 147 148function SpanColorSizeWeight(String, Color = "", Size = "", Weight = "") { 149 var Style = ""; 150 if (Color != "") { Style += "color: " + Color + ";"; } 151 if (Size != "") { Style += "font-size: " + Size + "px;"; } 152 if (Weight != "") { Style += "font-weight: " + Weight + ";"; } 153 var Output = '<span style="' + Style + '">' + String + '</span>'; 154 return Output; 155}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.