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"] = "dati inviati";

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"] = "Dati inviati";

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://"+getDomain()+"/ALFAROMEO_UK/images/a6_icona_ok.gif\" width=16 align=left border=0> &nbsp;<SPAN class=titlecontent style=\"LINE-HEIGHT: 16px\">Thank you, we have successfully received your request.</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>We will pass your details onto your local Alfa Romeo dealership, who will be in touch in the next few working days.</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()+"/ALFAROMEO_UK/images/1/continua_chiara.gif\" width=72 align=right border=0></A></TD></TR></TBODY></TABLE>";

messages["lang1"] = 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("confirm_page/"+tc_page_alias);
}

