			function envoiMontantSelectionne() {
				//Fonction appelée par le Flash pour instancier un Montant préselectionné
				if(montantDemande) {
					if(montantDemande!=0) { 
	                    return montantDemande;
					} else {
						return NULL;
					}				
				}
				else {
					return NULL;
				}			
			}
			
			function envoiMensualiteSelectionne() {
				//Fonction appelée par le Flash pour instancier une Mensualité préselectionné
				if (mensualiteSelectionne) {
					if(mensualiteSelectionne!=0) { 
							return mensualiteSelectionne;
					} else {
						return NULL;
					}
				}
				else {
					return NULL;
				}
            }
			function envoiMontantDefaut() {
				//Fonction appelée par le Flash pour instancier un autre montant par défaut que celui définit dans le Flash
				if (montantParDefaut) {
					if(montantParDefaut!=0) { 
							return montantParDefaut;
					} else {
						return NULL;
					}	
				}
				else {
					return NULL;
				}	
            }
            
			function chargeInfo (infos) {
        splatky = new Array();
        rpsn = new Array();
        total = new Array();
        mesice = new Array();
        
        splatky[10000] = new Array(); splatky[10000] = ['399','480','643','399']; rpsn[10000] = '35.1';
        splatky[20000] = new Array(); splatky[20000] = ['799','935','1263','799']; rpsn[20000] = '32.0';
        splatky[30000] = new Array(); splatky[30000] = ['1199','1402','1895','1199']; rpsn[30000] = '32.0';
        splatky[40000] = new Array(); splatky[40000] = ['1200','1413','1739','1200']; rpsn[40000] = '24.0';
        splatky[50000] = new Array(); splatky[50000] = ['1500','1767','2174','1500']; rpsn[50000] = '24.0';
        splatky[60000] = new Array(); splatky[60000] = ['1800','2120','2609','1800']; rpsn[60000] = '24.0';
        splatky[70000] = new Array(); splatky[70000] = ['2100','2474','3044','2100']; rpsn[70000] = '24.0';
        splatky[80000] = new Array(); splatky[80000] = ['2400','2827','3479','2400']; rpsn[80000] = '24.0';
        splatky[90000] = new Array(); splatky[90000] = ['2700','3181','3914','2700']; rpsn[90000] = '24.0';
        splatky[100000] = new Array(); splatky[100000] = ['3000','3484','4300','2405']; rpsn[100000] = '13.0';
        splatky[110000] = new Array(); splatky[110000] = ['3300','3690','4593','3300']; rpsn[110000] = '19.9';
        splatky[120000] = new Array(); splatky[120000] = ['3600','4025','5010','3600']; rpsn[120000] = '19.9';
        splatky[130000] = new Array(); splatky[130000] = ['3900','4361','5428','3900']; rpsn[130000] = '19.9';
        splatky[140000] = new Array(); splatky[140000] = ['4200','4696','5846','4200']; rpsn[140000] = '19.9';
        splatky[150000] = new Array(); splatky[150000] = ['4500','4799','6018','4500']; rpsn[150000] = '15.9';
        
        mesice[10000] = new Array(); mesice[10000] = ['12','24','36','40'];
        mesice[20000] = new Array(); mesice[20000] = ['12','24','36','38'];
        mesice[30000] = new Array(); mesice[30000] = ['12','24','36','38'];
        mesice[40000] = new Array(); mesice[40000] = ['12','24','36','52'];
        mesice[50000] = new Array(); mesice[50000] = ['12','24','36','52'];
        mesice[60000] = new Array(); mesice[60000] = ['12','24','36','52'];
        mesice[70000] = new Array(); mesice[70000] = ['12','24','36','52'];
        mesice[80000] = new Array(); mesice[80000] = ['12','24','36','52'];
        mesice[90000] = new Array(); mesice[90000] = ['12','24','36','52'];
        //mesice[100000] = new Array(); mesice[100000] = ['12','24','36','50'];
        mesice[100000] = new Array(); mesice[100000] = ['12','24','36','54']; // akce
        mesice[110000] = new Array(); mesice[110000] = ['12','24','36','47'];
        mesice[120000] = new Array(); mesice[120000] = ['12','24','36','47'];
        mesice[130000] = new Array(); mesice[130000] = ['12','24','36','47'];
        mesice[140000] = new Array(); mesice[140000] = ['12','24','36','47'];
        mesice[150000] = new Array(); mesice[150000] = ['12','24','36','43'];
        
        total[10000] = '16103'; 
        total[20000] = '30446'; 
        total[30000] = '45658'; 
        total[40000] = '61831'; 
        total[50000] = '77289'; 
        total[60000] = '92747'; 
        total[70000] = '108205'; 
        total[80000] = '123663'; 
        total[90000] = '139121';
        //total[100000] = '150517'; 
        total[100000] = '130944'; //akce
        total[110000] = '154768'; 
        total[120000] = '168816'; 
        total[130000] = '182884'; 
        total[140000] = '196952'; 
        total[150000] = '194596';
    
        document.getElementById('finalLoanAmount').innerHTML = priceFormat(infos.montantselect) + ' Kč';
        document.getElementById('finalLoanTranche').innerHTML = priceFormat(splatky[infos.montantselect][3]) + ' Kč';
        document.getElementById('finalLoanMonth').innerHTML = mesice[infos.montantselect][3] + ' měsíců';
        document.getElementById('finalLoanRpsn').innerHTML =  rpsn[infos.montantselect] + ' %';
        document.getElementById('finalLoanPa').innerHTML =  rpsn[infos.montantselect] + ' %';
        document.getElementById('totalFinalAmount').innerHTML = priceFormat(total[infos.montantselect]) + ' Kč';
        
        document.getElementById('selectedAmountByPrdInt').value = parseInt(infos.montantselect);
        document.getElementById('selectedInstAmountByPrdInt').value = splatky[infos.montantselect][3];
        document.getElementById('selectedAmountByPrd').value = parseInt(infos.montantselect) + '00';
        document.getElementById('selectedInstAmountByPrd').value = splatky[infos.montantselect][3] + '00';
        
        if (infos.montantselect <= 30000) {
            document.getElementById('productId').value = 1;
        } else {
            document.getElementById('productId').value = 2;
        }
			}
			
			function selectLoanTranche(index) {
			  splatky = new Array();
        rpsn = new Array();
        mesice = new Array();
        total = new Array();
        
        splatky[10000] = new Array(); splatky[10000] = ['399','480','643','399']; rpsn[10000] = '35.1';
        splatky[20000] = new Array(); splatky[20000] = ['799','935','1263','799']; rpsn[20000] = '32.0';
        splatky[30000] = new Array(); splatky[30000] = ['1199','1402','1895','1199']; rpsn[30000] = '32.0';
        splatky[40000] = new Array(); splatky[40000] = ['1200','1413','1739','1200']; rpsn[40000] = '24.0';
        splatky[50000] = new Array(); splatky[50000] = ['1500','1767','2174','1500']; rpsn[50000] = '24.0';
        splatky[60000] = new Array(); splatky[60000] = ['1800','2120','2609','1800']; rpsn[60000] = '24.0';
        splatky[70000] = new Array(); splatky[70000] = ['2100','2474','3044','2100']; rpsn[70000] = '24.0';
        splatky[80000] = new Array(); splatky[80000] = ['2400','2827','3479','2400']; rpsn[80000] = '24.0';
        splatky[90000] = new Array(); splatky[90000] = ['2700','3181','3914','2700']; rpsn[90000] = '24.0';
        splatky[100000] = new Array(); splatky[100000] = ['3000','3484','4300','2405']; rpsn[100000] = '13.0';
        splatky[110000] = new Array(); splatky[110000] = ['3300','3690','4593','3300']; rpsn[110000] = '19.9';
        splatky[120000] = new Array(); splatky[120000] = ['3600','4025','5010','3600']; rpsn[120000] = '19.9';
        splatky[130000] = new Array(); splatky[130000] = ['3900','4361','5428','3900']; rpsn[130000] = '19.9';
        splatky[140000] = new Array(); splatky[140000] = ['4200','4696','5846','4200']; rpsn[140000] = '19.9';
        splatky[150000] = new Array(); splatky[150000] = ['4500','4799','6018','4500']; rpsn[150000] = '15.9';
        
        mesice[10000] = new Array(); mesice[10000] = ['12','24','36','40'];
        mesice[20000] = new Array(); mesice[20000] = ['12','24','36','38'];
        mesice[30000] = new Array(); mesice[30000] = ['12','24','36','38'];
        mesice[40000] = new Array(); mesice[40000] = ['12','24','36','52'];
        mesice[50000] = new Array(); mesice[50000] = ['12','24','36','52'];
        mesice[60000] = new Array(); mesice[60000] = ['12','24','36','52'];
        mesice[70000] = new Array(); mesice[70000] = ['12','24','36','52'];
        mesice[80000] = new Array(); mesice[80000] = ['12','24','36','52'];
        mesice[90000] = new Array(); mesice[90000] = ['12','24','36','52'];
        //mesice[100000] = new Array(); mesice[100000] = ['12','24','36','50'];
        mesice[100000] = new Array(); mesice[100000] = ['12','24','36','54']; // akce
        mesice[110000] = new Array(); mesice[110000] = ['12','24','36','47'];
        mesice[120000] = new Array(); mesice[120000] = ['12','24','36','47'];
        mesice[130000] = new Array(); mesice[130000] = ['12','24','36','47'];
        mesice[140000] = new Array(); mesice[140000] = ['12','24','36','47'];
        mesice[150000] = new Array(); mesice[150000] = ['12','24','36','43'];
        
        total[10000] = '16103'; 
        total[20000] = '30446'; 
        total[30000] = '45658'; 
        total[40000] = '61831'; 
        total[50000] = '77289'; 
        total[60000] = '92747'; 
        total[70000] = '108205'; 
        total[80000] = '123663'; 
        total[90000] = '139121';
        //total[100000] = '150517'; 
        total[100000] = '130944'; //akce
        total[110000] = '154768'; 
        total[120000] = '168816'; 
        total[130000] = '182884'; 
        total[140000] = '196952'; 
        total[150000] = '194596';
        
        document.getElementById('selectedInstAmountByPrdInt').value = splatky[document.getElementById('selectedAmountByPrdInt').value][index];
        document.getElementById('finalLoanTranche').innerHTML = priceFormat(splatky[document.getElementById('selectedAmountByPrdInt').value][index]) + ' Kč';
        document.getElementById('finalLoanMonth').innerHTML = mesice[infos.montantselect][3] + ' měsíců';
        document.getElementById('finalLoanRpsn').innerHTML =  rpsn[document.getElementById('selectedAmountByPrdInt').value] + ' %';
        document.getElementById('finalLoanPa').innerHTML =  rpsn[document.getElementById('selectedAmountByPrdInt').value] + ' %';
        document.getElementById('totalFinalAmount').innerHTML = priceFormat(total[infos.montantselect]) + ' Kč';
        
        document.getElementById('selectedAmountByPrd').value = parseInt(document.getElementById('selectedAmountByPrdInt').value) + '00';
        document.getElementById('selectedInstAmountByPrd').value = splatky[document.getElementById('selectedAmountByPrdInt').value][index] + '00';
      }
