// JavaScript Document /* http://javascriptobfuscator.com/Javascript-Obfuscator.aspx */ // First. main // ... // others // ... // End. readyu var isDOM = (getRef ? true : false); var isIE4 = ((document.all && !isDOM) ? true : false); var isNS4 = (document.layers ? true : false); var isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; var local_url = 'https://'+window.location.host+'/'; var app_url = 'ccctech://'+window.location.host+'/'; var ratio = window.devicePixelRatio || 1; function isIE() { var ua = window.navigator.userAgent; //Check the userAgent property of the window.navigator object var msie = ua.indexOf('MSIE '); // IE 10 or older var trident = ua.indexOf('Trident/'); //IE 11 return (msie > 0 || trident > 0); } var screen = { width : (isIE() ? 1280 : window.screen.width) * ratio, height : (isIE() ? 800 : window.screen.height) * ratio }; var popUpWin=0; var stringStorage = ''; var scripts = document.getElementsByTagName('script'); var myScript = scripts[ scripts.length - 1 ]; var queryString = myScript.src.replace(/^[^\?]+\??/,''); var global_js_params = parseQuery( queryString ); var isMobileWesite = isMobileWebsiteBoo(); var datatable_lang = parseDatatable(); var mm_still, mm_still_close, mm_close_still; var mm_date, mm_init_time; var clock_check_timeout_post; var paypal_img, paypal_img_dis, cards_img, cards_img_dis, fps_img, fps_img_dis; var mspay_img, mspay_img_dis, googlepay_img, googlepay_img_dis, applepay_img, applepay_img_dis; var unionpay_img, unionpay_img_dis, alipay_img, alipay_img_dis, tenpay_img, tenpay_img_dis; var highlight_img; var count_down_clock, count_down_clock_is_pause; var current_add_question_selection = 0; var min_add_question_selection = 2; var max_add_question_selection = 20; var counts = {}; var ddmenuitem = 0; var searchDefaultValue = parseSearchValue(1); var searchNormalDefaultValue = parseSearchValue(0); var normalSearchInputFocusBoo = false; var ajax_getJSON = null; var ticket_row_index_count = 0 ; var profile_img_uploader_is_onClick = false; var headerIsAnimate = false; var MEP_lang = Number(global_js_params.lang); var MEP_spk = global_js_params.spk; var MEP_host_url = 'https://'+window.location.host+'/'; function isMobileWebsiteBoo() { var check = false; //pattern: ismobile = "/iphone|ipod|android|blackberry|opera|mini|windows\sce|palm|smartphone|iemobile/i"; //pattern: istablet = "/ipad|android|android 3.0|xoom|sch-i800|playbook|tablet|kindle/i"; //if((navigator.userAgent||navigator.vendor||window.opera).toLowerCase().match(/ipad|android|android 3.0|xoom|sch-i800|playbook|tablet|kindle/i)){ //alert('istablet'); if((navigator.userAgent||navigator.vendor||window.opera).toLowerCase().match(/iphone|ipod|android|blackberry|opera|mini|windows\sce|palm|smartphone|iemobile/i)){ return true; } return check; } function parseSearchValue(num){ switch(Number(global_js_params.lang)){ default: case 1: switch(num){ default: case 0: return 'Search ...'; break; case 1: return 'Search in Organizer ...'; break; } break; case 2: switch(num){ default: case 0: return '搜尋 ...'; break; case 1: return '搜尋主辦方 ...'; break; } break; case 3: switch(num){ default: case 0: return '搜寻 ...'; break; case 1: return '搜寻主办方 ...'; break; } break; } } function parseDatatable(){ switch(Number(global_js_params.lang)){ default: case 1: return { "search": 'Search:', "paginate": { "first": "First", "last": "Last", "next": "Next", "previous": "Previous" }, "processing": "Loading Data..", "emptyTable": 'No Data / Record Available', "lengthMenu": "Display _MENU_ records per page", "zeroRecords": "Nothing found - sorry", "info": "Showing page _PAGE_ / _PAGES_ (Total: _TOTAL_ Entries)", "infoEmpty": "No records available", "infoFiltered": "(filtered from _MAX_ total records)" }; break; case 2: return { "search": '搜尋:', "paginate": { "first": "首頁", "last": "尾頁", "next": "下一頁", "previous": "上一頁", }, "processing": "讀入數據中..", "emptyTable": '沒有數據 / 記錄可用', "lengthMenu": "每頁顯示 _MENU_ 個記錄", "zeroRecords": "沒有數據 / 記錄可用", "info": "頁數 _PAGE_ / _PAGES_ (合共: _TOTAL_ 項目)", "infoEmpty": "沒有記錄可用", "infoFiltered": "(從合共 _MAX_ 記錄篩選)" }; break; case 3: return { "search": '搜寻:', "paginate": { "first": "首页", "last": "尾页", "next": "下一页", "previous": "上一页", }, "processing": "读入数据中..", "emptyTable": '没有数据 / 记录可用', "lengthMenu": "每页显示 _MENU_ 个记录", "zeroRecords": "没有数据 / 记录可用", "info": "页数 _PAGE_ / _PAGES_ (合共: _TOTAL_ 项目)", "infoEmpty": "没有记录可用", "infoFiltered": "(从合共 _MAX_ 记录筛选)" }; break; } } function parseQuery ( query ) { var Params = new Object (); if ( ! query ) return Params; // return empty object var Pairs = query.split(/[;&]/); for ( var i = 0; i < Pairs.length; i++ ) { var KeyVal = Pairs[i].split('='); if ( ! KeyVal || KeyVal.length != 2 ) continue; var key = unescape( KeyVal[0] ); var val = unescape( KeyVal[1] ); val = val.replace(/\+/g, ' '); Params[key] = val; } return Params; } function getRef(id) { if (isDOM) return document.getElementById(id); if (isIE4) return document.all[id]; if (isNS4) return document.layers[id]; } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(address)){ return true; } return false; } function format_number(text){ return text.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"); }; function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; } function wordCount(str) { var matches = str.match(/[\u00ff-\uffff]|\S+/g); return matches ? matches.length : 0; } // ---------------------------------------- jquery init ------------------------------------------------ // ----- iPhone Switch ------------------------------------------------------------ jQuery.fn.iphoneSwitch = function(template_no, start_state, switched_on_callback, switched_off_callback, options){ var state = start_state == 'on' ? start_state : 'off'; var settings; switch(template_no){ default: settings = { mouse_over:'pointer', mouse_out:'default', switch_on_container_path: local_url+'lib/img/ajax-switch/iphone_switch_container_on.png', switch_off_container_path: local_url+'lib/img/ajax-switch/iphone_switch_container_off.png', switch_path: local_url+'lib/img/ajax-switch/iphone_switch.png', switch_width:86, switch_height:27, switch_off_width:-60 }; break; case 2: settings = { mouse_over:'pointer', mouse_out:'default', switch_on_container_path: local_url+'lib/img/ajax-switch/iphone_switch_gender_container_on.png', switch_off_container_path: local_url+'lib/img/ajax-switch/iphone_switch_gender_container_off.png', switch_path: local_url+'lib/img/ajax-switch/iphone_switch_gender.png', switch_width:148, switch_height:44, switch_off_width:-109 }; break; } if(options){jQuery.extend(settings,options);} return this.each(function(){ var container; var image; container = jQuery('
');image=jQuery(''); jQuery(this).html(jQuery(container).html(jQuery(image))); jQuery(this).mouseover(function(){jQuery(this).css("cursor",settings.mouse_over);}); jQuery(this).mouseout(function(){jQuery(this).css("background",settings.mouse_out);}); jQuery(this).click(function(){ if(state=='on'){ jQuery(this).find('.iphone_switch').animate({backgroundPosition:settings.switch_off_width},"fast",function(){ jQuery(this).attr('src',settings.switch_off_container_path); switched_off_callback(); }); state='off'; } else{ jQuery(this).find('.iphone_switch').animate({backgroundPosition:0},"fast",function(){switched_on_callback();}); jQuery(this).find('.iphone_switch').attr('src',settings.switch_on_container_path); state='on'; } }); // jQuery(this).click }); //#39BEAA }; // ----- END ------------- iPhone Switch ----------------------