var gembProductCalcPopupHeight=450;
var gembProductCalcPopupWidth=400;
function openProductCalcPopup(price) {
    var height=450;
    var width=400;
    var undef;
    if (undef != gembProductCalcPopupHeight) height=gembProductCalcPopupHeight;
    if (undef != gembProductCalcPopupWidth) width=gembProductCalcPopupWidth;
    window.open('/layout/set/fullscreen/gemb/productcalcpopup/'+price,'_blank',
        'directories=no,location=no,menubar=no,status=no,toolbar=no,height='+height+',width='+width
    );
}

function updateFinancingInfo() {
    var mp=document.getElementById('MonthlyPayment');
    if (mp) {
        var dpp=document.getElementById('DownPaymentPeriod');
        var tcc=document.getElementById('TotalCreditCost');
        var eir=document.getElementById('EffectiveInterestRate');
        if (dpp) {
            dpp.innerHTML=MonthlyAmounts['ma'+mp.value].DownPaymentPeriod+" mnd.";
        }
        if (tcc) {
            tcc.innerHTML=MonthlyAmounts['ma'+mp.value].TotalCreditCost;
        }
        if (eir) {
            eir.innerHTML=MonthlyAmounts['ma'+mp.value].EffectiveInterestRate+" %";
        }
    }
}

function updateFinancingInfoAfterThis()
{
    setTimeout('updateFinancingInfo();',10);
}

