// JavaScript Document
function calcthis()
{
var planperc=new Array(0,0,0,0,0);
var depo = document.getElementById("deposit").value;
var perc = document.getElementById("percent").value;
// =========================================================================================================================
if (perc == "perc1") {
planperc=Array(105,116,132,140,160);
if (depo<10)
{alert ("Minimal deposit for this plan is $10"); document.getElementById("deposit").value=10; calcthis();}
else
{
if (depo<1001)
{
document.getElementById("inpvar1").innerHTML = planperc[0];
document.getElementById("inpvar2").innerHTML = planperc[0] * depo / 100;
}
else
{ if(depo<2000)
{
document.getElementById("inpvar1").innerHTML = planperc[1];
document.getElementById("inpvar2").innerHTML = planperc[1] * depo / 100;
}
else
{ if (depo<5000)
{
document.getElementById("inpvar1").innerHTML = planperc[2];
document.getElementById("inpvar2").innerHTML = planperc[2] * depo / 100;
}
else
{ if (depo<20000)
{
document.getElementById("inpvar1").innerHTML = planperc[3];
document.getElementById("inpvar2").innerHTML = planperc[3] * depo / 100;
}
else
{
document.getElementById("inpvar1").innerHTML = planperc[4];
document.getElementById("inpvar2").innerHTML = planperc[4] * depo / 100;
}
}
}
}
}
}// /if
}; // function