99 ){
changeDisplay('upsellrecurringDiv','block');
$("#upsellrecurringAmount").html(Math.ceil($("#OrderTotal").val() / 6));
console.log("Upsell initiated");
$("#upsellrecurringInitDiv").html("");
}else{
console.log("Upsell doesnt apply");
changeDisplay('upsellrecurringDiv','none');
}
}
function upsellrecurring(){
document.orderInfo.recurringType[1].checked = 1;
$("#recurringAmount").val(Math.ceil($("#OrderTotal").val() / 6));
$("#recurringLength").val(12);
$("#upsellAmount").val($("#OrderTotal").val());
var itemQty1 = parseFloat($("#itemQty1").val());
if (isNaN(itemQty1)) itemQty1 = 0;
$("#itemQty1").val(parseFloat($("#OrderTotal").val())+itemQty1);
$("#DonationTotal").val(parseFloat($("#OrderTotal").val())*2);
changeDisplay('InstallDiv','block');
// changeDisplay('CreditCardTable','block'); // this was forcing the credit cards field to show even if a non cc payment selected
changeDisplay('RecurDiv','none');
//setTimeout(function(){
updateDonation();
//},2000);
changeDisplay('upsellrecurringDiv','none');
console.log("Upsell Applied");
}
//moved from dnt_tpl_simple.php:1975
function ShowMenu(num, menu, max) {
totalGuestCount = num;
for(i = 1; i <= num; i++){
var menu2 = menu + i;
document.getElementById(menu2).style.display = 'block';
}
var num2 = num;
num2++;
while(num2 <= max){
var menu3 = menu + num2;
document.getElementById(menu3).style.display = 'none';
num2=num2+1;
}
if(document?.orderInfo?.guests){
addGuest();
}
}
// END Upsell