function calcthis()
{ 
  var planperc=new Array(0,0,0,0,0,0,0,0);
  var depo = document.getElementById("deposit").value;
  var perc = document.getElementById("percent").value;

// =========================================================================================================================











// PLAN 1 ===================================================================================================================
if (perc == "perc1")  {planperc=Array(104,105,110,120,130,140,140,140)
  if (depo < 10)
	{alert ("Minimal deposit for this plan is $10"); document.getElementById("deposit").value = 10; calcthis();}
	else
	{
	if (depo > 100000)
	  {alert ("Maximal deposit for this plan  is $100000"); document.getElementById("deposit").value = 100000; calcthis();}
	  else
	  {
	  if (depo < 500)
		{
  
		  document.getElementById("inpvar1").innerHTML = planperc[0];
		  document.getElementById("inpvar2").innerHTML = planperc[0] * depo / 100;
		}
		else
		{
		  if (depo < 3000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[1];
			  document.getElementById("inpvar2").innerHTML = planperc[1] * depo / 100;
			}
			else
		{
		  if (depo < 6000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[2];
			  document.getElementById("inpvar2").innerHTML = planperc[2] * depo / 100;
			}
			else
		{
		  if (depo < 10000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[3];
			  document.getElementById("inpvar2").innerHTML = planperc[3] * depo / 100;
			}
			else
				{
		  if (depo < 20000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[4];
			  document.getElementById("inpvar2").innerHTML = planperc[4] * depo / 100;
			}
			else
		{
		  if (depo < 100000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[5];
			  document.getElementById("inpvar2").innerHTML = planperc[5] * depo / 100;
			}
			else {
			 if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[6];
			  document.getElementById("inpvar2").innerHTML = planperc[6] * depo / 100;
			}
			else
			{
			  document.getElementById("inpvar1").innerHTML = planperc[7];
			  document.getElementById("inpvar2").innerHTML = planperc[7] * depo / 100;
			}
		}
	  }
	}
	}
	}
	}
	}
 }
};   
// PLAN 2 ===================================================================================================================
if (perc == "perc2")  {planperc=Array(130,150,200,270,360,360,360,360)
   if (depo < 10)
	{alert ("Minimal deposit for this plan is $10"); document.getElementById("deposit").value = 10; calcthis();}
	else
	{
	if (depo > 100000)
	  {alert ("Maximal deposit for this plan  is $100000"); document.getElementById("deposit").value = 100000; calcthis();}
	  else
	  {
	  if (depo < 2000)
		{
  
		  document.getElementById("inpvar1").innerHTML = planperc[0];
		  document.getElementById("inpvar2").innerHTML = planperc[0] * depo / 100;
		}
		else
		{
		  if (depo < 8000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[1];
			  document.getElementById("inpvar2").innerHTML = planperc[1] * depo / 100;
			}
			else
		{
		  if (depo < 15000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[2];
			  document.getElementById("inpvar2").innerHTML = planperc[2] * depo / 100;
			}
			else
		{
		  if (depo < 25000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[3];
			  document.getElementById("inpvar2").innerHTML = planperc[3] * depo / 100;
			}
			else
				{
		  if (depo < 100000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[4];
			  document.getElementById("inpvar2").innerHTML = planperc[4] * depo / 100;
			}
			else
		{
		  if (depo < 100000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[5];
			  document.getElementById("inpvar2").innerHTML = planperc[5] * depo / 100;
			}
			else {
			 if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[6];
			  document.getElementById("inpvar2").innerHTML = planperc[6] * depo / 100;
			}
			else
			{
			  document.getElementById("inpvar1").innerHTML = planperc[7];
			  document.getElementById("inpvar2").innerHTML = planperc[7] * depo / 100;
			}
		}
	  }
	}
	}
	}
	}
	}
 }
};   
// PLAN 3 ===================================================================================================================
if (perc == "perc3")  {planperc=Array(160,200,300,350,450,550,550,550)
 if (depo < 10)
	{alert ("Minimal deposit for this plan is $10"); document.getElementById("deposit").value = 10; calcthis();}
	else
	{
	if (depo > 100000)
	  {alert ("Maximal deposit for this plan  is $100000"); document.getElementById("deposit").value = 100000; calcthis();}
	  else
	  {
	  if (depo < 5000)
		{
  
		  document.getElementById("inpvar1").innerHTML = planperc[0];
		  document.getElementById("inpvar2").innerHTML = planperc[0] * depo / 100;
		}
		else
		{
		  if (depo < 10000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[1];
			  document.getElementById("inpvar2").innerHTML = planperc[1] * depo / 100;
			}
			else
		{
		  if (depo < 20000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[2];
			  document.getElementById("inpvar2").innerHTML = planperc[2] * depo / 100;
			}
			else
		{
		  if (depo < 30000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[3];
			  document.getElementById("inpvar2").innerHTML = planperc[3] * depo / 100;
			}
			else
				{
		  if (depo < 50000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[4];
			  document.getElementById("inpvar2").innerHTML = planperc[4] * depo / 100;
			}
			else
		{
		  if (depo < 100000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[5];
			  document.getElementById("inpvar2").innerHTML = planperc[5] * depo / 100;
			}
			else {
			 if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[6];
			  document.getElementById("inpvar2").innerHTML = planperc[6] * depo / 100;
			}
			else
			{
			  document.getElementById("inpvar1").innerHTML = planperc[7];
			  document.getElementById("inpvar2").innerHTML = planperc[7] * depo / 100;
			}
		}
	  }
	}
	}
	}
	}
	}
 }
};   
// PLAN 4 ===================================================================================================================
if (perc == "perc4")  {planperc=Array(275,350,550,700,900,900,900,900)
   if (depo < 1500)
	{alert ("Minimal deposit for this plan is $1500"); document.getElementById("deposit").value = 1500; calcthis();}
	else
	{
	if (depo > 100000)
	  {alert ("Maximal deposit for this plan  is $100000"); document.getElementById("deposit").value = 100000; calcthis();}
	  else
	  {
	  if (depo < 5000)
		{
  
		  document.getElementById("inpvar1").innerHTML = planperc[0];
		  document.getElementById("inpvar2").innerHTML = planperc[0] * depo / 100;
		}
		else
		{
		  if (depo < 10000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[1];
			  document.getElementById("inpvar2").innerHTML = planperc[1] * depo / 100;
			}
			else
		{
		  if (depo < 20000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[2];
			  document.getElementById("inpvar2").innerHTML = planperc[2] * depo / 100;
			}
			else
		{
		  if (depo < 50000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[3];
			  document.getElementById("inpvar2").innerHTML = planperc[3] * depo / 100;
			}
			else
				{
		  if (depo < 100000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[4];
			  document.getElementById("inpvar2").innerHTML = planperc[4] * depo / 100;
			}
			else
		{
		  if (depo < 100000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[5];
			  document.getElementById("inpvar2").innerHTML = planperc[5] * depo / 100;
			}
			else {
			 if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[6];
			  document.getElementById("inpvar2").innerHTML = planperc[6] * depo / 100;
			}
			else
			{
			  document.getElementById("inpvar1").innerHTML = planperc[7];
			  document.getElementById("inpvar2").innerHTML = planperc[7] * depo / 100;
			}
		}
	  }
	}
	}
	}
	}
	}
 }
}; 

// PLAN 5 ===================================================================================================================
if (perc == "perc5")  {planperc=Array(405,600,800,1000,1300,1300,1300,1300)
   if (depo < 2000)
	{alert ("Minimal deposit for this plan is $2000"); document.getElementById("deposit").value = 2000; calcthis();}
	else
	{
	if (depo > 100000)
	  {alert ("Maximal deposit for this plan  is $100000"); document.getElementById("deposit").value = 100000; calcthis();}
	  else
	  {
	  if (depo < 5000)
		{
  
		  document.getElementById("inpvar1").innerHTML = planperc[0];
		  document.getElementById("inpvar2").innerHTML = planperc[0] * depo / 100;
		}
		else
		{
		  if (depo < 10000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[1];
			  document.getElementById("inpvar2").innerHTML = planperc[1] * depo / 100;
			}
			else
		{
		  if (depo < 20000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[2];
			  document.getElementById("inpvar2").innerHTML = planperc[2] * depo / 100;
			}
			else
		{
		  if (depo < 50000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[3];
			  document.getElementById("inpvar2").innerHTML = planperc[3] * depo / 100;
			}
			else
				{
		  if (depo < 100000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[4];
			  document.getElementById("inpvar2").innerHTML = planperc[4] * depo / 100;
			}
			else
		{
		  if (depo < 100000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[5];
			  document.getElementById("inpvar2").innerHTML = planperc[5] * depo / 100;
			}
			else {
			 if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[6];
			  document.getElementById("inpvar2").innerHTML = planperc[6] * depo / 100;
			}
			else
			{
			  document.getElementById("inpvar1").innerHTML = planperc[7];
			  document.getElementById("inpvar2").innerHTML = planperc[7] * depo / 100;
			}
		}
	  }
	}
	}
	}
	}
	}
 }
}; 


// PLAN 6 ===================================================================================================================
if (perc == "perc6")  {planperc=Array(1500,1700,2000,2500,2500,2500,2500,2500)
     if (depo < 3000)
	{alert ("Minimal deposit for this plan is $3000"); document.getElementById("deposit").value = 3000; calcthis();}
	else
	{
	if (depo > 100000)
	  {alert ("Maximal deposit for this plan  is $100000"); document.getElementById("deposit").value = 100000; calcthis();}
	  else
	  {
	  if (depo < 10000)
		{
  
		  document.getElementById("inpvar1").innerHTML = planperc[0];
		  document.getElementById("inpvar2").innerHTML = planperc[0] * depo / 100;
		}
		else
		{
		  if (depo < 20000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[1];
			  document.getElementById("inpvar2").innerHTML = planperc[1] * depo / 100;
			}
			else
		{
		  if (depo < 50000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[2];
			  document.getElementById("inpvar2").innerHTML = planperc[2] * depo / 100;
			}
			else
		{
		  if (depo < 100000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[3];
			  document.getElementById("inpvar2").innerHTML = planperc[3] * depo / 100;
			}
			else
				{
		  if (depo < 100000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[4];
			  document.getElementById("inpvar2").innerHTML = planperc[4] * depo / 100;
			}
			else
		{
		  if (depo < 100000)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[5];
			  document.getElementById("inpvar2").innerHTML = planperc[5] * depo / 100;
			}
			else {
			 if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[6];
			  document.getElementById("inpvar2").innerHTML = planperc[6] * depo / 100;
			}
			else
			{
			  document.getElementById("inpvar1").innerHTML = planperc[7];
			  document.getElementById("inpvar2").innerHTML = planperc[7] * depo / 100;
			}
		}
	  }
	}
	}
	}
	}
	}
 }
}; 
	
	// PLAN 7 ===================================================================================================================
if (perc == "perc7")  {planperc=Array(1000,1000,1000,1000,1000,1000,1000,1000)
   if (depo < 3000)
	{alert ("Minimal deposit for this plan is $3000"); document.getElementById("deposit").value = 3000; calcthis();}
	else
	{
	if (depo > 100000)
	  {alert ("Maximal deposit for this plan  is $100000"); document.getElementById("deposit").value = 100000; calcthis();}
	  else
	  {
	  if (depo < 100001)
		{
  
		  document.getElementById("inpvar1").innerHTML = planperc[0];
		  document.getElementById("inpvar2").innerHTML = planperc[0] * depo / 100;
		}
		else
		{
		  if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[1];
			  document.getElementById("inpvar2").innerHTML = planperc[1] * depo / 100;
			}
			else
		{
		  if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[2];
			  document.getElementById("inpvar2").innerHTML = planperc[2] * depo / 100;
			}
			else
		{
		  if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[3];
			  document.getElementById("inpvar2").innerHTML = planperc[3] * depo / 100;
			}
			else
				{
		  if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[4];
			  document.getElementById("inpvar2").innerHTML = planperc[4] * depo / 100;
			}
			else
		{
		  if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[5];
			  document.getElementById("inpvar2").innerHTML = planperc[5] * depo / 100;
			}
				else
		{
		  if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[6];
			  document.getElementById("inpvar2").innerHTML = planperc[6] * depo / 100;
			}
			
			else
			{
			  document.getElementById("inpvar1").innerHTML = planperc[7];
			  document.getElementById("inpvar2").innerHTML = planperc[7] * depo / 100;
			}
		}
	  }
	}
	}
	}
	}
	}
	}
};
	// PLAN 8 =================================================================================================================
if (perc == "perc8")  {planperc=Array(3000,3000,3000,3000,3000,3000,3000,3000)
     if (depo < 5000)
	{alert ("Minimal deposit for this plan is $5000"); document.getElementById("deposit").value = 5000; calcthis();}
	else
	{
	if (depo > 100000)
	  {alert ("Maximal deposit for this plan  is $100000"); document.getElementById("deposit").value = 100000; calcthis();}
	  else
	  {
	  if (depo < 100001)
		{
  
		  document.getElementById("inpvar1").innerHTML = planperc[0];
		  document.getElementById("inpvar2").innerHTML = planperc[0] * depo / 100;
		}
		else
		{
		  if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[1];
			  document.getElementById("inpvar2").innerHTML = planperc[1] * depo / 100;
			}
			else
		{
		  if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[2];
			  document.getElementById("inpvar2").innerHTML = planperc[2] * depo / 100;
			}
			else
		{
		  if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[3];
			  document.getElementById("inpvar2").innerHTML = planperc[3] * depo / 100;
			}
			else
				{
		  if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[4];
			  document.getElementById("inpvar2").innerHTML = planperc[4] * depo / 100;
			}
			else
		{
		  if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[5];
			  document.getElementById("inpvar2").innerHTML = planperc[5] * depo / 100;
			}
				else
		{
		  if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[6];
			  document.getElementById("inpvar2").innerHTML = planperc[6] * depo / 100;
			}
			
			else
			{
			  document.getElementById("inpvar1").innerHTML = planperc[7];
			  document.getElementById("inpvar2").innerHTML = planperc[7] * depo / 100;
			}
		}
	  }
	}
	}
	}
	}
	}
	}
};
	// PLAN 9 ===================================================================================================================
if (perc == "perc9")  {planperc=Array(9000,9000,9000,9000,9000,9000,9000,9000)
     if (depo < 10000)
	{alert ("Minimal deposit for this plan is $10000"); document.getElementById("deposit").value = 10000; calcthis();}
	else
	{
	if (depo > 100000)
	  {alert ("Maximal deposit for this plan  is $100000"); document.getElementById("deposit").value = 100000; calcthis();}
	  else
	  {
	  if (depo < 100001)
		{
  
		  document.getElementById("inpvar1").innerHTML = planperc[0];
		  document.getElementById("inpvar2").innerHTML = planperc[0] * depo / 100;
		}
		else
		{
		  if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[1];
			  document.getElementById("inpvar2").innerHTML = planperc[1] * depo / 100;
			}
			else
		{
		  if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[2];
			  document.getElementById("inpvar2").innerHTML = planperc[2] * depo / 100;
			}
			else
		{
		  if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[3];
			  document.getElementById("inpvar2").innerHTML = planperc[3] * depo / 100;
			}
			else
				{
		  if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[4];
			  document.getElementById("inpvar2").innerHTML = planperc[4] * depo / 100;
			}
			else
		{
		  if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[5];
			  document.getElementById("inpvar2").innerHTML = planperc[5] * depo / 100;
			}
				else
		{
		  if (depo < 100001)
			{
			  document.getElementById("inpvar1").innerHTML = planperc[6];
			  document.getElementById("inpvar2").innerHTML = planperc[6] * depo / 100;
			}
			
			else
			{
			  document.getElementById("inpvar1").innerHTML = planperc[7];
			  document.getElementById("inpvar2").innerHTML = planperc[7] * depo / 100;
			}
		}
	  }
	}
	}
	}
	}
	}
	}
};
	};// function