var messages = new Array();

//francese id = 2
var messagesTMP = new Array();
messagesTMP["errore"] = "fr - error.";
messagesTMP["privacy"] = "fr - privacy";
messagesTMP["seleziona"] = "fr - select";
messagesTMP["send"] = "<TABLE cellSpacing=0 cellPadding=0 width=\"100%\" border=0><TBODY><TR><TD class=alfa6CelPadLeft colSpan=4><IMG height=17 hspace=0 src=\"http://publish.fiat.com/ALFAROMEO_FRANCE/images/a6_icona_ok.gif\" width=16 align=left border=0> &nbsp;<SPAN class=titlecontent style=\"LINE-HEIGHT: 16px\">Thank you for your interest in Alfa Romeo</SPAN></TD><TD width=20>&nbsp;</TD></TR><TR><TD style=\"LINE-HEIGHT: 4px; HEIGHT: 4px\" colSpan=2>&nbsp;</TD></TR><TR><TD class=alfa6CelPadLeft><BR>Your request has been successfully received and we will deal with it in the next 48 hours.<BR><BR>We look forward to hearing from you again soon.<BR>The Alfa Romeo Customer Service Team. </TD>    <TD width=20>&nbsp;</TD></TR><TR><TD style=\"LINE-HEIGHT: 4px; HEIGHT: 4px\" colSpan=2>&nbsp;</TD></TR><TR class=bkgrigio><TD class=alfa6CelPadLeft noWrap><A href=\"javascript:window.close();\"><IMG height=17 hspace=0 src=\"http://publish.fiat.com/ALFAROMEO_FRANCE/images/1/continua_chiara.gif\" width=72 align=right border=0></A></TD></TR></TBODY></TABLE> ";

messages["lang2"] = messagesTMP;

//italiano id = 5
var messagesTMP = new Array();
messagesTMP["errore"] = "Si e' verificato un errore, controlla i campi rossi.";
messagesTMP["privacy"] = "Devi accettare l'informativa sulla privacy";
messagesTMP["seleziona"] = "Seleziona";
messagesTMP["send"] = "<TABLE cellSpacing=0 cellPadding=0 width=\"100%\" border=0><TBODY><TR><TD class=alfa6CelPadLeft colSpan=4><IMG height=17 hspace=0 src=\"http://publish.fiat.com/ALFAROMEO_SPAIN/images/a6_icona_ok.gif\" width=16 align=left border=0> &nbsp;<SPAN class=titlecontent style=\"LINE-HEIGHT: 16px\">Thank you for your interest in Alfa Romeo</SPAN></TD><TD width=20>&nbsp;</TD></TR><TR><TD style=\"LINE-HEIGHT: 4px; HEIGHT: 4px\" colSpan=2>&nbsp;</TD></TR><TR><TD class=alfa6CelPadLeft><BR>Your request has been successfully received and we will deal with it in the next 48 hours.<BR><BR>We look forward to hearing from you again soon.<BR>The Alfa Romeo Customer Service Team. </TD>    <TD width=20>&nbsp;</TD></TR><TR><TD style=\"LINE-HEIGHT: 4px; HEIGHT: 4px\" colSpan=2>&nbsp;</TD></TR><TR class=bkgrigio><TD class=alfa6CelPadLeft noWrap><A href=\"javascript:window.close();\"><IMG height=17 hspace=0 src=\"http://publish.fiat.com/ALFAROMEO_SPAIN/images/1/continua_chiara.gif\" width=72 align=right border=0></A></TD></TR></TBODY></TABLE> ";

messages["lang5"] = messagesTMP;

//UK id = 1
var messagesTMP = new Array();
messagesTMP["errore"] = "An error occured. Please check fields in red.";
messagesTMP["privacy"] = "Devi accettare l'informativa sulla privacy";
messagesTMP["seleziona"] = "Select";
messagesTMP["send"] = "<TABLE cellSpacing=0 cellPadding=0 width=\"100%\" border=0><TBODY><TR><TD class=alfa6CelPadLeft colSpan=4><IMG height=17 hspace=0 src=\"http://publish.fiat.com/ALFAROMEO_UK/images/a6_icona_ok.gif\" width=16 align=left border=0> &nbsp;<SPAN class=titlecontent style=\"LINE-HEIGHT: 16px\">Thank you for your interest in Alfa Romeo</SPAN></TD><TD width=20>&nbsp;</TD></TR><TR><TD style=\"LINE-HEIGHT: 4px; HEIGHT: 4px\" colSpan=2>&nbsp;</TD></TR><TR><TD class=alfa6CelPadLeft><BR>Your request has been successfully received and we will deal with it in the next 48 hours.<BR><BR>We look forward to hearing from you again soon.<BR>The Alfa Romeo Customer Service Team. </TD>    <TD width=20>&nbsp;</TD></TR><TR><TD style=\"LINE-HEIGHT: 4px; HEIGHT: 4px\" colSpan=2>&nbsp;</TD></TR><TR class=bkgrigio><TD class=alfa6CelPadLeft noWrap><A href=\"javascript:window.close();\"><IMG height=17 hspace=0 src=\"http://publish.fiat.com/ALFAROMEO_UK/images/1/continua_chiara.gif\" width=72 align=right border=0></A></TD></TR></TBODY></TABLE> ";

messages["lang1"] = messagesTMP;

//tedesco id = 3
var messagesTMP = new Array();
messagesTMP["errore"] = "Ein Fehler ist aufgetreten. Bitte &uuml;berpr&uuml;fen Sie die rot markierten Felder.";
messagesTMP["privacy"] = "Bitte akzeptieren Sie die Datenschutzerkl&auml;rung";
messagesTMP["seleziona"] = "Auswahl";
messagesTMP["send"] = "<TABLE cellSpacing=0 cellPadding=0 width=\"100%\" border=0><TBODY><TR><TD class=alfa6CelPadLeft colSpan=4><IMG height=17 hspace=0 src=\"http://"+getDomain()+"/NEWALFA_DE/images/a6_icona_ok.gif\" width=16 align=left border=0> &nbsp;<SPAN class=titlecontent style=\"LINE-HEIGHT: 16px\">Vielen Dank f&uuml;r Ihr Interesse an Alfa Romeo.</SPAN></TD><TD width=20>&nbsp;</TD></TR><TR><TD style=\"LINE-HEIGHT: 4px; HEIGHT: 4px\" colSpan=2>&nbsp;</TD></TR><TR><TD class=alfa6CelPadLeft><BR>Wir haben Ihre Anfrage erhalten und bearbeiten sie innerhalb der n&auml;chsten 48 Stunden.<BR><BR>Wir freuen uns, bald wieder von Ihnen zu h&ouml;ren.<BR>Ihr Alfa Romeo Kundenservice-Team. </TD>    <TD width=20>&nbsp;</TD></TR><TR><TD style=\"LINE-HEIGHT: 4px; HEIGHT: 4px\" colSpan=2>&nbsp;</TD></TR><TR class=bkgrigio><TD class=alfa6CelPadLeft noWrap><A href=\"javascript:window.close();\"><IMG height=17 hspace=0 src=\"http://"+getDomain()+"/NEWALFA_DE/images/1/continua_chiara.gif\" width=72 align=right border=0></A></TD></TR></TBODY></TABLE> ";

messages["lang3"] = messagesTMP;

//mostra il messaggio di errore
function showMessages(langId, errorName){
	var langName = "lang" + langId;
	return (messages[langName][errorName])		
}

function getPageFromUrl(){
	var indirizzo = document.URL;
	indirizzo = indirizzo.toLowerCase();
	indirizzo = indirizzo.substring(indirizzo.lastIndexOf("/")+1);
	tc_logging_active = true;
	tc_page_alias = indirizzo;
	tc_log(tc_page_alias);
}

function getPageFromUrl() {
	var indirizzo = document.URL;
	indirizzo = indirizzo.toLowerCase();
	indirizzo = indirizzo.substring(indirizzo.lastIndexOf("/")+1);
	tc_logging_active = true;
	tc_page_alias = indirizzo;
	tc_log("confirm_page/"+tc_page_alias);
}