// Determine language - default to english
function getLangDir() {
    var strLangDir = "english";
    var strLang = navigator.userLanguage;
    var strLangLC = strLang.toLowerCase();
    var strLangLCFirstTwoChars = strLangLC.substr(0,2);

	switch (strLangLCFirstTwoChars) {
	case "en": strLangDir = "english"; break;
	case "fr": strLangDir = "french"; break;
	case "de": strLangDir = "german"; break;
	case "it": strLangDir = "italian"; break;
	case "ja": strLangDir = "japanese"; break;
	case "ko": strLangDir = "korean"; break;
	case "pl": strLangDir = "polish"; break;
	case "ru": strLangDir = "russian"; break;
	case "es": strLangDir = "spanish"; break;
	case "cs": strLangDir = "czech"; break;
	case "zh":
		if (strLangLC == "zh_cn" || strLangLC == "zh-cn" || strLangLC == "zh" || strLangLC == "zh-sg" || strLangLC == "zh_sg") {
			// mainland china, singapore and general use simplified
			strLangDir = "chinese-simplified";
		}
		else {
			// taiwan, macau, hong kong and all others use traditional
			strLangDir = "chinese";
		}
		break;
	case "tr": strLangDir = "turkish"; break;
	default:
		// default to english
		strLangDir = "english";
		break;
	}

	return strLangDir;
}

// Uncomment one of the following 2 lines, depending on
// whether you want to explicitly set the language for debugging
// or want to use the language detected on the client machine.
// var m_strLangDir = "polish";
var m_strLangDir = getLangDir();

var m_strLangHelpDir = "lang/" + m_strLangDir + "/help";


