function loadBillingLength(a){var b=window[a+"_intervals"];if(b){for(var c=jQuery("#"+a+"_unit").val(),d=b[c].min,e=b[c].max,f=jQuery("#"+a+"_length"),g=f.val(),h="",i=d;e>=i;i++){var j=g==i?"selected=selected":"";h+=""}f.html(h)}}function cancel_subscription(a){confirm(gaddon_payment_strings.subscriptionCancelWarning)&&(jQuery("#subscription_cancel_spinner").show(),jQuery("#cancelsub").prop("disabled",!0),jQuery.post(ajaxurl,{action:"gaddon_cancel_subscription",entry_id:a,gaddon_cancel_subscription:gaddon_payment_strings.subscriptionCancelNonce},function(a){jQuery("#subscription_cancel_spinner").hide(),1==a?(jQuery("#gform_payment_status").html(gaddon_payment_strings.subscriptionCanceled),jQuery("#cancelsub").hide()):(jQuery("#cancelsub").prop("disabled",!1),alert(gaddon_payment_strings.subscriptionError))}))}