hs.graphicsDir = 'https://www.premieronline.com/js/highslide/graphics/'; $.fn.extend({ animateCss: function(animationName, callback) { var animationEnd = (function(el) { var animations = { animation: 'animationend', OAnimation: 'oAnimationEnd', MozAnimation: 'mozAnimationEnd', WebkitAnimation: 'webkitAnimationEnd', }; for (var t in animations) { if (el.style[t] !== undefined) { return animations[t]; } } })(document.createElement('div')); this.addClass('animated ' + animationName).one(animationEnd, function() { $(this).removeClass('animated ' + animationName); if (typeof callback === 'function') callback(); }); return this; }, }); $.fn.isVisible = function() { // Am I visible? // Height and Width are not explicitly necessary in visibility detection, the bottom, right, top and left are the // essential checks. If an image is 0x0, it is technically not visible, so it should not be marked as such. // That is why either width or height have to be > 0. var rect = this[0].getBoundingClientRect(); return ( (rect.height > 0 || rect.width > 0) && rect.bottom >= 0 && rect.right >= 0 && rect.top <= (window.innerHeight || document.documentElement.clientHeight) && rect.left <= (window.innerWidth || document.documentElement.clientWidth) ); }; function GetXmlHttpObject(handler) { var objXmlHttp=null; objXmlHttp=new XMLHttpRequest(); objXmlHttp.onreadystatechange=handler; return objXmlHttp; } var xmlHttp /*@cc_on @*/ /*@if (@_jscript_version >= 5) try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP") } catch (e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP") } catch (E) { xmlHttp=false } } @else xmlHttp=false @end @*/ if (!xmlHttp) { try { xmlHttp = new XMLHttpRequest(); } catch (e) { xmlHttp=false } } function account_reg_other_email() { if(document.getElementById('account_email_info')) document.getElementById('account_email_info').style.display = "none"; if(document.getElementById('account_email')) document.getElementById('account_email').value = ""; if(document.getElementById('account_email')) document.getElementById('account_email').focus(); if(document.getElementById('email_error')) document.getElementById('email_error').style.display = "none"; if(document.getElementById('email')) document.getElementById('email').value = ""; if(document.getElementById('email')) document.getElementById('email').focus(); } function elementBlink(selector) { $(selector).effect('shake'); } function validateAccountEmail(email,return_div) { var xmlMessage = ''; var URL = 'https://www.premieronline.com/include/ajax_functions/ajax_account_email_validation.php?e='+email; xmlHttp.open("POST", URL, false) xmlHttp.setRequestHeader('Content-Type','text/html'); xmlHttp.send(xmlMessage); result = xmlHttp.responseText; if(validate_email(email) == false) { if(document.getElementById('email_error')) document.getElementById('email_error').innerHTML = 'Please enter a valid email address.'; if(document.getElementById('create_profile_submit')) document.getElementById('create_profile_submit').style.display = 'none'; if(document.getElementById('email_error')) document.getElementById('email_error').style.display = ''; } else { if(result > 0) { if(document.getElementById('submit_button')) document.getElementById('submit_button').style.display = 'none'; if(document.getElementById('create_profile_submit')) document.getElementById('create_profile_submit').style.display = 'none'; document.getElementById(return_div).style.display = ""; document.getElementById(return_div).innerHTML = 'Sorry, that email address is already linked to a profile.
Click here to log in using this email address or choose another email.'; } else { document.getElementById(return_div).style.display = 'none'; if(document.getElementById('submit_button')) document.getElementById('submit_button').style.display = ''; if(document.getElementById('email_error')) document.getElementById('email_error').innerHTML = ''; if(document.getElementById('create_profile_submit')) document.getElementById('create_profile_submit').style.display = ''; if(document.getElementById('email_error')) document.getElementById('email_error').style.display = 'none'; } } } function validateAccountNick(nick,return_div) { var xmlMessage = ''; var URL = 'https://www.premieronline.com/include/ajax_functions/ajax_account_nick_validation.php?n='+nick; xmlHttp.open("POST", URL, false) xmlHttp.setRequestHeader('Content-Type','text/html'); xmlHttp.send(xmlMessage); result = xmlHttp.responseText; if(result > 0) { document.getElementById('submit_button').style.display = 'none'; document.getElementById('account_nick_info').style.display = ""; document.getElementById('account_nick_info').innerHTML = 'Sorry, that nick name is already taken.'; } else { document.getElementById('submit_button').style.display = ''; document.getElementById('account_nick_info').style.display = "none"; } } function validate_email(email) { var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; if(reg.test(email) == false) { return false; } } function initialCap(mystring) { var sp = mystring.value.split(' '); var wl=0; var f ,r; var word = new Array(); for (i = 0 ; i < sp.length ; i ++ ) { f = sp[i].substring(0,1).toUpperCase(); r = sp[i].substring(1); word[i] = f+r; } newstring = word.join(' '); mystring.value = newstring; } function firstCap(field) { field.value = field.value.substr(0, 1).toUpperCase() + field.value.substr(1); } function count_left(field, count, max) { document.getElementById('w_count_'+count).innerHTML = max-field.value.length + ' Characters left'; } function limitText(limitField, limitCount, limitNum) { if(limitField.value.length > limitNum) { limitField.value = limitField.value.substring(0, limitNum); } else { limitCount.value = limitNum - limitField.value.length; } } function limitTextArea(id, limitNum) { if(document.getElementById(id).value.length > limitNum) { document.getElementById(id).value = document.getElementById(id).value.substring(0, limitNum); } } function bookmark(){ var title = 'Premier Online'; var url = 'https://www.premieronline.com'; if (document.all) window.external.AddFavorite(url, title); else if (window.sidebar) window.sidebar.addPanel(title, url, "") else if (window.sidebar&&window.sidebar.addPanel) window.sidebar.addPanel(title,url,""); } function disciplines3Members2Check() { } function wordcount(area,maxwords) { var words = area.value.split(/\s/); cnt = words.length; var ele = document.getElementById('w_count'); ele.value = cnt; var words_left = maxwords - cnt; if(words_left < 0) {words_left = 0;} document.getElementById('w_count').innerHTML = words_left + " Words left"; while(cnt > maxwords) { area.value = area.value.substring(0,area.value.length-1); words = area.value.split(/\s/); cnt = words.length; } } function numericVal(obj) { var tam = obj.value.length; var numeric = false; for(var i=0;i= 40 && caracter <= 57) || caracter == 32) numeric = true; else { obj.value=obj.value.substring(0,tam-1); numericVal(obj); } } } function numericValNumbersOnly(obj) { var tam = obj.value.length; var numeric = false; for(var i=0;i= 48 && caracter <= 57) numeric = true; else { obj.value=obj.value.substring(0,tam-1); numericVal(obj); } } } function teamDisVal(obj) { var tam = obj.value.length; var alpha = false; for(var i=0;i= 65 && caracter <= 90) || (caracter >= 97 && caracter <= 122) || caracter == 44) alpha = true; else { obj.value=obj.value.substring(0,tam-1); alphaVal(obj); } } } function numericValHour(obj) { var number = obj.value; if(number > 24) { number = ''; } return number; } function numericValMinute(obj) { var number = obj.value; if(number > 59) { number = ''; } return number; } function numericValSecond(obj) { var number = obj.value; if(number > 59) { number = ''; } return number; } function numericValYear(obj) { var number = obj.value; if(number < 1900) { number = ''; } if(number > 2018) { number = ''; } return number; } function alphaVal(obj) { var tam = obj.value.length; var alpha = false; for(var i=0;i= 65 && caracter <= 90) || (caracter >= 97 && caracter <= 122) || caracter == 32) alpha = true; else { obj.value=obj.value.substring(0,tam-1); alphaVal(obj); } } } function nickVal(obj) { var tam = obj.value.length; var alpha = false; for(var i=0;i= 65 && caracter <= 90) || (caracter >= 97 && caracter <= 122) || (caracter >= 48 && caracter <= 57)) alpha = true; else { obj.value=obj.value.substring(0,tam-1); alphaVal(obj); } } } function getCountryCode(country_id) { var countries = new Array(); countries[1] = '93';countries[2] = '355';countries[3] = '213';countries[4] = '1-684';countries[5] = '376';countries[6] = '244';countries[7] = '1-264';countries[8] = '1-672';countries[9] = '1-268';countries[10] = '54';countries[11] = '374';countries[12] = '297';countries[13] = '247';countries[14] = '61';countries[15] = '43';countries[16] = '994';countries[17] = '1-242';countries[18] = '973';countries[19] = '880';countries[20] = '1-246';countries[21] = '375';countries[22] = '32';countries[23] = '501';countries[24] = '229';countries[25] = '1-441';countries[26] = '975';countries[27] = '591';countries[28] = '387';countries[29] = '267';countries[30] = '55';countries[31] = '1-284';countries[32] = '673';countries[33] = '359';countries[34] = '226';countries[35] = '95';countries[36] = '257';countries[42] = '236';countries[37] = '855';countries[38] = '237';countries[39] = '1';countries[40] = '238';countries[41] = '1-345';countries[43] = '235';countries[44] = '56';countries[45] = '86';countries[47] = '57';countries[48] = '269';countries[49] = '242';countries[50] = '682';countries[51] = '506';countries[52] = '385';countries[53] = '53';countries[54] = '599';countries[55] = '357';countries[56] = '420';countries[57] = '45';countries[58] = '246';countries[59] = '253';countries[60] = '1-767';countries[61] = '1-809';countries[62] = '593';countries[63] = '20';countries[64] = '503';countries[65] = '240';countries[68] = '291';countries[66] = '372';countries[67] = '251';countries[69] = '298';countries[70] = '500';countries[71] = '679';countries[72] = '358';countries[73] = '33';countries[75] = '594';countries[76] = '689';countries[77] = '241';countries[78] = '220';countries[79] = '995';countries[80] = '49';countries[81] = '233';countries[82] = '350';countries[83] = '30';countries[84] = '299';countries[85] = '1-473';countries[86] = '590';countries[87] = '1-671';countries[89] = '502';countries[90] = '224';countries[91] = '245';countries[92] = '592';countries[93] = '509';countries[94] = '504';countries[95] = '852';countries[96] = '36';countries[97] = '354';countries[98] = '91';countries[99] = '62';countries[100] = '98';countries[101] = '964';countries[102] = '353';countries[103] = '39';countries[104] = '225';countries[105] = '1-876';countries[106] = '81';countries[107] = '962';countries[108] = '7';countries[109] = '254';countries[110] = '686';countries[111] = '850';countries[112] = '82';countries[113] = '965';countries[114] = '996';countries[115] = '856';countries[116] = '371';countries[117] = '961';countries[118] = '266';countries[119] = '231';countries[120] = '218';countries[121] = '423';countries[122] = '370';countries[123] = '352';countries[124] = '853';countries[125] = '389';countries[126] = '261';countries[127] = '265';countries[128] = '60';countries[129] = '960';countries[130] = '223';countries[131] = '356';countries[132] = '692';countries[74] = '596';countries[133] = '222';countries[134] = '230';countries[135] = '269';countries[136] = '52';countries[137] = '691';countries[138] = '373';countries[139] = '33';countries[140] = '976';countries[141] = '1-664';countries[142] = '212';countries[143] = '258';countries[144] = '95';countries[145] = '264';countries[146] = '674';countries[147] = '977';countries[148] = '31';countries[149] = '599';countries[150] = '687';countries[151] = '64';countries[152] = '505';countries[153] = '227';countries[154] = '234';countries[155] = '683';countries[156] = '672';countries[158] = '47';countries[159] = '968';countries[160] = '92';countries[161] = '680';countries[233] = '970';countries[163] = '507';countries[164] = '675';countries[165] = '595';countries[166] = '51';countries[167] = '63';countries[168] = '48';countries[169] = '351';countries[170] = '1-787 ';countries[171] = '974';countries[172] = '262';countries[173] = '40';countries[174] = '7';countries[175] = '250';countries[183] = '378';countries[184] = '239';countries[185] = '966';countries[186] = '221';countries[187] = '381';countries[188] = '248';countries[189] = '232';countries[190] = '65';countries[191] = '421';countries[192] = '386';countries[193] = '677';countries[194] = '252';countries[195] = '27';countries[196] = '34';countries[197] = '94';countries[176] = '599';countries[177] = '290';countries[178] = '1-869';countries[179] = '1-758';countries[180] = '599';countries[182] = '1-809';countries[198] = '249';countries[199] = '597';countries[200] = '268';countries[201] = '46';countries[202] = '41';countries[203] = '963';countries[204] = '886';countries[205] = '992';countries[206] = '255';countries[207] = '66';countries[208] = '228';countries[209] = '676';countries[210] = '1-868';countries[211] = '216';countries[212] = '90';countries[213] = '993';countries[214] = '1-649';countries[215] = '688';countries[222] = '1-340';countries[218] = '971';countries[216] = '256';countries[217] = '380';countries[219] = '44';countries[221] = '598';countries[220] = '1';countries[223] = '998';countries[224] = '678';countries[225] = '39';countries[226] = '58';countries[227] = '84';countries[229] = '685';countries[230] = '967';countries[231] = '260';countries[232] = '263'; return "+" + countries[country_id]; } function formHelpPopup(form_id, thename) { fenster = window.open('https://www.premieronline.com/form_help_popup.php?form_id=' + form_id + '&name=' + thename, "", "width=400,height=300,status=no,scrollbars=no,resizable=no"); fenster.focus(); } function formHelpPopup450(form_id, thename) { fenster = window.open('https://www.premieronline.com/form_help_popup.php?form_id=' + form_id + '&name=' + thename, "", "width=400,height=450,status=no,scrollbars=no,resizable=no"); fenster.focus(); } function NewsPicPopup(filename) { fenster = window.open(filename, "", "width=640,height=490,status=no,scrollbars=no,resizable=no"); fenster.focus(); } function registrationFormHelpPopup(field_id) { fenster = window.open("https://www.premieronline.com/include/inc_event_registration/help_popup.php?field_id=" + field_id, "", "width=300,height=200,status=no,scrollbars=no,resizable=no"); fenster.focus(); } function toggle_addressbook_and_form(nr) { if(document.form.addressbook_or_form[0].checked == true) { document.getElementById('submit_new_member_for_addressbook').value = 0; document.getElementById('select_from_addressbook').style.display = 'block'; document.getElementById('form_new_addressbook_entry').style.display = 'none'; } else { document.getElementById('submit_new_member_for_addressbook').value = 1; document.getElementById('select_from_addressbook').style.display = 'none'; document.getElementById('addressbook_select').selectedIndex = 0; document.getElementById('form_new_addressbook_entry').style.display = 'block'; } } function toggle_add_field_def(nr) { if(document.getElementById('def_add_field').style.display == 'none') { document.getElementById('def_add_field').style.display = ''; } else { document.getElementById('def_add_field').style.display = 'none';} } function toggle_input_options(value) { if(value == "Selectbox" || value == "Checkbox" || value == "Radio Buttons") { document.getElementById('def_add_field_input_options').style.display = ''; } else { document.getElementById('def_add_field_input_options').style.display = 'none'; } } function toggle_event_overview() { if(document.getElementById('event_overview_table').style.display == 'none') { document.getElementById('event_overview_table').style.display = ''; document.getElementById('registration_overview_toggle_link').innerHTML= '« Hide Event Registration Overview'; } else { document.getElementById('event_overview_table').style.display = 'none'; document.getElementById('registration_overview_toggle_link').innerHTML= ''; } } function Fadeout(id, geschwindigkeit) { var fps = Math.round(geschwindigkeit / 100); var tmp = 0; for(i = 100; i >= 0; i--) { setTimeout("Fadeout_fade('" + id + "'," + i + ")", (tmp * fps)); tmp++; } } function Fadeout_fade(id, pas) { var thediv = document.getElementById(id).style; if(pas > 0) { thediv.opacity = (pas / 100); thediv.MozOpacity = (pas / 100); thediv.KhtmlOpacity = (pas / 100); thediv.filter = "alpha(opacity=" + pas + ")"; } else { thediv.display = "none"; } } function toggleDivBlock(id) { if(document.getElementById(id).style.display == 'none') { FadeinBlock(id,280); } else { Fadeout(id,280); } } function FadeinBlock(id, geschwindigkeit) { var fps = Math.round(geschwindigkeit / 100); var tmp = 0; for(i = 0; i <= 100; i++) { setTimeout("Fadeint_fadeBlock('" + id + "'," + i + ")", (tmp * fps)); tmp++; } } function Fadeint_fadeBlock(id, pas) { var thediv = document.getElementById(id).style; if(pas > 0) { thediv.opacity = (pas / 100); thediv.MozOpacity = (pas / 100); thediv.KhtmlOpacity = (pas / 100); thediv.filter = "alpha(opacity=" + pas + ")"; } else { thediv.display = "block"; } } function Fadein(id, geschwindigkeit) { var fps = Math.round(geschwindigkeit / 100); var tmp = 0; for(i = 0; i <= 100; i++) { setTimeout("Fadeint_fade('" + id + "'," + i + ")", (tmp * fps)); tmp++; } } function Fadeint_fade(id, pas) { var thediv = document.getElementById(id).style; if(pas > 0) { thediv.opacity = (pas / 100); thediv.MozOpacity = (pas / 100); thediv.KhtmlOpacity = (pas / 100); thediv.filter = "alpha(opacity=" + pas + ")"; } else { thediv.display = "table-row"; } } function FadeinTable(id, geschwindigkeit) { var fps = Math.round(geschwindigkeit / 100); var tmp = 0; for(i = 0; i <= 100; i++) { setTimeout("Fadeint_fadeTable('" + id + "'," + i + ")", (tmp * fps)); tmp++; } } function Fadeint_fadeTable(id, pas) { var thediv = document.getElementById(id).style; if(pas > 0) { thediv.opacity = (pas / 100); thediv.MozOpacity = (pas / 100); thediv.KhtmlOpacity = (pas / 100); thediv.filter = "alpha(opacity=" + pas + ")"; } else { thediv.display = "table"; } } function toggleDiv(id) { if(document.getElementById(id).style.display == 'none') { Fadein(id,280); } else { Fadeout(id,280); } } function toggleDivCalendar(id) { t = 0; while(document.getElementById(id + '_' + t)) { if(document.getElementById(id + '_' + t).style.display == 'none') { $('#' + id + '_' + t).fadeIn('fast'); t = t + 1; document.getElementById('icon_' + id).src = 'https://www.premieronline.com/layout/images/icon_expand.png'; } else { $('#' + id + '_' + t).fadeOut('fast'); t = t + 1; document.getElementById('icon_' + id).src = 'https://www.premieronline.com/layout/images/icon_reduce.png'; } } } function toggleEventRegOther(id) { if(document.getElementById(id)) { if(document.getElementById(id).value == '__Other') { document.getElementById(id + '_other_div').style.display = 'table'; } else { document.getElementById(id + '_other_div').style.display = 'none'; document.getElementById(id + '_other').value = ''; } } } function hideDiv(id) { document.getElementById(id).style.display = 'none'; } function bookingComEmailRequest(event_id, url) { $.get("https://www.premieronline.com/action/booking_com_email_request.php", { event_id: event_id }, function(data){ }); } var typingTimer; var doneTypingInterval = 300; function sgetHelpLiveQuestions() { clearTimeout(typingTimer); if($('#help_question').val) { typingTimer = setTimeout(sgetHelpLiveQuestionsDo, doneTypingInterval); } } function sgetHelpLiveQuestionsDo() { var str = $('#help_question').val(); if(str.length > 1) { $('#help_question').addClass('s_top_searching'); $.get("https://www.premieronline.com/action/help_live_search.php", { q: str }, function(data){ $('#livesearch_help').html(data); if(data) { $('#livesearch_help').css({border: '1px solid #ccc', borderTop: '0'}); $('#livesearch_help').slideDown(); } else { $('#livesearch_help').css({border: '0'}); } $('#help_question').removeClass('s_top_searching'); }); } } function hideResultsHelp() { $('#livesearch_help').slideUp(); } function addQuestionVote(question_id, vote) { xmlMessage = ''; var url = 'https://www.premieronline.com/action/vote_helptext.php?q=' + question_id + '&v=' + vote; xmlHttp.open("POST", url, false); xmlHttp.setRequestHeader('Content-Type','text/html'); xmlHttp.send(xmlMessage); document.getElementById('vote_response' + question_id).style.display = 'none'; document.getElementById('vote_response' + question_id).innerHTML = " Thank you for your feedback!"; Fadein('vote_response' + question_id,450); document.getElementById('vote_selection' + question_id).style.display = 'none'; } function showErrorPopup(title, text, confirm_button) { Fadein('disable_div'); document.getElementById('warning_popup').style.display = 'block'; document.getElementById('warning_title').innerHTML = title; document.getElementById('warning_text').innerHTML = text; document.getElementById('warning_popup_confirm').innerHTML = confirm_button; } function showErrorPopup2(title, text, confirm_button) { Fadein('disable_div'); document.getElementById('warning_popup2').style.display = 'block'; document.getElementById('warning_title2').innerHTML = title; document.getElementById('warning_text2').innerHTML = text; document.getElementById('warning_popup_confirm2').innerHTML = confirm_button; } function performAction(url) { performeDeleteAction(url); hideErrorPopup(); } function performAction2(url) { window.location = url; } function hideErrorPopup() { Fadeout('disable_div'); document.getElementById('warning_popup').style.display = 'none'; } function performeDeleteAction(url) { row = parseURL(url).params.row; $.get(url, function() { $('#tablerow' + row).slideUp('slow'); }); } function hideErrorPopup2() { Fadeout('disable_div'); document.getElementById('warning_popup2').style.display = 'none'; } function parseURL(url) { var a = document.createElement('a'); a.href = url; return { source: url, protocol: a.protocol.replace(':',''), host: a.hostname, port: a.port, query: a.search, params: (function(){ var ret = {}, seg = a.search.replace(/^\?/,'').split('&'), len = seg.length, i = 0, s; for (;i'); $.get("https://www.premieronline.com/action/comm.php", { id:id, value:value }, function(data){ $('#' + id).show(); $('#loading_' + id).html(''); console.log(data); }); } function updateCommCountry() { country_id = $('#comm_country').val(); $('#loading_country').html(''); $.get("https://www.premieronline.com/action/comm_country.php", { country_id:country_id }, function(data){ $('#loading_country').html('Updated!'); }); } function valCreditTopUp() { var a = $('#amount').val(); $.get("https://www.premieronline.com/action/val_credit_topup.php", { a:a }, function(data){ $('#amount_val_ret').html(data); }); } function userRegCatChangeDialog(reg_id) { $("#change_cat").dialog({ width: 750, height: 450, show: { duration: 200, effect: 'fade' }, hide: { duration: 200, effect: 'fade' }, }); $(".ui-dialog-titlebar").hide(); } function confirmUserRegCatChange() { cat_id = $("input[name='reg_category']:checked").val(); reg_id = $("#reg_id").val(); if(cat_id > 0) { $.get("https://www.premieronline.com/action/cat_change_ind.php", { cat_id:cat_id, reg_id:reg_id }, function(data){ var data_split = data.split("@@@"); if(data_split[0] == '1') { $('#cat_change_tr').hide(); $('#change_cat').dialog('close'); $('#cat_change_bib').html(data_split[1]); $('#cat_change_bib_dig').html(data_split[1]); $('#cat_change_cat').html(data_split[2]); $('#cat_change_fee').html(data_split[3]); $('#cat_changed_confirmation').fadeIn(); } else { $('#conf_user_msg').html(data); } }); } else { $('#conf_user_msg').html('Please select a category first.'); } } function addDiscountCode() { $('#disable_div').show(); $('#please_wait').show(); c = $('#discountcode').val(); $('#dc_error').hide(); $.get("https://www.premieronline.com/action/discount_code.php", { c:c }, function(data) { var data_split = data.split("@@@"); if(data_split[0] == '1') { window.location = window.location.href.split("?")[0]; } else { $('#disable_div').hide(); $('#please_wait').hide(); $('#discount_code_response').addClass('info_message_err'); $('#discount_code_response').fadeIn(); $('#discount_code_response').html(data_split[1]); } }); } function regTypeSeleect(type) { $('#sel_' + type).click(); $('#retypesel_img_ind').removeClass('regtypesel_selected'); $('#retypesel_img_team').removeClass('regtypesel_selected'); $('#retypesel_img_bulk').removeClass('regtypesel_selected'); $('#retypesel_info_ind').hide(); $('#retypesel_info_team').hide(); $('#retypesel_info_bulk').hide(); $('#retypesel_info_' + type).show(); $('#retypesel_img_' + type).addClass('regtypesel_selected'); $('#reg_form').submit(); } function myselfOrAB(type) { $('.sel_' + type).click(); $('#reg_form').submit(); } function bulkRegAbAutocomplete(value, n) { if(value.length > 0) { $.get("https://www.premieronline.com/action/bulk_autocomplete.php", { value:value }, function(data){ $('#ac').html(data); if(data != '') { $('#ac').css('display','table'); } }); } else { $('#ac').slideUp('fast'); } } function addBulkFromAB() { ab_id = $('#bulk_sel_from_ab').val(); clearInterval(saveBulkIntervalID); window.location.href = "https://www.premieronline.com/action/bulk_autocomplete.php?apply=1&ab_id=" + ab_id; } function showReplTeamMembForm(reg_id, ab_id_current, tm_id_current) { $('#tm_id').val(tm_id_current); $.get("https://www.premieronline.com/action/replace_team_member_input.php", { reg_id:reg_id, ab_id_current:ab_id_current, tm_id_current:tm_id_current }, function(data){ var sp = data.split('@@@'); $('#repl_tm_current').html(sp[0]); $('#repl_tm_select').html(sp[1]); }); $("#repl_team_member").dialog({ width: 510, height: 200, show: { duration: 200, effect: 'fade' }, hide: { duration: 200, effect: 'fade' }, }); $(".ui-dialog-titlebar").hide(); } function replTeamMemb(id, h) { var ab_id = $('#new_ab_id').val(); var tm_id = $('#tm_id').val(); if(ab_id == 0) { $('#conf_user_msg').html('Please select a new team member first.').slideDown('fast'); } else { $.post("https://www.premieronline.com/action/replace_team_member_action.php", { ab_id: ab_id, tm_id: tm_id }, function(data){ //console.log(data); window.location.href = "https://www.premieronline.com/transactions_details.php?id=" + id + "&h=" + h + "&repl=1"; }); } } function teamRegDisMemberToggle() { if($('#addressbook_select option:selected').text() != '-- Please select --') { $('#current_name').html($('#addressbook_select option:selected').text()); $('#dis_sel').slideDown(); } else { $('#dis_sel').slideUp(); } } function regCatSel(id) { $('#reg_cat_input').val(id); $('.confirmation_ok').css('background',"url('https://www.premieronline.com/layout/images/icon_catsel_0.png') #DDF5E2 no-repeat left top"); $('#cat_sel_' + id).css('background',"url('https://www.premieronline.com/layout/images/icon_catsel_1.png') #DDF5E2 no-repeat left top"); } function createProfileEmailValPopup() { email = $('#email').val(); var re = /\S+@\S+\.\S+/; if (re.test(email)) { $('#first_name').blur(); $('#last_name').blur(); $('#email').blur(); $('.create_profile_email_confirm_email').html(email); $('#create_profile_email_confirm').show('drop'); } } function createProfileEmailConfirm() { $('#first_name').focus(); $('.create_profile_email_confirm_email').html(''); $('#create_profile_email_confirm').hide('drop'); } function createProfileEmailEdit() { $('#create_profile_email_confirm').slideUp(); $('#email').val('').focus(); } function createProfileEmailCheck() { email = $('#email').val(); $.get("https://www.premieronline.com/action/create_profile_email_check.php", { email: email }, function(data){ console.log(data); var data_split = data.split("@@@"); if(data_split[0] == '') { createProfileEmailValPopup(); } if(data_split[0] == 'Active' || data_split[0] == 'Deleted' || data_split[0] == 'Inactive') { createProfileAlreadyRegisteredPopup(data_split[1], data_split[0]); $('#email_welcome_back').val(email); $('#password_welcome_back').focus(); } }); } function createProfileAlreadyRegisteredPopup(first_name, status) { $('#create_profile_first_name').html(first_name); if(status == 'Active') { $('#create_profile_login_text').html('Please login here:'); } if(status == 'Inactive' || status == 'Deleted') { $('#create_profile_login_text').html('Reactivate your account here:'); } $('#create_profile_intro').hide(); $('#create_profile_form').hide(); $('#val_msg').hide(); $('#create_profile_already_registered').show('drop'); } function pad(n) { return (n < 10) ? ("0" + n) : n; } function cancelDOBPick() { day = ''; month = ''; year = ''; $('#pick_day').hide('drop'); $('#pick_month').hide('drop'); $('#pick_year').hide('drop'); $('#dob').val(''); } function datePick() { day = ''; month = ''; year = ''; $('#dob').val(''); $('#pick_day').show('drop'); $('#pick_month').hide(); $('#pick_year').hide(); } function dayPick(i) { day = i; $('#pick_day').hide('drop'); $('#pick_month').show('drop'); if(day == 31) { $('#month_box_2').hide(); $('#month_box_4').hide(); $('#month_box_6').hide(); $('#month_box_9').hide(); $('#month_box_11').hide(); } else { $('#month_box_2').show(); $('#month_box_4').show(); $('#month_box_6').show(); $('#month_box_9').show(); $('#month_box_11').show(); } } function monthPick(i) { month = i; $('#pick_month').hide('drop'); $('#pick_year').show('drop'); } function yearPick(i) { year = i; $('#pick_year').hide('drop'); $('#dob').val(pad(day) + '.' + pad(month) + '.' + year); } function toggleCitySelectText() { if($('#country_id').val() == '218') { $('#city_text').hide(); $('#city_select').show(); } else { $('#city_text').show(); $('#city_select').hide(); } } function fixUAENumber(n) { nr = $(n).val(); nr = nr.replace('+', ""); nr = nr.replace(/\s/g,""); if(nr.substring(0, 3) == 971 && nr.substring(3, 4)) { nr = nr.replace('9710', '971'); } if(nr.substring(1, 4) == 971 && nr.substring(4, 5)) { nr = nr.replace('9710', '971'); } if(nr.length == 12) { code = nr.substring(0, 3); if(code == 971) { nr_format = '+' + nr.substring(0, 3) + ' ' + nr.substring(3, 5) + ' ' + nr.substring(5, 8) + ' ' + nr.substring(8, 12); $(n).val(nr_format); } } } function changeQtyCheckout(reg_id, extra_id) { qty = $('#extra_' + reg_id + '_' + extra_id).val(); if(qty == 0) { action_url = 'https://www.premieronline.com/action/change_qty_checkout.php?reg_id=' + reg_id+ '&extra_id=' + extra_id + 'qty=0'; showErrorPopup2('Are you sure?','Do you really want to remove this item?','Remove'); } else { $.get("https://www.premieronline.com/action/change_qty_checkout.php", { reg_id: reg_id, extra_id: extra_id, qty: qty }, function(data){ window.location.reload(); }); } } function edToggle(e) { $('.ep_element').hide(); $('.button-pill').removeClass('active'); $('.btn_' + e).addClass('active'); $('.ep_' + e).show(); } function favEvent(event_id) { $.get("https://www.premieronline.com/action/fav_event.php", { id: event_id, action: 'fav' }, function(data){ $('#favbtn').hide().html(' Show my Favorites').fadeIn(); }); } function addCancelationCoverage(mode, event_id) { $.get("https://www.premieronline.com/action/add_cancelation_coverage.php", { mode: mode }, function(data){ window.location.href = "https://www.premieronline.com/register_event.php?id=" + event_id; }); } function addCancelationCoverageExtra(mode, event_id, item) { $.get("https://www.premieronline.com/action/add_cancelation_coverage_extra.php", { mode: mode, item: item }, function(data){ window.location.href = "https://www.premieronline.com/register_event.php?id=" + event_id; }); } function invalidNrLog(t, n) { $.get("https://www.premieronline.com/action/invalid_nr_log.php", { t:t, n:n }, function(data){ }); } function rateOnlineReg(payment_id) { var attr = $('#rate_online_reg_process').attr('data-attribute'); var val = $('#rating-' + attr).val(); if(val !== '') { $.get("https://www.premieronline.com/action/rate_online_reg_process.php", { payment_id:payment_id, val:val }, function(data){ console.log(data); $('#rate_online_reg_process_div').hide(); $('#rate_online_reg_process_confirmation').fadeIn('slow'); }); } } function upsTrack(code) { $.get("https://www.premieronline.com/action/ups_track.php", { code: code }, function(data){ $('#upstrack').html(data); }); }