');
ajax_loader_small = new Image();
ajax_loader_small.src = 'https://mixiv.com/images/ajax-loader-small.gif';
var dot_count_98f104e1cb08 = 0;
var dot_interval_98f104e1cb08 = '';
var show_terms_98f104e1cb08 = 1;
var capture_data_98f104e1cb08 = 1; // this is 0 if we are just showing buttons
var do_validation_98f104e1cb08 = 1;
var current_price_token_98f104e1cb08 = '';
var secs_elapsed_98f104e1cb08 = 0;
var price_at_checkout_98f104e1cb08 = 7.47;
var starting_price_98f104e1cb08 = 7.47;
var original_price_98f104e1cb08 = 7.47;
var current_price_98f104e1cb08 = 7.47;
var coupon_price_98f104e1cb08 = 7.47;
var increase_per_sec_98f104e1cb08 = 0;
var max_price_98f104e1cb08 = 0.25;
var charged_price_subtotal_98f104e1cb08 = 7.47;
var handling_fee_98f104e1cb08 = 0.00;
var recurring_handling_fee_98f104e1cb08 = 0.00;
var shipping_fee_98f104e1cb08 = 0;
var tax_percent_98f104e1cb08 = 0;
var taxable_price_98f104e1cb08 = 0;
var tax_98f104e1cb08 = 0;
var valid_coupon_98f104e1cb08 = 0;
var recurring_price_at_checkout_98f104e1cb08 = 7.47;
var recurring_original_price_98f104e1cb08 = 7.47;
var recurring_current_price_98f104e1cb08 = 7.47;
var recurring_coupon_price_98f104e1cb08 = 7.47;
var recurring_price_subtotal_98f104e1cb08 = 7.47;
var recurring_taxable_price_98f104e1cb08 = 0;
var recurring_shipping_fee_98f104e1cb08 = 0;
var recurring_tax_98f104e1cb08 = 0;
var recurring_price_98f104e1cb08 = 7.47;
var add_tax_to_recurring_98f104e1cb08 = 1;
var apply_quantity_to_recurring_98f104e1cb08 = 0;
var u_country_98f104e1cb08 = '';
var u_state_98f104e1cb08 = '';
var u_zip_98f104e1cb08 = '';
var u_quantity_98f104e1cb08 = 1;
var u_recurring_quantity_98f104e1cb08 = 1;
var is_upsell_98f104e1cb08 = 0;
timezone_date_98f104e1cb08 = new Date();
document.form_98f104e1cb08.u_timezone_js_offset.value = timezone_date_98f104e1cb08.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_98f104e1cb08 (document.form_98f104e1cb08.u_accepted_membership_1,'1');
process_combined_membership_checkboxes_98f104e1cb08 (document.form_98f104e1cb08.u_accepted_membership_2,'2');
process_combined_membership_checkboxes_98f104e1cb08 (document.form_98f104e1cb08.u_accepted_membership_3,'3');
function auto_increment_price_98f104e1cb08() {
if (current_price_token_98f104e1cb08) {
secs_elapsed_98f104e1cb08++;
clearInterval(current_price_token_98f104e1cb08);
}
var new_price = parseFloat(starting_price_98f104e1cb08) + (parseFloat(increase_per_sec_98f104e1cb08) * parseFloat(secs_elapsed_98f104e1cb08));
if (parseFloat(new_price) < parseFloat(max_price_98f104e1cb08)) {
current_price_98f104e1cb08 = new_price;
current_price_token_98f104e1cb08 = setInterval('auto_increment_price_98f104e1cb08()',1000);
} else {
current_price_98f104e1cb08 = max_price_98f104e1cb08;
}
calculate_price_98f104e1cb08();
}
function set_variables_98f104e1cb08 () {
// 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_98f104e1cb08 = (document.form_98f104e1cb08.u_country) ? document.form_98f104e1cb08.u_country.value : '';
u_state_98f104e1cb08 = (document.form_98f104e1cb08.u_state) ? document.form_98f104e1cb08.u_state.value : '';
u_zip_98f104e1cb08 = (document.form_98f104e1cb08.u_zip) ? document.form_98f104e1cb08.u_zip.value : '';
u_quantity_98f104e1cb08 = (document.form_98f104e1cb08.u_quantity) ? document.form_98f104e1cb08.u_quantity.value : 1;
u_recurring_quantity_98f104e1cb08 = (apply_quantity_to_recurring_98f104e1cb08) ? u_quantity_98f104e1cb08 : 1;
}
function calculate_price_98f104e1cb08 () {
set_variables_98f104e1cb08();
// if we have a valid coupon, then override the incremented price. But incrementing should continue in the backgroud
if (parseInt(valid_coupon_98f104e1cb08) > 0) {
current_price_98f104e1cb08 = coupon_price_98f104e1cb08;
recurring_current_price_98f104e1cb08 = recurring_coupon_price_98f104e1cb08;
} else if (!(parseFloat(increase_per_sec_98f104e1cb08) > 0)) {
// if we aren't incrementing and you remove the coupon, we need to reset to original pricing
current_price_98f104e1cb08 = original_price_98f104e1cb08;
recurring_current_price_98f104e1cb08 = recurring_original_price_98f104e1cb08;
}
price_subtotal_98f104e1cb08 = parseFloat(current_price_98f104e1cb08) * parseFloat(u_quantity_98f104e1cb08);
recurring_subtotal_98f104e1cb08 = parseFloat(recurring_current_price_98f104e1cb08) * parseFloat(u_recurring_quantity_98f104e1cb08);
if (get_id('tax_percent_'+u_state_98f104e1cb08+'_'+u_country_98f104e1cb08+'_98f104e1cb08')) {
tax_percent_98f104e1cb08 = get_id('tax_percent_'+u_state_98f104e1cb08+'_'+u_country_98f104e1cb08+'_98f104e1cb08').value;
tax_98f104e1cb08 = parseFloat(price_subtotal_98f104e1cb08) * parseFloat(tax_percent_98f104e1cb08) / 100;
recurring_tax_98f104e1cb08 = parseFloat(recurring_subtotal_98f104e1cb08) * parseFloat(tax_percent_98f104e1cb08) / 100;
} else {
tax_98f104e1cb08 = 0;
recurring_tax_98f104e1cb08 = 0;
}
if (get_id('subtotal_at_checkout_98f104e1cb08')) // make sure it exists in case it is refreshing itself from iframe
get_id('subtotal_at_checkout_98f104e1cb08').innerHTML = curr(price_subtotal_98f104e1cb08);
if (get_id('shipping_at_checkout_98f104e1cb08')) // make sure it exists in case it is refreshing itself from iframe
get_id('shipping_at_checkout_98f104e1cb08').innerHTML = curr(shipping_fee_98f104e1cb08);
if (get_id('tax_at_checkout_98f104e1cb08')) // make sure it exists in case it is refreshing itself from iframe
get_id('tax_at_checkout_98f104e1cb08').innerHTML = curr(tax_98f104e1cb08);
price_at_checkout_98f104e1cb08 = parseFloat(price_subtotal_98f104e1cb08) + parseFloat(shipping_fee_98f104e1cb08) + parseFloat(curr(tax_98f104e1cb08));
price_at_checkout_98f104e1cb08 = (parseFloat(increase_per_sec_98f104e1cb08) > 0
&& parseFloat(current_price_98f104e1cb08) < parseFloat(max_price_98f104e1cb08))
&& !parseInt(valid_coupon_98f104e1cb08)
? price_at_checkout_98f104e1cb08 : curr(price_at_checkout_98f104e1cb08); // if we are still incrementing per second, don't format the currency
if (get_id('price_at_checkout_98f104e1cb08')) // make sure it exists in case it is refreshing itself from iframe
get_id('price_at_checkout_98f104e1cb08').innerHTML = price_at_checkout_98f104e1cb08;
if (get_id('price_at_checkout_bottom_98f104e1cb08')) // make sure it exists
get_id('price_at_checkout_bottom_98f104e1cb08').innerHTML = price_at_checkout_98f104e1cb08;
recurring_price_98f104e1cb08 = (add_tax_to_recurring_98f104e1cb08)
? parseFloat(recurring_subtotal_98f104e1cb08) + parseFloat(recurring_shipping_fee_98f104e1cb08) + parseFloat(curr(recurring_tax_98f104e1cb08))
: parseFloat(recurring_subtotal_98f104e1cb08) + parseFloat(recurring_shipping_fee_98f104e1cb08);
if (get_id('recurring_price_98f104e1cb08')) // make sure it exists in case it is refreshing itself from iframe
get_id('recurring_price_98f104e1cb08').innerHTML = curr(recurring_price_98f104e1cb08);
}
function get_kunaki_shipping_98f104e1cb08() {
set_variables_98f104e1cb08();
if (!((u_country_98f104e1cb08 == 'UNITED STATES' || u_country_98f104e1cb08 == 'CANADA')
&& (u_state_98f104e1cb08 == '' || u_state_98f104e1cb08 == 'N/A'))
&& u_zip_98f104e1cb08.length >= 4 && u_country_98f104e1cb08 != '') {
document.form_98f104e1cb08.req.value = 'kunaki_shipping';
document.form_98f104e1cb08.validate_mode.value = ''
document.form_98f104e1cb08.target = 'utility_98f104e1cb08';
document.form_98f104e1cb08.submit();
} else {
get_id('kunaki_shipping_98f104e1cb08').innerHTML = get_id('kunaki_shipping_reset_98f104e1cb08').innerHTML;
calculate_price_98f104e1cb08();
}
}
function cb_kunaki_shipping_98f104e1cb08 () {
form_validation_status = window.frames["utility_98f104e1cb08"].get_id('form_validation_status').innerHTML;
if (form_validation_status == '1') {
get_id('kunaki_shipping_98f104e1cb08').innerHTML = window.frames["utility_98f104e1cb08"].get_id('shipping_choices').innerHTML;
get_id('error_98f104e1cb08').innerHTML = '';
} else {
get_id('error_98f104e1cb08').innerHTML = window.frames["utility_98f104e1cb08"].get_id('error_message').innerHTML;
document.location.hash = 'error_anchor_98f104e1cb08';
get_id('kunaki_shipping_98f104e1cb08').innerHTML = get_id('kunaki_shipping_reset_98f104e1cb08').innerHTML;
}
calculate_price_98f104e1cb08();
}
function validate_coupon_98f104e1cb08() {
document.form_98f104e1cb08.req.value = 'validate';
document.form_98f104e1cb08.validate_mode.value = 'coupon_only';
document.form_98f104e1cb08.target = 'utility_98f104e1cb08';
document.form_98f104e1cb08.submit();
}
function cb_validate_coupon_98f104e1cb08 () {
form_validation_status = window.frames["utility_98f104e1cb08"].get_id('form_validation_status').innerHTML;
valid_coupon_temp_98f104e1cb08 = window.frames["utility_98f104e1cb08"].get_id('valid_coupon').innerHTML;
valid_coupon_98f104e1cb08 = parseInt(valid_coupon_temp_98f104e1cb08);
if (form_validation_status == '1' && valid_coupon_98f104e1cb08 == '1') {
get_id('coupon_valid_98f104e1cb08').innerHTML = 'Valid';
get_id('error_98f104e1cb08').innerHTML = '';
if (get_id('coupon_error_98f104e1cb08')) get_id('coupon_error_98f104e1cb08').innerHTML = '';
} else {
get_id('coupon_valid_98f104e1cb08').innerHTML = '';
if (get_id('coupon_error_98f104e1cb08')) get_id('coupon_error_98f104e1cb08').innerHTML = window.frames["utility_98f104e1cb08"].get_id('error_message').innerHTML;
get_id('error_98f104e1cb08').innerHTML = window.frames["utility_98f104e1cb08"].get_id('error_message').innerHTML;
//document.location.hash = 'error_anchor_98f104e1cb08';
}
if (get_id('pricing_box_98f104e1cb08')) {
get_id('pricing_box_98f104e1cb08').innerHTML = window.frames["utility_98f104e1cb08"].get_id('pricing_box').innerHTML;
}
coupon_price_98f104e1cb08 = window.frames["utility_98f104e1cb08"].get_id('coupon_price').innerHTML;
recurring_coupon_price_98f104e1cb08 = window.frames["utility_98f104e1cb08"].get_id('recurring_coupon_price').innerHTML;
calculate_price_98f104e1cb08();
}
function try_form_submit_98f104e1cb08(tag) {
document.form_98f104e1cb08.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_98f104e1cb08 && do_validation_98f104e1cb08) {
document.form_98f104e1cb08.target = 'utility_98f104e1cb08';
document.form_98f104e1cb08.req.value = 'validate';
document.form_98f104e1cb08.validate_mode.value = 'full_form';
document.form_98f104e1cb08.submit();
} else {
// if do_validation_98f104e1cb08 then we'll validate the terms in php
if (!do_validation_98f104e1cb08 && document.form_98f104e1cb08.show_terms && document.form_98f104e1cb08.terms.checked == false) {
alert('You must agree to the Terms and Conditions before proceeding');
document.form_98f104e1cb08.terms.focus();
} else {
do_form_submit_98f104e1cb08();
}
}
return false;
}
function do_phone_task_98f104e1cb08(mode) {
get_id('verify_phone_outer').style.display = 'none';
get_id('verify_phone_inner').style.display = 'none';
if (mode == 'change_number') {
document.form_98f104e1cb08.validate_phone_mode.value = 'phone';
document.form_98f104e1cb08.u_phone.select();
} else {
if (mode == 'submit_pin') {
document.form_98f104e1cb08.validate_phone_mode.value = 'pin';
} else if (mode == 'text_me') {
document.form_98f104e1cb08.validate_phone_mode.value = 'txt';
get_id('error_98f104e1cb08').innerHTML = ' Processing...';
} else if (mode == 'call_again') {
document.form_98f104e1cb08.validate_phone_mode.value = 'phone';
}
try_form_submit_98f104e1cb08('paid');
}
}
function check_pin_98f104e1cb08(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_98f104e1cb08').focus();
}
if (the_field.value.length >= 4) {
do_phone_task_98f104e1cb08('submit_pin');
}
}
function cb_do_form_result_98f104e1cb08 () {
form_validation_status = window.frames["utility_98f104e1cb08"].get_id('form_validation_status').innerHTML;
form_validation_task = window.frames["utility_98f104e1cb08"].get_id('form_validation_task').innerHTML;
if (form_validation_status == '1') {
get_id('error_98f104e1cb08').innerHTML = '';
document.form_98f104e1cb08.req.value = 'form';
do_form_submit_98f104e1cb08();
} else {
if (form_validation_task == 'validate_phone') {
get_id('error_98f104e1cb08').innerHTML = '';
activate_verify_phone_98f104e1cb08();
} else {
get_id('error_98f104e1cb08').innerHTML = ' '
+ window.frames["utility_98f104e1cb08"].get_id('error_message').innerHTML;
document.location.hash = 'error_anchor_98f104e1cb08';
}
}
return false;
}
function activate_verify_phone_98f104e1cb08 () {
get_id('phone_error_98f104e1cb08').innerHTML = window.frames["utility_98f104e1cb08"].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_98f104e1cb08.phone_pin.value = '';
document.form_98f104e1cb08.phone_pin.focus();
}
function do_form_submit_98f104e1cb08 () {
mode = document.form_98f104e1cb08.mode.value;
if (mode == 'standard') {
get_id('standard_div_98f104e1cb08').style.display = 'block';
document.form_98f104e1cb08.target = 'standard_98f104e1cb08';
document.form_98f104e1cb08.submit();
thank_you_for_subscribing_98f104e1cb08(mode);
} else if (mode == 'zune' || mode == 'itunes') {
document.form_98f104e1cb08.target = 'itunes_98f104e1cb08';
document.form_98f104e1cb08.submit();
get_id('loading_'+mode+'_98f104e1cb08').innerHTML = ' Loading';
add_dot_98f104e1cb08(mode);
} else {
// IMPORTANT!!! IE and Firefox will treat