');
ajax_loader_small = new Image();
ajax_loader_small.src = 'https://www.premiumcast.com/images/ajax-loader-small.gif';
var dot_count_11721905d9da = 0;
var dot_interval_11721905d9da = '';
var show_terms_11721905d9da = 0;
var capture_data_11721905d9da = 1; // this is 0 if we are just showing buttons
var do_validation_11721905d9da = 1;
var current_price_token_11721905d9da = '';
var secs_elapsed_11721905d9da = 0;
var price_at_checkout_11721905d9da = 0.00;
var starting_price_11721905d9da = 0.00;
var original_price_11721905d9da = 0.00;
var current_price_11721905d9da = 0.00;
var coupon_price_11721905d9da = 0.00;
var increase_per_sec_11721905d9da = 0;
var max_price_11721905d9da = 0.00;
var charged_price_subtotal_11721905d9da = 0.00;
var handling_fee_11721905d9da = 0.00;
var recurring_handling_fee_11721905d9da = 0.00;
var shipping_fee_11721905d9da = 0;
var tax_percent_11721905d9da = 0;
var taxable_price_11721905d9da = 0;
var tax_11721905d9da = 0;
var valid_coupon_11721905d9da = 0;
var recurring_price_at_checkout_11721905d9da = 0.00;
var recurring_original_price_11721905d9da = 0.00;
var recurring_current_price_11721905d9da = 0.00;
var recurring_coupon_price_11721905d9da = 0.00;
var recurring_price_subtotal_11721905d9da = 0;
var recurring_taxable_price_11721905d9da = 0;
var recurring_shipping_fee_11721905d9da = 0;
var recurring_tax_11721905d9da = 0;
var recurring_price_11721905d9da = 0.00;
var add_tax_to_recurring_11721905d9da = 0;
var apply_quantity_to_recurring_11721905d9da = 0;
var u_country_11721905d9da = '';
var u_state_11721905d9da = '';
var u_zip_11721905d9da = '';
var u_quantity_11721905d9da = 1;
var u_recurring_quantity_11721905d9da = 1;
var is_upsell_11721905d9da = 0;
timezone_date_11721905d9da = new Date();
document.form_11721905d9da.u_timezone_js_offset.value = timezone_date_11721905d9da.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_11721905d9da (document.form_11721905d9da.u_accepted_membership_1,'1');
process_combined_membership_checkboxes_11721905d9da (document.form_11721905d9da.u_accepted_membership_2,'2');
process_combined_membership_checkboxes_11721905d9da (document.form_11721905d9da.u_accepted_membership_3,'3');
function auto_increment_price_11721905d9da() {
if (current_price_token_11721905d9da) {
secs_elapsed_11721905d9da++;
clearInterval(current_price_token_11721905d9da);
}
var new_price = parseFloat(starting_price_11721905d9da) + (parseFloat(increase_per_sec_11721905d9da) * parseFloat(secs_elapsed_11721905d9da));
if (parseFloat(new_price) < parseFloat(max_price_11721905d9da)) {
current_price_11721905d9da = new_price;
current_price_token_11721905d9da = setInterval('auto_increment_price_11721905d9da()',1000);
} else {
current_price_11721905d9da = max_price_11721905d9da;
}
calculate_price_11721905d9da();
}
function set_variables_11721905d9da () {
// 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_11721905d9da = (document.form_11721905d9da.u_country) ? document.form_11721905d9da.u_country.value : '';
u_state_11721905d9da = (document.form_11721905d9da.u_state) ? document.form_11721905d9da.u_state.value : '';
u_zip_11721905d9da = (document.form_11721905d9da.u_zip) ? document.form_11721905d9da.u_zip.value : '';
u_quantity_11721905d9da = (document.form_11721905d9da.u_quantity) ? document.form_11721905d9da.u_quantity.value : 1;
u_recurring_quantity_11721905d9da = (apply_quantity_to_recurring_11721905d9da) ? u_quantity_11721905d9da : 1;
}
function calculate_price_11721905d9da () {
set_variables_11721905d9da();
// if we have a valid coupon, then override the incremented price. But incrementing should continue in the backgroud
if (parseInt(valid_coupon_11721905d9da) > 0) {
current_price_11721905d9da = coupon_price_11721905d9da;
recurring_current_price_11721905d9da = recurring_coupon_price_11721905d9da;
} else if (!(parseFloat(increase_per_sec_11721905d9da) > 0)) {
// if we aren't incrementing and you remove the coupon, we need to reset to original pricing
current_price_11721905d9da = original_price_11721905d9da;
recurring_current_price_11721905d9da = recurring_original_price_11721905d9da;
}
price_subtotal_11721905d9da = parseFloat(current_price_11721905d9da) * parseFloat(u_quantity_11721905d9da);
recurring_subtotal_11721905d9da = parseFloat(recurring_current_price_11721905d9da) * parseFloat(u_recurring_quantity_11721905d9da);
if (get_id('tax_percent_'+u_state_11721905d9da+'_'+u_country_11721905d9da+'_11721905d9da')) {
tax_percent_11721905d9da = get_id('tax_percent_'+u_state_11721905d9da+'_'+u_country_11721905d9da+'_11721905d9da').value;
tax_11721905d9da = parseFloat(price_subtotal_11721905d9da) * parseFloat(tax_percent_11721905d9da) / 100;
recurring_tax_11721905d9da = parseFloat(recurring_subtotal_11721905d9da) * parseFloat(tax_percent_11721905d9da) / 100;
} else {
tax_11721905d9da = 0;
recurring_tax_11721905d9da = 0;
}
if (get_id('subtotal_at_checkout_11721905d9da')) // make sure it exists in case it is refreshing itself from iframe
get_id('subtotal_at_checkout_11721905d9da').innerHTML = curr(price_subtotal_11721905d9da);
if (get_id('shipping_at_checkout_11721905d9da')) // make sure it exists in case it is refreshing itself from iframe
get_id('shipping_at_checkout_11721905d9da').innerHTML = curr(shipping_fee_11721905d9da);
if (get_id('tax_at_checkout_11721905d9da')) // make sure it exists in case it is refreshing itself from iframe
get_id('tax_at_checkout_11721905d9da').innerHTML = curr(tax_11721905d9da);
price_at_checkout_11721905d9da = parseFloat(price_subtotal_11721905d9da) + parseFloat(shipping_fee_11721905d9da) + parseFloat(curr(tax_11721905d9da));
price_at_checkout_11721905d9da = (parseFloat(increase_per_sec_11721905d9da) > 0
&& parseFloat(current_price_11721905d9da) < parseFloat(max_price_11721905d9da))
&& !parseInt(valid_coupon_11721905d9da)
? price_at_checkout_11721905d9da : curr(price_at_checkout_11721905d9da); // if we are still incrementing per second, don't format the currency
if (get_id('price_at_checkout_11721905d9da')) // make sure it exists in case it is refreshing itself from iframe
get_id('price_at_checkout_11721905d9da').innerHTML = price_at_checkout_11721905d9da;
if (get_id('price_at_checkout_bottom_11721905d9da')) // make sure it exists
get_id('price_at_checkout_bottom_11721905d9da').innerHTML = price_at_checkout_11721905d9da;
recurring_price_11721905d9da = (add_tax_to_recurring_11721905d9da)
? parseFloat(recurring_subtotal_11721905d9da) + parseFloat(recurring_shipping_fee_11721905d9da) + parseFloat(curr(recurring_tax_11721905d9da))
: parseFloat(recurring_subtotal_11721905d9da) + parseFloat(recurring_shipping_fee_11721905d9da);
if (get_id('recurring_price_11721905d9da')) // make sure it exists in case it is refreshing itself from iframe
get_id('recurring_price_11721905d9da').innerHTML = curr(recurring_price_11721905d9da);
}
function get_kunaki_shipping_11721905d9da() {
set_variables_11721905d9da();
if (!((u_country_11721905d9da == 'UNITED STATES' || u_country_11721905d9da == 'CANADA')
&& (u_state_11721905d9da == '' || u_state_11721905d9da == 'N/A'))
&& u_zip_11721905d9da.length >= 4 && u_country_11721905d9da != '') {
document.form_11721905d9da.req.value = 'kunaki_shipping';
document.form_11721905d9da.validate_mode.value = ''
document.form_11721905d9da.target = 'utility_11721905d9da';
document.form_11721905d9da.submit();
} else {
get_id('kunaki_shipping_11721905d9da').innerHTML = get_id('kunaki_shipping_reset_11721905d9da').innerHTML;
calculate_price_11721905d9da();
}
}
function cb_kunaki_shipping_11721905d9da () {
form_validation_status = window.frames["utility_11721905d9da"].get_id('form_validation_status').innerHTML;
if (form_validation_status == '1') {
get_id('kunaki_shipping_11721905d9da').innerHTML = window.frames["utility_11721905d9da"].get_id('shipping_choices').innerHTML;
get_id('error_11721905d9da').innerHTML = '';
} else {
get_id('error_11721905d9da').innerHTML = window.frames["utility_11721905d9da"].get_id('error_message').innerHTML;
document.location.hash = 'error_anchor_11721905d9da';
get_id('kunaki_shipping_11721905d9da').innerHTML = get_id('kunaki_shipping_reset_11721905d9da').innerHTML;
}
calculate_price_11721905d9da();
}
function validate_coupon_11721905d9da() {
document.form_11721905d9da.req.value = 'validate';
document.form_11721905d9da.validate_mode.value = 'coupon_only';
document.form_11721905d9da.target = 'utility_11721905d9da';
document.form_11721905d9da.submit();
}
function cb_validate_coupon_11721905d9da () {
form_validation_status = window.frames["utility_11721905d9da"].get_id('form_validation_status').innerHTML;
valid_coupon_temp_11721905d9da = window.frames["utility_11721905d9da"].get_id('valid_coupon').innerHTML;
valid_coupon_11721905d9da = parseInt(valid_coupon_temp_11721905d9da);
if (form_validation_status == '1' && valid_coupon_11721905d9da == '1') {
get_id('coupon_valid_11721905d9da').innerHTML = 'Valid';
get_id('error_11721905d9da').innerHTML = '';
if (get_id('coupon_error_11721905d9da')) get_id('coupon_error_11721905d9da').innerHTML = '';
} else {
get_id('coupon_valid_11721905d9da').innerHTML = '';
if (get_id('coupon_error_11721905d9da')) get_id('coupon_error_11721905d9da').innerHTML = window.frames["utility_11721905d9da"].get_id('error_message').innerHTML;
get_id('error_11721905d9da').innerHTML = window.frames["utility_11721905d9da"].get_id('error_message').innerHTML;
//document.location.hash = 'error_anchor_11721905d9da';
}
if (get_id('pricing_box_11721905d9da')) {
get_id('pricing_box_11721905d9da').innerHTML = window.frames["utility_11721905d9da"].get_id('pricing_box').innerHTML;
}
coupon_price_11721905d9da = window.frames["utility_11721905d9da"].get_id('coupon_price').innerHTML;
recurring_coupon_price_11721905d9da = window.frames["utility_11721905d9da"].get_id('recurring_coupon_price').innerHTML;
calculate_price_11721905d9da();
}
function try_form_submit_11721905d9da(tag) {
document.form_11721905d9da.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_11721905d9da && do_validation_11721905d9da) {
document.form_11721905d9da.target = 'utility_11721905d9da';
document.form_11721905d9da.req.value = 'validate';
document.form_11721905d9da.validate_mode.value = 'full_form';
document.form_11721905d9da.submit();
} else {
// if do_validation_11721905d9da then we'll validate the terms in php
if (!do_validation_11721905d9da && document.form_11721905d9da.show_terms && document.form_11721905d9da.terms.checked == false) {
alert('You must agree to the Terms and Conditions before proceeding');
document.form_11721905d9da.terms.focus();
} else {
do_form_submit_11721905d9da();
}
}
return false;
}
function do_phone_task_11721905d9da(mode) {
get_id('verify_phone_outer').style.display = 'none';
get_id('verify_phone_inner').style.display = 'none';
if (mode == 'change_number') {
document.form_11721905d9da.validate_phone_mode.value = 'phone';
document.form_11721905d9da.u_phone.select();
} else {
if (mode == 'submit_pin') {
document.form_11721905d9da.validate_phone_mode.value = 'pin';
} else if (mode == 'text_me') {
document.form_11721905d9da.validate_phone_mode.value = 'txt';
get_id('error_11721905d9da').innerHTML = ' Processing...';
} else if (mode == 'call_again') {
document.form_11721905d9da.validate_phone_mode.value = 'phone';
}
try_form_submit_11721905d9da('paid');
}
}
function check_pin_11721905d9da(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_11721905d9da').focus();
}
if (the_field.value.length >= 4) {
do_phone_task_11721905d9da('submit_pin');
}
}
function cb_do_form_result_11721905d9da () {
form_validation_status = window.frames["utility_11721905d9da"].get_id('form_validation_status').innerHTML;
form_validation_task = window.frames["utility_11721905d9da"].get_id('form_validation_task').innerHTML;
if (form_validation_status == '1') {
get_id('error_11721905d9da').innerHTML = '';
document.form_11721905d9da.req.value = 'form';
do_form_submit_11721905d9da();
} else {
if (form_validation_task == 'validate_phone') {
get_id('error_11721905d9da').innerHTML = '';
activate_verify_phone_11721905d9da();
} else {
get_id('error_11721905d9da').innerHTML = ' '
+ window.frames["utility_11721905d9da"].get_id('error_message').innerHTML;
document.location.hash = 'error_anchor_11721905d9da';
}
}
return false;
}
function activate_verify_phone_11721905d9da () {
get_id('phone_error_11721905d9da').innerHTML = window.frames["utility_11721905d9da"].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_11721905d9da.phone_pin.value = '';
document.form_11721905d9da.phone_pin.focus();
}
function do_form_submit_11721905d9da () {
mode = document.form_11721905d9da.mode.value;
if (mode == 'standard') {
get_id('standard_div_11721905d9da').style.display = 'block';
document.form_11721905d9da.target = 'standard_11721905d9da';
document.form_11721905d9da.submit();
thank_you_for_subscribing_11721905d9da(mode);
} else if (mode == 'zune' || mode == 'itunes') {
document.form_11721905d9da.target = 'itunes_11721905d9da';
document.form_11721905d9da.submit();
get_id('loading_'+mode+'_11721905d9da').innerHTML = ' Loading';
add_dot_11721905d9da(mode);
} else {
// IMPORTANT!!! IE and Firefox will treat