var msgs = {};

function loadMessages()
{
    switch (gx.languageCode)
    {
        case "eng":
            loadMessagesEng();
            break;
        case "ita":
            loadMessagesIta();
            break;
        case "German":
            loadMessagesGer();
            break;
        case "jap":
            loadMessagesJap();
            break;
        case "por":
            loadMessagesPor();
            break;
        case "chs":
            loadMessagesChs();
            break;
        case "spa":
            loadMessagesSpa();
            break;
        case "cht":
            loadMessagesCht();
            break;
        default:
            loadMessagesEng();
            break;
    }
}

function loadMessagesEng()
{
    msgs.QViewerError = "Error";	
    msgs.QViewerGenNotImplemented = "QueryViewer is not implemented for this generator yet";	
    msgs.QViewerFlashRequiredGX = "This content requires the Adobe Flash Player (version 10.0.0). Get Adobe Flash Player at http://www.adobe.com/go/getflash";
    msgs.QViewerFlashRequiredRuntime = "This content requires the Adobe Flash Player (version 10.0.0). <a href=http://www.adobe.com/go/getflash/>Get Flash</a>";
    msgs.QViewerURLMaxReached = "Maximum URL limit reached. This may be the result of passing too many parameters to the query or configuring too many query attributes in the QueryViewer.";
}

function loadMessagesSpa()
{
    msgs.QViewerError = "Error";	
    msgs.QViewerGenNotImplemented = "QueryViewer aún no se implementó para este generador";	
    msgs.QViewerFlashRequiredGX = "Este contenido requiere el Adobe Flash Player (versión 10.0.0). Obténgalo en http://www.adobe.com/go/getflash";
    msgs.QViewerFlashRequiredRuntime = "Este contenido requiere el Adobe Flash Player (versión 10.0.0). <a href=http://www.adobe.com/go/getflash/>Obtener Flash</a>";
    msgs.QViewerURLMaxReached = "Se alcanzó el límite máximo de la URL. Esto puede ser el resultado de pasar demasiados parámetros a la consulta o configurar demasiados atributos de la consulta en el QueryViewer.";
}

function loadMessagesPor()
{
    msgs.QViewerError = "Erro";	
    msgs.QViewerGenNotImplemented = "QueryViewer ainda não se implementou para este gerador";	
    msgs.QViewerFlashRequiredGX = "Este conteúdo requer o Adobe Flash Player (versão 10.0.0). Obtenha-o na http://www.adobe.com/go/getflash";
    msgs.QViewerFlashRequiredRuntime = "Este conteúdo requer o Adobe Flash Player (versão 10.0.0). <a href=http://www.adobe.com/go/getflash/>Obter Flash</a>";
    msgs.QViewerURLMaxReached = "Foi atingido o limite máximo da URL. Pode ser o resultado de passar muitos parâmetros para a consulta ou configurar muitos atributos da consulta no QueryViewer.";
}

function loadMessagesIta()
{
    msgs.QViewerError = "Errore";	
    msgs.QViewerGenNotImplemented = "Il QueryViewer non è stato ancora implementato per questo generatore";	
    msgs.QViewerFlashRequiredGX = "Questo contenuto richiede Adobe Flash Player (versione 10.0.0). Si può installare da http://www.adobe.com/go/getflash";
    msgs.QViewerFlashRequiredRuntime = "Questo contenuto richiede Adobe Flash Player (versione 10.0.0). <a href=http://www.adobe.com/go/getflash/>Installare Flash</a>";
    msgs.QViewerURLMaxReached = "Si è raggiunto il limite massimo dell’URL. Può risultare dall’inserimento di troppi parametri nell'interrogazione o da aver configurato troppi attributi per l'interrogazione nel QueryViewer.";
}

function loadMessagesGer()
{
    msgs.QViewerError = "Fehler";	
    msgs.QViewerGenNotImplemented = "QueryViewer (Fragesucher) wurde noch nicht ausgestattet fuer diesen Generator";	
    msgs.QViewerFlashRequiredGX = "Dieser Inhalt benoetigt den Adobe Flash Player (Version 10.0.0). Benutze Adobe Flash Player http://www.adobe.com/go/fetflash";
    msgs.QViewerFlashRequiredRuntime = "Dieser Inhalt benoetigt den Adobe Flash Player (Version 10.0.0). <a href=http://www.adobe.com/go/getflash/>Benutze Flash</a>";
    msgs.QViewerURLMaxReached = "Das höchste URL-Limit wurde erreicht. Das kann sich daraus ergeben, dass zuviele Parameter in die Abfrage eingegeben oder dass zuviele Attribute der Abfrage im QueryViewer konfiguriert werden.";
}

function loadMessagesJap()
{
    msgs.QViewerError = "エラー";	
    msgs.QViewerGenNotImplemented = "クエリ表示 はこのジェネレータに対しまだ実行されていません";	
    msgs.QViewerFlashRequiredGX = "このコンテンツは Adobe Flash Player (バージョン 10.0.0)が必要です。Adobe Flash Player はこちらからダウンロードできます。 http://www.adobe.com/go/getflash";
    msgs.QViewerFlashRequiredRuntime = "このコンテンツはAdobe Flash Player (バージョン 10.0.0)が必要です。 <a href=http://www.adobe.com/go/getflash/> Flash </a>を入手";
    msgs.QViewerURLMaxReached = "URLが限界です。クエリパラメータの渡しすぎか、またはQueryViewerでのクエリ属性の設定しすぎによるものかもしれません。";
}

function loadMessagesChs()
{
    msgs.QViewerError = "错误";	
    msgs.QViewerGenNotImplemented = "询问显示在此发生器还未执行";	
    msgs.QViewerFlashRequiredGX = "显示此内容需要安装Adobe Flash Player (10.0.0版本). 请上此网站获取Adobe Flash Player http://www.adobe.com/go/getflash";
    msgs.QViewerFlashRequiredRuntime = "显示此内容需要安装Adobe Flash Player (10.0.0版本)<a href=http://www.adobe.com/go/getflash/>Get Flash</a>";
    msgs.QViewerURLMaxReached = "已抵达URL极限。原因可能是查询时传递过多参数，或者是QueryViewer上询问属性设置过多";
}

function loadMessagesCht()
{
    msgs.QViewerError = "錯誤";	
    msgs.QViewerGenNotImplemented = "詢問顯示在此發生器還未執行";	
    msgs.QViewerFlashRequiredGX = "顯示此內容需要安裝Adobe Flash Player ( 10.0.0版本). 請上此網站獲取Adobe Flash Player http://www.adobe.com/go/getflash";
    msgs.QViewerFlashRequiredRuntime = "顯示此內容需要安裝Adobe Flash Player ( 10.0.0版本)<a href=http://www.adobe.com/go/getflash/>Get Flash</a>";
    msgs.QViewerURLMaxReached = "已抵達URL極限。原因可能是查詢時傳遞過多參數，或者是QueryViewer上詢問屬性設置過多";
}

function getMessage(code)
{
	if (msgs[code] == undefined) 
		return code;
	else 
		return msgs[code];
}

