');
ajax_loader_small = new Image();
ajax_loader_small.src = 'https://www.premiumcast.com/images/ajax-loader-small.gif';
var dot_count_94d4eee0d11d = 0;
var dot_interval_94d4eee0d11d = '';
var show_terms_94d4eee0d11d = 1;
var capture_data_94d4eee0d11d = 1; // this is 0 if we are just showing buttons
var do_validation_94d4eee0d11d = 1;
var current_price_token_94d4eee0d11d = '';
var secs_elapsed_94d4eee0d11d = 0;
var price_at_checkout_94d4eee0d11d = 999.99;
var starting_price_94d4eee0d11d = 999.99;
var original_price_94d4eee0d11d = 999.99;
var current_price_94d4eee0d11d = 999.99;
var coupon_price_94d4eee0d11d = 999.99;
var increase_per_sec_94d4eee0d11d = 0;
var max_price_94d4eee0d11d = 0.00;
var charged_price_subtotal_94d4eee0d11d = 999.99;
var handling_fee_94d4eee0d11d = 0.00;
var recurring_handling_fee_94d4eee0d11d = 0.00;
var shipping_fee_94d4eee0d11d = 0;
var tax_percent_94d4eee0d11d = 0;
var taxable_price_94d4eee0d11d = 0;
var tax_94d4eee0d11d = 0;
var valid_coupon_94d4eee0d11d = 0;
var recurring_price_at_checkout_94d4eee0d11d = 999.99;
var recurring_original_price_94d4eee0d11d = 999.99;
var recurring_current_price_94d4eee0d11d = 999.99;
var recurring_coupon_price_94d4eee0d11d = 999.99;
var recurring_price_subtotal_94d4eee0d11d = 999.99;
var recurring_taxable_price_94d4eee0d11d = 0;
var recurring_shipping_fee_94d4eee0d11d = 0;
var recurring_tax_94d4eee0d11d = 0;
var recurring_price_94d4eee0d11d = 999.99;
var add_tax_to_recurring_94d4eee0d11d = 1;
var apply_quantity_to_recurring_94d4eee0d11d = 0;
var u_country_94d4eee0d11d = '';
var u_state_94d4eee0d11d = '';
var u_zip_94d4eee0d11d = '';
var u_quantity_94d4eee0d11d = 1;
var u_recurring_quantity_94d4eee0d11d = 1;
var is_upsell_94d4eee0d11d = 0;
timezone_date_94d4eee0d11d = new Date();
document.form_94d4eee0d11d.u_timezone_js_offset.value = timezone_date_94d4eee0d11d.getTimezoneOffset();
// we want these to show/hide last so that we don't shrink the form prematurely causing a scroll bar for the iframe
process_combined_membership_checkboxes_94d4eee0d11d (document.form_94d4eee0d11d.u_accepted_membership_1,'1');
process_combined_membership_checkboxes_94d4eee0d11d (document.form_94d4eee0d11d.u_accepted_membership_2,'2');
process_combined_membership_checkboxes_94d4eee0d11d (document.form_94d4eee0d11d.u_accepted_membership_3,'3');
function auto_increment_price_94d4eee0d11d() {
if (current_price_token_94d4eee0d11d) {
secs_elapsed_94d4eee0d11d++;
clearInterval(current_price_token_94d4eee0d11d);
}
var new_price = parseFloat(starting_price_94d4eee0d11d) + (parseFloat(increase_per_sec_94d4eee0d11d) * parseFloat(secs_elapsed_94d4eee0d11d));
if (parseFloat(new_price) < parseFloat(max_price_94d4eee0d11d)) {
current_price_94d4eee0d11d = new_price;
current_price_token_94d4eee0d11d = setInterval('auto_increment_price_94d4eee0d11d()',1000);
} else {
current_price_94d4eee0d11d = max_price_94d4eee0d11d;
}
calculate_price_94d4eee0d11d();
}
function set_variables_94d4eee0d11d () {
// set these fields here in case they are not on the form, and also to make code easier to read
// they may not be on the form if type == one_time and we want to show the price and no shipping
u_country_94d4eee0d11d = (document.form_94d4eee0d11d.u_country) ? document.form_94d4eee0d11d.u_country.value : '';
u_state_94d4eee0d11d = (document.form_94d4eee0d11d.u_state) ? document.form_94d4eee0d11d.u_state.value : '';
u_zip_94d4eee0d11d = (document.form_94d4eee0d11d.u_zip) ? document.form_94d4eee0d11d.u_zip.value : '';
u_quantity_94d4eee0d11d = (document.form_94d4eee0d11d.u_quantity) ? document.form_94d4eee0d11d.u_quantity.value : 1;
u_recurring_quantity_94d4eee0d11d = (apply_quantity_to_recurring_94d4eee0d11d) ? u_quantity_94d4eee0d11d : 1;
}
function calculate_price_94d4eee0d11d () {
set_variables_94d4eee0d11d();
// if we have a valid coupon, then override the incremented price. But incrementing should continue in the backgroud
if (parseInt(valid_coupon_94d4eee0d11d) > 0) {
current_price_94d4eee0d11d = coupon_price_94d4eee0d11d;
recurring_current_price_94d4eee0d11d = recurring_coupon_price_94d4eee0d11d;
} else if (!(parseFloat(increase_per_sec_94d4eee0d11d) > 0)) {
// if we aren't incrementing and you remove the coupon, we need to reset to original pricing
current_price_94d4eee0d11d = original_price_94d4eee0d11d;
recurring_current_price_94d4eee0d11d = recurring_original_price_94d4eee0d11d;
}
price_subtotal_94d4eee0d11d = parseFloat(current_price_94d4eee0d11d) * parseFloat(u_quantity_94d4eee0d11d);
recurring_subtotal_94d4eee0d11d = parseFloat(recurring_current_price_94d4eee0d11d) * parseFloat(u_recurring_quantity_94d4eee0d11d);
if (get_id('tax_percent_'+u_state_94d4eee0d11d+'_'+u_country_94d4eee0d11d+'_94d4eee0d11d')) {
tax_percent_94d4eee0d11d = get_id('tax_percent_'+u_state_94d4eee0d11d+'_'+u_country_94d4eee0d11d+'_94d4eee0d11d').value;
tax_94d4eee0d11d = parseFloat(price_subtotal_94d4eee0d11d) * parseFloat(tax_percent_94d4eee0d11d) / 100;
recurring_tax_94d4eee0d11d = parseFloat(recurring_subtotal_94d4eee0d11d) * parseFloat(tax_percent_94d4eee0d11d) / 100;
} else {
tax_94d4eee0d11d = 0;
recurring_tax_94d4eee0d11d = 0;
}
if (get_id('subtotal_at_checkout_94d4eee0d11d')) // make sure it exists in case it is refreshing itself from iframe
get_id('subtotal_at_checkout_94d4eee0d11d').innerHTML = curr(price_subtotal_94d4eee0d11d);
if (get_id('shipping_at_checkout_94d4eee0d11d')) // make sure it exists in case it is refreshing itself from iframe
get_id('shipping_at_checkout_94d4eee0d11d').innerHTML = curr(shipping_fee_94d4eee0d11d);
if (get_id('tax_at_checkout_94d4eee0d11d')) // make sure it exists in case it is refreshing itself from iframe
get_id('tax_at_checkout_94d4eee0d11d').innerHTML = curr(tax_94d4eee0d11d);
price_at_checkout_94d4eee0d11d = parseFloat(price_subtotal_94d4eee0d11d) + parseFloat(shipping_fee_94d4eee0d11d) + parseFloat(curr(tax_94d4eee0d11d));
price_at_checkout_94d4eee0d11d = (parseFloat(increase_per_sec_94d4eee0d11d) > 0
&& parseFloat(current_price_94d4eee0d11d) < parseFloat(max_price_94d4eee0d11d))
&& !parseInt(valid_coupon_94d4eee0d11d)
? price_at_checkout_94d4eee0d11d : curr(price_at_checkout_94d4eee0d11d); // if we are still incrementing per second, don't format the currency
if (get_id('price_at_checkout_94d4eee0d11d')) // make sure it exists in case it is refreshing itself from iframe
get_id('price_at_checkout_94d4eee0d11d').innerHTML = price_at_checkout_94d4eee0d11d;
if (get_id('price_at_checkout_bottom_94d4eee0d11d')) // make sure it exists
get_id('price_at_checkout_bottom_94d4eee0d11d').innerHTML = price_at_checkout_94d4eee0d11d;
recurring_price_94d4eee0d11d = (add_tax_to_recurring_94d4eee0d11d)
? parseFloat(recurring_subtotal_94d4eee0d11d) + parseFloat(recurring_shipping_fee_94d4eee0d11d) + parseFloat(curr(recurring_tax_94d4eee0d11d))
: parseFloat(recurring_subtotal_94d4eee0d11d) + parseFloat(recurring_shipping_fee_94d4eee0d11d);
if (get_id('recurring_price_94d4eee0d11d')) // make sure it exists in case it is refreshing itself from iframe
get_id('recurring_price_94d4eee0d11d').innerHTML = curr(recurring_price_94d4eee0d11d);
}
function get_kunaki_shipping_94d4eee0d11d() {
set_variables_94d4eee0d11d();
if (!((u_country_94d4eee0d11d == 'UNITED STATES' || u_country_94d4eee0d11d == 'CANADA')
&& (u_state_94d4eee0d11d == '' || u_state_94d4eee0d11d == 'N/A'))
&& u_zip_94d4eee0d11d.length >= 4 && u_country_94d4eee0d11d != '') {
document.form_94d4eee0d11d.req.value = 'kunaki_shipping';
document.form_94d4eee0d11d.validate_mode.value = ''
document.form_94d4eee0d11d.target = 'utility_94d4eee0d11d';
document.form_94d4eee0d11d.submit();
} else {
get_id('kunaki_shipping_94d4eee0d11d').innerHTML = get_id('kunaki_shipping_reset_94d4eee0d11d').innerHTML;
calculate_price_94d4eee0d11d();
}
}
function cb_kunaki_shipping_94d4eee0d11d () {
form_validation_status = window.frames["utility_94d4eee0d11d"].get_id('form_validation_status').innerHTML;
if (form_validation_status == '1') {
get_id('kunaki_shipping_94d4eee0d11d').innerHTML = window.frames["utility_94d4eee0d11d"].get_id('shipping_choices').innerHTML;
get_id('error_94d4eee0d11d').innerHTML = '';
} else {
get_id('error_94d4eee0d11d').innerHTML = window.frames["utility_94d4eee0d11d"].get_id('error_message').innerHTML;
document.location.hash = 'error_anchor_94d4eee0d11d';
get_id('kunaki_shipping_94d4eee0d11d').innerHTML = get_id('kunaki_shipping_reset_94d4eee0d11d').innerHTML;
}
calculate_price_94d4eee0d11d();
}
function validate_coupon_94d4eee0d11d() {
document.form_94d4eee0d11d.req.value = 'validate';
document.form_94d4eee0d11d.validate_mode.value = 'coupon_only';
document.form_94d4eee0d11d.target = 'utility_94d4eee0d11d';
document.form_94d4eee0d11d.submit();
}
function cb_validate_coupon_94d4eee0d11d () {
form_validation_status = window.frames["utility_94d4eee0d11d"].get_id('form_validation_status').innerHTML;
valid_coupon_temp_94d4eee0d11d = window.frames["utility_94d4eee0d11d"].get_id('valid_coupon').innerHTML;
valid_coupon_94d4eee0d11d = parseInt(valid_coupon_temp_94d4eee0d11d);
if (form_validation_status == '1' && valid_coupon_94d4eee0d11d == '1') {
get_id('coupon_valid_94d4eee0d11d').innerHTML = 'Valid';
get_id('error_94d4eee0d11d').innerHTML = '';
if (get_id('coupon_error_94d4eee0d11d')) get_id('coupon_error_94d4eee0d11d').innerHTML = '';
} else {
get_id('coupon_valid_94d4eee0d11d').innerHTML = '';
if (get_id('coupon_error_94d4eee0d11d')) get_id('coupon_error_94d4eee0d11d').innerHTML = window.frames["utility_94d4eee0d11d"].get_id('error_message').innerHTML;
get_id('error_94d4eee0d11d').innerHTML = window.frames["utility_94d4eee0d11d"].get_id('error_message').innerHTML;
//document.location.hash = 'error_anchor_94d4eee0d11d';
}
if (get_id('pricing_box_94d4eee0d11d')) {
get_id('pricing_box_94d4eee0d11d').innerHTML = window.frames["utility_94d4eee0d11d"].get_id('pricing_box').innerHTML;
}
coupon_price_94d4eee0d11d = window.frames["utility_94d4eee0d11d"].get_id('coupon_price').innerHTML;
recurring_coupon_price_94d4eee0d11d = window.frames["utility_94d4eee0d11d"].get_id('recurring_coupon_price').innerHTML;
calculate_price_94d4eee0d11d();
}
function try_form_submit_94d4eee0d11d(tag) {
document.form_94d4eee0d11d.mode.value = tag;
// if we're capturing data, then we try to validate first. cb_do_form_result will submit form if successful
if (capture_data_94d4eee0d11d && do_validation_94d4eee0d11d) {
document.form_94d4eee0d11d.target = 'utility_94d4eee0d11d';
document.form_94d4eee0d11d.req.value = 'validate';
document.form_94d4eee0d11d.validate_mode.value = 'full_form';
document.form_94d4eee0d11d.submit();
} else {
// if do_validation_94d4eee0d11d then we'll validate the terms in php
if (!do_validation_94d4eee0d11d && document.form_94d4eee0d11d.show_terms && document.form_94d4eee0d11d.terms.checked == false) {
alert('You must agree to the Terms and Conditions before proceeding');
document.form_94d4eee0d11d.terms.focus();
} else {
do_form_submit_94d4eee0d11d();
}
}
return false;
}
function do_phone_task_94d4eee0d11d(mode) {
get_id('verify_phone_outer').style.display = 'none';
get_id('verify_phone_inner').style.display = 'none';
if (mode == 'change_number') {
document.form_94d4eee0d11d.validate_phone_mode.value = 'phone';
document.form_94d4eee0d11d.u_phone.select();
} else {
if (mode == 'submit_pin') {
document.form_94d4eee0d11d.validate_phone_mode.value = 'pin';
} else if (mode == 'text_me') {
document.form_94d4eee0d11d.validate_phone_mode.value = 'txt';
get_id('error_94d4eee0d11d').innerHTML = ' Processing...';
} else if (mode == 'call_again') {
document.form_94d4eee0d11d.validate_phone_mode.value = 'phone';
}
try_form_submit_94d4eee0d11d('paid');
}
}
function check_pin_94d4eee0d11d(the_field) {
if (document.all) {
// hack for horrible IE8 bug that doesn't show the text in the text box w/o refreshing div!
get_id('verify_phone_outer').style.display = 'none';
get_id('verify_phone_inner').style.display = 'none';
get_id('verify_phone_outer').style.display = 'block';
get_id('verify_phone_inner').style.display = 'block';
get_id('phone_pin_94d4eee0d11d').focus();
}
if (the_field.value.length >= 4) {
do_phone_task_94d4eee0d11d('submit_pin');
}
}
function cb_do_form_result_94d4eee0d11d () {
form_validation_status = window.frames["utility_94d4eee0d11d"].get_id('form_validation_status').innerHTML;
form_validation_task = window.frames["utility_94d4eee0d11d"].get_id('form_validation_task').innerHTML;
if (form_validation_status == '1') {
get_id('error_94d4eee0d11d').innerHTML = '';
document.form_94d4eee0d11d.req.value = 'form';
do_form_submit_94d4eee0d11d();
} else {
if (form_validation_task == 'validate_phone') {
get_id('error_94d4eee0d11d').innerHTML = '';
activate_verify_phone_94d4eee0d11d();
} else {
get_id('error_94d4eee0d11d').innerHTML = ' '
+ window.frames["utility_94d4eee0d11d"].get_id('error_message').innerHTML;
document.location.hash = 'error_anchor_94d4eee0d11d';
}
}
return false;
}
function activate_verify_phone_94d4eee0d11d () {
get_id('phone_error_94d4eee0d11d').innerHTML = window.frames["utility_94d4eee0d11d"].get_id('error_message').innerHTML;
if (document.all) {
get_id('verify_phone_inner').style.marginLeft = '0px';
}
get_id('verify_phone_outer').style.display = 'block';
get_id('verify_phone_inner').style.display = 'block';
scroll(0,0);
document.body.style.overflow='hidden';
document.form_94d4eee0d11d.phone_pin.value = '';
document.form_94d4eee0d11d.phone_pin.focus();
}
function do_form_submit_94d4eee0d11d () {
mode = document.form_94d4eee0d11d.mode.value;
if (mode == 'standard') {
get_id('standard_div_94d4eee0d11d').style.display = 'block';
document.form_94d4eee0d11d.target = 'standard_94d4eee0d11d';
document.form_94d4eee0d11d.submit();
thank_you_for_subscribing_94d4eee0d11d(mode);
} else if (mode == 'zune' || mode == 'itunes') {
document.form_94d4eee0d11d.target = 'itunes_94d4eee0d11d';
document.form_94d4eee0d11d.submit();
get_id('loading_'+mode+'_94d4eee0d11d').innerHTML = ' Loading';
add_dot_94d4eee0d11d(mode);
} else {
// IMPORTANT!!! IE and Firefox will treat