// VERSIONE LANCIA
// Variabili per lasciare i layer che scrollano al posto precedente dopo il reset della grafica
var TopColoriStep2 = 0;
var LeftCerchioniStep2 = 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 cc = true;
function graphic() {

	switch(Vehicle.step) {
		case 0: displayStep0(); break;
		case 1:
			displayStep1();
			setBoxDxTop();
			break;
		case 2:
			
			interniListTMP = getConstrainEsclusive(MvsIPList, Vehicle.MvsBodyColor.code);
			cerchioniListTMP = getOptByCategory('-');
			if (TopColoriStep2 != 0) 		TopColoriStep2 = parseInt(document.getElementById('ccInnColori').style.top);
			if (LeftCerchioniStep2 != 0) 	LeftCerchioniStep2 = parseInt(document.getElementById('ccInnCerchioni').style.left);
			if (TopInterniStep2 != 0) 		TopInterniStep2 = parseInt(document.getElementById('ccInnInterni').style.top);
			displayStep2();
			document.getElementById('ccInnColori').style.top = TopColoriStep2 + "px";
			document.getElementById('ccInnCerchioni').style.left = LeftCerchioniStep2 + "px";
			document.getElementById('ccInnInterni').style.top = TopInterniStep2 + "px";
			setBorderRedImg(getCerchione().code);
			setBoxDxTop();
		break;
		case 3:
			if (TopOptStep3 != 0) TopOptStep3 = parseInt(document.getElementById('ccInnOpt3').style.top);
			if (TopDetailLay != 0) TopDetailLay = parseInt(document.getElementById('detailInt').style.top);
			displayStep3();
			document.getElementById('ccInnOpt3').style.top = TopOptStep3 + "px";
			document.getElementById('detailInt').style.top = TopDetailLay + "px";
			setBoxDxTop();
		break;
		case 4:
			if (ServerSide["page4H1Flag1"] == "false") ServerSide["page4H1Link1"] = '';
			if (ServerSide["page4H1Flag2"] == "false") ServerSide["page4H1Link2"] = '';
			if (ServerSide["page4H2Flag1"] == "false") ServerSide["page4H2Link1"] = '';
			if (ServerSide["page4H2Flag2"] == "false") ServerSide["page4H2Link2"] = '';
			if (ServerSide["page4H2Flag3"] == "false") ServerSide["page4H2Link3"] = '';
			if (ServerSide["page4H2Flag4"] == "false") ServerSide["page4H2Link4"] = '';
			displayStep4();
			setBoxDxTop();
			break;
	}
	if (document.getElementById('flash')) document.getElementById('flash').className = "alfa6BorderGrigio";
	if (flagStart > 0) setLayerProperty();
	flagStart++;
}
/******************************************/

// INIZIO DISPLAY STEP 0 (scelta modelli)
function displayStep0() {

	var numRow = 0;
	var contCategory = 0;
	var ListArray = new Array();

	// Conto categorie
	for (i = 0; i < ModelList.length; i++) {
		if (i != 0) {
			if (ModelList[i].category != ModelList[i-1].category) {
				contCategory++;
			} else {

			}
		} else { contCategory++;}
	}

	numRows = contCategory;
	cnt = 1;

	// Conto numero righe da visualizzare
	for (i = 0; i < ModelList.length; i++) {
		if (i < ModelList.length - 1) {
			//alert(i);
			if (ModelList[i].category == ModelList[i+1].category) {
				cnt++;
				if (cnt > 3 && (cnt%3 == 1)) {
					numRows++;
				}
			} else cnt = 1;
		}
	}

	// Riempo "ListArray" con tutto quello che serve per il loop
	cnt = 0;
	cntMod = 0;
	var contArray = new Array();

	for (i = 0; i < numRows; i++) {

		for (k = 0; k < 3; k++) {
			if (k == 0) {
				contArray[k] = ModelList[cntMod];
				cntMod++;
			} else {
				if (cntMod < ModelList.length) {
					if (ModelList[cntMod].category == ModelList[cntMod-1].category ) {
						contArray[k] = ModelList[cntMod];
						cntMod++;
					} else {
						if (k == 1) {
							contArray[k] = '&nbsp;';
							contArray[k+1] = '&nbsp;';
						}
						if (k == 2) {
							contArray[k] = '&nbsp;';
						}
						break;
					}
				} else {
					if (k == 1) {
						contArray[k] = '&nbsp;';
						contArray[k+1] = '&nbsp;';
					}
					if (k == 2) {
						contArray[k] = '&nbsp;';
					}
					break;
				}
			}
		}
		ListArray[i] = new Array(contArray[0],contArray[1],contArray[2]);
	}

	CodiceHTML =
		'<table border="0" cellpadding="0" cellspacing="0" width="100%">'+
			'<tr>'+
				'<td style="padding-top:20px;" valign="top" colspan="2">'+
					'<table border="0" cellpadding="0" cellspacing="0" width="100%">'+
						'<tr>'+
							'<td class="alfa6CelPadLeft"><span class="titlecontent">'+ServerSide['pageTitle']+'</span></td>'+
						'</tr>'+
						'<tr><td style="height:4px;line-height:4px;">&nbsp;</td></tr>'+
						'<tr>'+
							'<td class="alfa6CelPad">'+ServerSide['page0Text']+'</td>'+
						'</tr>'+
						'<tr><td style="height:8px;line-height:8px;">&nbsp;</td></tr>'+
					'</table>'+
				'</td>'+
			'</tr>'+
			'<tr>'+
				'<td class="alfa6ExCelBorder" width="70%" style="padding-top:0px;" valign="top">'+
				'<!-- INIZIO DEI MODELLI -->';
	for (i = 0; i < numRows; i++) {
		CodiceHTML +=
		'<table border="0" cellpadding="0" cellspacing="0" width="100%" height="61">'+
			'<tr><td style="height:1px;line-height:0px;font-size:1px" class="bkbianco">&nbsp;</td></tr>'+
			'<tr><td style="line-height:0px;height:2px;font-size:2px;">&nbsp;</td></tr>'+
			'<tr>'+
				'<td style="padding-left:20px;">'+
					'<table border="0" cellpadding="0" cellspacing="0" width="100%" height="38" class="bkbianco" style="margin-right:2px;">'+
						'<tr>';
		// Loop per le immagini/spazi vuoti
		CodiceHTML += '<td width="155" height="44" style="line-height:0px;"><img border="0" onclick="javascript:modelChanged(\''+ListArray[i][0].code+'\')" src="'+ListArray[i][0].imgSmall+'" alt="'+ListArray[i][0].desc+'" style="cursor:hand;" hspace="0" vspace="0" width="90" height="44" border="0"></td>';
		if (ListArray[i][1] == '&nbsp;') CodiceHTML += '<td width="121" height="38" style="line-height:0px;">'+ListArray[i][1]+'</td>';
		else CodiceHTML += '<td width="121" height="44" style="line-height:0px;"><img border="0" onclick="javascript:modelChanged(\''+ListArray[i][1].code+'\')" src="'+ListArray[i][1].imgSmall+'" alt="'+ListArray[i][1].desc+'" style="cursor:hand;" hspace="0" vspace="0" width="90" height="44" border="0"></td>';
		if (ListArray[i][2] == '&nbsp;') CodiceHTML += '<td width="121" height="38" style="line-height:0px;">'+ListArray[i][2]+'</td>';
		else CodiceHTML += '<td width="121" height="44" style="line-height:0px;"><img border="0" align="right" onclick="javascript:modelChanged(\''+ListArray[i][2].code+'\')" src="'+ListArray[i][2].imgSmall+'" alt="'+ListArray[i][2].desc+'" style="cursor:hand;" hspace="0" vspace="0" width="90" height="44" border="0"></td>';
		CodiceHTML +=
						'</tr>'+
					'</table>'+
				'</td>'+
			'</tr>'+
			'<tr><td style="line-height:0px;height:2px;font-size:2px;">&nbsp;</td></tr>'+
			'<tr><td style="height:1px;line-height:0px;font-size:1px" class="bkbianco">&nbsp;</td></tr>'+
			'<tr>'+
				'<td style="padding-left:20px;">'+
					'<table border="0" cellpadding="0" cellspacing="0" width="100%" height="18" style="margin-right:2px;">'+
						'<tr>';
		// Loop per le descrizioni
		CodiceHTML += '<td width="155" height="18" style="padding-left:8px;" class="textGreyBold">'+ListArray[i][0].desc+'</td>';
		if (ListArray[i][1] == '&nbsp;') CodiceHTML += '<td width="121" height="18" style="padding-left:8px;" class="textGreyBold">'+ListArray[i][1]+'</td>';
		else CodiceHTML += '<td width="121" height="18" style="padding-left:8px;" class="textGreyBold">'+ListArray[i][1].desc+'</td>';
		if (ListArray[i][2] == '&nbsp;') CodiceHTML += '<td width="121" height="18" style="padding-left:8px;" class="textGreyBold">'+ListArray[i][2]+'</td>';
		else CodiceHTML += '<td width="121" height="18" style="padding-left:8px;" class="textGreyBold" align="center">'+ListArray[i][2].desc+'</td>';
		CodiceHTML +=
						'</tr>'+
					'</table>'+
				'</td>'+
			'</tr>'+
		'</table>';
	}
	CodiceHTML +=
				'<!-- FINE DEI MODELLI -->'+
				'</td>'+
				'<td width="30%" align="center" valign="top" style="padding-top:0px;">'+
				'<!-- INIZIO TABELLE-BLOCCHI DI DESTRA -->'+
				boxDXCode()+
				'<!-- FINE TABELLE-BLOCCHI DI DESTRA -->'+
				'</td>'+
			'</tr>'+
		'</table>';

	if (IsIE6() || IsIE7()) { CodiceHTML += ''; }
	else { CodiceHTML += '<br>'; }

	document.getElementById('alfa6').innerHTML = CodiceHTML;
}
// FINE DISPLAY STEP 0 (scelta modelli)

/******************************************/

// INIZIO DISPLAY STEP 1 (scelta mvs)
function displayStep1() {

	CodiceHTML =
		'<table border="0" cellpadding="0" cellspacing="0" width="100%">'+
			'<tr>'+
				'<td width="70%" style="padding-left:0px;" valign="top">'+
					'<table border="0" cellpadding="0" cellspacing="0" width="100%" class="bkgrigio">'+
						NumImgCode();
			var gg = 0;
			var foTMP = false;
			for (var pr in Vehicle.Promos) {
				if (Vehicle.Promos[pr].promoType == 'E') {
					if (gg == 0) {
						CodiceHTML +=
							'<tr>'+
								'<td align="center" style="padding-left:20px;padding-right:20px;padding-top:6px;padding-bottom:0px;" colspan="2" class="alfa6CelBorderRightBianco">'+
									'<table border="0" cellpadding="0" cellspacing="0" width="380" class="alfa6TabBorderGrigio">'+
										'<tr class="bkgrigioscuro">'+
											'<td height="15" style="font-size:9px;color:#FFFFFF;padding-left:5px;" align="left"><b>'+ServerSide["page1HComm"]+'</b></td>'+
										'</tr>';
					}
					if (gg%2 != 0) CodiceHTML += '<tr class="bkgrigio">';
					else CodiceHTML += '<tr class="bkgrigiochiaro">';
					CodiceHTML +=
										'<td style="font-size:9px;padding:5px;" align="left" class="alfa6CelBorderTop">'+Vehicle.Promos[pr].communication+'</td>'+
									'</tr>';
					foTMP = true;
				}

				gg++;
			}
			if (foTMP) {
				CodiceHTML +=
							'</table>'+
						'</td>'+
					'</tr>';
			}
	CodiceHTML +=
						'<tr>'+
							'<td align="center" style="padding-left:20px;padding-right:20px;padding-top:8px;padding-bottom:8px;" colspan="2" class="alfa6CelBorderRightBianco">'+
								'<table border="0" cellpadding="0" cellspacing="0" width="380" class="alfa6TabBorderGrigio">'+
									'<tr class="bkgrigioscuro">'+
										'<td height="15" style="padding-left:5px;font-size:9px;" width="210" class="box"><b>'+ServerSide['page1H1']+'</b></td>'+
										'<td height="15" style="font-size:9px;" width="80" class="box" align="center"><b>'+ServerSide['page1H2']+'</b></td>'+
										'<td height="15" style="font-size:9px;" width="45" class="box" align="center"><b>'+ServerSide['page1H3']+'</b></td>'+
										'<td height="15" style="font-size:9px;" width="45" class="box" align="center"><b>'+ServerSide['page1H5']+'</b></td>'+
										'<td height="15" style="font-size:9px;" width="45" class="box" align="center"><b>'+ServerSide['page1H4']+'</b></td>'+
									'</tr>';
	var prom = '';
	for (m = 0; m < MvsList.length; m++) {
		var promFlag = true;
		//var frecciaColor = "frecciettinaRossaSB.gif";
		var frecciaColor = "CC_STEP01_check.gif";
		if(MvsList[m].code == Vehicle.Mvs.code){
			//frecciaColor = "frecciettinaVerdeSB.gif"
			frecciaColor = "CC_STEP01_checked.gif"
		}
		var infoImage='<img align="center" onclick="javascript:mvsInfoRequested(\''+MvsList[m].code+'\');" src="'+ServerSide["imagePath"]+'a6_icona_esplora.gif" style="cursor:hand;margin-top:1px;" hspace="0" vspace="0" width="14" height="15" border="0">';
		if(ServerSide["mvsInfoDisabled"] == "true"){
			infoImage='<img align="center" src="'+ServerSide["imagePath"]+'spaziatore.gif" style="margin-top:1px;" hspace="0" vspace="0" width="14" height="15" border="0">';
		}
		var optImage='<img align="center" onclick="javascript:mvsOptRequested(\''+MvsList[m].code+'\');" src="'+ServerSide["imagePath"]+'a6_icona_esplora.gif" style="cursor:hand;margin-top:1px;" hspace="0" vspace="0" width="14" height="15" border="0">';
		if(ServerSide["mvsOptDisabled"] == "true"){
			optImage='<img align="center" src="'+ServerSide["imagePath"]+'spaziatore.gif" style="margin-top:1px;" hspace="0" vspace="0" width="14" height="15" border="0">';
		}
		for (k = 0; k < PromoList.length; k++) {
			if (PromoList[k].promoType == 'F' && PromoList[k].objCode == MvsList[m].code) {
				prom = '<br><b>'+numberToFormattedString(PromoList[k].price)+'</b>';
				CodiceHTML +=
						'<tr class="bkred">'+
						'<td style="padding-left:5px;font-size:9px;" class="alfa6CelBorderTop" style="color:#FFFFFF"><font class="box">'+MvsList[m].desc+'</font></td>'+
						'<td style="font-size:9px;" height="17" align="center" class="alfa6CelBorderTopLeft" style="color:#FFFFFF"><font class="box"><s>'+numberToFormattedString(MvsList[m].price)+'</s>'+prom+'</font></td>'+
						'<td style="font-size:9px;line-height:0px;" height="17" valign="center" align="center" class="alfa6CelBorderTopLeft">'+infoImage+'</td>'+
						'<td style="font-size:9px;line-height:0px;" height="17" valign="center" align="center" class="alfa6CelBorderTopLeft">'+optImage+'</td>'+
						'<td style="font-size:9px;line-height:0px;" height="17" valign="center" align="center" class="alfa6CelBorderTopLeft"><img align="center" onclick="javascript:mvsChanged(\''+MvsList[m].code+'\');" src="'+ServerSide["imagePath"]+ frecciaColor + '" style="cursor:hand;" hspace="0" vspace="0" width="12" height="12" border="0"></td>'+
					'</tr>';
				promFlag = false;
				break;
			}
		}

		if (promFlag) {
		if (m%2 != 0) coloRig = '<tr class="bkgrigio">';
		else coloRig = '<tr class="bkgrigiochiaro">';
		CodiceHTML +=
					coloRig+
					'<td style="padding-left:5px;font-size:9px;" class="alfa6CelBorderTop">'+MvsList[m].desc+'</td>'+
					'<td style="font-size:9px;" height="17" align="center" class="alfa6CelBorderTopLeft">'+numberToFormattedString(MvsList[m].price)+'</td>'+
					'<td style="font-size:9px;line-height:0px;" height="17" valign="center" align="center" class="alfa6CelBorderTopLeft">'+infoImage+'</td>'+
					'<td style="font-size:9px;line-height:0px;" height="17" valign="center" align="center" class="alfa6CelBorderTopLeft">'+optImage+'</td>'+
					'<td style="font-size:9px;line-height:0px;" height="17" valign="center" align="center" class="alfa6CelBorderTopLeft"><img align="center" onclick="javascript:mvsChanged(\''+MvsList[m].code+'\');" src="'+ServerSide["imagePath"]+ frecciaColor + '" style="cursor:hand;" hspace="0" vspace="0" width="12" height="12" border="0"></td>'+
				'</tr>';
		}
	}
	CodiceHTML +=
								'</table>'+
							'</td>'+
						'</tr>'+
						footerTasti()+
					'</table>'+
				'</td>'+
				'<td width="30%" align="center" valign="top" style="padding-top:34px;" id="contBoxsToMove">'+
				'<!-- INIZIO TABELLE-BLOCCHI DI DESTRA -->'+
				boxDXCode()+
				'<!-- FINE TABELLE-BLOCCHI DI DESTRA -->'+
				'</td>'+
			'</tr>'+
		'</table>';

	if (IsIE6() || IsIE7()) { CodiceHTML += ''; }
	else { CodiceHTML += '<br>'; }

	document.getElementById('alfa6').innerHTML = CodiceHTML;

}
// FINE DISPLAY STEP 1 (scelta mvs)

/******************************************/

// INIZIO DISPLAY STEP 2 (scelta colore, interni cerchione)
function displayStep2() {

	CodiceHTML =
		'<table border="0" cellpadding="0" cellspacing="0" width="100%">'+
			'<tr>'+
				'<td style="padding-left:0px;" valign="top" width="70%">'+
				'<!-- INIZIO CONTENUTI CENTRALI -->'+
					'<table border="0" cellpadding="0" cellspacing="0" width="100%" class="bkgrigio">'+
						NumImgCode()+
						'<tr>'+
							'<td align="center" style="padding-left:20px;padding-right:20px;padding-top:8px;padding-bottom:8px;" colspan="2" class="alfa6CelBorderRightBianco">'+
								'<table border="0" cellpadding="0" cellspacing="0" width="378" class="alfa6TabBorderGrigio">'+
									'<tr class="bkgrigioscuro">'+
										'<td height="15" style="padding-left:5px;font-size:9px;" width="378" class="box"><b>'+ServerSide["page2H1"]+'</b></td>'+
									'</tr>'+
									'<tr class="bkgrigiochiaro">'+
										'<td style="padding-left:5px;padding-top:8px;padding-bottom:8px;" class="alfa6CelBorderTop">'+
											'<table border="0" cellpadding="0" cellspacing="0" width="373">'+
												'<tr>'+
													'<td>'+
														'<table border="0" cellpadding="0" cellspacing="0" width="373">'+
															'<tr>'+
																'<td width="257" height="125" class="bkbianco" style="line-height:0px;position:relative;" id="tdFlash">'+
																	flashObj()+
																'</td>'+
																'<td width="113" align="right" style="padding-left:4px;">'+
																	'<table border="0" cellpadding="0" cellspacing="0" height="125" width="109">'+
																		'<tr>'+
																			'<td height="125">'+
																				'<table border="0" cellpadding="0" cellspacing="0" height="124" width="109" style="padding-righ:4px;">'+
																					'<tr>'+
																						'<td rowspan="2" width="99" nowrap>'+
																							'<div id="ccContColori">'+
																								'<div id="ccInnColori" style="top:0px;">'+
'<!-- INIZIO LAYER COLORI CHE SCROLLA -->'+
																									'<table border="0" cellpadding="0" cellspacing="0" width="99">';


																					if (MvsBCList.length > 0) {
																						contBC = 0;
																						for (i = 0; i < MvsBCList.length/2; i++) {
																							CodiceHTML +=
																									'<tr height="26">'+
																										'<td height="26" onclick="javascript:mvsBCChanged(\''+MvsBCList[contBC].code+'\');" style="cursor:hand;line-height:1px;"><img src="'+MvsBCList[contBC].imgSmall+'" alt="'+MvsBCList[contBC].desc+getDescBCByOptCode(MvsBCList[contBC].code)+'" height="24" width="45" style="border:solid 1px #FFFFFF" hspace="0" vspace="0"></td>'+
																										'<td height="26" style="line-height:1px;width:4px;">&nbsp</td>';
																							contBC++;
																							if ((contBC > MvsBCList.length - 1) && ((MvsBCList.length)%2 == 1)) {
																								CodiceHTML +=
																										'<td height="26" style"line-height:1px;" colspan="4">&nbsp;</td>'+
																									'</tr>';
																								break;
																							}
																							CodiceHTML +=
																										'<td height="26" onclick="javascript:mvsBCChanged(\''+MvsBCList[contBC].code+'\');" style="cursor:hand;line-height:1px;"><img src="'+MvsBCList[contBC].imgSmall+'" alt="'+MvsBCList[contBC].desc+getDescBCByOptCode(MvsBCList[contBC].code)+'" height="24" width="45" style="border:solid 1px #FFFFFF" hspace="0" vspace="0"></td>'+
																										'<td height="26" style="line-height:1px;width:4px;">&nbsp</td>'+
																									'</tr>'+
																								'<tr><td colspan="4" style="line-height:1px;height:7px;font-size:3px;">&nbsp</td></tr>';
																							contBC++;
																						}
																					} else CodiceHTML += '<tr><td>&nbsp</td></tr>';
																					CodiceHTML +=
																									'</table>'+
'<!-- FINE LAYER COLORI CHE SCROLLA -->'+
																								'</div>'+
																							'</div>'+
																						'</td>'+
																						'<td align="left" valign="top" style="line-height:0px;"><img onmouseout="fermaScrolling()" onmouseover="javascript:parteScrolling(\'giu\',\'colori\');" style="cursor:hand;" height="4" width="8" src="'+ServerSide["imagePath"]+'cc_SuRed.gif" vspace="2" hspace="0" border="0"></td>'+
																					'</tr>'+
																					'<tr>'+
																						'<td align="left" valign="bottom" style="line-height:0px;" width="10"><img onmouseout="fermaScrolling()" onmouseover="javascript:parteScrolling(\'su\',\'colori\');" style="cursor:hand;" height="4" width="8" src="'+ServerSide["imagePath"]+'cc_GiuRed.gif" vspace="2" hspace="0" border="0"></td>'+
																					'</tr>'+
																				'</table>'+
																			'</td>'+
																		'</tr>'+
																	'</table>'+
																'</td>'+
															'</tr>'+
															'<tr>'+
																'<td colspan="2" style="padding-top:6px;">'+
'<!-- INIZIO TABELLA DESCRIZIONE COLORE -->'+
																	'<table border="0" cellpadding="0" cellspacing="0" height="15" width="358" class="alfa6TabBorderGrigio">'+
																		'<tr class="bkgrigiochiaro">';
										descColoriTMP = Vehicle.MvsBodyColor.desc+getDescBCByOptCode(Vehicle.MvsBodyColor.code);
										if (descColoriTMP.length > 53) descColoriTMP = '<a title="'+descColoriTMP+'" style="cursor:default;">'+descColoriTMP.substring(0, 52)+'...</a>';
																CodiceHTML +=
																			'<td class="novePx" style="padding-bottom:1px;padding-top:1px;padding-left:4px;padding-right:4px;">'+descColoriTMP+'</td>'+
																		'</tr>'+
																	'</table>'+
'<!-- FINE TABELLA DESCRIZIONE COLORE -->'+
																'</td>'+
															'</tr>'+
														'</table>'+
													'</td>'+
												'</tr>'+
											'</table>'+
										'</td>'+
									'</tr>'+
									'<tr class="bkgrigioscuro">'+
										'<td height="15" style="padding-left:5px;font-size:9px;" width="378" class="box"><b>'+ServerSide["page2H2"]+'</b></td>'+
									'</tr>'+
									'<tr class="bkgrigiochiaro">'+
										'<td style="padding-left:5px;padding-top:8px;padding-bottom:8px;" class="alfa6CelBorderTop">'+
											'<table border="0" cellpadding="0" cellspacing="0" width="373">'+
												'<tr>'+
													'<td>'+
														'<table border="0" cellpadding="0" cellspacing="0" width="373" height="81">'+
															'<tr>'+
																'<td width="250" class="alfa6BorderGrigio">'+
																	'<table border="0" cellpadding="0" cellspacing="0" width="250" height="81" class="bkbianco">'+
																		'<tr>'+
																			'<td height="40" valign="bottom">'+
'<!-- INIZIO LAYER CERCHIONI CHE SCROLLA -->'+
																				'<div id="ccContCerchioni" style="position:relative;left:10px;top:10px;">'+
																					'<div id="ccInnCerchioni" style="left:0px;">'+
																						'<table border="0" cellpadding="0" cellspacing="0" id="ccTabCerchioni" width="'+cerchioniListTMP.length*40+'">'+
																							'<tr>';
				if (cerchioniListTMP.length > 0) {
					for (i = 0; i < cerchioniListTMP.length; i++) {
						CodiceHTML += '<td width="40" height="40"><img id="CCimg'+cerchioniListTMP[i].code+'" onclick="javascript:mvsOptChanged(\''+cerchioniListTMP[i].code+'\');setBorderRedImg(\''+cerchioniListTMP[i].code+'\');" style="cursor:hand;" height="36" width="36" src="'+cerchioniListTMP[i].imgSmall+'" alt="'+convertApici(cerchioniListTMP[i].desc)+'" vspace="0" hspace="0" border="0"></td>';
					}
				} else {
					CodiceHTML += '<td width="40" height="40">&nbsp;</td>';
				}
				CodiceHTML +=
																							'</tr>'+
																						'</table>'+
																					'</div>'+
																				'</div>'+
'<!-- FINE LAYER CERCHIONI CHE SCROLLA -->'+
																			'</td>'+
																		'</tr>'+
																		'<tr>'+
																			'<td height="26" valign="bottom">'+
																				'<img align="left" onmouseout="fermaScrolling()" onmouseover="javascript:parteScrolling(\'dx\',\'cerchioni\');" style="cursor:hand;" height="8" width="4" src="'+ServerSide["imagePath"]+'cc_SxRed.gif" vspace="3" hspace="4" border="0"><img align="right" onmouseout="fermaScrolling()" onmouseover="javascript:parteScrolling(\'sx\',\'cerchioni\');" style="cursor:hand;" height="8" width="4" src="'+ServerSide["imagePath"]+'cc_DxRed.gif" vspace="3" hspace="4" border="0">'+
																			'</td>'+
																		'</tr>'+
																		'<tr>'+
																			'<td height="15">'+
'<!-- INIZIO TABELLA DESCRIZIONE CERCHIONE -->'+
																				'<table border="1" style=" color:#CCCCCC; border-color:gray; " cellpadding="0" cellspacing="0" height="15" width="257" class="alfa6CelBorderTop">'+
																					'<tr class="bkgrigiochiaro">'+
																						'<td class="novePx" style="background-color: #000000;border-color:gray; padding-bottom:1px;padding-top:1px;padding-left:4px;padding-right:4px;">';
																						var descCerchioTMP = getCerchione().desc;
																						var imgBigCerchione = getCerchione().imgBig;
				if (descCerchioTMP.length > 43) CodiceHTML += '<a title="'+convertApici(descCerchioTMP)+'" style="cursor:default; background-color: #000000;" >'+descCerchioTMP.substring(0, 42)+'...</a>';
				else CodiceHTML += descCerchioTMP;
				CodiceHTML +=
																						'</td>'+
																					'</tr>'+
																				'</table>'+
'<!-- FINE TABELLA DESCRIZIONE CERCHIONE -->'+
																			'</td>'+
																		'</tr>'+
																	'</table>'+
																'</td>'+
																'<td width="21">&nbsp;</td>'+
																'<td width="81" height="81" valign="top" style="line-height:0px;"><img id="CCimgBig" src="'+imgBigCerchione+'" alt="'+convertApici(descCerchioTMP)+'" class="alfa6BorderGrigio" height="81" width="81" vspace="0" hspace="0" border="0"></td>'+
																'<td width="13">&nbsp;</td>'+
															'</tr>'+
														'</table>'+
													'</td>'+
												'</tr>'+
											'</table>'+
										'</td>'+
									'</tr>'+
									'<tr class="bkgrigioscuro">'+
										'<td height="15" style="padding-left:5px;font-size:9px;" width="378" class="box"><b>'+ServerSide["page2H3"]+'</b></td>'+
									'</tr>'+
									'<tr class="bkgrigiochiaro">'+
										'<td style="padding-left:5px;padding-top:8px;padding-bottom:8px;" class="alfa6CelBorderTop">'+
											'<table border="0" cellpadding="0" cellspacing="0" width="373">'+
												'<tr>'+
													'<td>'+
														'<table border="0" cellpadding="0" cellspacing="0" width="373" height="106">'+
															'<tr>'+
																'<td width="193" height="106" class="alfa6BorderGrigio" style="line-height:0px;"><img height="106" width="193" src="'+Vehicle.MvsInnerPreparation.imgBig+'" alt="'+Vehicle.MvsInnerPreparation.desc+'" vspace="0" hspace="0" border="0"></td>'+
																'<td width="180" align="right" style="padding-left:4px;">'+
																	'<table border="0" cellpadding="0" cellspacing="0" height="106" width="176">'+
																		'<tr>'+
																			'<td height="106">'+
																				'<table border="0" cellpadding="0" cellspacing="0" height="106" width="176" style="padding-righ:4px;">'+
																					'<tr>'+
																						'<td rowspan="2" width="162" nowrap>'+
																							'<div id="ccContInterni">'+
																								'<div id="ccInnInterni" style="top:0px;">'+
'<!-- INIZIO LAYER INTERNI CHE SCROLLA -->'+
																									'<table border="0" cellpadding="0" cellspacing="0" width="162">';
									if (interniListTMP.length > 0) {
										contIP = 0;
										//alert(interniListTMP.length/3);
										for (i = 0; i < interniListTMP.length/3; i++) {
											CodiceHTML +=
												'<tr height="26">'+
													'<td height="26" style="line-height:1px;"><img onclick="javascript:mvsIPChanged('+interniListTMP[contIP].code+');" style="cursor:hand;" src="'+interniListTMP[contIP].imgSmall+'" alt="'+interniListTMP[contIP].desc+'" height="24" width="45" border="0" hspace="0" vspace="0" style="border:solid 1px #FFFFFF"></td>'+
													'<td height="26" style="line-height:1px;width:8px;">&nbsp</td>';
													contIP++;
													if ((contIP > interniListTMP.length - 2) && (interniListTMP.length)%3 == 1) {
											CodiceHTML += '<td height="26" colspan="4">&nbsp;</td>';
														break;
													}
											CodiceHTML +=
														'<td height="26" style="line-height:1px;"><img onclick="javascript:mvsIPChanged('+interniListTMP[contIP].code+');" style="cursor:hand;" src="'+interniListTMP[contIP].imgSmall+'" alt="'+interniListTMP[contIP].desc+'" height="24" width="45" border="0" hspace="0" vspace="0" style="border:solid 1px #FFFFFF"></td>'+
														'<td height="26" style="line-height:1px;width:8px;">&nbsp</td>';
													contIP++;
													if ((contIP > interniListTMP.length - 1) && (interniListTMP.length)%3 == 2) {
											CodiceHTML += '<td height="26" colspan="2">&nbsp;</td>';
														break;
													}
											CodiceHTML +=
												'<td height="26" style="line-height:1px;"><img onclick="javascript:mvsIPChanged('+interniListTMP[contIP].code+');" style="cursor:hand;" src="'+interniListTMP[contIP].imgSmall+'" alt="'+interniListTMP[contIP].desc+'" height="24" width="45" border="0" hspace="0" vspace="0" style="border:solid 1px #FFFFFF"></td>'+
												'<td height="26" style="line-height:1px;width:4px;">&nbsp</td>'+
												'</tr>';
											if (contIP < interniListTMP.length - 1) CodiceHTML += '<tr><td colspan="6" style="line-height:1px;height:14px;font-size:3px;">&nbsp</td></tr>';
											contIP++;
										}
									} else CodiceHTML += '<tr><td style="line-height:1px;height:14px;font-size:3px;">&nbsp</td></tr>';

																								CodiceHTML +=
																									'</table>'+
'<!-- FINE LAYER INTERNI CHE SCROLLA -->'+
																								'</div>'+
																							'</div>'+
																						'</td>'+
																						'<td align="left" valign="top" style="line-height:0px;"><img onmouseout="fermaScrolling()" onmouseover="javascript:parteScrolling(\'giu\',\'interni\');" style="cursor:hand;" height="4" width="8" src="'+ServerSide["imagePath"]+'cc_SuRed.gif" vspace="2" hspace="0" border="0"></td>'+
																					'</tr>'+
																					'<tr>'+
																						'<td align="left" valign="bottom" style="line-height:0px;" width="10"><img onmouseout="fermaScrolling()" onmouseover="javascript:parteScrolling(\'su\',\'interni\');" style="cursor:hand;" height="4" width="8" src="'+ServerSide["imagePath"]+'cc_GiuRed.gif" vspace="2" hspace="0" border="0"></td>'+
																					'</tr>'+
																				'</table>'+
																			'</td>'+
																		'</tr>'+
																	'</table>'+
																'</td>'+
															'</tr>'+
															'<tr>'+
																'<td colspan="2" style="padding-top:3px;">'+
'<!-- INIZIO TABELLA DESCRIZIONE INTERNI -->'+
																	'<table border="0" cellpadding="0" cellspacing="0" height="15" width="358" class="alfa6TabBorderGrigio">'+
																		'<tr class="bkgrigiochiaro">'+
																			'<td class="novePx" style="padding-bottom:1px;padding-top:1px;padding-left:4px;padding-right:4px;">';
										descInterniTMP = Vehicle.MvsInnerPreparation.desc;
										if (descInterniTMP.length > 53) descInterniTMP = '<a title="'+descInterniTMP+'" style="cursor:default;">'+descInterniTMP.substring(0, 52)+'...</a>';

														CodiceHTML +=
																				descInterniTMP+
																			'</td>'+
																		'</tr>'+
																	'</table>'+
'<!-- FINE TABELLA DESCRIZIONE INTERNI -->'+
																'</td>'+
															'</tr>'+
														'</table>'+
													'</td>'+
												'</tr>'+
											'</table>'+
										'</td>'+
									'</tr>'+
								'</table>'+
							'</td>'+
						'</tr>'+
					footerTasti()+
					'</table>'+
				'<!-- FINE CONTENUTI CENTRALI -->'+
				'</td>'+
				'<td width="30%" align="center" valign="top" style="padding-top:34px;" id="contBoxsToMove">'+
				'<!-- INIZIO TABELLE-BLOCCHI DI DESTRA -->'+
				boxDXCode()+
				'<!-- FINE TABELLE-BLOCCHI DI DESTRA -->'+
				'</td>'+
			'</tr>'+
		'</table>';

	document.getElementById('alfa6').innerHTML = CodiceHTML;

}
// FINE DISPLAY STEP 2 (scelta colore, interni cerchione)

/******************************************/

// INIZIO DISPLAY STEP 3 (scelta altri optional)
function displayStep3() {

	var cerchioObj = getCerchione();

	CodiceHTML =
		'<table border="0" cellpadding="0" cellspacing="0" width="100%">'+
			'<tr>'+
				'<td style="padding-left:0px;" valign="top" width="70%">'+
				'<!-- INIZIO CONTENUTI CENTRALI -->'+
					'<table border="0" cellpadding="0" cellspacing="0" width="100%" class="bkgrigio">'+
						NumImgCode()+
						'<tr>'+
							'<td align="center" style="padding-left:20px;padding-right:20px;padding-top:8px;padding-bottom:8px;" colspan="2" class="alfa6CelBorderRightBianco">'+
								'<table border="0" cellpadding="0" cellspacing="0" width="378" class="alfa6TabBorderGrigio">'+
									'<tr class="bkgrigioscuro">'+
										'<td height="15" style="padding-left:5px;font-size:9px;" width="378">&nbsp;</td>'+
									'</tr>'+
									'<tr class="bkgrigiochiaro">'+
										'<td class="alfa6CelBorderTop">'+
											'<table border="0" cellpadding="0" cellspacing="0" width="378" height="125" class="alfa6CelBorderBottom">'+
												'<tr>'+
													'<td width="258" height="125" style="line-height:0px;position:relative;" rowspan="2" class="bkbianco" id="tdFlash">'+
														flashObj()+
													'</td>'+
													'<td width="120" height="77" style="line-height:0px;" class="alfa6CelBorderLeftBottom" colspan="2"><img height="77" width="120" src="'+Vehicle.MvsInnerPreparation.imgNormal+'" alt="'+Vehicle.MvsInnerPreparation.desc+'" vspace="0" hspace="0" border="0"></td>'+
												'</tr>'+
												'<tr>'+
													'<td width="47" height="47" style="line-height:0px;" class="alfa6CelBorderLeftRight"><img height="47" width="47" src="'+cerchioObj.imgNormal+'" alt="'+convertApici(cerchioObj.desc)+'" vspace="0" hspace="0" border="0"></td>'+
													'<td width="72" height="47">&nbsp;</td>'+
												'</tr>'+
											'</table>'+
										'</td>'+
									'</tr>'+
									'<tr>'+
										'<td style="padding:0px;" width="378">'+
											'<table border="0" cellpadding="0" cellspacing="0" width="378" height="280">'+
												'<tr class="bkgrigioscuro">'+
													'<td style="padding-left:5px;font-size:9px;" width="72" class="alfa6CelBorderRight"><span class="box"><b>'+ServerSide["page3H1"]+'</b></span></td>'+
													'<td style="padding-left:5px;font-size:9px;" width="238" class="alfa6CelBorderRight"><span class="box"><b>'+ServerSide["page3H2"]+'</b></span></td>'+
													'<td style="padding-left:5px;font-size:9px;" width="68" class="box"><b>'+ServerSide["page3H3"]+'</b></td>'+
													'<td width="8" style="padding:0px;line-height:1px;">&nbsp;</td>'+
												'</tr>'+
												'<tr class="bkgrigio">'+
													'<td colspan="3" valign="top" width="368" style="padding:0px;" height="280">';
				if (IsIE6())				CodiceHTML += '<div id="ccContOpt3" style="top:0px;height:281px;clip:rect(0 368 281 0);">';
				else if (!IsIE())			CodiceHTML += '<div id="ccContOpt3" style="top:0px;height:280px;clip:rect(0 368 280 0);">';
				else 							CodiceHTML += '<div id="ccContOpt3" style="top:0px;">';
												CodiceHTML +=
													'<div id="ccInnOpt3" style="top:0px;">'+
														'<table border="0" cellpadding="0" cellspacing="0" width="100%" class="alfa6CelBorderBottom">'+
'<!-- INIZIO LOOP OPTIONALS -->';
var currentOpts = getVehicleOpts();
flagNextStep = true;
var po = 0;
							for (var cati in Categories) {
								if (cati != '-') {
									if (po > 0) {clsTR = 'class="alfa6CelBorderTopRight"'; clsT = 'class="alfa6CelBorderTop"';}
									else  {clsTR = 'class="alfa6CelBorderRight"'; clsT = '';}
									po++;
									CodiceHTML +=
												'<tr>'+
													'<td colspan="3" style="padding-left:5px;font-size:9px;" width="76" '+clsTR+'><span class="box"><b>&nbsp;</b></span></td>'+
													'<td style="padding:5px;font-size:9px;" width="224" '+clsTR+'><span class="red"><b>'+Categories[cati]+'</b></span></td>'+
													'<td style="padding-left:5px;font-size:9px;" '+clsT+' width="68"><b>&nbsp;</b></td>'+
												'</tr>';
									//for (k = getOptByCategory(cati).length-1; k >=0; k--) 
									for (k =0; k <=getOptByCategory(cati).length-1; k++){
										var escla = '<img src="'+ServerSide["imagePath"]+'spaziatore.gif" width="13" height="13" vspace="1" hspace="0" border="0">';
										var esplo = '<img src="'+ServerSide["imagePath"]+'spaziatore.gif" width="13" height="13" vspace="1" 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 oir = mustIncludeRem(getOptByCategory(cati)[k].code);
										var stc = '';
										//if (getOptByCategory(cati)[k].code == '530') alert(oi);
										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"]+'a6_icona_escla.gif" width="13" height="13" vspace="1" hspace="0" border="0" style="cursor:hand;">';
												flagNextStep = false;
											}
										}

										if (getOptByCategory(cati)[k].info == 'true') {
											esplo = '<img src="'+ServerSide["imagePath"]+'a6_icona_esplora.gif" onclick="javascript:optionalInfoRequested(\''+getOptByCategory(cati)[k].code+'\')" width="14" height="15" vspace="1" hspace="0" border="0" style="cursor:hand;">';
										}
										var checkB = '<input type="checkbox" class="formChe"'+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 align="center" style="padding:0px;width:26px;" width="26" class="alfa6CelBorderTopRight">'+escla+'</td>'+
																'<td align="center" style="padding:0px;width:25px;" width="25" class="alfa6CelBorderTopRight">'+esplo+'</td>'+
																'<td align="center" style="padding:0px;width:25px;" width="25" class="alfa6CelBorderTopRight">'+checkB+'</td>'+
																'<td style="padding-left:5px;font-size:9px;" width="224" class="alfa6CelBorderTopRight" style="color:#FFFFFF"><font class="box">'+getOptByCategory(cati)[k].desc+'</font></td>'+
																'<td style="padding-right:5px;font-size:9px;" width="68" class="alfa6CelBorderTop" align="right" style="color:#FFFFFF"><font class="box"><s>'+numberToFormattedString(getOptByCategory(cati)[k].price)+'</s><br><b>'+numberToFormattedString(getOptByCategory(cati)[k].price + PromoList[p].price)+'</font></b></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="formChe" 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="formChe"' + che + disab + ' onclick="javascript:addOrRemoveOpt(\'' + getOptByCategory(cati)[k].code + '\', this);">';
												priceString = ServerSide["standardOptionalLabel"];
											}
											CodiceHTML +=
														'<tr class="bkgrigiochiaro">'+
															'<td align="center" style="padding:0px;line-height:0px;" width="25" class="alfa6CelBorderTopRight">'+escla+'</td>'+
															'<td align="center" style="padding:0px;line-height:0px;" width="26" class="alfa6CelBorderTopRight">'+esplo+'</td>'+
															'<td align="center" style="padding:0px;line-height:0px;" width="25" class="alfa6CelBorderTopRight">'+checkB+'</td>'+
															'<td style="padding-left:5px;font-size:9px;" width="224" class="alfa6CelBorderTopRight">'+getOptByCategory(cati)[k].desc+'</td>'+
															'<td style="padding-right:5px;font-size:9px;" width="68" class="alfa6CelBorderTop" align="right">'+priceString+'</td>'+
														'</tr>';
										}
									}

								}
							}
												CodiceHTML +=
'<!-- FINE LOOP OPTIONALS -->'+
														'</table>'+
													'</div>'+
													'</div>'+
													'</td>'+
													'<td width="10" style="padding:0px;line-height:0px;" align="center" class="alfa6CelBorderTopLeft" height="100%" valign="top">'+
														'<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">'+
															'<tr><td valign="top" align="center" height="50%"><img onmouseout="fermaScrolling()" onmouseover="javascript:parteScrolling(\'giu\',\'opt3\');" style="cursor:hand;" height="4" width="8" src="'+ServerSide["imagePath"]+'cc_SuRed.gif" vspace="5" hspace="0" border="0"></td></td></tr>'+
															'<tr><td valign="bottom" align="center" height="50%"><img onmouseout="fermaScrolling()" onmouseover="javascript:parteScrolling(\'su\',\'opt3\');" style="cursor:hand;" height="4" width="8" src="'+ServerSide["imagePath"]+'cc_GiuRed.gif" vspace="5" hspace="0" border="0"></td></td></tr>'+
														'</table>'+
													'</td>'+
												'</tr>'+
											'</table>'+
										'</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 align="center" style="padding-left:20px;padding-right:20px;padding-top:0px;padding-bottom:8px;" colspan="2" class="alfa6CelBorderRightBianco">'+
								'<table border="0" cellpadding="0" cellspacing="0" width="380" class="alfa6TabBorderGrigio">'+
									'<tr class="bkgrigioscuro">'+
										'<td height="15" style="font-size:9px;color:#FFFFFF;padding-left:5px;" align="left"><b>'+ServerSide["page3HComm"]+'</b></td>'+
									'</tr>';
				var clp = 1;
				for (pro = 0; pro < PromoList.length; pro++) {
					if (PromoList[pro].promoType == 'A') {
						var proComA = '';
						var proCheckA = '';
						var proDisableA = '';
						if (clp%2 == 0) CodiceHTML += '<tr>';
						else CodiceHTML += '<tr class="bkgrigio">';
						if (PromoList[pro].communication != '') proComA = '<tr><td>&nbsp;</td><td class="novePx">'+PromoList[pro].communication;+'</td></tr>';
						if (Vehicle.Promos[PromoList[pro].code] != null) proCheckA = ' checked';
						if (PromoList[pro].switchable == '0') proDisableA = ' disabled';
						CodiceHTML +=
											'<td align="left" class="alfa6CelBorderTop">'+
												'<table cellpadding="1" cellspacing="0" border="0">'+
												'<tr><td height="18" style="padding-left:4px;">'+
												'<input onclick="javascript:addOrRemovePromo(\''+PromoList[pro].code+'\', this);" type="checkbox" class="formChe"'+proCheckA+proDisableA+'><td class="novePx">'+PromoList[pro].choice+'</td>'+
												'</td></tr>'+
												proComA+
												'</table>'+
									 		'</td>'+
										'</tr>';
						clp++;
					}
					if (PromoList[pro].promoType == 'B') {
						var proCheckB = '';
						var proDisableB = '';
						if (clp%2 == 0) CodiceHTML += '<tr>';
						else CodiceHTML += '<tr class="bkgrigio">';
						if (Vehicle.Promos[PromoList[pro].code] != null) proCheckB = ' checked';
						if (PromoList[pro].switchable == '0') proDisableB = ' disabled';
						CodiceHTML +=
										'<td height="19" style="font-size:9px;padding-left:5px;" align="left" class="alfa6CelBorderTop">'+
											'<input onclick="javascript:addOrRemovePromo(\''+PromoList[pro].code+'\', this);" type="checkbox" class="formChe"'+proCheckB+proDisableB+'>'+PromoList[pro].choice+
										'</td>'+
									'</tr>';
						clp++;
					}
					if (PromoList[pro].promoType == 'D') {
						if (clp%2 == 0) CodiceHTML += '<tr>';
						else CodiceHTML += '<tr class="bkgrigio">';
						CodiceHTML +=
										'<td height="19" style="font-size:9px;padding-left:5px;" align="left" class="alfa6CelBorderTop">'+
											PromoList[pro].communication+
										'</td>'+
									'</tr>';
						clp++;
					}
				}
				CodiceHTML +=
								'</table>'+
							'</td>'+
						'</tr>';
			}
				CodiceHTML +=
						footerTasti()+
					'</table>'+
				'<!-- FINE CONTENUTI CENTRALI -->'+
				'</td>'+
				'<td width="30%" align="center" valign="top" style="padding-top:34px;" id="contBoxsToMove">'+
				'<!-- INIZIO TABELLE-BLOCCHI DI DESTRA -->'+
				boxDXCode()+
				'<!-- FINE TABELLE-BLOCCHI DI DESTRA -->'+
				'</td>'+
			'</tr>'+
		'</table>';

	document.getElementById('alfa6').innerHTML = CodiceHTML;
}
// FINE DISPLAY STEP 3 (scelta altri optional)

/******************************************/

// INIZIO DISPLAY STEP 4
function displayStep4() {

	var cerchioObj = getCerchione();

	CodiceHTML =
		'<table border="0" cellpadding="0" cellspacing="0" width="100%">'+
			'<tr>'+
				'<td width="70%" style="padding-left:0px;" valign="top">'+
				'<!-- INIZIO CONTENUTI CENTRALI -->'+
					'<table border="0" cellpadding="0" cellspacing="0" width="100%" class="bkgrigio">'+
						NumImgCode()+
						'<tr>'+
							'<td align="center" style="padding-left:20px;padding-right:20px;padding-top:8px;padding-bottom:8px;" colspan="2" class="alfa6CelBorderRightBianco">'+
								'<table border="0" cellpadding="0" cellspacing="0" width="378" class="alfa6TabBorderGrigio">'+
									'<tr class="bkgrigioscuro">'+
										'<td height="15" style="padding-left:5px;font-size:9px;" width="378">&nbsp;</td>'+
									'</tr>'+
									'<tr class="bkgrigiochiaro">'+
										'<td style="padding:0px;" class="alfa6CelBorderTop">'+
											'<table border="0" cellpadding="0" cellspacing="0" width="378" height="125" class="alfa6CelBorderBottom">'+
												'<tr>'+
													'<td width="258" height="125" style="line-height:0px;position:relative;" rowspan="2" class="bkbianco" id="tdFlash">'+
														flashObj()+
													'</td>'+
													'<td width="120" height="77" style="line-height:0px;" class="alfa6CelBorderLeftBottom" colspan="2"><img height="77" width="120" src="'+Vehicle.MvsInnerPreparation.imgNormal+'" alt="'+Vehicle.MvsInnerPreparation.desc+'" vspace="0" hspace="0" border="0"></td>'+
												'</tr>'+
												'<tr>'+
													'<td width="47" height="47" style="line-height:0px;" class="alfa6CelBorderLeftRight"><img height="47" width="47" src="'+cerchioObj.imgNormal+'" alt="'+convertApici(cerchioObj.desc)+'" vspace="0" hspace="0" border="0"></td>'+
													'<td width="72" height="47">&nbsp;</td>'+
												'</tr>'+
											'</table>'+
										'</td>'+
									'</tr>'+
									'<tr class="bkgrigio">'+
										'<td class="alfa6CelPad" style="padding:20px;">'+
											ServerSide["page4Text"]+
										'</td>'+
									'</tr>'+
									'<!-- INIZIO NUOVO -->'+
									'<tr class="bkgrigio">'+
										'<td >'+
											'<table border="0" cellpadding="0" cellspacing="0" width="100%">'+
												'<tr class="bkgrigio">'+
													'<td width="25%">'+
													'&nbsp;'+
													'</td>'+
													'<td width="75%">'+
													'&nbsp;'+
													'</td>'+
												'</tr>'+
												'<tr class="bkgrigio">'+
													'<td colspan="2" align="right" style="padding:0px;padding-bottom:0px;padding-right:20px;"><a href="javascript:externalLinkCalled(\''+ServerSide["page4LinkTestdrive"]+'\')"><img src="'+ServerSide["imageLangPath"]+'cc_prenota_testdrive.gif" border="0" hspace="0" vspace="0"></a></td>'+
												'<tr class="bkgrigio" coslpan="2">'+
													'<td valign="center">'+
														'&nbsp;'+
													'</td>'+
												'</tr>'+
												'</tr>'+

/*
												'<tr class="bkgrigio">'+
													'<td colspan="2" align="right" style="padding:0px;padding-bottom:0px;padding-right:20px;"><a href="javascript:externalLinkCalled(\''+ServerSide["page4H1Link1"]+'\')"><img src="'+ServerSide["imageLangPath"]+'cc_sendDealerLead.gif" border="0" hspace="0" vspace="0"></a></td>'+
												'</tr>'+
												'<tr class="bkgrigio">'+
													'<td width="25%">'+
													'&nbsp;'+
													'</td>'+
													'<td width="75%">'+
													'&nbsp;'+
													'</td>'+
												'</tr>'
*/
												'';

											//Calcola il finanziamento
											if (ServerSide["page4H2Flag4"] == "true") {
												CodiceHTML+=
												'<tr class="bkgrigiochiaro">'+
													'<td width="25%" valign="center">'+
														'<a href="javascript:externalLinkCalled(\''+ServerSide["page4H2Link4"]+'\')"><img id="p4H2Img4"  src="'+ServerSide["imagePath"]+'cc_calcFin.jpg" border="0" ></a>'+
													'</td>'+
													'<td width="75%" valign="center" >'+
														'<b><span class="novePx">&nbsp;&nbsp;'+ServerSide["page4H2Desc4"]+'</span></b>'+
													'</td>'+
												'</tr>'+
												'<tr class="bkgrigio" coslpan="2">'+
													'<td valign="center">'+
														'&nbsp;'+
													'</td>'+
												'</tr>';
											}
											//Stampa il leaflet
											if (ServerSide["page4H2Flag3"] == "true") {
												CodiceHTML+=
												'<tr class="bkgrigiochiaro">'+
													'<td width="25%" valign="center">'+
														'<a href="javascript:externalLinkCalled(\''+ServerSide["page4H2Link3"]+'\')"><img id="p4H2Img3"  src="'+ServerSide["imagePath"]+'cc_printLeaflet.gif" border="0" ></a>'+
													'</td>'+
													'<td width="75%" valign="center">'+
														'<b><span class="novePx">&nbsp;&nbsp;'+ServerSide["page4H2Desc3"]+'</span></b>'+
													'</td>'+
												'</tr>'+
												'<tr class="bkgrigio" coslpan="2">'+
													'<td valign="center">'+
														'&nbsp;'+
													'</td>'+
												'</tr>';
											}
											//Invia ad un amico
											if (ServerSide["page4H2Flag1"] == "true") {
												CodiceHTML+=
												'<tr class="bkgrigiochiaro">'+
													'<td width="25%" valign="center">'+
														'<a href="javascript:externalLinkCalled(\''+ServerSide["page4H2Link1"]+'\')"><img id="p4H2Img1"  src="'+ServerSide["imagePath"]+'cc_sendToFriend.gif" border="0" ></a>'+
													'</td>'+
													'<td width="75%" valign="center">'+
														'<b><span class="novePx">&nbsp;&nbsp;'+ServerSide["page4H2Desc1"]+'</span></b>'+
													'</td>'+
												'</tr>'+
												'<tr class="bkgrigio" coslpan="2">'+
													'<td valign="center">'+
														'&nbsp;'+
													'</td>'+
												'</tr>';
											}
											//Scarica come desktop
											if (ServerSide["page4H2Flag2"] == "true") {
												CodiceHTML+=
												'<tr class="bkgrigiochiaro">'+
													'<td width="25%" valign="center">'+
														'<a href="javascript:externalLinkCalled(\''+ServerSide["page4H2Link2"]+'\')"><img id="p4H2Img2"  src="'+ServerSide["imagePath"]+'cc_desktopDownload.jpg" border="0" ></a>'+
													'</td>'+
													'<td width="75%" valign="center">'+
														'<b><span class="novePx">&nbsp;&nbsp;'+ServerSide["page4H2Desc2"]+'</span></b>'+
													'</td>'+
												'</tr>'+
												'<tr class="bkgrigio" coslpan="2">'+
													'<td valign="center">'+
														'&nbsp;'+
													'</td>'+
												'</tr>';
											}
											//Richiedi la brochure
											if (ServerSide["page4H1Flag2"] == "true") {
												CodiceHTML+=
												'<tr class="bkgrigiochiaro">'+
													'<td width="25%" valign="center">'+
														'<a href="javascript:externalLinkCalled(\''+ServerSide["page4H1Link2"]+'\')"><img id="p4H1Img2"  src="'+ServerSide["imagePath"]+'cc_requestBrochure.jpg" border="0" ></a>'+
													'</td>'+
													'<td width="75%" valign="center">'+
														'<b><span class="novePx">&nbsp;&nbsp;'+ServerSide["page4H1Desc2"]+'</span></b>'+
													'</td>'+
												'</tr>'+
												'<tr class="bkgrigio" coslpan="2">'+
													'<td valign="center">'+
														'&nbsp;'+
													'</td>'+
												'</tr>';
											}
											//Salva configurazione
											if (!(ServerSide["savingDisabled"] == "true")) {
												CodiceHTML+=
												'<tr class="bkgrigiochiaro">'+
													'<td width="25%" valign="center">'+
														'<a href="javascript:saveConfig()"><img  src="'+ServerSide["imagePath"]+'cc_saveConf.jpg" border="0" ></a>'+
													'</td>'+
													'<td width="75%" valign="center">'+
														'<b><span class="novePx">&nbsp;&nbsp;'+ServerSide["boxSaveTitle"]+'</span></b>'+
													'</td>'+
												'</tr>'+
												'<tr class="bkgrigio" coslpan="2">'+
													'<td valign="center">'+
														'&nbsp;'+
													'</td>'+
												'</tr>';
											}
											CodiceHTML+=
											'</table>'+
										'</td>'+
									'</tr>'+
									'<!-- FINE NUOVO -->'+
								'</table>'+
							'</td>'+
						'</tr>'+
						footerTasti()+
					'</table>'+
				'<!-- FINE CONTENUTI CENTRALI -->'+
				'</td>'+
				'<td width="30%" align="center" valign="top" style="padding-top:34px;" id="contBoxsToMove">'+
				'<!-- INIZIO TABELLE-BLOCCHI DI DESTRA -->'+
				boxDXCode()+
				'<!-- FINE TABELLE-BLOCCHI DI DESTRA -->'+
				'</td>'+
			'</tr>'+
		'</table>';
	document.getElementById('alfa6').innerHTML = CodiceHTML;
	//cursorManagerStep4();
}
// FINE DISPLAY STEP 4

