// Variabili per lasciare i layer che scrollano al posto precedente dopo il reset della grafica  
        var TopColoriStep2 = 0;
        var TopCerchioniStep2 = 0;
        var TopInterniStep2 = 0;
        var TopOptStep3 = 0;
        var TopDetailLay = 0;
 
// Varie Utilis:
        var interniListTMP = new Array();
        var cerchioniListTMP = new Array();
        var flagNextStep = true;
        var flagStart = 0;
        setLayerProperty = new Function();
		var rottamazioneBooleanFlag = false;
		
		 function caricaColoriInterni() {
			interniListTMP = getConstrainEsclusive(MvsIPList, Vehicle.MvsBodyColor.code);
	 		
			var tabellaColori = 
				'<table width="100%" class="auto-colors" >'+
					'<tr>' +
						'<td>'+
							'<div class="vscrol2">'+
								'<ul>';
									for (i = 0; i < interniListTMP.length; i++) {
										var curSel = '';																	
										if (interniListTMP[i].code == Vehicle.MvsInnerPreparation.code) curSel = 'bot_selected_layer';
										tabellaColori +=
										'<li>'+
											'<a href="javascript:;">'+
												'<img alt="'+convertApici(interniListTMP[i].desc)+'" '+
													'title="'+convertApici(interniListTMP[i].desc)+'" '+
													'onMouseOut="javascript:mouseOutIP(\'' + interniListTMP[i].code + '\');" '+
													'onMouseOver="javascript:mouseOverIP(\'' + interniListTMP[i].code + '\');" '+
													'onClick="javascript:mvsIPChanged(\'' + interniListTMP[i].code + '\');" '+
													'class="' + curSel + '" src="' + interniListTMP[i].imgSmall + '" '+
													'width="43" height="33">'+
											'</a>'+
										'</li>';
									}
								tabellaColori +=
								'</ul>'+
							'</div>'+
						'</td>'+
					'</tr>'+	
				'</table>';
				document.getElementById('tabColoriInterni').innerHTML = tabellaColori;	
				
					$(document).ready(function() {	
						$('.vscrol2').jScrollPane({showArrows:true, animateStep:5});
						$('.vscrol2 li img').click(function(){
						$('.vscrol2 li img').removeClass('bot_selected_layer');
						$(this).addClass('bot_selected_layer');
						});
					});
				
			
		 }

        function graphic() {
		//alert("valore di "+rottamazioneBooleanFlag);

            switch (Vehicle.step) {
                case 0:
                    displayStep0();
                    break;
                case 1:
                    displayStep1();
                    break;
                case 2:
							
                    interniListTMP = getConstrainEsclusive(MvsIPList, Vehicle.MvsBodyColor.code);
                    cerchioniListTMP = getOptByCategory('-');
                    //if (TopColoriStep2 != 0) TopColoriStep2 = parseInt(document.getElementById('ccInnColori').style.top);
                    //if (TopInterniStep2 != 0) TopInterniStep2 = parseInt(document.getElementById('ccInnInterni').style.top);
                    //if (TopCerchioniStep2 != 0) TopCerchioniStep2 = parseInt(document.getElementById('ccInnCerchioni').style.top);
					
                    displayStep2();
					
					
			
                    //document.getElementById('ccInnColori').style.top = TopColoriStep2 + "px";
                    //document.getElementById('ccInnInterni').style.top = TopInterniStep2 + "px";
                    //document.getElementById('ccInnCerchioni').style.top = TopCerchioniStep2 + "px";
					
					//tony - comentato x che nn si vedeva il flash
					//if(ServerSide["extendInnerPreparation"]){
					if(false){
						document.getElementById("ccContCerchioni").style.top ="490";
						//document.getElementById("ccContInterni").style.height ="175";
						//document.getElementById("ccContInterni").style.height ="109";
						document.getElementById("ccContInterni").clip ="rect(0,184,175,0)";
						document.getElementById("ntessutoHeight").height ="120";
						document.getElementById("interniimgbig").height ="109";
						document.getElementById("interniimgbig").style.marginTop ="20";
					}
					
					
                    break;
                case 3:
                    displayStep3();
                    break;
                case 4:
                    displayStep4();
                    break;
            }
	 
            if (ServerSide["useFlash"] == 'true') document.getElementById('flash').style.display = "block";

            flagStart++;
        }
function makeAgencyTag(){
	var agencyTag="";
	if(Vehicle.Model.code=='169'){
		if(Vehicle.step=='1'){
			agencyTag='<!--TagPanda--><img height="1" width="1" src="http://switch.atdmt.com/action/m1ifi1_HomepagecarconfiguratorPanda_6"/><!--/TagPanda-->';
		}
		else if(Vehicle.step=='4'){	
			agencyTag='<!--TagPanda--><img height="1" width="1" src="http://switch.atdmt.com/action/m1ifi1_ThankyoupagecarconfiguratorPanda_6"/><!--/TagPanda-->';
		}	
	}else{
		agencyTag='';
	}

	return agencyTag;
}
        /******************************************/

// INIZIO DISPLAY STEP 0 (scelta modelli)
        function displayStep0() {
        }

// INIZIO DISPLAY STEP 1 (scelta mvs)
	function displayStep1() {
	
		var footer = includeJsp("../common/footer.jsp");
		
		CodiceHTML =
		'<table width="100%" class="pageWrapper" border="0">'+
			'<tr>'+
				'<td>'+
					'<table width="100%" border="0">'+
						'<tr>'+
							'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td>'+
							'<td>' + NumImgCode() + '</td>'+
						'</tr>'+
						'<tr>'+
							'<td>' + 
								menuTopRightCode() + makeAgencyTag() +
								'<img id="tdFlash" src="' + ServerSide["imagePath"] + 'spacer.gif" width="353" height="179" border="0">'+
							'</td>'+
							'<td>'+
								'<table width="100%" border="0" cellpadding="0" cellspacing="0">' +
									'<tr>' +
										'<td colspan=\"3\"><img width="204" height="24" src="' + ServerSide["imageUploadPathFE"] + ServerSide["Page1TitleImageFE"] + '" /></td>'+
										'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td>'+
									'</tr>'+
									'<tr>' +
										'<td>' +
											'<p style="padding:10px 0 0 0;">' + ServerSide["Page1TextFE"] + '</p>'+
										'</td>'+
										'<td>'+
											'<img src="' + ServerSide["imagePath"] + 'spacer.gif" width="10" />'+
										'</td>'+
										'<td class="dipiumain" style="width: 204px; height: 194px;">'+
											//SPAZIO PER - TO KNOW MORE -
										'</td>'+
										'<td>'+
											'<img src="' + ServerSide["imagePath"] + 'spacer.gif" width="10" />'+
										'</td>'+
									'</tr>'+
								'</table>'+
							'</td>'+
						'</tr>'+
					'</table>'+
				'</td>'+
			'</tr>'+
			
			'<tr><td><img  style="height:35px;" src="' + ServerSide["imagePath"] + 'spacer.gif"></td></tr>'+
			
			'<tr>'+
				'<td><img src="' + ServerSide["imagePath"] + 'separator.png" class="separator" /></td>'+
			'</tr>'+
			'<tr>'+
				'<td>'+
					'<table width="100%">'+
						'<tr>'+
							'<td>'+
								'<table width="100%">'+
									'<tr>'+
										'<td><img src="' + ServerSide["imageUploadPathFE"] + ServerSide["Page1SubTitleImageFE"] + '" /></td>'+
									'</tr>'+
									'<tr>'+
										'<td style="padding:30px;">'+
											'<table width="100%" class="versione-modello">';
												CodiceHTML += '';
												 // 20090302 AB CR Incentivi INIZIO 
												if(isIncentiviModelEnable()){
												rottamazioneBooleanFlag = ServerSide["rottamazione"];
												 CodiceHTML +=
														'<tr>'+
															'<td colspan="4">'+
																'<form name="rottamazioneForm" action=""><input style="width: auto;" type="checkbox" '+ (rottamazioneBooleanFlag==true ? " checked " :"") + '  name="rottamazioneField" value="" onclick="javascript:setRottamazioneSelected();"/>&nbsp;&nbsp;Ho un\'auto da rottamare.</form>'+
															'</td>'+
														'</tr>'+
														'<tr>'+
															'<td colspan="4">'+
																'<img src="' + ServerSide["imagePath"] + 'eco_icona.png" width="22" id="ecoIncentivi" height="13" style="vertical-align: middle;"><b style="vertical-align: middle;"> Modelli che beneficiano degli ecoincentivi</b>'+
															'</td>'+
														'</tr>';
												}
												 // 20090302 AB CR Incentivi FINE
												if (ServerSide["mvsInfoDisabled"] == "false") {
													CodiceHTML +=
														'<tr>'+
															'<th class="alleft">' + ServerSide["page1H1"] + '</th>'+
															'<th>' + ServerSide["page1H2"] + '</th>'+
															'<th>' + ServerSide["page1H3"] + '</th>'+
															'<th>' + ServerSide["page1H4"] + '</th>'+
														'</tr>'+
														'<tr>'+
															'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td>'+
															'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td>'+
															'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td>'+
															'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td>'+
														'</tr>';
												// 20090302 AB CR Incentivi INIZIO
												} else if(isIncentiviModelEnable()) {
													//default
													CodiceHTML +=
														'<tr>'+
															'<th class="alleft">' + ServerSide["page1H1"] + '</th>'+
															'<th>' + ServerSide["page1H2"] + '</th>'+
															'<th width="100px">' + "Prezzo con ecoincentivi" + '</th>'+
															'<th>' + ServerSide["page1H4"] + '</th>'+
														'</tr>'+
														'<tr>'+
															'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td>'+
															'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td>'+
															'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td>'+
															'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td>'+
														'</tr>';
												// 20090302 AB CR Incentivi FINE
												}else{
													CodiceHTML +=
														'<tr>'+
															'<th class="alleft">' + ServerSide["page1H1"] + '</th>'+
															'<th>' + ServerSide["page1H2"] + '</th>'+
															'<th>' + ServerSide["page1H4"] + '</th>'+
														'</tr>'+
														'<tr>'+
															'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td>'+
															'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td>'+
															'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td>'+
														'</tr>';
												}
												var prom = '';
												for (m = 0; m < MvsList.length; m++) {
													var promFlag = true;
													var che = '';
													if (MvsList[m].code == Vehicle.Mvs.code) che = ' checked';

													for (k = 0; k < PromoList.length; k++) {
														if (PromoList[k].objCode == MvsList[m].code) {
															prom = '<b style="color:black">*</b>';
															CodiceHTML +=
															'<tr>' +
																'<td class="alleft">' + convertApici(MvsList[m].desc) +'</td>' +
																'<td class="alcenter" align="left" nowrap>' + numberToFormattedString(MvsList[m].price) + '&nbsp;' + prom + '&nbsp;&nbsp;&nbsp;&nbsp;</td>';
																	if (ServerSide["mvsInfoDisabled"] == "false") {
																		CodiceHTML +=
																		'<td class="trc" align="center"><img src="' + ServerSide["imagePath"] + 'a6_icona_esplora.gif" onclick="javascript:mvsInfoRequested(\'' + MvsList[m].code + '\');"></td>';
																	}
																CodiceHTML +=
																'<td class="alcenter"><input type="checkbox" class="check" onclick="javascript:mvsChanged(\'' + MvsList[m].code + '\');"' + che + '></td>' +
															'</tr>';
															promFlag = false;
															break;
														}
													}
													if (promFlag) {
													var styleLine="grayBackground";
													if(m%2 == 1){ 
														styleLine = "whiteBackground";
													}
														CodiceHTML +=
															'<tr >' +
																'<td class="alleft">' + getIncentiviIcon(MvsList[m].code , MvsList[m].price) +' '+ MvsList[m].desc +'</td>' +
																//'<td class="alleft">' + MvsList[m].desc + ' '+ getIncentiviIcon(MvsList[m].code , MvsList[m].price) + '</td>' +
																'<td class="alcenter">' + numberToFormattedString(MvsList[m].price) + '</td>';
																
														// 20090302 AB CR Incentivi INIZIO
														if(isIncentiviModelEnable()){
															var incentiviPrice = getIncentiviMvsPrice(MvsList[m].code, MvsList[m].price , getRottamazioneSelected())
															if(MvsList[m].price != incentiviPrice){
																CodiceHTML +='<td class="alcenter">' + numberToFormattedString(incentiviPrice) + '</td>';
															}else{
																CodiceHTML +='<td class="alcenter">&nbsp;</td>';
															}
														}
														// 20090302 AB CR Incentivi FINE
																
																
														if (ServerSide["mvsInfoDisabled"] == "false") {
															CodiceHTML +=
															'<td class="alcenter"><img src="' + ServerSide["imagePath"] + 'a6_icona_esplora.gif" onclick="javascript:mvsInfoRequested(\'' + MvsList[m].code + '\');"></td>';
														}
														CodiceHTML +=
																'<td class="alcenter"><input type="checkbox" class="check" onclick="javascript:mvsChanged(\'' + MvsList[m].code + '\');"' + che + '></td>' +
															'</tr>';
													}
												}
												CodiceHTML +=
														'<tr>'+
															'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td>'+
															'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td>'+
															'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td>'+
														'</tr>';
												if(!isIncentiviModelEnable()){
													CodiceHTML +=
														'<tr>'+
															'<td> ' + ServerSide["page1HComm"] + '</td>'+
															'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td>'+
															'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td>'+
														'</tr>';
												}
												CodiceHTML += footerTasti() + 
											'</table>'+
										'</td>'+
									'</tr>'+
								'</table>'+
							'</td>'+
							'<td width="220px">'+
								boxDXCode() +
							'</td>'+
						'</tr>'+
					'</table>'+
				'</td>'+
			'</tr>'+
			goToPageTop()+
		'</table>';
		
		CodiceHTML += footer;
		document.getElementById('fiatcc').innerHTML = CodiceHTML;

    }
// FINE DISPLAY STEP 1 (scelta mvs)

        /******************************************/

// INIZIO DISPLAY STEP 2 (scelta colore, interni cerchione)
     function displayStep2 (pass) {
		
		var footer = includeJsp("../common/footer.jsp");
		//var f1 = includeJsp("../common/f1.jsp");		
		CodiceHTML = 	
			'<table width="100%" class="pageWrapper" border="0">'+
				'<tr>'+
					'<td>'+
						'<table width="100%" border="0">'+
							'<tr>'+
								'<td>'+
									'<img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td>'+
								'<td>' + NumImgCode() + '</td>'+
							'</tr>'+
							'<tr>'+
								'<td width="335" >' + 
									menuTopRightCode() +
									'<img id="tdFlash" src="' + ServerSide["imagePath"] + 'spacer.gif" width="353" height="179" border="0">'+
								'</td>'+
								'<td>'+
									'<table width="100%" border="0" cellpadding="0" cellspacing="0">' +
										'<tr>' +
											'<td>'+
												'<img src="' + ServerSide["imageUploadPathFE"] + ServerSide["Page2TitleImageFE"] + '"/>'+
											'</td>'+
										'</tr>'+
										'<tr>' +
											'<td width="auto">' + 
												'<p style="padding:10px 10px 0 0;">'+
													ServerSide["Page2TextFE"] + 
													//'<br /><br /><img src="' + ServerSide["imagePath"] + 'configTxt4.gif" /><br />' + //immagine statica al posto di label in lingua (ServerSide["page2H1"])
													
													'<br /><br />'+
													'<span class="form-int">'+ServerSide["page2H1"]+'</span><br /><br />' + //immagine statica al posto di label in lingua (ServerSide["page2H1"])
													'<strong id="ncolore">' + convertApici(Vehicle.MvsBodyColor.desc) + '</strong>' + 
													'<table width="100%" class="auto-colors">'+  // id="auto_color" 
														'<tr>' +
															'<td>';	
																CodiceHTML += 
																'<div class="vscrol1" style="width:442px;">'+
																	'<ul>';
																		for (i = 0; i < MvsBCList.length; i++) {
																			var curSel = '';																			
																			if (MvsBCList[i].code == Vehicle.MvsBodyColor.code) curSel = 'bot_selected_layer'; 
																				CodiceHTML +=
																				'<li>'+
																					'<a href="javascript:;">'+
																						'<img alt="'+convertApici(MvsBCList[i].desc)+'" '+
																						'title="'+convertApici(MvsBCList[i].desc)+'" '+
																						'onMouseOut="javascript:mouseOutBC(\'' + MvsBCList[i].code + '\');" '+
																						'onMouseOver="javascript:mouseOverBC(\'' + MvsBCList[i].code + '\');" '+
																						'onClick="javascript:mvsBCChanged(\'' + MvsBCList[i].code + '\');" '+
																						'class="' + curSel + '" valign="top" src="' + MvsBCList[i].imgSmall + '" '+
																						'width="43" height="33" border="0" vspace="0" hspace="0" style="cursor:hand; ">'+
																					'</a>'+
																				'</li>';																				
																		}
																		CodiceHTML +=
																	'</ul>'+
																'</div>'+
															'</td>'+
														'</tr>'+
													'</table>'+
												'</p>'+
											'</td>'+
										'</tr>'+
									'</table>'+
								'</td>'+
							'</tr>'+
						'</table>'+
					'</td>'+
				'</tr>'+
				'<tr>'+
					'<td>'+
						'<img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" />'+
					'</td>'+
				'</tr>'+
				'<tr>'+
					'<td>'+
						'<img src="' + ServerSide["imagePath"] + 'separator.png" class="separator" />'+
					'</td>'+
				'</tr>'+
				
				'<tr>'+
					'<td>'+
						'<table width="100%">'+
							'<tr>'+
								'<td width="560">'+
									'<table width="100%">'+
										'<tr>'+
											'<td width="350" align="center">'+
												'<div id="imgBigInterni"></div>'+
											'</td>'+
											'<td width="205">'+
												'<span class="form-int">'+
													ServerSide["page2H3"]+
												'</span><br /><br />';
												//'<td><img src="' + ServerSide["imagePath"] + 'configTxt5.gif" /><br />'; //utilizzata immagine al posto di label page2H3
													var descInterniTMP = Vehicle.MvsInnerPreparation.desc;
													if (descInterniTMP.length > 26)
													{
														descInterniTMP = '<a style="text-decoration: underline;" title="' +
														convertApici(descInterniTMP) + '" style="cursor:default;">' + 
														convertApici(descInterniTMP.substring(0, 25)) + '...</a>';
													}
												CodiceHTML +=
												'<strong id="ntessuto">' + descInterniTMP + '</strong>'+
												'<div id="tabColoriInterni"></div>'+
											'</td>'+
										'</tr>'+
										'<tr>'+
											'<td colspan="2">'+
												'<img src="' + ServerSide["imagePath"] + 'separator560.png" class="separator" />'+
											'</td>'+
										'</tr>'+
										'<tr>'+
											'<td width="350" align="right" style="padding-right:30px">'+
												'<div id="imgCerchioneBig"></div>'+
											'</td>'+																	
											'<td width="205">'+
												'<span class="form-int">'+ServerSide["page2H2"]+'</span><br /><br />';//'<td><img src="' + ServerSide["imagePath"] + 'configTxt6.gif" /><br />';

												var descCerchioneTemp = getCerchione().desc;
												if (descCerchioneTemp.length > 26)
												{
													descCerchioneTemp = '<a style="text-decoration: underline;" title="' + convertApici(descCerchioneTemp) + '" style="cursor:default;">' + convertApici(descCerchioneTemp.substring(0, 25)) + '...</a>';
												}
												CodiceHTML +=
												'<strong id="ncerchione">'+descCerchioneTemp+'</strong><br>'+
												'<img src="' + ServerSide["imagePath"] + 'spacer.gif" height="6" />';
												if(getCcBoxCerchiVisibility()){
													CodiceHTML +=
													'<table width="100%" class="auto-colors">';
														CodiceHTML +=
														'<tr>' +
															'<td>'+		
																'<div class="vscrol3">'+
																	'<ul>';
																		for ( i = 0; i < cerchioniListTMP.length ; i++) {																					
																			var curSel = '';
																			var margTop = '';
																			if (i > 0) margTop = 'margin-top:5px';																				
																			if (cerchioniListTMP[i].code == getCerchione().code) curSel = 'bot_selected_layer';
																			CodiceHTML += 
																			'<li>'+
																				'<a>'+
																					'<img alt="'+convertApici(cerchioniListTMP[i].desc)+'" title="'+convertApici(cerchioniListTMP[i].desc)+'" onMouseOut="javascript:mouseOutRim(\'' + cerchioniListTMP[i].code + '\');" onMouseOver="mouseOverRim(\'' + cerchioniListTMP[i].code + '\');" onClick="javascript:mvsOptChanged(\'' + cerchioniListTMP[i].code + '\');" class="' + curSel + '" valign="top" src="' + cerchioniListTMP[i].imgSmall + '" width="43" height="33" border="0" vspace="0" style="cursor:hand;margin:0px;' + margTop + 'margin-right:24px;" />'+
																				'</a>'+
																			'</li>';
																		}
																		CodiceHTML += 
																	'</ul>'+
																'</div>'+
															'</td>'+
														'</tr>';													
															CodiceHTML +=
														'<tr>'+
															'<td>'+
																'<img src="' + ServerSide["imagePath"] + 'spacer.gif" height="6" />'+
															'</td>'+
														'</tr>'+
													'</table>';
												}//if
												CodiceHTML +=
											'</td>'+
										'</tr>'+
											footerTasti()+
										'<tr>'+
											'<td colspan="2">'+
												'<img src="' + ServerSide["imagePath"] + 'separator560.png" class="separator" />'+
											'</td>'+
										'</tr>'+
									'</table>'+
								'</td>'+
								'<td>'+
									'<img width="20" src="' + ServerSide["imagePath"] + 'spacer.gif" />'+
								'</td>'+
								'<td>'+	
									'<div id="BoxDxPrezzi"></div>'+
								'</td>'+
							'</tr>'+
						'</table>'+
					'</td>'+
				'</tr>'+
				goToPageTop()+
			'</table>';
			
			CodiceHTML += footer;
			document.getElementById('fiatcc').innerHTML = CodiceHTML;	
				document.getElementById('BoxDxPrezzi').innerHTML = boxDXCode(); 
				document.getElementById('imgBigInterni').innerHTML ='<img src="' + Vehicle.MvsInnerPreparation.imgBig + '" />';		
				document.getElementById('imgCerchioneBig').innerHTML ='<img src="' + getCerchione().imgBig + '" />';
				caricaColoriInterni();
			
			
        }
// FINE DISPLAY STEP 2 (scelta colore, interni cerchione)

        /******************************************/

// INIZIO DISPLAY STEP 3 (scelta altri optional)
    function displayStep3() {
	
	var footer = includeJsp("../common/footer.jsp");
	
	CodiceHTML =
	'<table width="100%" class="pageWrapper" border="0">'+
		'<tr>'+
			'<td>'+
				'<table width="100%" border="0">'+
					'<tr>'+
						'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td>'+
						'<td>' + NumImgCode() + '</td>'+
					'</tr>'+
					'<tr>'+
						'<td width="335" >' + 
							menuTopRightCode() +
							'<img id="tdFlash" src="' + ServerSide["imagePath"] + 'spacer.gif" width="353" height="179" border="0">'+
						'</td>'+
						'<td>'+
							'<table width="100%" border="0" cellpadding="0" cellspacing="0">' +
								'<tr>' +
									'<td><img   src="' + ServerSide["imageUploadPathFE"] + ServerSide["Page3TitleImageFE"] + '"></td>'+
								'</tr>'+
								'<tr>' +
									'<td width="auto" height="40">' + 
										'<p style="padding:10px 10px 0 0;">'+ ServerSide["Page3TextFE"] + '</p><br />'+
										'<img src="' + Vehicle.MvsInnerPreparation.imgBig + '">';
										var immagineCerchione = getCerchione().imgBig;
										if(!getCcBoxCerchiVisibility()){
												immagineCerchione = ServerSide["imagePath"] + 'spacer.gif';
										}
										CodiceHTML +=
										'<img src="' + immagineCerchione + '">'+
									'</td>'+
								'</tr>'+
							'</table>'+
						'</td>'+
					'</tr>'+
				'</table>'+
			'</td>'+
		'</tr>'+
		'<tr>'+
		'<tr><td>&nbsp;</td></tr>'+
			'<td><img src="' + ServerSide["imagePath"] + 'separator.png" class="separator" /></td>'+
		'</tr>'+
		'<tr>'+
			'<td>'+
				'<table width="100%">'+
					'<tr>'+
						'<td>'+
							'<table width="100%" class="optional-des">'+
								'<img src="' + ServerSide["imagePath"] + 'configTxt9.gif" /><br /><br />';
								if( getIncentiviValueByCode(Vehicle.Mvs.code,"INCENTIVI_ROTTAMAZIONE") != 0 ){
								rottamazioneBooleanFlag = ServerSide["rottamazione"];
								 CodiceHTML +=
								'<tr style="visibility:hidden;display:none;">'+
									'<td align="center">'+
										'<table border="0" cellspacing="0" cellpadding="0" class="tbldotted" width="96%">'+
											'<tr>'+
												'<td colspan="0" class="trc"><b>Ho un\'auto da rottamare</b></td>'+
												'<td colspan="0" class="trc" valign="middle">'+
													'<form name="rottamazioneForm" action=""><input type="checkbox" '+ (rottamazioneBooleanFlag==true ? " checked " :"") + '  name="rottamazioneField" value="" onclick="javascript:setRottamazioneSelected();"/></form>'+
												'</td>'+
											'</tr>'+
										'</table>'+
									'</td>'+
								'</tr>';
								}
								flagPromozioni = false;
								for (pp = 0; pp < PromoList.length; pp++) {
									if (PromoList[pp].promoType == 'A' || PromoList[pp].promoType == 'B' || PromoList[pp].promoType == 'D')
									{
										flagPromozioni = true;
									}
								}
								if (flagPromozioni)
								{
											CodiceHTML +=
											'<tr>' +
												'<td valign="top" colspan="5">' +
													'<table border="0" cellspacing="0" cellpadding="0" width="100%">' +
														'<tr class="bk2">' +
															'<td height="15" class="trc" align="left" colspan="5"><span class="txtbold">' + ServerSide["page1HComm"] + '</span></td>' +
														'</tr>';
									for (pro = 0; pro < PromoList.length; pro++) {
										if (PromoList[pro].promoType == 'A') {										
											var priceString="";
											if(PromoList[pro].priceNoVat<0){ //absolute
												priceString +=printCurrency("-"+numberToFormattedString( Math.abs(PromoList[pro].priceNoVat)),"&nbsp;","C");
											}
											else{ //percent
												priceString+="-"+PromoList[pro].priceNoVat+"%";
											}
											var proComA = '';
											var proCheckA = '';
											var proDisableA = '';
											if (Vehicle.Promos[PromoList[pro].code] != null) proCheckA = ' checked';
											if (PromoList[pro].switchable == '0') proDisableA = ' disabled';
											CodiceHTML += 
												'<tr>'+
													'<td  class="trc" height="18" style="font-size:2px;" align="center"><input onclick="javascript:addOrRemovePromo(\''+PromoList[pro].code+'\', this);"  type="checkbox" '+proCheckA+proDisableA+'></td>'+
													'<td class="trc" style="padding-left:2px;">'+PromoList[pro].choice+'</td>'+
													'<td class="trc" style="padding-left:2px;">'+PromoList[pro].communication+'<br>'+priceString + '</td>'+
												'</tr>';
										}
										if (PromoList[pro].promoType == 'B') {
											var priceString =printCurrency(numberToFormattedString( Math.abs(PromoList[pro].priceNoVat)),"&nbsp;","C");
											var proCheckB = '';
											var proDisableB = '';
											if (Vehicle.Promos[PromoList[pro].code] != null) proCheckB = ' checked';
											if (PromoList[pro].switchable == '0') proDisableB = ' disabled';
											CodiceHTML += 
												'<tr>'+
													'<td class="trc" height="18" style="font-size:2px;" align="center"><input onclick="javascript:addOrRemovePromo(\''+PromoList[pro].code+'\', this);"  type="checkbox" '+proCheckB+proDisableB+'></td>'+
													'<td class="trc" style="padding-left:2px;">'+PromoList[pro].choice+'</td>'+
													'<td class="trc" style="padding-left:2px;">'+PromoList[pro].communication+'<br>' + priceString + '</td>'+
												'</tr>';
										
										}         
										if (PromoList[pro].promoType == 'D') {
											CodiceHTML +=
												'<tr>' +
													'<td class="trc" height="18" style="font-size:2px;" align="center"><input type="checkbox" name="finta" disabled checked></td>'+
													'<td height="18" colspan="4" align="left" style="padding-left:2px;" class="trc">' +
														PromoList[pro].communication +
													'</td>' +
												'</tr>';
										}
									}
								}
								CodiceHTML +=
								'<tr>'+
									'<th width="75" class="thbg">' + ServerSide["page3H1"] + '</th>'+
									'<th width="360" align="left" class="thbg">' + ServerSide["page3H2"] + '</th>'+
									'<th class="thbg">' + ServerSide["page3H3"] + '</th>'+
								'</tr>';
								var currentOpts = getVehicleOpts();
								flagNextStep = true;

								//var ordinamentoOptional = 1;
								var oridineGiusto = '';
								if(Categories["5"]) oridineGiusto+='5';
								if(Categories["S"]) oridineGiusto+='S';
								if(Categories["T"]) oridineGiusto+='T';
								if(Categories["C"]) oridineGiusto+='C';
								if(Categories["L"]) oridineGiusto+='L';
								if(Categories["K"]) oridineGiusto+='K';
								if(Categories["A"]) oridineGiusto+='A';
								if(Categories["Z"]) oridineGiusto+='Z';
								if(Categories["I"]) oridineGiusto+='I';
								if(Categories["O"]) oridineGiusto+='O';								
								for (var cati in Categories) {
									if (cati != '-' && oridineGiusto != '') {
										if(oridineGiusto != ''){
											cati = oridineGiusto.substring(0,1);
											oridineGiusto = oridineGiusto.substring(1);
										}

								CodiceHTML +=
								'<tr>' +
									'<td colspan="3">'+
										'<table width="100%" cellpadding="3" class="optional-tab" style="margin-top: 10px;">'+
											'<tr>'+
												'<td colspan="3" class="midtr">' + Categories[cati] + '</td>'+
											'</tr>';
												
										for (k = 0; k < getOptByCategory(cati).length; k++) {
											var escla = '<img src="' + ServerSide["imagePath"] + 'spacer.gif" width="13" height="13" vspace="0" hspace="0" border="0" >';
											var esplo = '<img src="' + ServerSide["imagePath"] + 'spacer.gif" width="13" height="13" vspace="0" hspace="0" border="0" >';
											var che = '';
											var disab = '';
											for (var COC in currentOpts) {
												if (COC == getOptByCategory(cati)[k].code) che = ' checked';
											}
											if (setChecked(getOptByCategory(cati)[k].code)) che = ' checked';
											if (getOptByCategory(cati)[k].optType == 'S' || setDisabled(getOptByCategory(cati)[k].code)) disab = ' disabled';
											var stc = '';
											if (che == ' checked') {
												var oe = toBeIncluded(getOptByCategory(cati)[k].code);
												var oi = mustInclude(getOptByCategory(cati)[k].code);
												if (!oe[0] || oi) {
													if (oi && !oe[0]) stc = 'ei';
													if (oi && oe[0]) stc = 'i';
													if (!oi && !oe[0]) stc = 'e';
													escla = '<img onclick="javascript:checkCons(\'' + getOptByCategory(cati)[k].code + '\',\'' + stc + '\');" src="' + ServerSide["imagePath"] + 'green-alert.gif" style="cursor:hand;">';
													flagNextStep = false;
												}
											}
											if (getOptByCategory(cati)[k].info == 'true') {
												esplo = '<img src="' + ServerSide["imagePath"] + 'green-quest.gif" onclick="javascript:optionalInfoRequested(\'' + getOptByCategory(cati)[k].code + '\')" style="cursor:hand;">';
											}
											//MANNI: test su HDA
											var hdaKey='';
											//var hdaKeyCheck ='NOPT_' + getOptByCategory(cati)[k].code;	      
											//alert("display step 3 - gestione hda mvs " + getEnabledHdaMvs(Vehicle.Mvs.code));
															   
											if (showHdaInStep(Vehicle.step) &&  (getOptByCategory(cati)[k].hdaSenziente == 'Y' || getEnabledHdaMvs(Vehicle.Mvs.code))) {
												  
												  if(getCodModel() != "" && getCodModel() !="150" && (onInfoHDA.indexOf(getCodModel()) < 0))
													  onInfoHDA = getCodModel() + "_" + onInfoHDA; 	                              
																				  
												var hdaKey =onInfoHDA+'_' + getOptByCategory(cati)[k].code;                            
												esplo = '<img src="' + ServerSide["imagePath"] + 'green-quest.gif" onclick="debug(\'' + hdaKey + '\'); window.HDA.sendEvent(\'' + hdaKey + '\')" style="cursor:hand;">';
											}

											//var checkB = '<input type="checkbox" class="formChe"' + che + disab + ' onclick="javascript:addOrRemoveOpt(\'' + getOptByCategory(cati)[k].code + '\', this); if(window.HDA && this.checked) { debug(\'' + hdaKeyCheck + '     categoria=' + cati + '\'); window.HDA.sendEvent(\'' + hdaKeyCheck + '\',\'categoria=' + cati +'\') } ">';
											//la riga di sopra comprende la categoria; per il momento lo abbiamo disabilitato
											//var checkB = '<input type="checkbox" class="formChe"' + che + disab + ' onclick="javascript:addOrRemoveOpt(\'' + getOptByCategory(cati)[k].code + '\', this); if(window.HDA && this.checked) { debug(\'' + hdaKeyCheck + '\'); window.HDA.sendEvent(\'' + hdaKeyCheck + '\');} ">';
											//la riga sopra comprende l'invio del codice OPT onClick, hanno richiesto attualmente di disabilitare tale funzione.
											var checkB = '<input type="checkbox" class="check"' + che + disab + ' onclick="javascript:addOrRemoveOpt(\'' + getOptByCategory(cati)[k].code + '\', this);">';
											var promoFlag = true;
											for (p = 0; p < PromoList.length; p++) {
												if (PromoList[p].promoType == 'C' && PromoList[p].objCode == getOptByCategory(cati)[k].code) {
													CodiceHTML +=
															'<tr class="bkred">' +
															'<td class="trc" width="20" align="center">' + escla + '</td>' +
															'<td  width="20" align="center" style="margin-top:2px;">' + esplo + '</td>' +
															'<td align="center" class="trc">' + checkB + '</td>' +
															'<td class="trc">' + convertApici(getOptByCategory(cati)[k].desc) + '</td>' +
															'<td class="trc" align="right"><s>' + numberToFormattedString(getOptByCategory(cati)[k].price) + '</s>&nbsp;&nbsp;&nbsp;&nbsp;<br><b>' + numberToFormattedString(getOptByCategory(cati)[k].price + PromoList[p].price) + '</b>&nbsp;&nbsp;&nbsp;&nbsp;</td>' +
															'</tr>';
													promoFlag = false;
												}
											}
											if (promoFlag) {
												//nuova grafica optionals di serie
												var price = getOptByCategory(cati)[k].price;
												var priceString;
												if (getOptByCategory(cati)[k].optType == 'S' && price == 0) {
													checkB = '<input type="checkbox" class="check" checked disabled >';
													priceString = ServerSide["standardOptionalLabel"];
												} else {
													priceString = numberToFormattedString(getOptByCategory(cati)[k].price);
												}
												if (getOptByCategory(cati)[k].optType == 'X'){
													var codeArg=getOptByCategory(cati)[k].code;
													if(getCheckStd(codeArg)=='A'){
														che = ' checked';
														disab = ' disabled';
													}
													if(getCheckStd(codeArg)=='R'){
														che = '';
														disab = ' disabled';
													}
													checkB = '<input id=\'' + getOptByCategory(cati)[k].code + '\' type="checkbox" class="check"' + che + disab + ' onclick="javascript:addOrRemoveOpt(\'' + getOptByCategory(cati)[k].code + '\', this);">';
													priceString = ServerSide["standardOptionalLabel"];
												}
												CodiceHTML +=
														'<tr>' +
															'<td class="left">'+
																escla+
																esplo+
																checkB+
															'</td>'+
															'<td width="360">' + convertApici(getOptByCategory(cati)[k].desc) + '</td>'+
															'<td align="right">' + priceString + '</td>'+
														'</tr>';
											}
										}
											CodiceHTML +=
											'</table>'+
										'</td>'+
									'</tr>';
									}
								}
								CodiceHTML +=
								footerTasti() +
								'<tr><td colspan="3"><img src="' + ServerSide["imagePath"] + 'separator560.png" class="separator" /></td></tr>'+
							'</table>'+
						'</td>'+
						'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" width="20" /></td>'+
						'<td>'+	
							boxDXCode() +
						'</td>'+
					'</tr>'+
				'</table>'+
			'</td>'+
		'</tr>'+
		goToPageTop()+
	'<table>';
	CodiceHTML += footer;
	document.getElementById('fiatcc').innerHTML = CodiceHTML;
	}
// FINE DISPLAY STEP 3 (scelta altri optional)

        /******************************************/

// INIZIO DISPLAY STEP 4
        function displayStep4() {
			
			var footer = includeJsp("../common/footer.jsp");
			//var testdrive = includeJsp("tdccStep4form.jsp");
			
	/******************************************************/
			//testo legale 4 step
			var testoLegale = '';
			var testoLegale="<b>Ce site Internet a &eacute;t&eacute; con&ccedil;u le plus soigneusement possible : n&eacute;anmoins ni l&#39;exactitude ni la justesse des informations qu&#39;il comporte ne peuvent &ecirc;tre garanties. Aucune responsabilit&eacute; ne peut donc &ecirc;tre engag&eacute;e pour quelque dommage que ce soit r&eacute;sultant directement ou indirectement de l&#39;utilisation de ce site Internet.</b>";
	/******************************************************/
				
			
            /* prendo gli oggetti ExternalLink per stampare i testi linkati, le immagini
            linkate ed i percorsi da passare a externalLinkCalled(code) */
            var financing = getExternalLinkByCode("financing");
            var dealerLocator = getExternalLinkByCode("dealerLocator");
            var saveConfig = getExternalLinkByCode("saveConfig");
            var brochure = getExternalLinkByCode("brochure");
            var printLeaflet = getExternalLinkByCode("printLeaflet");
            var sendToFriend = getExternalLinkByCode("sendToFriend");
            var loadConfig = getExternalLinkByCode("loadConfig");
            var testDrive = getExternalLinkByCode("testDrive");
            var sendLead = getExternalLinkByCode("sendLead");
			var pdfBrochure = getExternalLinkByCode("pdfBrochure");
			var htmlTD ="";
			if(ServerSide["PB_TDCC_ENABLE"]=="true"){
				htmlTD = "<table cellpadding=0 cellspancing=0 border='0' bordercolor='blue'><tr><td valign='top' align='left'  style='width:190px; height:250px;'><span  id='spacerTD'></span></td></tr></table>";
			}	
			
			var CodiceHTMLperHda ='';
			if(showHdaInStep(Vehicle.step))
			{ //manni
					CodiceHTMLperHda += "<table cellpadding=0 cellspancing=0 border='0' bordercolor='green'><tr><td valign='top' align='left' style='width:197px; height:180px;'><span  id='spacerDiv'></span></td></tr></table>";
			}

            CodiceHTML =
			'<table width="100%" class="pageWrapper" border="0">'+
				'<tr>'+
					'<td>'+
						'<table width="100%" border="0">'+
							'<tr>'+
								'<td>&nbsp;</td>'+
								'<td>' + NumImgCode() + '</td>'+
							'</tr>'+
							'<tr>'+
								'<td width="335" >' + 
									menuTopRightCode() +
									'<img id="tdFlash" src="' + ServerSide["imagePath"] + 'spacer.gif" width="353" height="179" border="0">'+
								'</td>'+
								'<td>'+
									'<table width="100%" border="0" cellpadding="0" cellspacing="0">' +
										'<tr>' +
											'<td><img  src="' + ServerSide["imageUploadPathFE"] + ServerSide["Page4TitleImageFE"] + '"></td>'+
										'</tr>'+
										'<tr>' +
											'<td width="auto">' + 
												'<p style="padding:10px 10px 0 0;">'+ ServerSide["page4Text"] + '</p><br />'+
												'<img src="' + Vehicle.MvsInnerPreparation.imgBig + '">';
												var immagineCerchione = getCerchione().imgBig;
												if(!getCcBoxCerchiVisibility()){
													immagineCerchione = ServerSide["imagePath"] + 'spacer.gif';
												}
												CodiceHTML +=
												'<img src="' + immagineCerchione + '">'+
											'</td>'+
										'</tr>'+
									'</table>'+
								'</td>'+
							'</tr>'+
						'</table>'+
					'</td>'+
				'</tr>'+
				'<tr>'+
				'<tr><td>&nbsp;</td></tr>'+
					'<td><img src="' + ServerSide["imagePath"] + 'separator.png" class="separator" /></td>'+
				'</tr>'+
				'<tr>'+
					'<td>'+
						'<table width="100%">'+
							'<tr>'+
								'<td width="560">'+
									'<table width="100%" class="config-step4h">'+
										//'<tr><td><img src="' + ServerSide["imageUploadPathFE"] + ServerSide["BoxYourCarTitleImageFE"] + '"><br /></td></tr>'+
										'<tr><td><img src="' + ServerSide["imagePath"] + 'configTxt11.gif"><br /></td></tr>'+
										'<tr><td>' + convertApici(Vehicle.Mvs.desc) + '</td></tr>'+
										'<tr><td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td></tr>'+
										//'<tr><td><img src="' + ServerSide["imageUploadPathFE"] + ServerSide["BoxBasePriceTitleImageFE"] + '"><br /></td></tr>'+
										'<tr><td><img src="' + ServerSide["imagePath"] + 'configTxt12.gif"><br /></td></tr>'+
										'<tr><td>';
											var incentivoPrice = getIncentiviMvsPrice(Vehicle.Mvs.code, Vehicle.Mvs.price , getRottamazioneSelected());
											if(incentivoPrice != calculatePrice('basicPrice')){
												CodiceHTML += getPrezzoBaseBox(Vehicle.Mvs.code, Vehicle.Mvs.price , getRottamazioneSelected());
											//20090203 AB CR Incentivi FINE
											}else if (calculatePrice('basicPrice') != calculatePrice('basicPricePromo')) {
												CodiceHTML += '<s>' + ' ' + conditionalPrintCurrencySymbolBefore(calculatePrice('basicPrice'), " ") + '  ' + ServerSide["boxPriceVatIncluded"] + '</s>' +
														'<br><b>' + ServerSide["boxOnPromotionLabelFE"] + '</b><br>' + ' ' + conditionalPrintCurrencySymbolBefore(calculatePrice('basicPricePromo'), " ") + '  ' + ServerSide["boxPriceVatIncluded"];
											} else {
												CodiceHTML += ' ' + conditionalPrintCurrencySymbolBefore(calculatePrice('basicPrice'), " ") + ' ' + ServerSide["boxPriceVatIncluded"];
											}
										CodiceHTML +=
										'</td></tr>'+
										'<tr><td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td></tr>'+
										//'<tr><td><img src="' + ServerSide["imageUploadPathFE"] + ServerSide["BoxTotalPriceTitleImageFE"] + '"><br /></td></tr>'+
										'<tr><td><img src="' + ServerSide["imagePath"] + 'configTxt13.gif"><br /></td></tr>'+
										'<tr><td>';
											if (calculatePrice('totalPrice') != calculatePrice('totalPriceNoPromo')) {
												CodiceHTML += '<s>' + ' ' + conditionalPrintCurrencySymbolBefore(calculatePrice('totalPriceNoPromo'), " ") + '</b> ' + ServerSide["boxPriceVatIncluded"] + '</s>' +
														'<br><b>' + ServerSide["boxOnPromotionLabelFE"] + '</b><br>' + ' ' + conditionalPrintCurrencySymbolBefore(calculatePrice('totalPrice'), " ") + '</b> ' + ServerSide["boxPriceVatIncluded"];
											} else {
												CodiceHTML += ' ' + conditionalPrintCurrencySymbolBefore(calculatePrice('totalPriceIncentivi'), " ") + '</b> ' + ServerSide["boxPriceVatIncluded"];
											}
										CodiceHTML +=
										'</td></tr>'+
										'<tr><td id="boxCalcFinanziaria">'+drawBoxCalcolatriceFinanziaria("left")+'</td></tr>'+
										'<tr><td><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td></tr>'+
										//'<tr><td><img src="' + ServerSide["imageUploadPathFE"] + ServerSide["BoxConfDetailsTitleImageFE"] + '" /></td></tr>';
										'<tr><td><img src="' + ServerSide["imagePath"] + 'configTxt14.gif"" /></td></tr>';

										if( getIncentiviValueByCode(Vehicle.Mvs.code,"INCENTIVI_ROTTAMAZIONE") != 0 )
										{
											rottamazioneBooleanFlag = ServerSide["rottamazione"];
											CodiceHTML +=
											'<tr style="visibility:hidden;display:none;">'+
												'<td colspan="4" class="txt"><table><tr>'+
												'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" width="10" height="1"></td>' +
												'<td><b>Ho un\'auto da rottamare</b></td>'+
												'<td>'+
													'<form name="rottamazioneForm" action=""><input type="checkbox" '+ (rottamazioneBooleanFlag == true ? " checked " :"") + '  name="rottamazioneField" value="" onclick="javascript:setRottamazioneSelected();"/></form>'+
												'</td>'+
											'</tr>';
										}
										CodiceHTML +=
									'</table>'+
									'<table width="100%" class="optional-des">'+
										'<tr>'+
											'<td>'+
												'<table width="100%" cellpadding="3" class="op-optional">'+
													'<tr>'+
														'<td width="435" class="midtr">' + ServerSide["page4Header1FE"] + '</td>'+
														'<td class="midtr">' + ServerSide["page3H3"] + '</td>'+
													'</tr>'+
													'<tr>'+
														'<td><strong>' + ServerSide["boxDetailBodyColor"] + ':</strong> ' + convertApici(Vehicle.MvsBodyColor.desc) + '</td>'+
														'<td class="alcenter">' + conditionalPrintCurrencySymbolBefore(Vehicle.MvsBodyColor.price, " ") + '</td>'+
													'</tr>'+
													'<tr>'+
														'<td><strong>' + ServerSide["boxDetailnnerPreparation"] + ':</strong> ' + convertApici(Vehicle.MvsInnerPreparation.desc) + '</td>'+
														'<td class="alcenter">' + conditionalPrintCurrencySymbolBefore(Vehicle.MvsInnerPreparation.price, " ") + '</td>'+
													'</tr>'+
													'<tr>'+
														'<td><strong>' + ServerSide["boxDetailRim"] + ':</strong> ' + convertApici(getCerchione().desc) + '</td>'+
														'<td class="alcenter">' + conditionalPrintCurrencySymbolBefore(getCerchione().price, " ") + '</td>'+
													'</tr>'+
													'<tr><td colspan="2"><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td></tr>'+
												'</table>'+
											'</td>'+
										'</tr>'+
										'<tr>'+
											'<td>'+
												'<table width="100%" cellpadding="3" class="op-optional">'+
													'<tr class="midtr">'+
														'<td width="435" class="midtr">' + ServerSide["page4Header2FE"] + '</td>'+
														'<td class="midtr">' + ServerSide["page3H3"] + '</td>'+
													'</tr>';
													for (var VO in Vehicle.Optionals) {
													if (Vehicle.Optionals[VO].category != '-' && Vehicle.Optionals[VO].optType == 'O') {
														CodiceHTML +=
														'<tr>' +
															'<td>' + convertApici(Vehicle.Optionals[VO].desc) + '</td>' +
															'<td class="alcenter">';
															var eventualPricePromo = calculateSingleOptPromoPrice(Vehicle.Optionals[VO].code);
															if (Vehicle.Optionals[VO].price != eventualPricePromo) {
																CodiceHTML += '<s>' + ' ' + conditionalPrintCurrencySymbolBefore(Vehicle.Optionals[VO].price, " ") + '</s><br>' +
																		'<b>' + ServerSide["currency"] + ' ' + numberToFormattedString(eventualPricePromo) + '</b>';
															} else {
																CodiceHTML += ' ' + conditionalPrintCurrencySymbolBefore(Vehicle.Optionals[VO].price, " ");
															}
															CodiceHTML +=
															'</td>' +
														'</tr>';
														}
													}
													CodiceHTML +=
													'<tr><td colspan="2"><img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td></tr>'+
												'</table>'+
											'</td>'+
										'</tr>'+
										'<tr>'+
											'<td>'+
												'<table width="100%" cellpadding="3" class="op-optional">'+
													'<tr class="midtr"><td class="midtr">Equipements de s&eacute;rie</td></tr>';
													
													var oridineGiusto = '';
													if(StandardCategories["S"]) oridineGiusto+='S';
													if(StandardCategories["T"]) oridineGiusto+='T';
													if(StandardCategories["C"]) oridineGiusto+='C';
													if(StandardCategories["L"]) oridineGiusto+='L';
													if(StandardCategories["K"]) oridineGiusto+='K';
													if(StandardCategories["A"]) oridineGiusto+='A';
													if(StandardCategories["Z"]) oridineGiusto+='Z';
													if(StandardCategories["I"]) oridineGiusto+='I';
													if(StandardCategories["O"]) oridineGiusto+='O';															
													for (var cati in StandardCategories)
													{
														if (cati != '-') {
															if(oridineGiusto != '')
															{
																cati = oridineGiusto.substring(0,1);
																oridineGiusto = oridineGiusto.substring(1);
															}
															
															CodiceHTML +=
																	'<tr>' +
																		'<th class="thbg">' + StandardCategories[cati] + '</th>' +
																	'</tr>';
															for (k = 0; k < getStandardOptByCategory(cati).length; k++)
															{
															CodiceHTML +=
																	'<tr>' +
																		'<td>' + convertApici(getStandardOptByCategory(cati)[k].desc) + '</td>' +
																	'</tr>';
															}
															CodiceHTML +=
																	'<tr>' +
																		'<td>&nbsp;</td>' +
																	'</tr>';
														}
													}
													CodiceHTML +=	
													'<tr><td colspan="2">'+testoLegale+'<img src="' + ServerSide["imagePath"] + 'spacer.gif" height="10" /></td></tr>'+
												'</table>'+
											'</td>'+
										'</tr>'+
									'</table>'+
								'</td>'+
								'<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" width="20" height="10" /></td>'+
								'<td style="width: 220px;" valign="top">'+
									
								'</td>'+
							'</tr>'+
						'</table>'+
					'</td>'+
				'</tr>'+
				'<tr>'+
					'<td>'+
						'<table class="config-ft-menu" width="100%">'+
						'<tr>'+
							'<td>';
								if (testDrive.disabled == "false") CodiceHTML += '<a href="javascript:externalLinkCalled(\'' + testDrive.code + '\')" >' + testDrive.desc + '</a>';
								if (dealerLocator.disabled == "false") CodiceHTML += '<a href="javascript:externalLinkCalled(\'' + dealerLocator.code + '\')" >' + dealerLocator.desc + '</a>';
								if (sendLead.disabled == "false") CodiceHTML += ' | <a href="javascript:externalLinkCalled(\'' + sendLead.code + '\')" >' + sendLead.desc + '</a>';
								if (saveConfig.disabled == "false") CodiceHTML += ' | <a href="javascript:externalLinkCalled(\'' + saveConfig.code + '\')" >' + saveConfig.desc + '</a>';
								if (brochure.disabled == "false") CodiceHTML += ' | <a href="javascript:externalLinkCalled(\'' + brochure.code + '\')" >' + brochure.desc + '</a>';
								if (printLeaflet.disabled == "false") CodiceHTML += ' | <a href="javascript:externalLinkCalled(\'' + printLeaflet.code + '\')" >' + printLeaflet.desc + '</a>';
								if (sendToFriend.disabled == "false") CodiceHTML += ' | <a href="javascript:externalLinkCalled(\'' + sendToFriend.code + '\')" >' + sendToFriend.desc + '</a>';
								if (pdfBrochure.disabled == "false") CodiceHTML += ' | <a href="javascript:externalLinkCalled(\'' + pdfBrochure.code + '\')" >' + pdfBrochure.desc + '</a>';
								
								if (financing.disabled == "false"){
									var strOnClick = "";
									if(ServerSide["siteStoreName"] == "FIAT_ITALIA"){
										strOnClick = "onclick=\"tc_log('http://www.fiat.it/newCarConfigurator/ccStep4/Financial_Calculator_Start.jsp');\"";
									}
								/*financing.desc*/
									CodiceHTML += '| <a href="javascript:externalLinkCalled(\'' + financing.code + '\')"' + strOnClick + ' >' + 'Calculer votre financement' + '</a>';
								}
							CodiceHTML += '</td>'+
								goToPageTopStep4() + 
						'</tr>'+
						'</table>'+
					'</td>'+
				'</tr>'+
			'</table>';
			
			CodiceHTML += footer;
			document.getElementById('fiatcc').innerHTML = CodiceHTML;return
			//CodiceHTML +=		
			
            for (var ad = 0; ad < ExternalLinkDataList.length; ad++) {
                if (ExternalLinkDataList[ad].length > 0) {
                    CodiceHTML +=
                            '<tr class="bkBianco">' +
                            '<td class="trc" colspan="2"><span class="txtbold">' + ExternalLinkDataList[ad][0] + '</span></td>' +
                            '</tr>' +
                            '<tr>' +
                            '<td class="trc" colspan="2">' + ExternalLinkDataList[ad][1] + '</td>' +
                            '</tr>' +
                            '<tr>' +
                            '<td colspan="2" class="trc" valign="top">&nbsp;</td>' +
                            '</tr>';
                }
            }
            CodiceHTML +=
                    '</table>' + 
                    '</tr>' +
                    '<tr>' +
                    '<td colspan="3" class="txt"><br>';
            if (financing.disabled == "false"){
            	var strOnClick = "";
            	if(ServerSide["siteStoreName"] == "FIAT_ITALIA"){
            		strOnClick = "onclick=\"tc_log('http://www.fiat.it/newCarConfigurator/ccStep4/Financial_Calculator_Start.jsp');\"";
            	}
            
            	CodiceHTML += '<a href="javascript:externalLinkCalled(\'' + financing.code + '\')"' + strOnClick + '  class="lunderline" >' + financing.desc + '</a>';
            }
            
            if (testDrive.disabled == "false") CodiceHTML += ' | <a href="javascript:externalLinkCalled(\'' + testDrive.code + '\')" class="lunderline" >' + testDrive.desc + '</a>';
            if (dealerLocator.disabled == "false") CodiceHTML += ' | <a href="javascript:externalLinkCalled(\'' + dealerLocator.code + '\')" class="lunderline" >' + dealerLocator.desc + '</a>';
            if (sendLead.disabled == "false") CodiceHTML += ' | <a href="javascript:externalLinkCalled(\'' + sendLead.code + '\')" class="lunderline" >' + sendLead.desc + '</a>';
            if (saveConfig.disabled == "false") CodiceHTML += ' | <a href="javascript:externalLinkCalled(\'' + saveConfig.code + '\')" class="lunderline" >' + saveConfig.desc + '</a>';
            if (brochure.disabled == "false") CodiceHTML += ' | <a href="javascript:externalLinkCalled(\'' + brochure.code + '\')" class="lunderline" >' + brochure.desc + '</a>';
            if (printLeaflet.disabled == "false") CodiceHTML += ' | <a href="javascript:externalLinkCalled(\'' + printLeaflet.code + '\')" class="lunderline">' + printLeaflet.desc + '</a>';
            if (sendToFriend.disabled == "false") CodiceHTML += ' | <a href="javascript:externalLinkCalled(\'' + sendToFriend.code + '\')" class="lunderline" >' + sendToFriend.desc + '</a>';
			if (pdfBrochure.disabled == "false") CodiceHTML += ' | <a href="javascript:externalLinkCalled(\'' + pdfBrochure.code + '\')" class="lunderline" >' + pdfBrochure.desc + '</a>';
            
			testo       = 'Inserisci il tuo numero e parli subito, gratuitamente, con un esperto Fiat  per prenotare il test drive o richiedere informazioni.';
			sospensione = '<br>.............................................................';
			CodiceHTML +=
                    '</td>' +
                    '<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" width="10" height="1"></td>' +
                    '</tr>' +                    
                    '</table>' +
                    '</td>' +
                    '<td>' +
                    '<img src="' + ServerSide["imagePath"] + 'spacer.gif" width="7" height="8">' +
                    '</td>' +
                    '<td background="' + ServerSide["imagePath"] + 'pxl_grey.gif" valign="top">' +
                    '<table border="0" cellspacing="0" cellpadding="0">' +
                    '<tr>' +
                    '<td class="bkBianco"><img src="' + ServerSide["imagePath"] + 'spacer.gif" width="1" id="bordodx" height="361"></td>' +
                    '</tr>' +
                    '</table>' +
                    '</td>' +
                    '</tr>' +
                    '<tr>' +
                    '<td rowspan="2" colspan="2"><img src="' + ServerSide["imagePath"] + 'brdr_bttmlft.gif"></td>' +
                    '<td><img src="' + ServerSide["imagePath"] + 'spacer.gif" width="1" height="8"></td>' +
                    '<td rowspan="2" colspan="2"><img src="' + ServerSide["imagePath"] + 'brdr_bttmrght.gif"></td>' +
                    '</tr>' +
                    '<tr>' +
                    '<td background="' + ServerSide["imagePath"] + 'pxl_grey.gif"><img src="' + ServerSide["imagePath"] + 'spacer.gif" width="1" height="1"></td>' +
                    '</tr>' +
                    '</table>' +
                    '</td>' +
                    '<td valign="top">' +
                    '<table border="0" cellspacing="0" cellpadding="0" width="204">' +
                    '<tr>' +
                    '<td background="' + ServerSide["imagePath"] + 'pxl_grey.gif" colspan="2"><img src="' + ServerSide["imagePath"] + 'spacer.gif" width="8" height="1"></td>' +
                    '<td background="' + ServerSide["imagePath"] + 'pxl_grey.gif"><img src="' + ServerSide["imagePath"] + 'spacer.gif" width="188" height="1"></td>' +
                    '<td class="bkBianco" rowspan="2" colspan="2"><img src="' + ServerSide["imagePath"] + 'brdr_tprght.gif"></td>' +
                    '</tr>' +
                    '<tr> ' +
                    '<td class="bkBianco" colspan="2"><img src="' + ServerSide["imagePath"] + 'spacer.gif" width="1" height="8"></td>' +
                    '<td class="bkBianco"><img src="' + ServerSide["imagePath"] + 'spacer.gif" width="1" height="8"></td> ' +
                    '</tr>' +
                    '<tr>' +
                    '<td class="bkBianco"><img src="' + ServerSide["imagePath"] + 'spacer.gif" width="1" height="232"></td>' +
                    '<td class="bkBianco"><img src="' + ServerSide["imagePath"] + 'spacer.gif" width="7" height="1"></td>' +
                    '<td class="txtPLUSbkBianco" valign="top">' + CodiceHTMLperHda + htmlTD;
					if(Vehicle.Model.code == '1941'){
					CodiceHTML +=
					'<br><img border="0" name="clickCall_Step4" src="/FIAT_ITALIA/images/clickCall_Step4.gif" /><br>'+
					testo+
					sospensione+
					'<br><center><a onclick="MM_openBrWindow(\'http://www.sitofono.com/cc/fiat_auto/\',\'pppShowroom\',\'width=360,height=450\')" '+
					   'href="#" '+
					   'onmouseover="document.images[\'clickCall\'].src=\'/FIAT_ITALIA/images/button_Over_State.png\'" '+
				       'onMouseOut="document.images[\'clickCall\'].src=\'/FIAT_ITALIA/images/button_Normal_State.png\'">'+
							'<img border="0" name="clickCall" src="/FIAT_ITALIA/images/button_Normal_State.png" />'+
					'</a></center><br>';
					}
					CodiceHTML +=
					
					
					
					
                    '<table border="0" cellspacing="10" cellpadding="0" width="100%" style="z-index:60;position:relative;">' +
                    '<tr>' +
                    '<td class="txt" valign="top" align="left"><br>' + ServerSide["page4BoxLabel"] + ':<br>';

            //inizio estensioni 17.06.2004
            var maxGroup = findExternalLinkMaxGroup();
            var maxGroupPos = findExternalLinkMaxGroupPos();
            var cont = 1;
            var voce = 'opvoce';
            var formerGroup = -1;
            for (var gr = 0; gr <= maxGroup; gr++) {
                for (var pos = 0; pos <= maxGroupPos; pos++) {
                    for (var i = 0; i < ExternalLinkList.length; i++) {
                        var exL = ExternalLinkList[i];
                        if (exL.disabled == "false" && exL.displayAs == "image" && exL.group == gr && exL.groupPos == pos) {
                            if (formerGroup != -1 && formerGroup != exL.group) {
                                CodiceHTML += '<br><br>';
                            }
                            voce = 'opvoce' + cont;
                            
                            var strOnClick = "";
            				if(exL.code == "financing" && ServerSide["siteStoreName"] == "FIAT_ITALIA"){
			            		strOnClick = "javascript:tc_log('http://www.fiat.it/newCarConfigurator/ccStep4/Financial_Calculator_Start.jsp');";
			            	}
                            CodiceHTML += '<br><img onclick="' + strOnClick + 'javascript:externalLinkCalled(\'' + exL.code + '\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'' + voce + '\',\'\',\'' + ServerSide["imageUploadPathFE"] + exL.imageOver + '\',0)" src="' + ServerSide["imageUploadPathFE"] + exL.image + '" name="' + voce + '" border="0" class="img_brdrbottom" style="cursor:hand;margin:0px;" width="165" height="16" hspace="0" vspace="1">';
                            formerGroup = exL.group;
                            cont++;
                        }
                    }
                }
            }
            cont = 0;
            for (var gr = 0; gr <= maxGroup; gr++) {
                for (var pos = 0; pos <= maxGroupPos; pos++) {
                    for (var i = 0; i < ExternalLinkList.length; i++) {
                        var exL = ExternalLinkList[i];
                        if (exL.disabled == "false" && exL.displayAs == "text" && exL.group == gr && exL.groupPos == pos) {
                            if (cont == 0) {
                                CodiceHTML += '<br><br><br>';
                            } else {
                                CodiceHTML += ' | ';
                            }
                            CodiceHTML += '<a href="javascript:externalLinkCalled(\'' + exL.code + '\')"  class="lunderline">' + exL.desc + '</a>';
                            cont++;
                        }
                    }
                }
            }
            //fine estensioni 17.06.2004

            CodiceHTML +=
                    '</td> ' +
                    '</tr>' +
                    '</table>' +
                    '</td>' +
                    '<td class="bkBianco"><img src="' + ServerSide["imagePath"] + 'spacer.gif" width="7" height="1"></td>' +
                    '<td background="' + ServerSide["imagePath"] + 'pxl_grey.gif"><img src="' + ServerSide["imagePath"] + 'spacer.gif" width="1" height="1"></td>' +
                    '</tr> ' +
                    '<tr> ' +
                    '<td class="bkBianco" colspan="2"><img src="' + ServerSide["imagePath"] + 'spacer.gif" width="8" height="8"></td> ' +
                    '<td class="bkBianco"><img src="' + ServerSide["imagePath"] + 'spacer.gif" width="1" id="finebarra" height="8"></td> ' +
                    '<td class="bkBianco" rowspan="2" colspan="2"><img src="' + ServerSide["imagePath"] + 'brdr_bttmrght.gif"></td> ' +
                    '</tr>' +
                    '<tr>' +
                    '<td background="' + ServerSide["imagePath"] + 'pxl_grey.gif" colspan="2"><img src="' + ServerSide["imagePath"] + 'spacer.gif" width="1" height="1"></td>' +
                    '<td background="' + ServerSide["imagePath"] + 'pxl_grey.gif"><img src="' + ServerSide["imagePath"] + 'spacer.gif" width="1" height="1"></td> ' +
					'</tr>' +
                    '</table>' +
                    '</td>' +
                    '</tr>' +
                    '</table>' +
                    '<table width="790" cellspacing="0" cellpadding="0" border="0">' +
                    '<tr>' +
                    '<td align="right" class="txt" height="20"><a href="#" class="lnormalg">' + ServerSide["backToTopPageFE"] + '</a> <sup><img src="' + ServerSide["imagePath"] + 'rrw_bttm.gif" width="8" height="6" border="0"></sup></td>' +
                    '</tr>' +
                    '</table>';

            

            //cursorManagerStep4();
        }
		
// FINE DISPLAY STEP 4

function getRottamazioneSelected(){
			if(rottamazioneBooleanFlag != null){
				//alert("getRottamazioneSelected !=null = "+rottamazioneBooleanFlag);
				return rottamazioneBooleanFlag;
			}else{
				//alert("getRottamazioneSelected = "+rottamazioneBooleanFlag);
				return false;
			}
		}
		
function setRottamazioneSelected(){
	//alert("valore del field = "+document.rottamazioneForm.rottamazioneField.checked);
	rottamazioneBooleanFlag = document.rottamazioneForm.rottamazioneField.checked;
	ServerSide["rottamazione"] = rottamazioneBooleanFlag;
	graphic();
	
}

function getIncentiviIcon( mvsListCode, price){
	if(isIncentiviModelEnable()){
		var incentiviPrice = getIncentiviMvsPrice(mvsListCode, price , true);
			if(incentiviPrice != price){
				//Immagine Incentivo
				var imgEcoPath = '<img src="' + ServerSide["imagePath"] + 'eco_icona.png" width="22" id="ecoIncentivi" height="13">';
				return imgEcoPath;
			}else{
				return "";
			}
	}else{
		return "";
	}
//eco_icona.png
}

function getPrezzoBaseBox(mvsCode,mvsBasePrice,rottamazione){

var CodiceHTML ='';
var incentiviTotVal = getIncentiviValueByCode(mvsCode,"INCENTIVI_TOTALE");
var rottamazioneVal =0;
	if(rottamazione){
		rottamazioneVal = getIncentiviValueByCode(mvsCode,"INCENTIVI_ROTTAMAZIONE");
	}


	if(incentiviTotVal+rottamazioneVal != 0){
		CodiceHTML += '<s>'+' '+conditionalPrintCurrencySymbolBefore(calculatePrice('basicPrice'), " ")+' '+ServerSide["boxPriceVatIncluded"]+'</s>'+
				'<br><b>' + conditionalPrintCurrencySymbolBefore(getIncentiviMvsPrice(Vehicle.Mvs.code , calculatePrice('basicPrice'),getRottamazioneSelected()), " ")+' '+ServerSide["boxPriceVatIncluded"]+'</b>';
				
				if(incentiviTotVal > 0){
					CodiceHTML += '<br><b>Ecoincentivi -'+conditionalPrintCurrencySymbolBefore(incentiviTotVal, " ")+'</b>';
				}
				
				if(rottamazioneVal > 0){
					CodiceHTML += '<br><b>Rottamazione -'+conditionalPrintCurrencySymbolBefore(rottamazioneVal, " ")+'</b>';
				}
				
	}
	return CodiceHTML;
	
}

function getIncentiviValueByCode(mvsCode,codElement){
	var incentivo = 0;
		for(var i=0;i<MvsQuotes.length;i++){
			if(MvsQuotes[i].codeChannel=="INCENTIVI"){
				if(mvsCode==MvsQuotes[i].codeMvs){
					if(MvsQuotes[i].codeElement==codElement){
						incentivo=MvsQuotes[i].currencyValue;
						break;
					}
				}
			}
		}
		return incentivo;
}

	// Funzione che verifica l'eventuale disabilitazione del box cerchioni per l'MVS selezionato.
	// In tutti gli altri casi, il box verra' visualizzato, as usual.
	function getCcBoxCerchiVisibility(){
			if(Vehicle.Mvs.ccViewCerchi != null && Vehicle.Mvs.ccViewCerchi == "N"){
				//DEBUG
				//alert("Vehicle.Mvs.ccViewCerchi = " + Vehicle.Mvs.ccViewCerchi +" MVS = " +Vehicle.Mvs.code);
				return false;
			}else{
				return true;
			}
			
	}
