= isFeaturesJSP ? $('select[name=months1] option:selected').val() : $('.premiumColumnSelect option:selected').val(); var m; var t = '' + parseInt(v) var r = $(obj).closest('form').find('input[name^=payment]:checked'); var sel = r.attr('id'); if (sel.indexOf('ecomm_visa') == 0) { m = 'ecomm_visa'; } if (sel.indexOf('ecomm_mc') == 0) { m = 'ecomm_mc'; } if (sel.indexOf('boleto') == 0) { m = 'boleto'; } if (sel.indexOf('_tef') == 0) { m = '_tef'; } processPayment(e, m, t); return false; } function processPaymentOption(obj, e) { var r = $(obj).closest('form').find('input[name^=payment]:checked'); var sel = r.attr('id'); var m; var t; if (sel && sel.indexOf('ecomm_visa') == 0) { m = 'ecomm_visa'; t = '' + parseInt(sel.substring(m.length)) } if (sel && sel.indexOf('ecomm_mc') == 0) { m = 'ecomm_mc'; t = '' + parseInt(sel.substring(m.length)) } if (sel && sel.indexOf('boleto') == 0) { m = 'boleto'; t = '' + parseInt(sel.substring(m.length)) } if (sel && sel.indexOf('_tef') == 0) { m = '_tef'; t = '' + parseInt(sel.substring(m.length)) } processPayment(e, m, t); return false; } function processPaymentSelect4Sync(obj, e) { var planID = $('.premiumColumnSelect option:selected').val() var paymentData = new Array(); paymentData = $(obj).closest('form').find('input[name^=payment4Sync]:hidden').attr('name').split('.') paymentData.length ? processPayment(e, paymentData[1], paymentData[2], planID) : { } } var AFPaymentMethod //could be defined in '.../4shared/src/main/webapp/features.jsp' function processPayment(e, m, t, p) { if (typeof p == 'undefined') { p = '107'; } if (m && m.indexOf('ecomm_visa') == 0) { showGCPage(e, 'ecomm_visa', t, p, 'Visa'); AFPaymentMethod == undefined ? { } : AFPaymentMethod.hide() return; } if (m && m.indexOf('ecomm_mc') == 0) { showGCPage(e, 'ecomm_mc', t, p, 'MasterCard'); AFPaymentMethod == undefined ? { } : AFPaymentMethod.hide() return; } if (m && m.indexOf('boleto') == 0) { showBoletoPage(e, 'boleto', t, p, 'Boleto Bancario'); AFPaymentMethod == undefined ? { } : AFPaymentMethod.hide() return; } if (m && m.indexOf('_tef') == 0) { showBoletoPage(e, '_tef', t, p, 'Transferencia Bancaria'); AFPaymentMethod == undefined ? { } : AFPaymentMethod.hide() return; } showResellersPage(); } function showBoletoPage(e, m, t){ Authenticate.showPopup({postAuthenticateParams : {eventName : "getPaymentInfoAndRedirect", params : {m:m, t:t}}}); } showVisaPage = showAEPage = showMCPage = showJCBPage = showMBPage = function(e, m, t, p, pm) { showGCPage(e, m, t, p, pm); }; // ugly crutch to show div instead of popup var showGcPageForLoggedInUser = showGcFrame function showGCPage(e, m, t, p, pm){ Authenticate.showPopup({postAuthenticateParams : {eventName : "showGcPageForLoggedInUser", params : {m:m, t:t, pm:pm}}}); } function getPaymentLogo(m){ var logo = '' if(m == 'ecomm_visa') logo = 'http://static.4shared.com/images/purchase/visa.png?ver=3977149087' else if(m == 'ecomm_ae') logo = 'http://static.4shared.com/images/purchase/amex.png?ver=4043761290' else if(m == 'ecomm_mc') logo = 'http://static.4shared.com/images/purchase/master.png?ver=2741020356' else logo = 'https://eu.gcsip.nl/hpp/externals/pl/' + (m.slice(0, 2) == 'gc' ? m : 'logo_' + m) + '.gif' return logo } function showGcDiv(m, t, pm) { var term = '', price = '' if (t == 1) { term = '1 Month' price = formatDollarsAndCents(calculateValueAfterDiscount(9.95)) + ' USD' } else if (t == 3) { term = '3 Months' price = formatDollarsAndCents(calculateValueAfterDiscount(23.95)) + ' USD' } else if (t == 6) { term = '6 Months' price = formatDollarsAndCents(calculateValueAfterDiscount(42.95)) + ' USD' } else if (t == 12) { term = '12 Months' price = formatDollarsAndCents(calculateValueAfterDiscount(77.95)) + ' USD' } // to be defined elsewhere showGcDivImpl(m, t, pm, getPaymentLogo(m), term, price) } function showGcFrame(m, t, pm){ var logo4s =''; var term = t == 1 ? '1