1$.validator.addMethod("alpha_numericRegex", function (value, element) { 2 return this.optional(element) || /^[a-z0-9\-]+$/i.test(value); 3}); 4 5//Jackpot Start 6function getJackpotTotal() { 7 var strAnn = 29451147; 8 9 $("#progressivejackpot").html(strAnn); 10 $('#progressivejackpot').countTo({ 11 format: 'money', 12 from: strAnn, 13 to: 999999999.99, 14 speed: 100000000, 15 refresh_interval: 0.0002, 16 on_complete: function (value) { 17 $(this).hide().fadeIn(1000); 18 } 19 }); 20} 21 22(function ($) { 23 $.fn.countTo = function (options) { 24 options = $.extend({}, $.fn.countTo.defaults, options || {}); 25 var loops = Math.ceil(options.speed / options.refresh_interval), 26 increment = (options.to - options.from) / loops; 27 return $(this).each(function () { 28 var _this = this, 29 loop_count = 0, 30 value = options.from, 31 interval = setInterval(update_timer, options.refresh_interval); 32 function update_timer() { 33 value += increment; 34 loop_count++; 35 if (options.format == 'money') { 36 $(_this).html('¥ ' + number_with_commas(value.toFixed(options.decimals))); 37 } else { 38 $(_this).html(value.toFixed(options.decimals)); 39 } 40 if (typeof (options.on_update) == 'function') { 41 options.on_update.call(_this, value); 42 } 43 if (loop_count >= loops) { 44 clearInterval(interval); 45 value = options.to; 46 if (typeof (options.on_complete) == 'function') { 47 options.on_complete.call(_this, value); 48 } 49 } 50 } 51 52 }); 53 }; 54 $.fn.countTo.defaults = { 55 from: 0, 56 to: 100, 57 speed: 1000, 58 refresh_interval: 100, 59 decimals: 2, 60 on_update: null, 61 on_complete: null 62 }; 63})(jQuery); 64 65function number_with_commas(x) { 66 return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); 67} 68//Jackpot End 69 70function comingsoon() { 71 alert("Coming Soon"); 72} 73 74function showErrorMessage(errCode, errMsg) { 75 if (errCode == '99' || errCode == '100012') { 76 alert(errCode + " - " + errMsg); 77 } 78 else { 79 alert(errCode + " - " + errMsg); 80 } 81} 82 83function getAnnouncement() { 84 $.ajax({
85 type: 'POST', 86 url: '/ajaxData/proc_getAnnouncement', 87 cache: false, 88 dataType: 'json', 89 success: function (d) { 90 var ann_content = ""; 91 92 if (d.data == null) 93 return false; 94 if (d.data.length <= 0) 95 return false; 96 97 $.each(d.data, function (i, item) { 98 var content = item.a_content; 99 var start_time = item.start_time_local; 100 101 ann_content += content + " "; 102 }); 103 $("#web_announcement").html(ann_content); 104 105 //var rate = 0.25; 106 //var charNum = $("#web_announcement").text().length; 107 //var duration = charNum * rate; 108 109 //$("#web_announcement").css("animation", "marquee " + duration + "s linear infinite"); 110 } 111 }); 112} 113 114function refreshVCode(s_name, ele_id) { 115 $('#' + ele_id).attr('src', '/ajaxData/proc_captchaCode?s=' + s_name + '&v=' + Math.floor(Math.random() * 100)); 116} 117 118function refreshVCodeWithClassName(s_name, ele_class) { 119 $('.' + ele_class).attr('src', '/ajaxData/proc_captchaCode?s=' + s_name + '&v=' + Math.floor(Math.random() * 100)); 120} 121 122function clearVCodeWithClassName(c_name) { 123 $.ajax({
124 type: 'POST', 125 url: '/ajaxData/proc_captchaCode?c=' + c_name, 126 success: function (d) { 127 console.log("successfully clear " + c_name + " vcode."); 128 } 129 }); 130} 131 132function generateQRCode(elementid, size, x) { 133 $("#" + elementid).css("width", size); 134 $("#" + elementid).css("height", size); 135 $("#" + elementid).css("background-color", "white"); 136 var options = { 137 render: 'image', 138 text: x, 139 size: size, 140 background:"#FFF", 141 ecLevel: 'M', 142 color: '#000', 143 minVersion: 1, 144 quiet: 1, 145 mode: 0 146 }; 147 $("#" + elementid).qrcode(options); 148} 149 150function getUrlParameter(name) { 151 name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]'); 152 var regex = new RegExp('[\\?&]' + name + '=([^&#]*)'); 153 var results = regex.exec(location.search); 154 return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' ')); 155} 156 157function checkAgent() { 158 var ag_code = getUrlParameter("up"); 159 if (ag_code != null && ag_code != "") { 160 //*** obsolete *** 161 //clearCookies("ag"); 162 //setCookies("ag", ag_code, 1); 163 // ************** 164 Cookies.remove('ag'); 165 Cookies.set('ag', ag_code, { expires: 1 }); // expiry value is day 166 } 167} 168 169//COOKIES START 170function setCookies(cookiesname, cookiesvalue, cookieshour) { 171 var date = new Date(); 172 date.setTime(date.getTime() + (cookieshour * 60 * 60 * 1000)); 173 var expires = ";path=/; expires=" + date.toGMTString(); 174 document.cookie = cookiesname + "=" + cookiesvalue + expires; 175} 176 177function clearCookies(cookiesname) { 178 setCookies(cookiesname, "", -1); 179} 180 181 182function getCookie(cookiesname) { 183 var name = cookiesname + "="; 184 var decodedCookie = decodeURIComponent(document.cookie); 185 var ca = decodedCookie.split(';'); 186 for (var i = 0; i < ca.length; i++) { 187 var c = ca[i]; 188 while (c.charAt(0) == ' ') { 189 c = c.substring(1); 190 } 191 if (c.indexOf(name) == 0) { 192 return c.substring(name.length, c.length); 193 } 194 } 195 return null; 196} 197//COOKIES END 198 199function getDateTime() { 200 setInterval('generateDateTime()', 1000); 201} 202 203function generateDateTime() { 204 var dNow = new Date(); 205 206 var weekday = new Array(7); 207 weekday[0] = "Sunday"; 208 weekday[1] = "Monday"; 209 weekday[2] = "Tuesday"; 210 weekday[3] = "Wednesday"; 211 weekday[4] = "Thursday"; 212 weekday[5] = "Friday"; 213 weekday[6] = "Saturday"; 214 215 var m = dNow.getMinutes(); 216 var s = dNow.getSeconds(); 217 218 if (m < 10) { 219 m = "0" + m; 220 } 221 if (s < 10) { 222 s = "0" + s; 223 } 224 var localDate = " " + weekday[dNow.getDay()] + ", " + dNow.getDate() + '/' + (dNow.getMonth() + 1) + '/' + dNow.getFullYear() + ' ' + dNow.getHours() + ':' + m + ':' + s; 225 $('#currentDate').text(localDate); 226} 227 228function clearCookie() { 229 //createCookie('<%= common.cookiesname.WEBSITE_LANGUAGE %>', -1); //remove lang 230 createCookie('view', -1); //remove desktop view 231 createAgent('agentID', -1); //remove agent 232 alert("cookies cleared."); 233 location.reload(); 234} 235 236 237function localeCurrency(value, defCul, ignoreDecimal) { 238 var localeValue; 239 var fractionDigits = "2"; 240 var defCulture = defCul; 241 if (defCulture == null || defCulture == undefined || defCulture == '' || defCulture == 'ja-JP') 242 defCulture = 'en-US'; 243 244 if (ignoreDecimal) { 245 if (isNaN(value)) 246 value = 0; 247 fractionDigits = "0"; 248 } 249 250 if (value && $.isNumeric(value)) { 251 var val; 252 if (typeof (value) == "string") 253 val = parseFloat(value); 254 else 255 val = value; 256 257 localeValue = val.toLocaleString(defCulture, { 258 style: 'decimal', 259 minimumFractionDigits: fractionDigits, 260 maximumFractionDigits: fractionDigits 261 }); 262 } 263 else { 264 var val = 0; 265 localeValue = val.toLocaleString(defCulture, { 266 style: 'decimal', 267 minimumFractionDigits: fractionDigits, 268 maximumFractionDigits: fractionDigits 269 });; 270 } 271 272 return localeValue; 273} 274 275function replaceHTTPS(content) { 276 var protocol = document.location.protocol; 277 if (protocol == "https:") { 278 if (content) { 279 var newContent = content; 280 var n = content.indexOf("http://file"); 281 282 if (n >= 0) { 283 newContent = content.replace(/http:/g, "https:"); 284 return newContent; 285 } 286 return content; 287 } 288 } 289 return content; 290} 291 292function Encrypt(str) {
293 if (!str) str = ""; 294 str = (str == "undefined" || str == "null") ? "" : str; 295 try { 296 var key = 146; 297 var pos = 0; 298 ostr = ''; 299 while (pos < str.length) { 300 ostr = ostr + String.fromCharCode(str.charCodeAt(pos) ^ key); 301 pos += 1; 302 } 303 304 return ostr; 305 } catch (ex) { 306 return ''; 307 } 308} 309 310function Decrypt(str) { 311 if (!str) str = ""; 312 str = (str == "undefined" || str == "null") ? "" : str; 313 try { 314 var key = 146; 315 var pos = 0; 316 ostr = ''; 317 while (pos < str.length) { 318 ostr = ostr + String.fromCharCode(key ^ str.charCodeAt(pos)); 319 pos += 1; 320 } 321 322 return ostr; 323 } catch (ex) { 324 return ''; 325 } 326} 327function bytesToSize(bytes) { 328 var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; 329 if (bytes == 0) return '0 Byte'; 330 var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024))); 331 return (Math.round(bytes / Math.pow(1024, i) * 100) / 100) + ' ' + sizes[i]; 332}; 333 334String.prototype.toDecimalPoint = function (n) { 335 var amt = parseFloat(this); 336 var pow = parseFloat(n); 337 if (!isNaN(amt) && !isNaN(pow)) { // if is number 338 pow = Math.pow(10, n); 339 return (Math.floor(amt * pow) / pow).toFixed(n); 340 } 341 else { 342 amt = 0; 343 return amt.toFixed(n); 344 } 345}; 346 347// Fires the client-side Meta/TikTok pixel event(s) matching a server-side conversion fire, using the 348// same event_id the server sent to Meta CAPI / TikTok Events API so both sides dedupe as one conversion. 349// data: the "data" object of a common3_ajaxResponse whose data.pixelEvents was populated server-side 350// by PixelTracking.FireConversionEvent (e.g. proc_register on successful registration). 351function firePixelEvents(data) { 352 if (!data || !data.pixelEvents || !data.pixelEvents.length) return; 353 354 data.pixelEvents.forEach(function (evt) { 355 try { 356 if (evt.platform === "METAFB" && typeof fbq === "function") { 357 fbq('trackSingle', evt.pixelId, evt.eventName, {}, { eventID: evt.eventId }); 358 } else if (evt.platform === "TIKTOK" && typeof ttq !== "undefined" && ttq.instance) { 359 ttq.instance(evt.pixelId).track(evt.eventName, {}, { event_id: evt.eventId }); 360 } 361 } catch (ex) { 362 console.log("firePixelEvents failed for " + evt.platform + " " + evt.pixelId, ex); 363 } 364 }); 365} 366 367Number.prototype.toDecimalPoint = function (n) { 368 var amt = parseFloat(this); 369 var pow = parseFloat(n); 370 if (!isNaN(amt) && !isNaN(pow)) { // if is number 371 pow = Math.pow(10, n); 372 return (Math.floor(amt * pow) / pow).toFixed(n); 373 } 374 else { 375 amt = 0; 376 return amt.toFixed(n); 377 } 378};
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.