﻿//definicion de los valores
//monto	 = ['Elegir','600 €','1000 €','1200 €','1500 €','1800 €','2000 €','2400 €','2800 €','3000 €','4500 €','6000 €'];
monto	 = ['Elegir','600 €','1000 €','1200 €','1500 €','1800 €','2000 €','2400 €','2800 €','3000 €'];
//monto	 = ['Elegir',600,1000,1200,1500,1800,2000,2400,2800,3000];
//cuotas = [[['']],[['18,60 €'],['23,00 €'],['31,00 €']],[['31,00 €'],['38,00 €'],['51,50 €']],[['37,20 €'],['46,00 €'],['62,00 €']],[['47,00 €'],['57,50 €'],['77,50 €']],[['55,80 €'],['69,00 €'],['93,00 €']],[['62,00 €'],['76,00 €'],['103,00 €']],[['74,40 €'],['82,00 €'],['92,00 €'],['104,00 €'],['124,00 €']],[['87,00 €'],['95,00 €'],['106,00 €'],['121,00 €'],['148,00 €']],[['93,00 €'],['102,50 €'],['115,00 €'],['130,00 €'],['155,00 €']],[['141,00 €'],['152,50 €'],['172,50 €'],['195,00 €'],['232,50 €']],[['186,00 €'],['205,00 €'],['230,00 €'],['260,00 €'],['310,00 €']]];
cuotas = [[['']],[['18,60 €'],['23,00 €'],['31,00 €']],[['31,00 €'],['38,00 €'],['51,50 €']],[['37,20 €'],['46,00 €'],['62,00 €']],[['47,00 €'],['57,50 €'],['77,50 €']],[['55,80 €'],['69,00 €'],['93,00 €']],[['62,00 €'],['76,00 €'],['103,00 €']],[['74,40 €'],['82,00 €'],['92,00 €'],['104,00 €'],['124,00 €']],[['87,00 €'],['95,00 €'],['106,00 €'],['121,00 €'],['148,00 €']],[['93,00 €'],['102,50 €'],['115,00 €'],['130,00 €'],['155,00 €']],[['141,00 €'],['152,50 €'],['172,50 €'],['195,00 €'],['232,50 €']]];
//cuotas = [[['']],[[18,60],[23,00],[31,00]],[[31,00],[38,00],[51,50]],[[37,20],[46,00],[62,00]],[[47,00],[57,50],[77,50]],[[55,80],[69,00],[93,00]],[[62,00],[76,00],[103,00]],[[74,40],[82,00],[92,00],[104,00],[124,00]],[[87,00],[95,00],[106,00],[121,00],[148,00]],[[93,00],[102,50],[115,00],[130,00],[155,00]],[[141,00],[152,50],[172,50],[195,00],[232,50]]];
meses	 = [[''],[48,36,24],[48,36,24],[48,36,24],[48,36,24],[48,36,24],[48,36,24],[48,42,36,30,24],[48,42,36,30,24],[48,42,36,30,24],[48,42,36,30,24],[48,42,36,30,24]];
tae		 = [[''],[22.95,22.95],[22.95,22.95],[22.95,22.95],[22.95,22.95],[22.95,22.95],[22.95,22.95],[22.95,22.95],[22.95,22.95],[20.99,20.67],[19.82,19.53],[19.15,18.86],[17.13,17.15],[16.02,15.81],[15.04,15.00]];
tin		 = [[''],[20.84,20.84],[20.84,20.84],[20.84,20.84],[20.84,20.84],[20.84,20.84],[20.84,20.84],[20.84,20.84],[20.84,20.84],[19.21,18.94],[18.22,17.98],[17.65,17.40],[15.92,15.94],[14.95,14.76],[14.09,14.06]];

contents=new Array();

var separator="<+>";

TCN_makeComboGroup('monto','cuota');
var vi = 0;
while( vi < monto.length ) {	
	var vj = 0;
	while( vj < cuotas[vi].length ) {	
		varvalue = monto[vi] + '#' + cuotas[vi][vj] + '#' + meses[vi][vj] + '#' + tae[vi][vj] + '#' + tin[vi][vj];
		//cadenafinal = monto[vi] + ' €' + '<+>' + monto[vi] + '<+>' +  cuotas[vi][vj] + ' €' + '<+>' + varvalue;
		cadenafinal = monto[vi] + '<+>' + monto[vi] + '<+>' +  cuotas[vi][vj] + '<+>' + varvalue;
		TCN_addContent(cadenafinal);		
		vj++;
	}
	vi++;
}
TCN_startCombo();

function PoneCartel(ol) 
{
	if(ol) {
		msg = '&nbsp;&nbsp;<BR>&nbsp;&nbsp;Debe seleccionar Importe y Cuota<BR><BR><BR><BR><BR>';		
	} else {		
		arr = document.getElementById("cuota").value.split('#');
		//msg = '<BR>&nbsp;&nbsp;Usted ha seleccionado <b>'+ arr[0] +' &euro;</b><BR>&nbsp;&nbsp;Valor de la cuota <b>'+ arr[1] +' &euro;</b><BR>&nbsp;&nbsp;Tiempo <b>'+arr[2]+' meses</b><BR><BR><BR>'
		//msg = '&nbsp;&nbsp;Usted ha seleccionado: <b>'+ arr[0] +'</b><BR>&nbsp;&nbsp;Cuota: <b>'+ arr[1] +'</b><BR>&nbsp;&nbsp;Plazo: <b>'+arr[2]+' meses</b><input name="cuota2" type="hidden" value="'+arr[1]+'" /><input name="mensualidad3" type="hidden" value="'+arr[2]+'" />'
		msg = '<input name="cuota2" type="hidden" value="'+arr[1]+'" /><input name="mensualidad3" type="hidden" value="'+arr[2]+'" /><input name="monto" type="hidden" value="'+arr[0]+'" />'
	}	
	document.getElementById("msg_monto").innerHTML = msg;	
}

