function init()
{								
	if (!isDOM1)
		return;
	
	if (getObj("opcMonto").checked)
		modoCalculo('BtnMonto');
	
	if (getObj("OpcCuotaMaxima").checked)
		modoCalculo('BtnCuotaMaxima');
	
	if (getObj("opcIngresosNetos").checked)
		modoCalculo('BtnIngresosNetos');
	
	
	
	var txtLastFocus = getObj("txtLastFocus");
	if (txtLastFocus.value != "")
	{		
		var txt = getObj(txtLastFocus.value);
		if (txt.style.visibility !='hidden')
		{
			if (txt.disabled == false)
				txt.focus();
		}
	}

	
	
	var txtPosPagina = getObj("txtPosPagina");
	if (txtPosPagina.value != "")	
		document.location.href = "#" + txtPosPagina.value ;
	
}



function simularKeyPress()
{		
	if (!isDOM1)
		return;

	getObj("txtLastFocus").value = event.srcElement.id;	
	
	if ((event.keyCode < 48 || event.keyCode > 57) && event.keyCode != 13)
		event.keyCode = 0;
		
	
	if (event.keyCode == 13)
		getObj("BtnSimular").focus();
}
			
function modoCalculo(idBoton)
{
	if (!isDOM1)
		return;

	var txtCuota = getObj("txtCuota");
	var txtMonto = getObj("txtMonto");	
	var lblMontoCalculadoConIngresos = getObj("lblMontoCalculadoConIngresos");
	
	
	
	txtCuota.disabled = true;
	txtCuota.style.backgroundColor='eeeeee';
	
	txtMonto.disabled = true;
	txtMonto.style.backgroundColor='eeeeee';
	
	
	
	switch (idBoton)
	{
		case "BtnMonto": 
		{			
			txtCuota.innerText = "";
			txtMonto.disabled = false;				
			txtMonto.style.backgroundColor='#FFF4CA';						
			lblMontoCalculadoConIngresos.innerText = "";
			txtMonto.focus();			
			break;
		}
					
		case "BtnCuotaMaxima": 
		{				
			txtMonto.innerText = "";
			txtCuota.disabled = false;				
			txtCuota.style.backgroundColor='#FFF4CA';						
			lblMontoCalculadoConIngresos.innerText = "";
			txtCuota.focus();			
			break;
		}
		
		
		
	}
}

	


