WoTStatScript

More info for World of Tanks profile page. Updated for the new style.

Pada tanggal 12 Februari 2015. Lihat %(latest_version_link).

// ==UserScript==
// @name        WoTStatScript
// @version     0.9.6.02
// @description More info for World of Tanks profile page. Updated for the new style.
// @author      Orrie
// @namespace   http://forum.worldoftanks.eu/index.php?/topic/263423-
// @icon        http://dl.dropboxusercontent.com/u/12497046/wot/projects/statscript/img/icon.png
// @include     http://worldoftanks.eu/*/accounts/*-*/
// @include     http://worldoftanks.ru/*/accounts/*-*/
// @include     http://worldoftanks.com/*/accounts/*-*/
// @include     http://worldoftanks.asia/*/accounts/*-*/
// @include     http://worldoftanks.kr/*/accounts/*-*/
// @include     http://*.wargaming.net/clans/*/
// @grant       GM_xmlhttpRequest
// @license     MIT License
// ==/UserScript==
/*
	Changelog: http://dl.dropboxusercontent.com/u/12497046/wot/projects/statscript/WoTStatScript-changelog.txt
*/
(function () {
// global vars
var d = document;

// get server info
var wg = {host:d.location.host, href:d.location.href, clan:{}};
	wg.srv = wg.host.match(/(eu|ru|na|com|asia|kr)/)[0].replace(/com/,"na");
	wg.player = /(community|uc)\/accounts\/\d+/.test(wg.href);
	wg.clans = /wargaming\.net\/clans\/+[\d]+\//.test(wg.href);

// script variables
var sc = {
	host: "http://greasyfork.org/scripts/661-wotstatscript",
	user: "http://forum.wotlabs.net/index.php?/user/1618-orrie/",
	top: {
		eu: "http://forum.worldoftanks.eu/index.php?showtopic=263423",
		na: "http://forum.worldoftanks.com/index.php?showtopic=404652"
	},
	vers: "0.9.6.02",
	nm: {
		id: "orrie_js_174043" // noobmeter api id
	},
	loc: [
		[(wg.player) ? d.getElementsByClassName('b-portalmenu_links_list_point')[(wg.srv == "ru") ? 4 : 3].firstElementChild.innerHTML.toLowerCase() : d.getElementsByClassName('global-nav__bg')[0].innerHTML.toLowerCase(), "en"],
		["support", "en"],["podpora", "cz"],["kundendienst", "de"],["soporte", "es"],["aide", "fr"],["pomoc", "pl"],["destek", "tr"],["suporte", "en"],["поддержка", "ru"]
	]
};
// script threadlink
	sc.link = "<div class='b-scriptlink'><a target='_blank' href="+sc.host+">Script</a> version "+sc.vers+" - <a target='_blank' href="+((wg.srv == "na")?sc.top.na:sc.top.eu)+">Thread</a></div>";

// external site support - wotlabs, noobmeter, wot-news, wotstats, wotcs, wot-life, wotstats.com.au, wotreplays and clan history
var srv = {
	wl: false, nm: false, wn: false, ws: false, cs: false, wlife: false, wots: false, wr: false, ch: false
};

// determine browser types
var web = {
	gecko: typeof InstallTrigger !== 'undefined',
	opera: !!window.opera || /opera|opr/i.test(navigator.userAgent),
	chrome: !!window.chrome && !!window.chrome.webstore,
	safari: /constructor/i.test(window.HTMLElement)
};

// inserting style into head
var style = elem("style", "wotstatscript", "", "text/css");
	d.head.appendChild(style);

// inserting functions into head as scripts
var scripts = [copyClipboard];
for (var _j=0; _j<scripts.length; ++_j) {
var script = elem("script", "wotstatscript", "", "text/javascript");
	script.textContent = scripts[_j].toString();
	d.head.appendChild(script);
}

// modify sidebar structure
var sidebar_class = d.getElementsByClassName('l-sidebar')[0],
	recBlock_class = d.getElementsByClassName('js-recruitsation-block')[0],
	sidemsg_class = elem("div", "l-side-msg", "");
	if (sidebar_class) {
		sidemsg_class.appendChild(recBlock_class);
		sidebar_class.appendChild(sidemsg_class);
	}

// colour scale array
var colArr = {
	//      col        wr  bat    sr  hr  dmg  wn8   wn7   eff   nm
	sUni: [ "#5A3175", 65, 30000, 50, 80, 300, 2900, 2050, 2050, 2000 ], // 99.99% super unicum
	uni:  [ "#83579D", 60, 25000, 46, 75, 270, 2450, 1850, 1800, 1950 ], // 99.90% unicum
	gr8:  [ "#3972C6", 56, 21000, 42, 70, 240, 2000, 1550, 1500, 1750 ], // 99.00% great
	vGud: [ "#4099BF", 54, 17000, 38, 65, 210, 1600, 1350             ], // 95.00% very good
	good: [ "#4D7326", 52, 13000, 34, 60, 180, 1200, 1100, 1200, 1450 ], // 82.00% good
	aAvg: [ "#849B24", 50, 10000, 30, 55, 150,  900                   ], // 63.00% above average
	avg:  [ "#CCB800", 48,  7000, 25, 50, 120,  650,  900,  900, 1250 ], // 40.00% average
	bAvg: [ "#CC7A00", 47,  3000, 20, 45,  90,  450,  700,  600, 1150 ], // 20.00% below average
	bas:  [ "#CD3333", 46,  1000, 15, 40,  60,  300,  500             ], //  6.00% basic
	beg:  [ "#930D0D",  0,     0,  0,  0,   0,    0,    0,    0,    0 ], //  0.00% beginner
	dft:  [ "#6B6B6B" ], // default
	id: { "col": 0, "wr": 1, "bat": 2, "sr": 3, "hr": 4, "dmg": 5, "wn8": 6, "wn7": 7, "eff": 8, "nm": 9 }  // type identifier
};

// localization
// cz-czech   - Crabtr33 and Ragnarocek
// de-german  - ArtiOpa, Crakker and multimill
// fr-french  - SuperPommeDeTerre
// pl-polish  - KeluMocy and pokapokami
// es-spanish - Frodo45127
// tr-turkish - Ufuko
// ru-russian - dimon222
var loc = {
	// thousands separator
	sym: { en: ",", ru: " ", cz: " ", de: ".", fr: " ", pl: " ", es:".", tr: "."},
	// profile page
	p01: { en: "Go to Bottom", ru: "Пролистать вниз", cz: "Konec stránky", de: "nach unten", fr: "Aller à la fin", pl: "Koniec strony", es: "Ir al final", tr: "Aşağı İn" },
	p02: { en: "Go to Top", ru: "Пролистать наверх", cz: "Začátek stránky", de: "nach oben", fr: "Aller au début", pl: "Początek strony", es: "Ir al principio", tr: "Yukarı Çık" },
	p03: { en: "Days Ago", ru: "Дней назад", cz: "dnů", de: "Tage in WOT aktiv", fr: "jours", pl: "Dni temu", es: "Días", tr: "Gün Önce" },
	p04: { en: "Player Stats:", ru: "Статистика игрока:", cz: "Stat. hráče:", de: "Spielerstatistik", fr: "Statistiques du joueur:", pl: "Statystyki gracza:", es: "Estadísticas del jugador:", tr: "Oyuncu Statları" },
	p05: { en: "Signature:", ru: "Подпись:", cz: "Podpis:", de: "Forumsignatur", fr: "Signature:", pl: "Sygnatura do forum:", es: "Firma", tr: "İmza" },
	p06: { en: "Light", ru: "Светлые тона", cz: "Světlý", de: "Signatur Weiß", fr: "Claire", pl: "Jasna", es: "Clara", tr: "Açık" },
	p07: { en: "Dark", ru: "Тёмные тона", cz: "Tmavý", de: "Signatur Schwarz", fr: "Foncée", pl: "Ciemna", es: "Oscura", tr: "Koyu" },
	p08: { en: "Replays:", ru: "Реплеи:", cz: "Záznamy:", de: "Replays", fr: "Replays:", pl: "Powtórki:", es: "Repeticiones:", tr: "Replayler" },
	p09: { en: "Victories", ru: "Победы", cz: "Vítězství", de: "Siege", fr: "Victoires", pl: "Zwycięstw", es: "Victorias", tr: "Zaferler" },
	p10: { en: "Battles Participated", ru: "Участий в битвах", cz: "Počet bitev", de: "Gefechte geführt", fr: "Batailles participées", pl: "Bitew", es: "Batallas jugadas", tr: "Savaş Katılımı" },
	p11: { en: "Average Experience", ru: "Средний опыт", cz: "Průměrné zkušenosti", de: "Durchnittl. Erfahrung", fr: "Expérience moyenne", pl: "Średnie doświadczenie", es: "Experiencia media", tr: "Ortalama Deneyim" },
	p12: { en: "Average Tier", ru: "Средний уровень танка", cz: "Průměrný Tier", de: "Durchschnittl. Stufe", fr: "Tiers moyen", pl: "Średni poziom pojazdu", es: "Tier medio", tr: "Ortalama Seviye" },
	p13: { en: "Win/Loss Ratio", ru: "Отношение Победы/Поражения", cz: "Poměr vítězství/porážek", de: "Verhältnis Siege/ Niederlagen", fr: "Ratio Victoires/Défaites", pl: "Zwycięstwa/porażki", es: "Ratio de victorias/derrotas", tr: "Zafer/Kayıp Oranı" },
	p14: { en: "Performance Ratings", ru: "Рейтинги производительности", cz: "Hodnocení bojového výkonu", de: "Leistungsverhältnis", fr: "Indices de performances", pl: "Statystyki wydajności", es: "Ratios de rendimiento", tr: "Performans Değerleri" },
	p15: { en: "WN8", ru: "WN8", cz: "WN8", de: "WN8", fr: "WN8", pl: "WN8", es: "WN8", tr: "WN8" },
	p16: { en: "Efficiency", ru: "Эффективность", cz: "Efektivita", de: "Effizienz", fr: "Efficacité", pl: "Efficiency", es: "Eficiencia", tr: "Efficiency" },
	p17: { en: "NoobMeter", ru: "NoobMeter", cz: "NoobMeter", de: "NoobMeter", fr: "NoobMeter", pl: "NoobMeter", es: "NoobMeter", tr: "NoobMeter" },
	p18: { en: "Fetching...", ru: "Загрузка...", cz: "Načítám...", de: "abrufen...", fr: "Récupération...", pl: "Pobieranie...", es: "Recuperando...", tr: "Getiriliyor..." },
	p19: { en: "Performance Rating Calculations", ru: "Вычисления рейтинга производительности", cz: "Výpočet hodnocení bojového výkonu", de: "Leistungsberechnung", fr: "Calculs des indicateurs de performances", pl: "Obliczenia statystyk wydajności", es: "Cálculos del ratio de rendimiento", tr: "Performans Değeri Hesaplamaları" },
	p20: { en: "Formula Type", ru: "Тип формулы", cz: "Typ výpočtu", de: "Formel", fr: "Type de formule", pl: "Formuła", es: "Tipo de fórmula", tr: "Formül Tipi" },
	p21: { en: "Total", ru: "Всего", cz: "Celkem", de: "Gesamt", fr: "Total", pl: "Wynik", es: "Total", tr: "Toplam" },
	p22: { en: "Scaled", ru: "Шкала", cz: "Stupnice", de: "Skaliert", fr: "A l'échelle", pl: "Skalowanie", es: "Escala", tr: "Ölçek" },
	p23: { en: "Destroyed", ru: "Уничтожено", cz: "Zničeno", de: "Zerstört", fr: "Détruits", pl: "Fragi", es: "Destruidos", tr: "imha" },
	p24: { en: "Damage", ru: "Урон", cz: "Poškození", de: "Schaden", fr: "Dommages", pl: "Obrażenia", es: "Daño", tr: "Hasar" },
	p25: { en: "Detected", ru: "Обнаружено", cz: "Detekováno", de: "Aufgeklärt", fr: "Détectés", pl: "Wykrycia", es: "Detectados", tr: "Tespit" },
	p26: { en: "Capping", ru: "Захват", cz: "Obsazení", de: "Erobert", fr: "Capture", pl: "Zdobycie bazy", es: "Capturando", tr: "İşgal" },
	p27: { en: "Defense", ru: "Оборона", cz: "Obrana", de: "Verteidigt", fr: "Défense", pl: "Obrona bazy", es: "Defendiendo", tr: "Savunma" },
	p28: { en: "Victories", ru: "Победы", cz: "Vítězství", de: "Siege", fr: "Victoires", pl: "Zwycięstwa", es: "Victorias", tr: "Zaferler" },
	p29: { en: "WN8", ru: "WN8", cz: "WN8", de: "WN8", fr: "WN8", pl: "WN8", es: "WN8", tr: "WN8" },
	p30: { en: "WN7", ru: "WN7", cz: "WN7", de: "WN7", fr: "WN7", pl: "WN7", es: "WN7", tr: "WN7" },
	p31: { en: "Efficiency", ru: "Эффективность", cz: "Efektivita", de: "Effizienz", fr: "Efficacité", pl: "Efficiency", es: "Eficiencia", tr: "Efficiency" },
	p32: { en: "What is WN Efficiency?", ru: "Что такое WN эффективность?", cz: "Co je WN hodnocení?", de: "Was bedeutet WN Effizienz", fr: "Qu'est que l'efficacité WN ?", pl: "Czym jest statystyka wydajności WN?", es: "¿Qué es la eficiencia WN?", tr: "WN Efficiency Nedir?" },
	p33: { en: "Ace Tanker", ru: "Мастер", cz: "Hrdina", de: "Panzer Ass", fr: "As du char", pl: "As Pancerny", es: "As de tanques", tr: "Tank Ası" },
	p34: { en: "1st Class", ru: "1 степень", cz: "1. třídy", de: "1ter Klasse", fr: "Classe 1", pl: "Pierwsza Klasa", es: "Clase I", tr: "1. Sınıf" },
	p35: { en: "2nd Class", ru: "2 степень", cz: "2. třídy", de: "2ter Klasse", fr: "Classe 2", pl: "Druga Klasa", es: "Clase II", tr: "2. Sınıf" },
	p36: { en: "3rd Class", ru: "3 степень", cz: "3. třídy", de: "3ter Klasse", fr: "Classe 3", pl: "Trzecia Klasa", es: "Clase III", tr: "3. Sınıf" },
	p37: { en: "No Badge", ru: "Нет значка", cz: "Nezískáno", de: "kein Orden", fr: "Aucun badge", pl: "Bez odznaki", es: "Sin medalla", tr: "Rozetsiz" },
	p38: { en: "Total Vehicles", ru: "Общее количество танки", cz: "Celkem vozidel", de: "Alle Fahrzeuge", fr: "Nombre total de véhicules", pl: "Całkowita liczba pojazdów", es: "Total de vehículos", tr: "Toplam Araçlar" },
	p39: { en: "Battles Participated:", ru: "Участий в битвах:", cz: "Počet bitev:", de: "An Gefechten teilgenommen", fr: "Batailles participées:", pl: "Bitwy:", es: "Batallas jugadas:", tr: "Savaş Katılımı" },
	p40: { en: "Victories:", ru: "Победы:", cz: "Vítězství:", de: "Siege", fr: "Victoires:", pl: "Zwycięstwa:", es: "Victorias:", tr: "Zaferler" },
	p41: { en: "Defeats:", ru: "Поражения:", cz: "Porážek:", de: "Niederlagen", fr: "Défaites:", pl: "Porażki:", es: "Derrotas:", tr: "Yenilgiler" },
	p42: { en: "Draws:", ru: "Ничья:", cz: "Remíza:", de: "Unentschieden", fr: "Egalités:", pl: "Remisy:", es: "Empates:", tr: "Beraberlikler" },
	p43: { en: "Battles Survived:", ru: "Битв пережито:", cz: "Přežito bitev:", de: "Gefechte überlebt", fr: "Batailles survécues:", pl: "Przetrwane bitwy:", es: "Batallas como superviviente:", tr: "Hayatta Kalma" },
	p44: { en: "Average Battles per Day:", ru: "Среднее число битв за день:", cz: "Průměrný počet bitev za den:", de: "Durschnittliche Gefechte pro Tag", fr: "Nombre moyen de batailles par jour:", pl: "Średnia bitew na dzień:", es: "Media de batallas por día:", tr: "Günlük Ortalama Savaş" },
	p45: { en: "Experience:", ru: "Опыт:", cz: "Zkušenosti:", de: "Erfahrung", fr: "Expérience:", pl: "Doświadczenie:", es: "Experiencia:", tr: "Deneyim" },
	p46: { en: "Average Experience per Battle:", ru: "Средний опыт за битву:", cz: "Průměrné zkušenosti za bitvu:", de: "Durchschnittserfahrung", fr: "Expérience moyenne par bataille:", pl: "Średnie doświadczenie na bitwę:", es: "Experiencia media por batalla:", tr: "Savaş Başına Ortalama Deneyim" },
	p47: { en: "Maximum Experience per Battle:", ru: "Максимальный опыт за битву:", cz: "Maximální zkušenosti za bitvu:", de: "Höchste Gefechtserfahrung", fr: "Expérience maximum par bataille:", pl: "Maksymalne doświadczenie na bitwę:", es: "Experiencia máxima por batalla:", tr: "Savaş Başına Maksimum Deneyim" },
	p48: { en: "Destroyed:", ru: "Уничтожено:", cz: "Zničeno:", de: "Zerstört", fr: "Détruits", pl: "Zniszczeni przeciwnicy:", es: "Destruidos:", tr: "İmhalar" },
	p49: { en: "Deaths:", ru: "Смертей:", cz: "Nepřežil:", de: "Tode", fr: "Morts", pl: "Zniszczony:", es: "Muertes:", tr: "Ölümler" },
	p50: { en: "Detected:", ru: "Обнаружено", cz: "Detekováno:", de: "Aufgeklärt", fr: "Détectés", pl: "Wykrytych:", es: "Detectados:", tr: "Tespitler" },
	p51: { en: "Hit Ratio:", ru: "Коэффициент попаданий:", cz: "Přesnost střelby:", de: "Trefferquote", fr: "Ratio de hit", pl: "Celność:", es: "Ratio de impactos:", tr: "İsabet Oranı" },
	p52: { en: "Damage Caused:", ru: "Урона нанесено:", cz: "Udělené poškození:", de: "Schaden verursacht", fr: "Dommages causés:", pl: "Zadane obrażenia:", es: "Daño causado:", tr: "Yapılan Hasar" },
	p53: { en: "Damage Received:", ru: "Урона получено:", cz: "Přijaté poškození:", de: "Schaden erhalten", fr: "Dommages reçus:", pl: "Otrzymane obrażenia:", es: "Daño recibido:", tr: "Alınan Hasar" },
	p54: { en: "Base Capture Points:", ru: "Очки захвата:", cz: "Bodů obsazení základny:", de: "Eroberungspunkte", fr: "Points de capture de base:", pl: "Punkty przejęcia bazy:", es: "Puntos de captura:", tr: "Bölge İşgali Puanı" },
	p55: { en: "Base Defense Points:", ru: "Очки обороны:", cz: "Bodů obrany základny:", de: "Verteidigungspunkte", fr: "Points de défense de base:", pl: "Punkty obrony bazy:", es: "Puntos de defensa:", tr: "Bölge Savunması Puanı" },
	p56: { en: "Average Tier:", ru: "Средний уровень:", cz: "Průměrný Tier:", de: "Durchschnittliche Stufe", fr: "Tiers moyen:", pl: "Średni poziom pojazdów:", es: "Tier media:", tr: "Ortalama Seviye" },
	p57: { en: "Vehicle Tiers", ru: "Уровни техники", cz: "Tiery vozidel", de: "Fahrzeuge Stufe", fr: "Tiers du véhicule", pl: "Poziomy czołgów", es: "Tier de los vehículos:", tr: "Araç Seviyeleri" },
	p58: { en: "Tier", ru: "Уровень", cz: "Tier", de: "Stufe", fr: "Tiers", pl: "Poziom", es: "Tier", tr: "Seviye" },
	p59: { en: "Total Vehicles:", ru: "Количество техники:", cz: "Celkem vozidel:", de: "Gesamt Fahrzeuge", fr: "Nombre total de véhicules:", pl: "Całkowita liczba pojazdów:", es: "Total de vehículos:", tr: "Toplam Araçlar" },
	p60: { en: "Tankopedia", ru: "Танковедение", cz: "Tankpédie", de: "Tankopedia", fr: "Tankopedia", pl: "Tankopedia", es: "Tankopedia", tr: "Tankopedia" },
	p61: { en: "Tank Statistics", ru: "Статистика танка", cz: "Statistiky vozidel", de: "Panzer Statistik", fr: "Statistiques des chars", pl: "Statystyki czołgu", es: "Estadísticas de tanques", tr: "Tank İstatistikleri" },
	p62: { en: "Premium Tanks", ru: "Премиум танки", cz: "Premium tanky", de: "Premium Panzer", fr: "Chars premiums", pl: "Czołgi premium", es: "Tanques premium", tr: "Premium Tanklar" },
	p63: { en: "Copy stats to Clipboard", ru: "Скопировать в буфер обмена", cz: "Kopírovat Stat. do schránky", de: "Statistiken in Zwischenablage kopieren", fr: "Copier les statistiques vers le presse-papiers", pl: "Kopiuj statystyki do schowka", es: "Copiar estadísticas al portapapeles", tr: "İstatistikleri Panoya Kopyala" },
	p64: { en: "Press Ctrl+C, or Right-Click and Copy", ru: "Нажмите Ctrl+C или ПКМ и Скопировать", cz: "Stiskni Ctrl+C, nebo klikni pravým tl. myši a vyber Kopírovat", de: "STRG+C/ rechter Mausklick und Kopieren", fr: "Appuyez sur Ctrl+C, ou clic droit et Copier", pl: "Naciśnij Ctrl+C, lub prawy klawisz myszy i 'Kopiuj'", es: "Presiona Ctrl+C, o haz clic derecho y pulsa Copiar.", tr: "Ctrl+C Tuşuna Bas, veya Sağ Tıkla ve Kopyala" },
	p65: { en: "WoTStatScript not active, because of player having 0 battles", ru: "Скрипт неактивен, т.к. у игрока 0 битв", cz: "WoTStatScript není aktivní, protože hráč má 0 bitev", de: "WoTStatScript inaktiv wegen fehlender Gefechte", fr: "WoTStatScript n'est pas actif, car le joueur a 0 batailles", pl: "WoTStatScript nieaktywny, ponieważ gracz rozegrał 0 bitew", es: "El script WoTStat no está activo, porque el jugador no ha jugado ninguna batalla.", tr: "WoTStat Scipt aktif değil, çünkü oyuncunun 0 savaşı var." },
	p66: { en: "Clan Stats:", ru: "Статистика клана:", cz: "Stat. klanu:", de: "Clanstatistiken", fr: "Statistiques du clan:", pl: "Statystyki klanu:", es: "Estadísticas del clan:", tr: "Klan İstatistikleri" },
	p67: { en: "Replays:", ru: "Реплеи:", cz: "Záznamy:", de: "Replays", fr: "Replays:", pl: "Powtórki:", es: "Repeticiones:", tr: "Replayler" },
	p68: { en: "Tier 10 Only", ru: "Уровень 10 Только", cz: "Pouze Tier 10", de: "nur Stufe 10", fr: "Seulement les tiers 10", pl: "Tylko 10 tier", es: "Sólo tier 10", tr: "Seviye 10 Tanklar" },
	p69: { en: "Battles missing from API, ratings may be inaccurate", ru: "Отсутствует Battles от API, рейтинги могут быть неточными", cz: "Některé bitvy se z API nenačetly, hodnocení může být nepřesné", de: "Fehlende API Gefechtsdaten, Bewertungen können ungenau sein", fr: "Des batailles manquent de l'API, les indices peuvent être faussés", pl: "Brakujące bitwy, obliczenia mogą być niedokładne", es: "Faltan batallas desde la API, por lo que los ratios pueden no ser muy precisos.", tr: "Savaş bilgileri eksik, hesaplamalar hatalı olabilir." },
	p70: { en: "Hit Ratio", ru: "Коэффициент попаданий", cz: "Přesnost střelby", de: "Trefferquote", fr: "Ratio de hit", pl: "Celność", es: "Ratio de impacto", tr: "İsabet Oranı" },
	p71: { en: "Average Damage", ru: "Средний Урона", cz: "Průměrné poškození", de: "Durchschnittlicher Schaden", fr: "Dommages moyens", pl: "Średnie obrażenia", es: "Daño medio", tr: "Ortalama Hasar" },
	p72: { en: "Stats for", ru: "Cтатистика для", cz: "Statistika hráče", de: "Statistik für", fr: "Statistiques pour ", pl: "Statystyki z", es: "Estadísticas para", tr: "İstatistikler" },
	p73: { en: "Battles:", ru: "Битвы:", cz: "Bitev:", de: "Gefechte", fr: "Batailles:", pl: "Bitew:", es: "Batallas:", tr: "Savaşlar" },
	p74: { en: "Clan History:", ru: "История клана:", cz: "Historie klanů:", de: "Clan Historie", fr: "Clan History:", pl: "Poprzednie klany:", es: "Clan History:", tr: "Clan History:" },
	p75: { en: "No Rating", ru: "Нет рейтинга", cz: "Bez hodnocení", de: "Kein Rating", fr: "No Rating", pl: "Brak klasyfikacji", es: "No Rating", tr: "No Rating" },
	p76: { en: "None", ru: "Никто", cz: "Žádné", de: "Kein", fr: "None", pl: "Brak", es: "None", tr: "None" },
	p77: { en: "Error", ru: "Oшибка", cz: "Chyba", de: "Fehler", fr: "Error", pl: "Błąd", es: "Error", tr: "Error" },
	// clan page
	c01: { en: "Clan Stats:", ru: "Статистика клана:", cz: "Stat. klanu:", de: "Clanstatistiken", fr: "Statistiques du clan:", pl: "Statystyki klanu:", es: "Estadísticas del clan:", tr: "Klan İstatistikleri" },
	c02: { en: "Replays:", ru: "Реплеи:", cz: "Záznamy:", de: "Replays", fr: "Replays:", pl: "Powtórki:", es: "Repeticiones:", tr: "Replayler" }
	//p00: { en: "", ru: "", cz: "", de: "", fr: "", pl: "", es:"", tr: ""},
};

// region settings for external sites
switch(wg.srv) {
	case ("eu"): // eu server
		srv.wl = srv.nm = srv.wn = srv.ws = srv.cs = srv.wlife = srv.ch = srv.wr = wg.srv;
		break;
	case ("ru"): // ru server
		srv.wl = srv.nm = srv.wn = srv.ws = srv.cs = srv.ch = srv.wots = srv.wr = wg.srv;
		break;
	case ("na"): // na server - american english
		srv.wl = srv.nm = srv.ws = srv.cs = srv.ch = wg.srv; srv.wr = "com"; srv.wn = "us";
		loc.p27.en = "Defence";
		loc.p55.en = "Base Defence Points:";
		break;
	case ("asia"): // asia server
		srv.wl = srv.nm = srv.wn = srv.ws = srv.cs = "sea"; srv.ch = wg.srv; srv.wr = "com";
		break;
	case ("kr"): // korean server
		srv.wl = srv.nm = srv.ws = srv.cs = srv.ch = wg.srv; srv.wr = "com";
		break;
	default: break;
}

// find page language
for (var _sl=1; _sl<sc.loc.length; _sl++) {
	if (sc.loc[_sl][0] == sc.loc[0][0]) {
		sc.loc = sc.loc[_sl][1];
	}
	else if (_sl == sc.loc.length-1) {
		sc.loc = sc.loc[0][1];
		if (wg.player) {
			sidemsg_class.appendChild(elem("div", "b-loc-wrpr", "<div class='b-sidebar-widget clearfix'><div class='b-sidebar-widget_inner b-sidebar-widget_inner__recrut'><h2 class='b-sidebar-widget_title'>Script Translation</h2><p class='b-sidebar-widget_text'>Unsupported language detected!<br>If you want to contribute with translation, contact <a class='b-orange-arrow' href='"+sc.user+"'>Orrie</a></p></div></div>"));
		}
	}
}
// process localization
for (var _l in loc) {
	if (loc.hasOwnProperty(_l)) {
		loc[_l] = loc[_l][sc.loc];
	}
}

// variables for dropbox, css and data uri
var css = {
	box: "border: 1px solid rgba(255, 255, 255, 0.05); box-shadow: 0 0 38px 1px rgba(0, 0, 0, 0.3) inset, 0 0 23px 1px rgba(255, 255, 255, 0.02), 0 0 5px 1px rgba(0, 0, 0, 0.5) inset;",
	input: "background: rgba(0, 0, 0, 0.09); box-shadow: 0 0 1px 1px rgba(255, 255, 255, 0.15) inset, 0 0 38px 1px rgba(0, 0, 0, 0.3) inset, 0 0 23px 1px rgba(255, 255, 255, 0.02), 0 0 5px 1px rgba(0, 0, 0, 0.5) inset; color: #606061;",
	l: [
		"http://dl.dropboxusercontent.com/u/12497046/wot/projects/statscript/img",
		"/static/wot/common/css/scss/context-menu/img/arrow.png",
		"/static/wot/common/css/scss/content/links/img/orange_arrow.png",
		"/static/wot/common/css/scss/content/user/img/speedometr-separator.png",
		"/static/wot/common/css/scss/content/links/img/ico-info.png",
		"/static/wot/common/css/scss/content/links/img/vertical-arrow.png",
		"/static/wot/common/img/common/cont-img-mask.png",
		"/static/wot/common/img/classes/class-ace.png",
		"/static/wot/common/img/classes/class-1.png",
		"/static/wot/common/img/classes/class-2.png",
		"/static/wot/common/img/classes/class-3.png"
	],
	u: {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VwzuP7xZWkXbNe6499CrOKG1117TzQ2xzg7HbBydc9wZqQhRpFDQyS89PWuF5/SI6ixG3GyK804aMMsFl5niQirTrbfU97tXLBZohCxIjTRx58aXrDDdd6S+5oQXHbDEJHuEJ822xVsuauV95nrS8diwTZ8WjSxCgPPe/ueRjb5qF+XA818b2+igtThqj997xZD7muVb1f9zla5fj3nZKakIKiFVinPONWeGrt7et92RfX17tu5/ev4yZ1xmkU3escvjtu38wq5/j47O3+m1kcNrm/X2GTMmKRIpNY6W/df3PqH1yUvf2la2/PKlpec7xpzWY6Inxg7um/bmj/81eOWwb7uzro/Y7ZxGKNQgpcZou+sfhwb7H3Nw5vxn7/9VvDpt+IGHX7fQVo84dOTvK0fHf7rsE7P3KFaPj7ytQUoJUNDR41o/KKevznm5JJfnzPc93rPqm9nJZdlZa2nPxp/kUzkvP511Y5Wb9KoVRQGgqFUmu8my2Nb34YTsz0tzTS5+3/Jn01+v2/S3/ExOyQk5eaTssdLdpuvqCAQBQmgVHb2ucYVr7/jG3Gk71L6n62eHll48aI0tFhoe+/MLthmy3UljQoskAFBJtSkmWTD5mYvmzHLYQYvc6r826JrnmBOjJ39ovVNGjUutFJIAhBQqFBMMuqM8rFuEaERoa23ThmaddXb4SCuFRkgIANRaIVWmucRlpusgjOhRS+mE/9tr2HnjQiskEACAUGmFXv1S6Gg0KjQ6RjTOSq1UpAQIABAIiVoqWiEVoVU0WiGMCyQABACAkCqNokiNIgVSoBUILQBQAQAAAAgpERIhkQAAHwPlu9kMCvbXiAAAAABJRU5ErkJggg=="
	}
};

// matches url with profile page and checks if profile has any battles as script is useless without
if (wg.player) {
	var tableBattles = filter(d.getElementsByClassName('t-personal-data_value')[2].innerHTML, 1),
		profileName_class = d.getElementsByClassName('b-profile-name')[0];
	if (tableBattles > 0) {
	// getting userinfo
		wg.name = d.getElementsByTagName('h1')[0].innerHTML;
		wg.id = wg.href.match(/\/(\d+)/)[1];

	// URL variables
		sc.nm.url = "http://noobmeter.com/player/"+srv.nm+"/"+wg.name+"/"+wg.id;
		sc.nm.api = "http://noobmeter.com/simpleplayerprapi/"+srv.nm+"/"+wg.name+"/"+wg.id+"/"+sc.nm.id;
		sc.chApi = "http://clanapi-wotcs-eu.herokuapp.com/players/"+wg.id+"/changes";

	// style contents
	styleCSS([
		// global rules
		"h3, h4 {margin: 0 0 15px; text-align: center;}",
		"h5 {margin: 5px 0 8px;}",
		"p, .reg-KR p {margin: 0;}",
		".reg-KR p {line-height: 133%;}",
		"table {width: 100%;}",
		// background image fix
		"#js-background-parallax-translate3d-wrapper {z-index: -1;}",
		// container wrapper
		".l-container-wrapper {background: none;}",
		// content width
		".l-content {margin: 0 22px 25px; width: 955px}",
		// background rules
		".b-background {display: flex; left: -23px; opacity: 0.5; position: absolute; width: 1000px; z-index: -1;}",
		".b-background img {width: 100%;}",
		// profile wrapper rules
		".b-profile-wrpr {margin: 15px 0 0; min-height: 138px;}",
		".b-profile-wrpr td {font-weight: bold; line-height: 133%;}",
		".b-profile-wrpr .t-profile-table a, .b-profile-wrpr #js-profile-clan-table a {background: url("+css.l[1]+") no-repeat 0 2px; color: #CACBCC; padding: 0 0 0 10px;}",
		".b-profile-wrpr .t-profile-table a:hover, .b-profile-wrpr #js-profile-clan-table a:hover {background: url("+css.l[1]+") no-repeat -244px 2px; color: #FFFFFF;}",
		".b-profile-header {position: absolute; right: 0; top: 0;}",
		".b-scriptlink {"+css.input+" border-left: 1px solid #000000; border-right: 1px solid #000000; display: inline-block; text-align: center; padding: 7px 0 6px; width: 199px;}",
		".b-ratingsClip {display: inline-block;}",
		".b-ratingsButton {"+css.input+" display: block; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; padding: 7px 7px 6px;}",
		".b-ratingsButton:hover {background-color: #282828; cursor: pointer;}",
		".b-profile-error {background: rgba(204,0,0,0.15); border: 1px solid #510000; box-shadow: 0 0 3px #733232; color: #CACBCC; display: none; margin: 0 3px -6px 0; overflow: hidden; padding: 3px; text-align: center; text-overflow: ellipsis; white-space: nowrap; width: 220px;}",
		".b-profile-error:hover {width: auto;}",
		// profile player rules
		".b-profile-name {float: none; margin: 0; max-width: 370px;}",
		".b-profile-name table {font-family: Arial;}",
		".b-profile-name td:first-child {white-space: nowrap;}",
		".reg-RUS .b-profile-name td:first-child {width: 120px;}",
		".reg-KR .b-profile-name td:first-child {width: 80px;}",
		".b-header-h1__profile {margin: 0; padding: 0 0 6px;}",
		"body.reg-KR h1, body.reg-KR .b-header-h1 {line-height: 1;}",
		// profile clan rules
		"#js-clan-block-container {left: 385px; position: absolute; top: 25px;}",
		".b-profile-clan {float: none; max-width: 360px; margin: 0;}",
		".b-photo {min-height: 54px;}",
		"a.b-link-clan, .b-link-clan a {display: inline;}",
		".b-statistic {margin: 0 0 3px;}",
		"#js-clan-block-container table {font-family: Arial; width: 360px;}",
		"#js-clan-block-container td:first-child {white-space: nowrap;}",
		".reg-RUS #js-clan-block-container td:first-child {width: 115px;}",
		".reg-KR #js-clan-block-container td:first-child {width: 70px;}",
		// profile clan history rules
		".b-clanHistory-wrpr {width: 750px;}",
		".b-clanHistory-wrpr span {display: inline-block; font-weight: bold; line-height: 133%;}",
		".b-clanHistory-wrpr .clanname {padding: 0 2px 0 0;}",
		".b-clanHistory-wrpr .clantag {padding: 0 2px;}",
		".b-clanHistory-wrpr .clantag.curr a {color: #F9D088;}",
		".b-clanHistory-wrpr a {color: #CACBCC;}",
		".b-clanHistory-wrpr a:hover {color: #FFFFFF;}",
		// campaign rating rules
		"#js-glory-points-block {margin: 2px 0;}",
		".b-campaign-rating {margin: 0; padding: 10px 0 0; width: 750px;}",
		".b-campaign-rating_header {display: inline-block; padding: 0 30px; position: relative; top: -5px;}",
		".b-leadership-header_date {float: none; margin: 0; text-align: center;}",
		".b-campaign-rating_header .b-header-h3__first {margin: 0;}",
		".b-campaign-rating_info {display: inline-block; float: none; padding-left: 30px;}",
		".b-campaign-rating_info__left-divider {background-position: 15px 0;}",
		".b-campaign-rating_delta {padding: 0; position: absolute; top: 0;}",
		".b-campaign-rating_links {margin: 10px 65px 0 0;}",
		".b-campaign-rating_message {padding: 0 0 15px; text-align: center;}",
		// sidebar rules
		".l-sidebar {margin: 0; position: absolute; right: 0; top: 25px; width: auto;}",
		".b-context-menu {background: url("+css.u.menu+") repeat-y; border-right: 1px solid black; margin: 0; width: 200px;}",
		".b-context-menu_wrapper {padding: 10px 0 5px;}",
		".b-context-menu-list {line-height: 16px;}",
		".b-context-menu-list li {padding: 4px 3px 4px 12px;}",
		// sidebar messages wrapper rules
		".l-side-msg {position: absolute; right: -227px; text-align: center; top: 0px; width: 205px;}",
		".b-sidebar-widget__comparison {background-color: #000000; border: 1px solid #000000; margin: 0; position: absolute; left: 223px; top: -26px; width: 203px;}",
		".b-sidebar-widget {margin: 0;}",
		".b-sidebar-widget_inner {padding: 10px}",
		".b-sidebar-widget_inner__comparison {display: table; margin: 5px auto; padding: 0;}",
		".b-sidebar-widget_title {margin: 0 0 5px; text-align: center;}",
		".b-sidebar-widget_text {margin: 0 0 5px;}",
		".b-box-shadow.js-recruitstation-recommended-widget {margin: 0; width: 242px;}",
		// userblock wrapper rules
		".b-user-block {"+css.box+" margin: 0; width: 750px;}",
		".b-head-block {background: url("+css.l[3]+") no-repeat 50% 100%; padding: 5px 0;}",
		".b-user-block_info {height: 110px; padding: 3px 25px;}",
		".b-personal-link {background-position: 0 12px; clear: left; padding: 10px 0 0 50px;}",
		".b-personal-link_txt {width: 360px;}",
		".b-user-block__sparks {background: url('"+css.l[0]+"/sparks.png') no-repeat 50% 0; width: 100%;}",
		".b-personal-data {min-height: 180px; padding: 0 20px 15px;}",
		".t-personal-data_ico {padding: 82px 5px 0;}",
		".t-personal-data_ico__hitrate {background: url("+css.u.icon1+") no-repeat 50% 50px;}",
		".t-personal-data_ico__tier {background: url("+css.u.icon2+") no-repeat 50% 50px;}",
		".t-personal-data_value {font-size: 28px; line-height: 100%;}",
		".t-personal-data_value.t-personal-data_value__pr {font-size: 36px;}",
		".b-speedometer-body {padding: 20px 50px;}",
		".b-speedometer {width: 33.3333%}",
		// ratings info rules
		".t-ratings-info {table-layout: fixed;}",
		".t-ratings-info th {font-size: 13px; font-weight: bold; line-height: 133%; padding: 20px 0 0;}",
		".t-ratings-info td {font-family: 'WarHeliosCondCBold','Arial Narrow',arial,sans-serif; font-size: 36px; line-height: 133%}",
		".t-ratings-info .rating-url_nm {background-image: url("+css.u.nmLogo+"); background-position: left center; background-repeat: no-repeat; padding: 0 0 0 20px;}",
		".ratings-table {background: url("+css.l[3]+") no-repeat 50% 0; padding: 20px 25px 10px;}",
		".t-table-ratings {width: 100%;}",
		".t-table-ratings td {line-height: 130%; padding: 9px 12px 2px 0; vertical-align: bottom;}",
		".t-table-ratings .td-value {padding-right: 0; text-align: right; white-space: nowrap;}",
		".t-table-ratings .td-number {color: #BABCBF; font-weight: bold; padding-right: 0; text-align: right; width: 70px;}",
		".t-table-ratings .td-center {line-height: 16px; padding: 9px 0 2px; text-align: center;}",
		".t-table-ratings .td-rating-meter {background: url("+css.l[3]+") no-repeat 50% 100%;}",
		".t-table-ratings .td-rating-meter td {padding: 0;}",
		".t-table-ratings .rating-meter {background: url("+css.u.rat+") no-repeat; border: 1px solid #252527; border-radius: 3px; height: 3px; margin: 0 7px;}",
		".t-table-ratings .rating-meter-dail_line {background: url("+css.u.rat+") no-repeat; box-shadow: 0 0 10px 1px rgba(221, 84, 12, 0.15), 0 0 3px 1px rgba(133, 18, 11, 0.25); height: 3px; width: 0;}",
		".t-table-ratings .rating-meter-marker {background: url("+css.u.ratMark+") no-repeat; float: right; height: 13px; margin: -5px -2px 0 0; width: 5px;}",
		".t-table-ratings .rating-meter_wn8 {background-position: 0 0;}",
		".t-table-ratings .rating-meter_wn8 .rating-meter-dail_line {background-position: 0 -3px;}",
		".t-table-ratings .rating-meter_wn7 {background-position: 0 -6px;}",
		".t-table-ratings .rating-meter_wn7 .rating-meter-dail_line {background-position: 0 -9px;}",
		".t-table-ratings .rating-meter_eff {background-position: 0 -12px;}",
		".t-table-ratings .rating-meter_eff .rating-meter-dail_line {background-position: 0 -15px;}",
		".wnelink {padding: 5px 25px 5px 0; text-align: right;}",
		".wnelink_info {background-image: url("+css.l[4]+"), url("+css.l[2]+"); background-position: 4px 0px, right 0; padding: 0 9px 0 20px;}",
		".wnelink_info:hover {background-position: 4px -17px, right -22px;}",
		// statistics wrapper rules
		".b-statistics-wrpr {margin: 0 0 30px; overflow: auto;}",
		".b-statistics-wrpr .t-dotted td {line-height: 23px; padding: 0;}",
		".b-statistics-wrpr .t-dotted tr:hover td {color: #79797A;}",
		".b-statistics-wrpr .t-dotted td.t-dotted_class-ico {line-height: 13px;}",
		".b-statistics-wrpr .t-dotted td.t-dotted_class-ico img {margin: 2px 0 -1px;}",
		".b-result {margin: 0 10px; width: 315px;}",
		".b-result .t-dotted__fixed {table-layout: auto;}",
		".b-result-classes {margin: 0 10px; width: 265px;}",
		".b-result-classes span {color: #606061; display: inline-block; width: 48px;}",
		".t-dotted td {background: url("+css.l[3]+") no-repeat 50% 100%;}",
		// cake diagram rules
		".b-diagrams-sector {margin: 0 0 25px;}",
		".b-diagrams-sector h3 {text-align: center;}",
		".b-diagram-block {float: left; margin: 0 9px; width: 300px;}",
		".b-diagram-wrpr {float: none; margin: 0 auto;}",
		".t-dotted.t-dotted__diagram {margin-top: 0px; width: 100%;}",
		".t-dotted_diagram-percent {display: inline-block; width: 40px;}",
		".b-diagram-total {margin: 25px 0 0;}",
		".b-diagram-tiers .js-results {display: inline-block; margin: 0 0 0 30px; text-align: right; width: 14px;}",
		".reg-RUS .b-diagram-tiers .js-results {margin: 0 0 0 15px;}",
		".b-diagram-tiers .t-dotted_diagram-percent {margin: 0 0 0 3px; width: 52px;}",
		".b-diagram-ico_tier {background: url("+css.u.tiers+") no-repeat; padding-left: 30px;}",
		".b-diagram-ico_tier-1 {background-position: 4px 1px;}",
		".b-diagram-ico_tier-2 {background-position: 4px -14px;}",
		".b-diagram-ico_tier-3 {background-position: 4px -29px;}",
		".b-diagram-ico_tier-4 {background-position: 4px -45px;}",
		".b-diagram-ico_tier-5 {background-position: 4px -59px;}",
		".b-diagram-ico_tier-6 {background-position: 4px -74px;}",
		".b-diagram-ico_tier-7 {background-position: 4px -89px;}",
		".b-diagram-ico_tier-8 {background-position: 4px -104px;}",
		".b-diagram-ico_tier-9 {background-position: 4px -120px;}",
		".b-diagram-ico_tier-10 {background-position: 4px -134px;}",
		".t-dotted__diagram tr td.t-dotted_diagram-last {width: 0;}",
		// achievement wrapper rules
		".b-achievements-wrpr {margin: 16px 0 0;}",
		".b-vertical-arrow {display: table; margin: 8px auto 0; padding: 2px 10px 0;}",
		".js-short-achievements {margin: 15px 0 50px;}",
		".js-full-achievements {margin: 0 37px 50px;}",
		".reg-KR .js-full-achievements {margin: 0 34px 30px;}",
		".b-achivements {display: table; margin: 0 auto; padding: 0 0 20px;}",
		".b-achivements-head {margin-top: 15px;}",
		".b-achivements_item {display: inline-table; float: inherit; margin: 5px 5px 0;}",
		".js-full-achievements #js-achivement-medalTamadaYoshio {margin-left: 45px;}",
		".js-full-achievements #js-achivement-tacticalBreakthrough {margin-left: 165px;}",
		".js-full-achievements #js-achivement-rangerMedal {margin-left: 165px;}",
		".js-full-achievements #js-achivement-infiltratorMedal {margin-right: 95px;}",
		".js-full-achievements #js-achivement-medalKay {margin-left: 125px;}",
		".js-full-achievements #js-achivement-forTacticalOperations {margin-left: 165px;}",
		".js-full-achievements #js-achivement-readyForBattleLT {margin-left: 245px;}",
		".js-full-achievements #js-achivement-noMansLand {margin-left: 85px;}",
		".js-full-achievements #js-achivement-ironMan {margin-left: 205px;}",
		// global rating rules
		".b-composite-heading {margin: 21px 0 15px 400px; width: 553px;}",
		".b-profile-ratings-date {margin-top: 1px}",
		".b-leadership-info {display: table; margin: 0 auto;}",
		".b-profile-link {display: table; margin: 14px auto 0}",
		".b-msg-important__rating {display: table; margin: 5px auto 0;}",
		".b-rating-dial__user {display: table; margin: 30px auto 22px;}",
		".b-orange-arrow__leadership {display: table; margin: 0 auto;}",
		".b-leadership-rating-text {text-align: center;}",
		".l-leadership-info-alignment {text-align: center;}",
		// vehicle table rules
		".b-vehicles-wrpr {margin: 20px 0;}",
		".b-vehicles-header {display: table; margin: 0 auto 15px}",
		".b-profile-vehicles-tankstat {margin: 0; position: absolute; right: 15px;}",
		".b-profile-vehicles-tankstat_link {background-image: url("+css.u.nmLogo+"), url("+css.l[2]+"); background-position: left center, right 0px; padding: 0 9px 0 20px;}",
		".b-profile-vehicles-tankstat_link:hover {background-position: left center, right -22px;}",
		".t-profile__vehicle .t-profile_right {text-align: center;}",
		".t-profile_dropdown-ico .tablesorter-header-inner {display: inherit;}",
		".t-profile_tankstype-prem td {border-top: 2px dashed #212123;}",
		".t-profile_tankstype-prem .b-tankstype-text {color: #FFC363;}",
		".t-profile_tankstype-prem.t-profile_tankstype__empty .b-tankstype-text {color: rgba(255, 195, 99, 0.3);}",
		".t-profile .t-profile_tankstype td {height: 50px; padding: 0; vertical-align: middle;}",
		".b-tankstype-ico {display: table-cell;}",
		".b-tankstype-ico__lighttank {background-position: 0 -114px;}",
		".b-tankstype-ico__mediumtank {background-position: 0 -173px;}",
		".b-tankstype-ico__heavytank {background-position: 0 5px;}",
		".b-tankstype-ico__at-spg {background-position: 0 -232px;}",
		".b-tankstype-ico__spg {background-position: 0 -54px;}",
		".b-tankstype-ico__prem {background-position: 0 -291px;}",
		".b-tankstype-ico__ten {background: none; color: #BBB7AC; font-size: 17px; font-weight: 100; padding: 0 0 3px; text-align: center;}",
		".b-tankstype-text {display: table-cell; height: inherit; vertical-align: middle;}",
		".t-profile .t-profile_tankstype__item td {height: 40px; padding: 0; vertical-align: middle;}",
		".t-profile .t-profile_tankstype__item:hover td {background: rgba(0, 0, 0, 0.04); border-bottom: 1px solid rgba(255, 255, 255, 0); color: #BABCBF;}",
		".t-profile .t-profile_tankstype td.t-profile_center div.hidden {display: none;}",
		".t-profile .t-profile_tankstype td.t-profile_center span {display: inline-block; margin-left: 10px; text-align: left; width: 40px;}",
		".b-armory-wrapper {height: inherit; margin: 0; padding: 0; width: 160px;}",
		".b-armory-wrapper .b-armory-level {display: table-cell; font-size: inherit; height: inherit; position: inherit; vertical-align: middle; left: 0; top: 0;}",
		".b-armory-wrapper img.png {height: 64px; margin: -50px 0 0 24px;}",
		".b-name-vehicle {color: #BBB7AC; display: table-cell; height: inherit; vertical-align: middle;}",
		".b-name-vehicle.b-gold-name {color: #FFC363;}",
		".b-name-vehicle.b-red-name {color: #D00900;}",
		".t-profile_dropdown-link {display: inherit;}",
		".js-error-data {text-align: center;}",
		".b-msg-error {display: table; margin: 0 auto;}",
		".b-vehicle-detail_txt {margin: 0 auto 4px; text-align: center; width: 768px;}",
		".b-vehicle-detail_link {display: table; margin: 0 auto;}",
		".b-vehicle-slider {margin: 23px 64px 17px}",
		".b-vehicle-slider_inner {width: 741px;}",
		".b-vehicle-slider_prev {left: -12px;}",
		".b-vehicle-slider_next {right: -12px;}",
		".b-vehicle-minitable {margin: 0 43px; width: 350px;}",
		".b-vehicle-minitable__right {float: left;}",
		// profile navigator
		".b-profile-nav {text-align: center;}",
		".wrapper-dropdown .b-profile-nav {float: left; padding: 7px 0 0;}",
		".b-profile-nav a {background: url("+css.l[5]+") no-repeat; cursor:pointer; padding: 0 10px;}",
		".b-profile-nav a.top {background-position: 100% 0px;}",
		".b-profile-nav a.top:hover {background-position: 100% -36px;}",
		".b-profile-nav a.bot {background-position: 100% -18px;}",
		".b-profile-nav a.bot:hover {background-position: 100% -54px;}",
		".b-profile-nav span {border-bottom: 1px dashed;}",
		// multiple usage rules
		".b-orange-arrow__heading, .b-profile-ratings_link {margin: 4px 0 0;}"
	]);
	// applies relevant style for own profile - login name delayed by Wargaming
	var userCheckSeq = 0,
		userChecker = setInterval(function() {
		var loginUser = d.getElementsByClassName('js-my_profile_nickname')[0].innerHTML.replace(/\s+/g, '');
			userCheckSeq ++;
			if (loginUser == wg.name ) {
				if (srv.s == "es") {
					profile_div.style.minHeight = "167px";
				}
				else {
					profile_div.style.minHeight = "151px";
				}
				clearInterval(userChecker);
			}
			else if (userCheckSeq == 5) {
				clearInterval(userChecker);
			}
		}, 1000);
	// end style

	// formula calculations and variables
	// expected tank values v18 with premium tanks up to 0.9.6
	var statObj = {
		"ms-1":                        { title:"MS-1",                      id:3329,  tier:1,  nation:"RU", type:"LT", frag:1.92, dmg:249.77,  spot:1.43, def:1.51, win:59.03 },
		"bt-2":                        { title:"BT-2",                      id:1025,  tier:2,  nation:"RU", type:"LT", frag:1.54, dmg:265.05,  spot:2.02, def:1.24, win:58.91 },
		"t-26":                        { title:"T-26",                      id:4609,  tier:2,  nation:"RU", type:"LT", frag:1.67, dmg:282.37,  spot:1.40, def:1.67, win:60.03 },
		"t-60":                        { title:"T-60",                      id:15361, tier:2,  nation:"RU", type:"LT", frag:1.56, dmg:260.95,  spot:1.59, def:1.72, win:61.47 },
		"tetrarch_ll":                 { title:"Tetrarch",                  id:54529, tier:2,  nation:"RU", type:"LT", frag:1.63, dmg:279.98,  spot:1.53, def:1.46, win:58.64, prem:1 },
		"bt-7":                        { title:"BT-7",                      id:769,   tier:3,  nation:"RU", type:"LT", frag:0.88, dmg:218.00,  spot:2.10, def:1.03, win:54.71 },
		"bt-sv":                       { title:"BT-SV",                     id:52225, tier:3,  nation:"RU", type:"LT", frag:1.70, dmg:359.74,  spot:2.39, def:1.71, win:61.83, prem:1 },
		"ltp":                         { title:"LTP",                       id:56577, tier:3,  nation:"RU", type:"LT", frag:1.40, dmg:303.68,  spot:1.50, def:1.55, win:57.47, prem:1 },
		"m3_stuart_ll":                { title:"M3 Light",                  id:52737, tier:3,  nation:"RU", type:"LT", frag:1.04, dmg:235.25,  spot:1.69, def:1.17, win:53.40, prem:1 },
		"t-127":                       { title:"T-127",                     id:53505, tier:3,  nation:"RU", type:"LT", frag:1.79, dmg:373.25,  spot:1.79, def:1.73, win:59.84, prem:1 },
		"t-46":                        { title:"T-46",                      id:3073,  tier:3,  nation:"RU", type:"LT", frag:1.11, dmg:268.97,  spot:1.43, def:1.00, win:56.25 },
		"t-70":                        { title:"T-70",                      id:15105, tier:3,  nation:"RU", type:"LT", frag:1.43, dmg:337.87,  spot:1.49, def:1.63, win:58.12 },
		"a-20":                        { title:"A-20",                      id:2049,  tier:4,  nation:"RU", type:"LT", frag:0.74, dmg:273.73,  spot:2.37, def:0.84, win:55.37 },
		"t-50":                        { title:"T-50",                      id:9473,  tier:4,  nation:"RU", type:"LT", frag:0.70, dmg:260.62,  spot:2.99, def:0.65, win:55.52 },
		"t80":                         { title:"T-80",                      id:15873, tier:4,  nation:"RU", type:"LT", frag:1.12, dmg:380.82,  spot:1.73, def:1.36, win:58.59 },
		"valentine_ll":                { title:"Valentine II",              id:52481, tier:4,  nation:"RU", type:"LT", frag:1.46, dmg:409.99,  spot:1.54, def:1.63, win:57.22, prem:1 },
		"mt25":                        { title:"MT-25",                     id:16641, tier:6,  nation:"RU", type:"LT", frag:0.51, dmg:365.84,  spot:3.47, def:0.59, win:53.10 },
		"r107_ltb":                    { title:"LTTB",                      id:18433, tier:7,  nation:"RU", type:"LT", frag:0.75, dmg:783.58,  spot:2.82, def:0.80, win:54.30 },
		"r109_t54s":                   { title:"T-54 ltwt.",                id:18177, tier:8,  nation:"RU", type:"LT", frag:0.63, dmg:883.93,  spot:2.33, def:0.65, win:51.84 },
		"a-32":                        { title:"A-32",                      id:52993, tier:4,  nation:"RU", type:"MT", frag:0.87, dmg:293.06,  spot:2.40, def:0.78, win:54.78, prem:1 },
		"t-28":                        { title:"T-28",                      id:1537,  tier:4,  nation:"RU", type:"MT", frag:1.12, dmg:418.64,  spot:1.27, def:0.92, win:56.80 },
		"matilda_ii_ll":               { title:"Matilda IV",                id:51457, tier:5,  nation:"RU", type:"MT", frag:1.36, dmg:578.41,  spot:1.19, def:1.45, win:57.86, prem:1 },
		"r04_t-34":                    { title:"T-34",                      id:1,     tier:5,  nation:"RU", type:"MT", frag:1.09, dmg:514.27,  spot:1.46, def:1.06, win:55.56 },
		"a43":                         { title:"A-43",                      id:12289, tier:6,  nation:"RU", type:"MT", frag:1.03, dmg:683.16,  spot:2.02, def:0.98, win:54.35 },
		"t-34-85":                     { title:"T-34-85",                   id:2561,  tier:6,  nation:"RU", type:"MT", frag:1.02, dmg:734.66,  spot:1.45, def:0.96, win:55.05 },
		"r108_t34_85m":                { title:"T-34-85M",                  id:58113, tier:6,  nation:"RU", type:"MT", frag:1.03, dmg:683.16,  spot:2.02, def:0.98, win:54.35, prem:1 },
		"a44":                         { title:"A-44",                      id:12545, tier:7,  nation:"RU", type:"MT", frag:0.99, dmg:951.71,  spot:1.70, def:0.83, win:53.38 },
		"kv-13":                       { title:"KV-13",                     id:8961,  tier:7,  nation:"RU", type:"MT", frag:0.85, dmg:779.58,  spot:1.54, def:0.93, win:53.60 },
		"t-43":                        { title:"T-43",                      id:6657,  tier:7,  nation:"RU", type:"MT", frag:0.94, dmg:877.16,  spot:1.56, def:1.00, win:54.34 },
		"t44_85":                      { title:"T-44-85",                   id:57089, tier:7,  nation:"RU", type:"MT", frag:0.85, dmg:779.58,  spot:1.54, def:0.93, win:53.60, prem:1 },
		"t44_122":                     { title:"T-44-122",                  id:56833, tier:7,  nation:"RU", type:"MT", frag:0.85, dmg:779.58,  spot:1.54, def:0.93, win:53.60, prem:1 },
		"object416":                   { title:"Object 416",                id:13313, tier:8,  nation:"RU", type:"MT", frag:1.03, dmg:1279.62, spot:1.42, def:0.96, win:52.81 },
		"t-44":                        { title:"T-44",                      id:4353,  tier:8,  nation:"RU", type:"MT", frag:0.82, dmg:1014.58, spot:1.65, def:0.85, win:52.59 },
		"r112_t54_45":                 { title:"T-54 First Prototype",      id:59905, tier:8,  nation:"RU", type:"MT", frag:0.82, dmg:1147.96, spot:1.31, def:0.91, win:52.68, prem:1 },
		"r104_object_430_ii":          { title:"Object 430 Version II",     id:17665, tier:9,  nation:"RU", type:"MT", frag:1.03, dmg:1548.16, spot:1.56, def:0.87, win:53.24 },
		"t-54":                        { title:"T-54",                      id:7937,  tier:9,  nation:"RU", type:"MT", frag:0.94, dmg:1457.35, spot:1.80, def:0.81, win:51.34 },
		"object_140":                  { title:"Object 140",                id:16897, tier:10, nation:"RU", type:"MT", frag:1.01, dmg:1833.60, spot:1.70, def:0.89, win:49.47 },
		"object_430":                  { title:"Object 430",                id:17153, tier:10, nation:"RU", type:"MT", frag:1.00, dmg:1785.87, spot:1.65, def:0.88, win:50.03 },
		"object_907":                  { title:"Object 907",                id:15617, tier:10, nation:"RU", type:"MT", frag:1.00, dmg:1811.66, spot:1.74, def:0.85, win:49.66, prem:1 },
		"t62a":                        { title:"T-62A",                     id:13825, tier:10, nation:"RU", type:"MT", frag:0.92, dmg:1698.26, spot:1.62, def:0.76, win:48.56 },
		"churchill_ll":                { title:"Churchill III",             id:51713, tier:5,  nation:"RU", type:"HT", frag:1.28, dmg:612.11,  spot:1.19, def:1.30, win:55.12, prem:1 },
		"kv1":                         { title:"KV-1",                      id:11777, tier:5,  nation:"RU", type:"HT", frag:1.21, dmg:629.78,  spot:0.88, def:1.00, win:54.45 },
		"kv-1s":                       { title:"KV-1S",                     id:18689, tier:5,  nation:"RU", type:"HT", frag:1.41, dmg:729.97,  spot:1.36, def:1.16, win:58.91 },
		"kv-220_action":               { title:"KV-220",                    id:54017, tier:5,  nation:"RU", type:"HT", frag:1.50, dmg:699.26,  spot:1.42, def:1.37, win:60.67, prem:1 },
		"kv-220":                      { title:"KV-220 Beta-Test",          id:51201, tier:5,  nation:"RU", type:"HT", frag:1.50, dmg:699.26,  spot:1.42, def:1.37, win:60.67, prem:1 },
		"kv2":                         { title:"KV-2",                      id:10497, tier:6,  nation:"RU", type:"HT", frag:1.15, dmg:880.75,  spot:0.73, def:0.74, win:54.81 },
		"r106_kv85":                   { title:"KV-85",                     id:2817,  tier:6,  nation:"RU", type:"HT", frag:1.16, dmg:892.47,  spot:1.14, def:0.74, win:54.90 },
		"t150":                        { title:"T-150",                     id:11265, tier:6,  nation:"RU", type:"HT", frag:1.05, dmg:816.85,  spot:0.92, def:0.81, win:54.57 },
		"is":                          { title:"IS",                        id:513,   tier:7,  nation:"RU", type:"HT", frag:1.03, dmg:1078.74, spot:1.08, def:0.76, win:53.52 },
		"kv-3":                        { title:"KV-3",                      id:5889,  tier:7,  nation:"RU", type:"HT", frag:1.05, dmg:1121.31, spot:0.88, def:0.77, win:54.16 },
		"is-3":                        { title:"IS-3",                      id:5377,  tier:8,  nation:"RU", type:"HT", frag:0.94, dmg:1331.96, spot:1.06, def:0.76, win:52.04 },
		"object252":                   { title:"IS-6",                      id:9217,  tier:8,  nation:"RU", type:"HT", frag:1.11, dmg:1431.77, spot:1.19, def:0.83, win:53.64, prem:1 },
		"r113_object_730":             { title:"IS-5 (Object 730)",         id:58881, tier:8,  nation:"RU", type:"HT", frag:1.11, dmg:1431.77, spot:1.19, def:0.83, win:53.64, prem:1 },
		"kv4":                         { title:"KV-4",                      id:11009, tier:8,  nation:"RU", type:"HT", frag:0.83, dmg:1206.36, spot:0.85, def:0.72, win:52.25 },
		"kv-5":                        { title:"KV-5",                      id:53249, tier:8,  nation:"RU", type:"HT", frag:0.99, dmg:1266.56, spot:1.10, def:0.85, win:51.87, prem:1 },
		"is8":                         { title:"IS-8",                      id:11521, tier:9,  nation:"RU", type:"HT", frag:0.89, dmg:1540.88, spot:1.14, def:0.67, win:50.23 },
		"st_i":                        { title:"ST-I",                      id:10753, tier:9,  nation:"RU", type:"HT", frag:0.95, dmg:1695.84, spot:0.97, def:0.69, win:52.57 },
		"is-4":                        { title:"IS-4",                      id:6145,  tier:10, nation:"RU", type:"HT", frag:0.91, dmg:1871.69, spot:1.10, def:0.76, win:49.02 },
		"is-7":                        { title:"IS-7",                      id:7169,  tier:10, nation:"RU", type:"HT", frag:0.86, dmg:1789.37, spot:1.23, def:0.62, win:49.14 },
		"r110_object_260":             { title:"Object 260 mod. 1945",      id:58369, tier:10, nation:"RU", type:"HT", frag:0.84, dmg:1771.13, spot:1.31, def:0.63, win:47.91, prem:1 },
		"at-1":                        { title:"AT-1",                      id:5121,  tier:2,  nation:"RU", type:"TD", frag:1.80, dmg:298.73,  spot:0.47, def:1.46, win:59.07 },
		"su-76":                       { title:"SU-76",                     id:6401,  tier:3,  nation:"RU", type:"TD", frag:1.64, dmg:407.49,  spot:0.98, def:1.59, win:58.41 },
		"su76i":                       { title:"SU-76I",                    id:54273, tier:3,  nation:"RU", type:"TD", frag:2.22, dmg:453.48,  spot:0.97, def:1.81, win:62.70, prem:1 },
		"gaz-74b":                     { title:"SU-85B",                    id:6913,  tier:4,  nation:"RU", type:"TD", frag:1.57, dmg:580.78,  spot:1.16, def:1.47, win:58.94 },
		"su-85":                       { title:"SU-85",                     id:257,   tier:5,  nation:"RU", type:"TD", frag:1.19, dmg:595.07,  spot:0.56, def:1.20, win:54.53 },
		"su_85i":                      { title:"SU-85I",                    id:53761, tier:5,  nation:"RU", type:"TD", frag:1.46, dmg:670.32,  spot:0.88, def:1.72, win:54.75, prem:1 },
		"su-100":                      { title:"SU-100",                    id:3585,  tier:6,  nation:"RU", type:"TD", frag:1.24, dmg:876.79,  spot:0.81, def:1.13, win:54.85 },
		"su100y":                      { title:"SU-100Y",                   id:54785, tier:6,  nation:"RU", type:"TD", frag:1.26, dmg:909.16,  spot:0.61, def:0.87, win:55.28, prem:1 },
		"su100m1":                     { title:"SU-100M1",                  id:10241, tier:7,  nation:"RU", type:"TD", frag:1.03, dmg:1029.66, spot:0.85, def:1.16, win:53.31 },
		"su122_44":                    { title:"SU-122-44",                 id:55297, tier:7,  nation:"RU", type:"TD", frag:1.25, dmg:1164.81, spot:0.81, def:0.95, win:54.33, prem:1 },
		"su-152":                      { title:"SU-152",                    id:2305,  tier:7,  nation:"RU", type:"TD", frag:1.09, dmg:1075.09, spot:0.54, def:0.83, win:52.83 },
		"r111_isu130":                 { title:"ISU-130",                   id:58625, tier:8,  nation:"RU", type:"TD", frag:1.19, dmg:1588.72, spot:0.56, def:0.79, win:51.54, prem:1 },
		"isu-152":                     { title:"ISU-152",                   id:7425,  tier:8,  nation:"RU", type:"TD", frag:1.19, dmg:1588.72, spot:0.56, def:0.79, win:51.54 },
		"su-101":                      { title:"SU-101",                    id:9985,  tier:8,  nation:"RU", type:"TD", frag:0.98, dmg:1241.29, spot:0.93, def:0.96, win:50.35 },
		"r53_object_704":              { title:"Object 704",                id:8193,  tier:9,  nation:"RU", type:"TD", frag:1.24, dmg:2056.67, spot:0.70, def:0.83, win:51.57 },
		"su122_54":                    { title:"SU-122-54",                 id:12033, tier:9,  nation:"RU", type:"TD", frag:0.97, dmg:1542.79, spot:0.90, def:0.86, win:49.94 },
		"object263":                   { title:"Object 263",                id:14337, tier:10, nation:"RU", type:"TD", frag:1.13, dmg:2190.82, spot:0.99, def:0.81, win:49.72 },
		"object268":                   { title:"Object 268",                id:13569, tier:10, nation:"RU", type:"TD", frag:1.17, dmg:2299.37, spot:0.83, def:0.77, win:49.06 },
		"su-18":                       { title:"SU-18",                     id:3841,  tier:2,  nation:"RU", type:"SP", frag:1.35, dmg:251.57,  spot:0.12, def:1.67, win:53.42 },
		"su-26":                       { title:"SU-26",                     id:7681,  tier:3,  nation:"RU", type:"SP", frag:1.60, dmg:600.17,  spot:0.12, def:2.08, win:58.49 },
		"su-5":                        { title:"SU-5",                      id:4865,  tier:4,  nation:"RU", type:"SP", frag:1.19, dmg:697.45,  spot:0.10, def:1.66, win:53.65 },
		"su122a":                      { title:"SU-122A",                   id:16385, tier:5,  nation:"RU", type:"SP", frag:1.02, dmg:575.07,  spot:0.09, def:1.25, win:53.06 },
		"su-8":                        { title:"SU-8",                      id:5633,  tier:6,  nation:"RU", type:"SP", frag:1.15, dmg:1148.14, spot:0.06, def:1.32, win:52.49 },
		"s-51":                        { title:"S-51",                      id:1793,  tier:7,  nation:"RU", type:"SP", frag:0.95, dmg:1329.10, spot:0.05, def:0.84, win:50.34 },
		"su14_1":                      { title:"SU-14-1",                   id:16129, tier:7,  nation:"RU", type:"SP", frag:0.93, dmg:1075.26, spot:0.04, def:0.85, win:52.37 },
		"su-14":                       { title:"SU-14-2",                   id:4097,  tier:8,  nation:"RU", type:"SP", frag:1.01, dmg:1439.64, spot:0.02, def:0.71, win:50.88 },
		"object_212":                  { title:"212A",                      id:8449,  tier:9,  nation:"RU", type:"SP", frag:1.00, dmg:1672.34, spot:0.03, def:0.71, win:49.67 },
		"object_261":                  { title:"Object 261",                id:8705,  tier:10, nation:"RU", type:"SP", frag:1.02, dmg:1912.22, spot:0.05, def:0.90, win:48.59 },
		"ltraktor":                    { title:"Leichttraktor",             id:3089,  tier:1,  nation:"DE", type:"LT", frag:1.95, dmg:258.63,  spot:2.26, def:1.50, win:59.48 },
		"pz35t":                       { title:"Pz.Kpfw. 35 (t)",           id:785,   tier:2,  nation:"DE", type:"LT", frag:1.63, dmg:275.47,  spot:1.92, def:1.65, win:59.76 },
		"h39_captured":                { title:"Pz.Kpfw. 38H 735 (f)",      id:52497, tier:2,  nation:"DE", type:"LT", frag:2.11, dmg:345.64,  spot:1.91, def:2.65, win:57.09, prem:1 },
		"pzi":                         { title:"Pz.Kpfw. I",                id:12817, tier:2,  nation:"DE", type:"LT", frag:1.21, dmg:195.14,  spot:2.65, def:0.80, win:59.10 },
		"pzii":                        { title:"Pz.Kpfw. II",               id:2065,  tier:2,  nation:"DE", type:"LT", frag:1.51, dmg:250.64,  spot:2.07, def:1.51, win:58.68 },
		"g108_pzkpfwii_ausfd":         { title:"Pz.Kpfw. II Ausf. D",       id:60433, tier:2,  nation:"DE", type:"LT", frag:1.21, dmg:195.14,  spot:2.65, def:0.80, win:59.10, prem:1 },
		"pz38t":                       { title:"Pz.Kpfw. 38 (t)",           id:3345,  tier:3,  nation:"DE", type:"LT", frag:1.55, dmg:363.12,  spot:1.57, def:1.37, win:60.14 },
		"pzi_ausf_c":                  { title:"Pz.Kpfw. I Ausf. C",        id:12561, tier:3,  nation:"DE", type:"LT", frag:1.13, dmg:243.00,  spot:3.07, def:1.15, win:56.92 },
		"pz_ii_ausfg":                 { title:"Pz.Kpfw. II Ausf. G",       id:13073, tier:3,  nation:"DE", type:"LT", frag:1.03, dmg:272.73,  spot:1.84, def:1.35, win:58.35 },
		"pzii_j":                      { title:"Pz.Kpfw. II Ausf. J",       id:51729, tier:3,  nation:"DE", type:"LT", frag:2.01, dmg:380.52,  spot:2.00, def:2.09, win:68.24, prem:1 },
		"pziii_a":                     { title:"Pz.Kpfw. III Ausf. A",      id:4881,  tier:3,  nation:"DE", type:"LT", frag:1.20, dmg:278.00,  spot:1.86, def:0.94, win:56.96 },
		"t-15":                        { title:"T-15",                      id:54801, tier:3,  nation:"DE", type:"LT", frag:1.18, dmg:270.45,  spot:3.01, def:1.41, win:59.85, prem:1 },
		"pz38_na":                     { title:"Pz.Kpfw. 38 (t) n.A.",      id:8209,  tier:4,  nation:"DE", type:"LT", frag:0.75, dmg:275.30,  spot:2.30, def:0.82, win:55.31 },
		"pzii_luchs":                  { title:"Pz.Kpfw. II Luchs",         id:6161,  tier:4,  nation:"DE", type:"LT", frag:0.89, dmg:323.33,  spot:2.77, def:0.97, win:57.51 },
		"vk1602":                      { title:"VK 16.02 Leopard",          id:5393,  tier:5,  nation:"DE", type:"LT", frag:0.61, dmg:351.24,  spot:2.78, def:0.66, win:53.55 },
		"vk2801":                      { title:"VK 28.01",                  id:10001, tier:6,  nation:"DE", type:"LT", frag:0.64, dmg:520.86,  spot:2.70, def:0.52, win:53.52 },
		"auf_panther":                 { title:"Aufklärungspanzer Panther", id:14353, tier:7,  nation:"DE", type:"LT", frag:0.61, dmg:667.90,  spot:2.07, def:0.60, win:51.29 },
		"g103_ru_251":                 { title:"Spähpanzer Ru 251",         id:18449, tier:8,  nation:"DE", type:"LT", frag:0.68, dmg:911.55,  spot:2.39, def:0.75, win:51.62 },
		"g100_gtraktor_krupp":         { title:"Grosstraktor - Krupp",      id:59665, tier:3,  nation:"DE", type:"MT", frag:1.19, dmg:300.59,  spot:1.07, def:1.05, win:56.53, prem:1 },
		"pz_iv_ausfa":                 { title:"Pz.Kpfw. IV Ausf. A",       id:17169, tier:3,  nation:"DE", type:"MT", frag:1.51, dmg:333.55,  spot:1.32, def:1.03, win:59.26 },
		"s35_captured":                { title:"Pz.Kpfw. S35 739 (f)",      id:51985, tier:3,  nation:"DE", type:"MT", frag:1.70, dmg:391.83,  spot:1.54, def:1.73, win:61.13, prem:1 },
		"pziii_ausfj":                 { title:"Pz.Kpfw. III",              id:4369,  tier:4,  nation:"DE", type:"MT", frag:1.01, dmg:339.46,  spot:1.96, def:0.90, win:56.28 },
		"pz_iv_ausfd":                 { title:"Pz.Kpfw. IV Ausf. D",       id:17425, tier:4,  nation:"DE", type:"MT", frag:1.16, dmg:443.43,  spot:1.35, def:0.99, win:55.97 },
		"vk2001db":                    { title:"VK 20.01 (D)",              id:13585, tier:4,  nation:"DE", type:"MT", frag:1.21, dmg:406.33,  spot:1.72, def:1.29, win:57.62 },
		"g107_pzkpfwIII_ausfk":        { title:"Pz.Kpfw. III Ausf. K",      id:61457, tier:5,  nation:"DE", type:"MT", frag:0.90, dmg:427.40,  spot:1.59, def:0.85, win:52.96, prem:1 },
		"pziii_iv":                    { title:"Pz.Kpfw. III/IV",           id:6417,  tier:5,  nation:"DE", type:"MT", frag:0.90, dmg:427.40,  spot:1.59, def:0.85, win:52.96 },
		"pz_iv_ausfh":                 { title:"Pz.Kpfw. IV Ausf. H",       id:18193, tier:5,  nation:"DE", type:"MT", frag:1.31, dmg:611.02,  spot:1.41, def:0.96, win:56.68 },
		"pziv_hydro":                  { title:"Pz.Kpfw. IV hydrostat.",    id:55057, tier:5,  nation:"DE", type:"MT", frag:1.30, dmg:610.92,  spot:1.34, def:1.62, win:53.61, prem:1 },
		"t-25":                        { title:"T-25",                      id:54545, tier:5,  nation:"DE", type:"MT", frag:1.16, dmg:570.31,  spot:1.57, def:1.21, win:55.99, prem:1 },
		"pziv_schmalturm":             { title:"Pz.Kpfw. IV Schmalturm",    id:57361, tier:6,  nation:"DE", type:"MT", frag:0.98, dmg:736.75,  spot:1.07, def:1.24, win:52.27, prem:1 },
		"pzv_pziv":                    { title:"Pz.Kpfw. V/IV",             id:51473, tier:6,  nation:"DE", type:"MT", frag:0.66, dmg:450.51,  spot:1.61, def:0.71, win:49.63, prem:1 },
		"pzv_pziv_ausf_alfa":          { title:"Pz.Kpfw. V/IV Alpha",       id:54033, tier:6,  nation:"DE", type:"MT", frag:0.66, dmg:450.51,  spot:1.61, def:0.71, win:49.63, prem:1 },
		"vk3002db_v1":                 { title:"VK 30.01 (D)",              id:14097, tier:6,  nation:"DE", type:"MT", frag:1.04, dmg:735.74,  spot:1.68, def:1.08, win:54.27 },
		"vk3001p":                     { title:"VK 30.01 (P)",              id:7185,  tier:6,  nation:"DE", type:"MT", frag:0.93, dmg:678.91,  spot:1.29, def:0.82, win:52.86 },
		"vk3002m":                     { title:"VK 30.02 (M)",              id:15889, tier:6,  nation:"DE", type:"MT", frag:1.00, dmg:737.19,  spot:1.41, def:1.02, win:52.16 },
		"pzv":                         { title:"Panther",                   id:1297,  tier:7,  nation:"DE", type:"MT", frag:0.88, dmg:894.97,  spot:1.22, def:1.19, win:52.69 },
		"panther_m10":                 { title:"Panther/M10",               id:57617, tier:7,  nation:"DE", type:"MT", frag:0.93, dmg:870.17,  spot:1.27, def:1.19, win:51.98, prem:1 },
		"vk3002db":                    { title:"VK 30.02 (D)",              id:4113,  tier:7,  nation:"DE", type:"MT", frag:0.93, dmg:860.50,  spot:1.58, def:0.99, win:52.34 },
		"indien_panzer":               { title:"Indien-Panzer",             id:13841, tier:8,  nation:"DE", type:"MT", frag:0.86, dmg:1162.01, spot:1.22, def:1.00, win:50.42 },
		"panther_ii":                  { title:"Panther II",                id:8465,  tier:8,  nation:"DE", type:"MT", frag:0.82, dmg:1076.79, spot:1.33, def:0.90, win:51.94 },
		"g106_pzkpfwpanther_ausff":    { title:"Panther mit 8.8cm L/71",    id:60177, tier:8,  nation:"DE", type:"MT", frag:0.82, dmg:1076.79, spot:1.33, def:0.90, win:51.94, prem:1 },
		"e-50":                        { title:"E 50",                      id:10257, tier:9,  nation:"DE", type:"MT", frag:0.89, dmg:1482.21, spot:1.44, def:0.68, win:49.75 },
		"pro_ag_a":                    { title:"Leopard Prototyp A",        id:14865, tier:9,  nation:"DE", type:"MT", frag:0.86, dmg:1451.40, spot:1.40, def:0.89, win:48.89 },
		"g105_t-55_nva_ddr":           { title:"Т-55 NVA DDR",              id:60945, tier:9,  nation:"DE", type:"MT", frag:0.94, dmg:1457.35, spot:1.80, def:0.81, win:51.34, prem:1 },
		"e50_ausf_m":                  { title:"E 50 Ausf. M",              id:12305, tier:10, nation:"DE", type:"MT", frag:0.91, dmg:1815.14, spot:1.45, def:0.71, win:48.32 },
		"leopard1":                    { title:"Leopard 1",                 id:14609, tier:10, nation:"DE", type:"MT", frag:0.96, dmg:1827.88, spot:1.67, def:0.91, win:47.92 },
		"dw_ii":                       { title:"Durchbruchswagen 2",        id:13329, tier:4,  nation:"DE", type:"HT", frag:1.21, dmg:417.73,  spot:1.03, def:1.27, win:54.75 },
		"b-1bis_captured":             { title:"Pz.Kpfw. B2 740 (f)",       id:52241, tier:4,  nation:"DE", type:"HT", frag:1.79, dmg:519.50,  spot:1.67, def:1.73, win:60.86, prem:1 },
		"vk3001h":                     { title:"VK 30.01 (H)",              id:2577,  tier:5,  nation:"DE", type:"HT", frag:1.07, dmg:664.49,  spot:1.27, def:1.08, win:53.89 },
		"vk3601h":                     { title:"VK 36.01 (H)",              id:2321,  tier:6,  nation:"DE", type:"HT", frag:1.10, dmg:810.08,  spot:1.26, def:1.09, win:54.60 },
		"pzvi_tiger_p":                { title:"Tiger (P)",                 id:10769, tier:7,  nation:"DE", type:"HT", frag:0.97, dmg:1098.74, spot:0.99, def:1.04, win:53.38 },
		"pzvi":                        { title:"Tiger I",                   id:529,   tier:7,  nation:"DE", type:"HT", frag:0.99, dmg:1100.50, spot:0.99, def:1.00, win:52.84 },
		"lowe":                        { title:"Löwe",                      id:54289, tier:8,  nation:"DE", type:"HT", frag:0.83, dmg:1239.23, spot:0.87, def:0.86, win:49.33, prem:1 },
		"pzvib_tiger_ii":              { title:"Tiger II",                  id:5137,  tier:8,  nation:"DE", type:"HT", frag:0.86, dmg:1247.99, spot:1.00, def:0.83, win:50.75 },
		"vk4502a":                     { title:"VK 45.02 (P) Ausf. A",      id:10513, tier:8,  nation:"DE", type:"HT", frag:0.88, dmg:1229.43, spot:1.25, def:0.84, win:51.05 },
		"e-75":                        { title:"E 75",                      id:9745,  tier:9,  nation:"DE", type:"HT", frag:0.92, dmg:1608.91, spot:1.08, def:0.70, win:50.77 },
		"vk4502p":                     { title:"VK 45.02 (P) Ausf. B",      id:7441,  tier:9,  nation:"DE", type:"HT", frag:0.87, dmg:1540.44, spot:0.95, def:0.64, win:50.02 },
		"e-100":                       { title:"E 100",                     id:9489,  tier:10, nation:"DE", type:"HT", frag:0.94, dmg:1959.15, spot:1.03, def:0.53, win:49.67 },
		"maus":                        { title:"Maus",                      id:6929,  tier:10, nation:"DE", type:"HT", frag:0.85, dmg:1783.87, spot:0.93, def:0.69, win:49.46 },
		"vk7201":                      { title:"VK 72.01 (K)",              id:58641, tier:10, nation:"DE", type:"HT", frag:0.96, dmg:2025.56, spot:1.14, def:0.52, win:49.81, prem:1 },
		"panzerjager_i":               { title:"Panzerjäger I",             id:3601,  tier:2,  nation:"DE", type:"TD", frag:2.01, dmg:327.84,  spot:1.16, def:1.66, win:59.92 },
		"g20_marder_ii":               { title:"Marder II",                 id:6673,  tier:3,  nation:"DE", type:"TD", frag:1.45, dmg:406.89,  spot:1.08, def:1.45, win:58.75 },
		"hetzer":                      { title:"Hetzer",                    id:1809,  tier:4,  nation:"DE", type:"TD", frag:1.49, dmg:477.76,  spot:0.62, def:1.12, win:56.82 },
		"marder_iii":                  { title:"Marder 38T",                id:11281, tier:4,  nation:"DE", type:"TD", frag:1.50, dmg:565.29,  spot:1.03, def:1.57, win:57.75 },
		"g101_stug_iii":               { title:"StuG III Ausf. B",          id:17937, tier:4,  nation:"DE", type:"TD", frag:1.43, dmg:488.97,  spot:0.81, def:1.19, win:56.74 },
		"pz_sfl_ivc":                  { title:"Pz.Sfl. IVc",               id:16145, tier:5,  nation:"DE", type:"TD", frag:1.22, dmg:643.66,  spot:0.80, def:1.14, win:52.98 },
		"stug_40_ausfg":               { title:"StuG III Ausf. G",          id:1041,  tier:5,  nation:"DE", type:"TD", frag:1.19, dmg:599.06,  spot:0.75, def:1.31, win:53.81 },
		"g104_stug_iv":                { title:"StuG IV",                   id:60689, tier:5,  nation:"DE", type:"TD", frag:1.19, dmg:599.06,  spot:0.75, def:1.31, win:53.81, prem:1 },
		"dickermax":                   { title:"Dicker Max",                id:57105, tier:6,  nation:"DE", type:"TD", frag:1.14, dmg:863.10,  spot:0.79, def:1.14, win:52.25, prem:1 },
		"jagdpziv":                    { title:"Jagdpanzer IV",             id:1553,  tier:6,  nation:"DE", type:"TD", frag:1.06, dmg:739.43,  spot:0.77, def:1.19, win:52.29 },
		"nashorn":                     { title:"Nashorn",                   id:11793, tier:6,  nation:"DE", type:"TD", frag:1.20, dmg:938.85,  spot:0.70, def:1.20, win:51.86 },
		"e-25":                        { title:"E 25",                      id:55569, tier:7,  nation:"DE", type:"TD", frag:1.31, dmg:1061.27, spot:1.60, def:1.69, win:51.64, prem:1 },
		"jagdpanther":                 { title:"Jagdpanther",               id:3857,  tier:7,  nation:"DE", type:"TD", frag:1.07, dmg:1101.36, spot:0.74, def:1.03, win:52.53 },
		"sturer_emil":                 { title:"Sturer Emil",               id:11025, tier:7,  nation:"DE", type:"TD", frag:1.06, dmg:1081.86, spot:0.53, def:0.97, win:50.47 },
		"jagdtiger_sdkfz_185":         { title:"8.8 cm Pak 43 Jagdtiger",   id:55313, tier:8,  nation:"DE", type:"TD", frag:0.97, dmg:1303.38, spot:0.77, def:1.12, win:49.76, prem:1 },
		"ferdinand":                   { title:"Ferdinand",                 id:7697,  tier:8,  nation:"DE", type:"TD", frag:1.09, dmg:1488.75, spot:0.62, def:0.94, win:50.72 },
		"jagdpantherii":               { title:"Jagdpanther II",            id:11537, tier:8,  nation:"DE", type:"TD", frag:1.14, dmg:1538.09, spot:0.81, def:0.96, win:51.19 },
		"rhb_waffentrager":            { title:"Rhm.-Borsig Waffenträger",  id:16657, tier:8,  nation:"DE", type:"TD", frag:1.29, dmg:1724.44, spot:0.63, def:1.12, win:52.11 },
		"jagdtiger":                   { title:"Jagdtiger",                 id:7953,  tier:9,  nation:"DE", type:"TD", frag:1.08, dmg:1835.74, spot:0.65, def:0.81, win:50.02 },
		"waffentrager_iv":             { title:"Waffenträger auf Pz. IV",   id:16401, tier:9,  nation:"DE", type:"TD", frag:1.18, dmg:1972.18, spot:0.68, def:0.94, win:50.69 },
		"jagdpz_e100":                 { title:"Jagdpanzer E 100",          id:12049, tier:10, nation:"DE", type:"TD", frag:1.08, dmg:2166.00, spot:0.68, def:0.53, win:49.08 },
		"waffentrager_e100":           { title:"Waffenträger auf E 100",    id:16913, tier:10, nation:"DE", type:"TD", frag:1.47, dmg:2496.73, spot:0.53, def:0.84, win:49.87 },
		"gw_mk_vie":                   { title:"G.Pz. Mk. VI (e)",          id:15121, tier:2,  nation:"DE", type:"SP", frag:1.02, dmg:192.52,  spot:0.18, def:1.31, win:57.53 },
		"bison_i":                     { title:"Sturmpanzer I Bison",       id:2833,  tier:3,  nation:"DE", type:"SP", frag:1.25, dmg:400.31,  spot:0.18, def:1.67, win:57.64 },
		"wespe":                       { title:"Wespe",                     id:5905,  tier:3,  nation:"DE", type:"SP", frag:1.15, dmg:425.16,  spot:0.14, def:1.70, win:53.47 },
		"pz_sfl_ivb":                  { title:"Pz.Sfl. IVb",               id:15633, tier:4,  nation:"DE", type:"SP", frag:1.22, dmg:470.38,  spot:0.11, def:1.68, win:55.35 },
		"sturmpanzer_ii":              { title:"Sturmpanzer II",            id:4625,  tier:4,  nation:"DE", type:"SP", frag:1.11, dmg:446.05,  spot:0.17, def:1.68, win:54.10 },
		"grille":                      { title:"Grille",                    id:5649,  tier:5,  nation:"DE", type:"SP", frag:1.11, dmg:665.17,  spot:0.11, def:1.56, win:52.70 },
		"hummel":                      { title:"Hummel",                    id:273,   tier:6,  nation:"DE", type:"SP", frag:1.05, dmg:1002.20, spot:0.08, def:1.33, win:50.74 },
		"g_panther":                   { title:"G.W. Panther",              id:8977,  tier:7,  nation:"DE", type:"SP", frag:1.02, dmg:1306.13, spot:0.05, def:1.04, win:50.37 },
		"gw_tiger_p":                  { title:"G.W. Tiger (P)",            id:15377, tier:8,  nation:"DE", type:"SP", frag:0.91, dmg:1316.65, spot:0.04, def:0.64, win:50.11 },
		"g_tiger":                     { title:"G.W. Tiger",                id:8721,  tier:9,  nation:"DE", type:"SP", frag:0.93, dmg:1566.33, spot:0.04, def:0.63, win:48.51 },
		"g_e":                         { title:"G.W. E 100",                id:9233,  tier:10, nation:"DE", type:"SP", frag:0.97, dmg:1844.31, spot:0.04, def:0.62, win:48.11 },
		"t1_cunningham":               { title:"T1 Cunningham",             id:545,   tier:1,  nation:"US", type:"LT", frag:1.69, dmg:213.47,  spot:2.18, def:1.28, win:58.77 },
		"m2_lt":                       { title:"M2 LT",                     id:1825,  tier:2,  nation:"US", type:"LT", frag:1.49, dmg:251.35,  spot:2.57, def:1.34, win:59.39 },
		"t1_e6":                       { title:"T1E6",                      id:53537, tier:2,  nation:"US", type:"LT", frag:1.15, dmg:202.07,  spot:1.76, def:0.95, win:56.92, prem:1 },
		"t2_lt":                       { title:"T2 LT",                     id:51489, tier:2,  nation:"US", type:"LT", frag:1.23, dmg:210.73,  spot:2.67, def:1.10, win:57.42, prem:1 },
		"t7_combat_car":               { title:"T7 Combat Car",             id:55073, tier:2,  nation:"US", type:"LT", frag:1.24, dmg:182.84,  spot:1.99, def:1.19, win:57.82, prem:1 },
		"m22_locust":                  { title:"M22 Locust",                id:52769, tier:3,  nation:"US", type:"LT", frag:1.16, dmg:276.63,  spot:2.67, def:1.34, win:57.51, prem:1 },
		"m3_stuart":                   { title:"M3 Stuart",                 id:289,   tier:3,  nation:"US", type:"LT", frag:1.08, dmg:252.87,  spot:2.53, def:1.27, win:57.56 },
		"mtls_1g14":                   { title:"MTLS-1G14",                 id:52001, tier:3,  nation:"US", type:"LT", frag:1.08, dmg:252.87,  spot:2.53, def:1.27, win:57.56, prem:1 },
		"m5_stuart":                   { title:"M5 Stuart",                 id:5153,  tier:4,  nation:"US", type:"LT", frag:0.85, dmg:289.51,  spot:2.62, def:0.98, win:56.83 },
		"m24_chaffee":                 { title:"M24 Chaffee",               id:9761,  tier:5,  nation:"US", type:"LT", frag:0.65, dmg:492.30,  spot:2.75, def:0.72, win:53.80 },
		"t21":                         { title:"T21",                       id:15137, tier:6,  nation:"US", type:"LT", frag:0.56, dmg:466.70,  spot:2.39, def:0.59, win:52.87 },
		"a94_t37":                     { title:"T37",                       id:16673, tier:6,  nation:"US", type:"LT", frag:0.71, dmg:632.34,  spot:2.30, def:0.86, win:53.22 },
		"m41_bulldog":                 { title:"M41 Walker Bulldog",        id:17953, tier:7,  nation:"US", type:"LT", frag:0.82, dmg:874.78,  spot:2.57, def:0.82, win:52.94 },
		"t71":                         { title:"T71",                       id:15649, tier:7,  nation:"US", type:"LT", frag:0.67, dmg:712.99,  spot:2.60, def:0.64, win:52.48 },
		"t49":                         { title:"T49",                       id:18209, tier:8,  nation:"US", type:"LT", frag:0.62, dmg:921.84,  spot:1.92, def:0.59, win:51.24 },
		"t2_med":                      { title:"T2 MT",                     id:5665,  tier:2,  nation:"US", type:"MT", frag:1.53, dmg:260.74,  spot:1.75, def:1.27, win:59.88 },
		"m2_med":                      { title:"M2 MT",                     id:4897,  tier:3,  nation:"US", type:"MT", frag:1.38, dmg:302.83,  spot:1.56, def:1.08, win:57.42 },
		"m3_grant":                    { title:"M3 Lee",                    id:3105,  tier:4,  nation:"US", type:"MT", frag:1.00, dmg:344.64,  spot:0.84, def:0.84, win:54.28 },
		"a78_m4_improved":             { title:"M4 Improved",               id:12577, tier:5,  nation:"US", type:"MT", frag:1.44, dmg:666.89,  spot:1.55, def:1.04, win:58.15, prem:1 },
		"m4_sherman":                  { title:"M4 Sherman",                id:1057,  tier:5,  nation:"US", type:"MT", frag:1.44, dmg:666.89,  spot:1.55, def:1.04, win:58.15 },
		"m4a2e4":                      { title:"M4A2E4 Sherman",            id:52257, tier:5,  nation:"US", type:"MT", frag:1.00, dmg:445.08,  spot:1.54, def:0.90, win:54.41, prem:1 },
		"m7_med":                      { title:"M7",                        id:5409,  tier:5,  nation:"US", type:"MT", frag:0.94, dmg:427.81,  spot:2.19, def:0.99, win:55.20 },
		"ram-ii":                      { title:"Ram II",                    id:51745, tier:5,  nation:"US", type:"MT", frag:1.19, dmg:549.92,  spot:1.46, def:1.19, win:57.24, prem:1 },
		"a104_m4a3e8a":                { title:"Fury",                      id:56097, tier:6,  nation:"US", type:"MT", frag:1.00, dmg:690.05,  spot:1.54, def:1.00, win:55.03, prem:1 },
		"sherman_jumbo":               { title:"M4A3E2 Sherman Jumbo",      id:10017, tier:6,  nation:"US", type:"MT", frag:1.06, dmg:745.05,  spot:1.22, def:1.10, win:54.30 },
		"m4a3e8_sherman":              { title:"M4A3E8 Sherman",            id:1313,  tier:6,  nation:"US", type:"MT", frag:1.00, dmg:690.05,  spot:1.54, def:1.00, win:55.03 },
		"t20":                         { title:"T20",                       id:1569,  tier:7,  nation:"US", type:"MT", frag:0.95, dmg:958.11,  spot:1.74, def:1.03, win:54.31 },
		"t23e3":                       { title:"T23E3",                     id:11809, tier:7,  nation:"US", type:"MT", frag:1.10, dmg:902.09,  spot:1.81, def:1.35, win:52.39, prem:1 },
		"pershing":                    { title:"M26 Pershing",              id:5921,  tier:8,  nation:"US", type:"MT", frag:0.86, dmg:1118.55, spot:1.58, def:0.99, win:51.70 },
		"t26_e4_superpershing":        { title:"T26E4 SuperPershing",       id:13345, tier:8,  nation:"US", type:"MT", frag:0.86, dmg:1131.01, spot:1.00, def:0.97, win:51.19, prem:1 },
		"t69":                         { title:"T69",                       id:14625, tier:8,  nation:"US", type:"MT", frag:1.03, dmg:1272.64, spot:1.32, def:1.08, win:52.22 },
		"t95_e2":                      { title:"T95E2",                     id:53793, tier:8,  nation:"US", type:"MT", frag:0.86, dmg:1118.55, spot:1.58, def:0.99, win:51.70, prem:1 },
		"m46_patton":                  { title:"M46 Patton",                id:8993,  tier:9,  nation:"US", type:"MT", frag:0.89, dmg:1444.58, spot:1.64, def:0.72, win:50.36 },
		"t54e1":                       { title:"T54E1",                     id:15393, tier:9,  nation:"US", type:"MT", frag:1.12, dmg:1698.56, spot:1.03, def:0.78, win:51.01 },
		"m48a1":                       { title:"M48A1 Patton",              id:14113, tier:10, nation:"US", type:"MT", frag:0.88, dmg:1714.31, spot:1.59, def:0.68, win:47.79 },
		"m60":                         { title:"M60",                       id:15905, tier:10, nation:"US", type:"MT", frag:0.79, dmg:1651.72, spot:1.48, def:0.72, win:46.45, prem:1 },
		"t95_e6":                      { title:"T95E6",                     id:55841, tier:10, nation:"US", type:"MT", frag:0.79, dmg:1651.72, spot:1.48, def:0.72, win:46.45, prem:1 },
		"t1_hvy":                      { title:"T1 HT",                     id:3361,  tier:5,  nation:"US", type:"HT", frag:1.24, dmg:638.89,  spot:1.21, def:1.12, win:55.52 },
		"t14":                         { title:"T14",                       id:33,    tier:5,  nation:"US", type:"HT", frag:1.33, dmg:606.91,  spot:1.54, def:1.21, win:55.78, prem:1 },
		"m6":                          { title:"M6",                        id:801,   tier:6,  nation:"US", type:"HT", frag:1.04, dmg:829.81,  spot:1.08, def:0.85, win:53.56 },
		"t29":                         { title:"T29",                       id:3873,  tier:7,  nation:"US", type:"HT", frag:1.10, dmg:1233.90, spot:1.15, def:0.98, win:54.89 },
		"m6a2e1":                      { title:"M6A2E1",                    id:52513, tier:8,  nation:"US", type:"HT", frag:0.85, dmg:1136.19, spot:1.18, def:0.82, win:47.48, prem:1 },
		"t32":                         { title:"T32",                       id:4385,  tier:8,  nation:"US", type:"HT", frag:0.92, dmg:1294.05, spot:1.23, def:0.92, win:52.54 },
		"t34_hvy":                     { title:"T34",                       id:2849,  tier:8,  nation:"US", type:"HT", frag:0.84, dmg:1298.47, spot:0.83, def:0.71, win:50.60, prem:1 },
		"m103":                        { title:"M103",                      id:9505,  tier:9,  nation:"US", type:"HT", frag:0.88, dmg:1567.62, spot:1.12, def:0.68, win:50.08 },
		"t110":                        { title:"T110E5",                    id:10785, tier:10, nation:"US", type:"HT", frag:0.87, dmg:1813.53, spot:1.21, def:0.73, win:48.63 },
		"t57_58":                      { title:"T57 HT",                    id:14881, tier:10, nation:"US", type:"HT", frag:1.13, dmg:2157.48, spot:0.84, def:0.75, win:49.56 },
		"t18":                         { title:"T18",                       id:6177,  tier:2,  nation:"US", type:"TD", frag:2.11, dmg:312.85,  spot:1.21, def:1.50, win:58.21 },
		"t82":                         { title:"T82",                       id:6433,  tier:3,  nation:"US", type:"TD", frag:1.50, dmg:364.48,  spot:1.31, def:1.17, win:58.78 },
		"m8a1":                        { title:"M8A1",                      id:10273, tier:4,  nation:"US", type:"TD", frag:1.33, dmg:499.46,  spot:1.58, def:1.59, win:58.51 },
		"t40":                         { title:"T40",                       id:7713,  tier:4,  nation:"US", type:"TD", frag:1.54, dmg:579.16,  spot:1.28, def:1.54, win:58.95 },
		"m10_wolverine":               { title:"M10 Wolverine",             id:6945,  tier:5,  nation:"US", type:"TD", frag:1.26, dmg:620.69,  spot:1.03, def:1.39, win:55.62 },
		"t67":                         { title:"T67",                       id:10529, tier:5,  nation:"US", type:"TD", frag:1.38, dmg:670.61,  spot:1.76, def:1.51, win:57.52 },
		"m18_hellcat":                 { title:"M18 Hellcat",               id:11553, tier:6,  nation:"US", type:"TD", frag:1.20, dmg:902.91,  spot:1.48, def:1.30, win:55.27 },
		"m36_slagger":                 { title:"M36 Jackson",               id:7201,  tier:6,  nation:"US", type:"TD", frag:1.11, dmg:849.66,  spot:0.94, def:1.17, win:54.82 },
		"t25_at":                      { title:"T25 AT",                    id:9249,  tier:7,  nation:"US", type:"TD", frag:1.07, dmg:1089.15, spot:0.81, def:1.13, win:53.42 },
		"t25_2":                       { title:"T25/2",                     id:11041, tier:7,  nation:"US", type:"TD", frag:0.95, dmg:1003.48, spot:1.00, def:1.12, win:52.75 },
		"a102_t28_concept":            { title:"T28 Concept",               id:56609, tier:7,  nation:"US", type:"TD", frag:1.07, dmg:1089.15, spot:0.81, def:1.13, win:53.42, prem:1 },
		"a101_m56":                    { title:"M56 Scorpion",              id:56353, tier:8,  nation:"US", type:"TD", frag:0.98, dmg:1241.29, spot:0.93, def:0.96, win:50.35 },
		"t28":                         { title:"T28",                       id:8225,  tier:8,  nation:"US", type:"TD", frag:1.01, dmg:1390.41, spot:0.52, def:0.93, win:50.77 },
		"t28_prototype":               { title:"T28 Prototype",             id:11297, tier:8,  nation:"US", type:"TD", frag:1.04, dmg:1439.56, spot:0.53, def:0.96, win:51.10 },
		"t30":                         { title:"T30",                       id:2593,  tier:9,  nation:"US", type:"TD", frag:1.02, dmg:1787.68, spot:0.75, def:0.62, win:50.55 },
		"t95":                         { title:"T95",                       id:8737,  tier:9,  nation:"US", type:"TD", frag:1.09, dmg:1820.48, spot:0.50, def:0.67, win:51.91 },
		"t110e3":                      { title:"T110E3",                    id:13857, tier:10, nation:"US", type:"TD", frag:1.12, dmg:2318.01, spot:0.81, def:0.60, win:51.29 },
		"t110e4":                      { title:"T110E4",                    id:13089, tier:10, nation:"US", type:"TD", frag:1.06, dmg:2177.48, spot:0.84, def:0.62, win:49.24 },
		"t57":                         { title:"T57",                       id:2081,  tier:2,  nation:"US", type:"SP", frag:1.43, dmg:272.68,  spot:0.36, def:2.01, win:55.72 },
		"m7_priest":                   { title:"M7 Priest",                 id:3617,  tier:3,  nation:"US", type:"SP", frag:1.04, dmg:574.73,  spot:0.11, def:1.95, win:51.01 },
		"m37":                         { title:"M37",                       id:4641,  tier:4,  nation:"US", type:"SP", frag:1.06, dmg:404.02,  spot:0.14, def:1.58, win:53.48 },
		"m41":                         { title:"M41 HMC",                   id:4129,  tier:5,  nation:"US", type:"SP", frag:1.09, dmg:1047.08, spot:0.07, def:1.56, win:51.23 },
		"m44":                         { title:"M44",                       id:16417, tier:6,  nation:"US", type:"SP", frag:1.04, dmg:840.34,  spot:0.08, def:1.39, win:53.08 },
		"m12":                         { title:"M12",                       id:7969,  tier:7,  nation:"US", type:"SP", frag:1.01, dmg:1299.66, spot:0.06, def:1.11, win:50.89 },
		"m40m43":                      { title:"M40/M43",                   id:7457,  tier:8,  nation:"US", type:"SP", frag:1.05, dmg:1568.70, spot:0.05, def:0.87, win:50.89 },
		"m53_55":                      { title:"M53/M55",                   id:16161, tier:9,  nation:"US", type:"SP", frag:1.02, dmg:1777.19, spot:0.04, def:0.90, win:51.30 },
		"t92":                         { title:"T92",                       id:8481,  tier:10, nation:"US", type:"SP", frag:0.95, dmg:1886.27, spot:0.04, def:0.72, win:48.47 },
		"gb03_cruiser_mk_i":           { title:"Cruiser Mk. I",             id:5201,  tier:2,  nation:"UK", type:"LT", frag:1.87, dmg:319.65,  spot:1.57, def:1.59, win:59.85 },
		"gb58_cruiser_mk_iii":         { title:"Cruiser Mk. III",           id:7761,  tier:2,  nation:"UK", type:"LT", frag:1.85, dmg:314.54,  spot:2.21, def:1.36, win:61.18 },
		"gb76_mk_vic":                 { title:"Light Mk. VIC",             id:54865, tier:2,  nation:"UK", type:"LT", frag:1.43, dmg:210.41,  spot:1.99, def:1.24, win:58.91, prem:1 },
		"gb14_m2":                     { title:"M2A4",                      id:593,   tier:2,  nation:"UK", type:"LT", frag:1.49, dmg:251.35,  spot:2.57, def:1.34, win:59.39 },
		"gb69_cruiser_mk_ii":          { title:"Cruiser Mk. II",            id:6993,  tier:3,  nation:"UK", type:"LT", frag:1.39, dmg:305.51,  spot:1.03, def:1.04, win:56.01 },
		"gb59_cruiser_mk_iv":          { title:"Cruiser Mk. IV",            id:7505,  tier:3,  nation:"UK", type:"LT", frag:1.48, dmg:361.38,  spot:1.88, def:1.12, win:60.24 },
		"gb15_stuart_i":               { title:"Stuart I-IV",               id:1361,  tier:3,  nation:"UK", type:"LT", frag:1.08, dmg:252.87,  spot:2.53, def:1.27, win:57.56 },
		"gb60_covenanter":             { title:"Covenanter",                id:6481,  tier:4,  nation:"UK", type:"LT", frag:1.04, dmg:369.65,  spot:1.87, def:1.05, win:56.99 },
		"gb04_valentine":              { title:"Valentine",                 id:4945,  tier:4,  nation:"UK", type:"LT", frag:0.86, dmg:333.95,  spot:0.86, def:1.22, win:54.69 },
		"gb20_crusader":               { title:"Crusader",                  id:2129,  tier:5,  nation:"UK", type:"LT", frag:0.98, dmg:456.88,  spot:1.76, def:1.10, win:54.74 },
		"gb01_medium_mark_i":          { title:"Vickers Medium Mk. I",      id:81,    tier:1,  nation:"UK", type:"MT", frag:1.88, dmg:240.35,  spot:1.17, def:1.17, win:58.74 },
		"gb05_vickers_medium_mk_ii":   { title:"Vickers Medium Mk. II",     id:337,   tier:2,  nation:"UK", type:"MT", frag:1.64, dmg:274.36,  spot:1.04, def:1.35, win:58.00 },
		"gb06_vickers_medium_mk_iii":  { title:"Vickers Medium Mk. III",    id:2385,  tier:3,  nation:"UK", type:"MT", frag:1.19, dmg:300.59,  spot:1.07, def:1.05, win:56.53 },
		"gb17_grant_i":                { title:"Grant",                     id:1617,  tier:4,  nation:"UK", type:"MT", frag:1.00, dmg:344.64,  spot:0.84, def:0.84, win:54.28 },
		"gb07_matilda":                { title:"Matilda",                   id:849,   tier:4,  nation:"UK", type:"MT", frag:1.33, dmg:502.84,  spot:0.88, def:1.61, win:58.01 },
		"gb68_matilda_black_prince":   { title:"Matilda Black Prince",      id:53585, tier:5,  nation:"UK", type:"MT", frag:1.24, dmg:574.64,  spot:0.83, def:1.49, win:55.41, prem:1 },
		"gb50_sherman_iii":            { title:"Sherman III",               id:12881, tier:5,  nation:"UK", type:"MT", frag:1.44, dmg:666.89,  spot:1.55, def:1.04, win:58.15 },
		"gb21_cromwell":               { title:"Cromwell",                  id:1105,  tier:6,  nation:"UK", type:"MT", frag:1.04, dmg:711.06,  spot:2.06, def:0.95, win:55.05 },
		"gb19_sherman_firefly":        { title:"Sherman Firefly",           id:3665,  tier:6,  nation:"UK", type:"MT", frag:0.95, dmg:806.35,  spot:0.91, def:0.79, win:52.33 },
		"gb22_comet":                  { title:"Comet",                     id:5457,  tier:7,  nation:"UK", type:"MT", frag:1.01, dmg:929.79,  spot:1.77, def:1.06, win:53.33 },
		"gb23_centurion":              { title:"Centurion Mk. I",           id:5969,  tier:8,  nation:"UK", type:"MT", frag:0.82, dmg:1147.96, spot:1.31, def:0.91, win:52.68 },
		"gb70_n_fv4202_105":           { title:"FV4202 (P)",                id:55633, tier:8,  nation:"UK", type:"MT", frag:0.82, dmg:1147.96, spot:1.31, def:0.91, win:52.68, prem:1 },
		"gb24_centurion_mk3":          { title:"Centurion Mk. 7/1",         id:5713,  tier:9,  nation:"UK", type:"MT", frag:0.91, dmg:1588.38, spot:1.28, def:0.85, win:50.84 },
		"gb70_fv4202_105":             { title:"FV4202",                    id:7249,  tier:10, nation:"UK", type:"MT", frag:0.96, dmg:1886.82, spot:1.39, def:0.80, win:48.31 },
		"gb08_churchill_i":            { title:"Churchill I",               id:2897,  tier:5,  nation:"UK", type:"HT", frag:1.17, dmg:630.42,  spot:0.91, def:1.20, win:54.92 },
		"gb51_excelsior":              { title:"Excelsior",                 id:54353, tier:5,  nation:"UK", type:"HT", frag:1.43, dmg:661.43,  spot:1.61, def:1.31, win:57.56, prem:1 },
		"gb09_churchill_vii":          { title:"Churchill VII",             id:4689,  tier:6,  nation:"UK", type:"HT", frag:0.99, dmg:756.40,  spot:0.78, def:1.06, win:53.16 },
		"gb63_tog_ii":                 { title:"TOG II*",                   id:53841, tier:6,  nation:"UK", type:"HT", frag:1.16, dmg:863.71,  spot:0.62, def:1.24, win:52.60, prem:1 },
		"gb10_black_prince":           { title:"Black Prince",              id:3153,  tier:7,  nation:"UK", type:"HT", frag:0.94, dmg:1011.85, spot:0.88, def:1.10, win:54.08 },
		"gb11_caernarvon":             { title:"Caernarvon",                id:3921,  tier:8,  nation:"UK", type:"HT", frag:0.81, dmg:1213.79, spot:1.11, def:0.93, win:51.58 },
		"gb12_conqueror":              { title:"Conqueror",                 id:4433,  tier:9,  nation:"UK", type:"HT", frag:0.87, dmg:1610.79, spot:1.04, def:0.69, win:50.07 },
		"gb13_fv215b":                 { title:"FV215b",                    id:6225,  tier:10, nation:"UK", type:"HT", frag:0.91, dmg:1901.63, spot:1.10, def:0.66, win:48.36 },
		"gb39_universal_carrierqf2":   { title:"Universal Carrier 2-pdr",   id:8273,  tier:2,  nation:"UK", type:"TD", frag:1.78, dmg:291.66,  spot:1.44, def:1.52, win:59.20 },
		"gb42_valentine_at":           { title:"Valentine AT",              id:8017,  tier:3,  nation:"UK", type:"TD", frag:1.63, dmg:387.60,  spot:0.90, def:1.66, win:58.80 },
		"gb57_alecto":                 { title:"Alecto",                    id:9041,  tier:4,  nation:"UK", type:"TD", frag:1.32, dmg:475.48,  spot:1.46, def:1.59, win:57.50 },
		"gb44_archer":                 { title:"Archer",                    id:13393, tier:5,  nation:"UK", type:"TD", frag:1.26, dmg:620.69,  spot:1.03, def:1.39, win:55.62 },
		"gb73_at2":                    { title:"AT 2",                      id:8785,  tier:5,  nation:"UK", type:"TD", frag:1.19, dmg:579.58,  spot:0.81, def:1.56, win:57.32 },
		"gb45_achilles_iic":           { title:"Achilles",                  id:14417, tier:6,  nation:"UK", type:"TD", frag:1.11, dmg:849.66,  spot:0.94, def:1.17, win:54.82 },
		"gb74_at8":                    { title:"AT 8",                      id:9553,  tier:6,  nation:"UK", type:"TD", frag:1.12, dmg:823.44,  spot:0.70, def:1.41, win:56.13 },
		"gb40_gun_carrier_churchill":  { title:"Churchill Gun Carrier",     id:9809,  tier:6,  nation:"UK", type:"TD", frag:0.90, dmg:703.56,  spot:0.42, def:1.03, win:52.42 },
		"gb71_at_15a":                 { title:"AT 15A",                    id:54097, tier:7,  nation:"UK", type:"TD", frag:0.93, dmg:970.33,  spot:0.71, def:1.21, win:51.99, prem:1 },
		"gb75_at7":                    { title:"AT 7",                      id:10065, tier:7,  nation:"UK", type:"TD", frag:1.18, dmg:1241.60, spot:0.70, def:1.30, win:56.42 },
		"gb41_challenger":             { title:"Challenger",                id:14161, tier:7,  nation:"UK", type:"TD", frag:0.95, dmg:1003.48, spot:1.00, def:1.12, win:52.75 },
		"gb72_at15":                   { title:"AT 15",                     id:8529,  tier:8,  nation:"UK", type:"TD", frag:1.06, dmg:1443.76, spot:0.66, def:1.19, win:52.50 },
		"gb80_charioteer":             { title:"Charioteer",                id:14673, tier:8,  nation:"UK", type:"TD", frag:1.09, dmg:1488.75, spot:0.62, def:0.94, win:50.72 },
		"gb81_fv4004":                 { title:"Conway",                    id:13137, tier:9,  nation:"UK", type:"TD", frag:0.87, dmg:1610.79, spot:1.04, def:0.69, win:50.07 },
		"gb32_tortoise":               { title:"Tortoise",                  id:52561, tier:9,  nation:"UK", type:"TD", frag:1.08, dmg:1820.73, spot:0.63, def:0.87, win:51.56 },
		"gb48_fv215b_183":             { title:"FV215b (183)",              id:9297,  tier:10, nation:"UK", type:"TD", frag:1.25, dmg:2329.98, spot:0.59, def:0.57, win:48.77 },
		"gb83_fv4005":                 { title:"FV4005",                    id:13905, tier:10, nation:"UK", type:"TD", frag:1.25, dmg:2329.98, spot:0.59, def:0.57, win:48.77 },
		"gb25_loyd_carrier":           { title:"Loyd Gun Carriage",         id:10577, tier:2,  nation:"UK", type:"SP", frag:1.41, dmg:195.95,  spot:0.26, def:1.32, win:56.18 },
		"gb78_sexton_i":               { title:"Sexton I",                  id:54609, tier:3,  nation:"UK", type:"SP", frag:1.12, dmg:279.39,  spot:0.13, def:1.61, win:53.94, prem:1 },
		"gb27_sexton":                 { title:"Sexton II",                 id:3409,  tier:3,  nation:"UK", type:"SP", frag:0.96, dmg:239.84,  spot:0.12, def:1.37, win:53.78 },
		"gb26_birch_gun":              { title:"Birch Gun",                 id:10833, tier:4,  nation:"UK", type:"SP", frag:1.00, dmg:361.14,  spot:0.10, def:1.88, win:53.40 },
		"gb28_bishop":                 { title:"Bishop",                    id:11089, tier:5,  nation:"UK", type:"SP", frag:1.22, dmg:647.73,  spot:0.11, def:1.70, win:55.25 },
		"gb77_fv304":                  { title:"FV304",                     id:11857, tier:6,  nation:"UK", type:"SP", frag:1.14, dmg:853.36,  spot:0.16, def:2.15, win:54.53 },
		"gb29_crusader_5inch":         { title:"Crusader 5.5-in. SP",       id:11345, tier:7,  nation:"UK", type:"SP", frag:0.92, dmg:993.36,  spot:0.07, def:1.66, win:51.29 },
		"gb79_fv206":                  { title:"FV207",                     id:12113, tier:8,  nation:"UK", type:"SP", frag:0.93, dmg:1306.53, spot:0.03, def:0.86, win:50.24 },
		"gb30_fv3805":                 { title:"FV3805",                    id:11601, tier:9,  nation:"UK", type:"SP", frag:0.99, dmg:1703.97, spot:0.03, def:0.77, win:50.38 },
		"gb31_conqueror_gun":          { title:"Conqueror Gun Carriage",    id:12369, tier:10, nation:"UK", type:"SP", frag:1.02, dmg:2244.39, spot:0.03, def:0.97, win:51.69 },
		"renaultft":                   { title:"Renault FT",                id:577,   tier:1,  nation:"FR", type:"LT", frag:1.72, dmg:219.80,  spot:1.37, def:1.50, win:59.45 },
		"d1":                          { title:"D1",                        id:1601,  tier:2,  nation:"FR", type:"LT", frag:1.43, dmg:236.13,  spot:1.16, def:1.85, win:55.79 },
		"hotchkiss_h35":               { title:"Hotchkiss H35",             id:1345,  tier:2,  nation:"FR", type:"LT", frag:1.46, dmg:240.71,  spot:1.38, def:1.81, win:58.89 },
		"amx38":                       { title:"AMX 38",                    id:5953,  tier:3,  nation:"FR", type:"LT", frag:0.99, dmg:219.46,  spot:0.95, def:1.60, win:55.63 },
		"amx40":                       { title:"AMX 40",                    id:2881,  tier:4,  nation:"FR", type:"LT", frag:0.71, dmg:239.62,  spot:0.86, def:0.91, win:52.49 },
		"elc_amx":                     { title:"ELC AMX",                   id:14145, tier:5,  nation:"FR", type:"LT", frag:0.66, dmg:462.17,  spot:2.61, def:0.75, win:53.93 },
		"amx_12t":                     { title:"AMX 12 t",                  id:6465,  tier:6,  nation:"FR", type:"LT", frag:0.59, dmg:493.20,  spot:2.02, def:0.57, win:51.92 },
		"f69_amx13_57_100":            { title:"AMX 13 57",                 id:63809, tier:7,  nation:"FR", type:"LT", frag:0.60, dmg:586.53,  spot:2.09, def:0.60, win:52.04, prem:1 },
		"amx_13_75":                   { title:"AMX 13 75",                 id:5185,  tier:7,  nation:"FR", type:"LT", frag:0.60, dmg:586.53,  spot:2.09, def:0.60, win:52.04 },
		"amx_13_90":                   { title:"AMX 13 90",                 id:4929,  tier:8,  nation:"FR", type:"LT", frag:0.70, dmg:836.95,  spot:2.45, def:0.65, win:51.76 },
		"d2":                          { title:"D2",                        id:321,   tier:3,  nation:"FR", type:"MT", frag:1.29, dmg:300.60,  spot:0.92, def:1.46, win:57.94 },
		"f68_amx_chasseur_de_char_46": { title:"AMX Chasseur de chars",     id:63553, tier:8,  nation:"FR", type:"MT", frag:0.93, dmg:1120.00, spot:1.51, def:1.07, win:50.04, prem:1 },
		"lorraine40t":                 { title:"Lorraine 40 t",             id:5697,  tier:9,  nation:"FR", type:"MT", frag:0.96, dmg:1407.12, spot:1.35, def:0.79, win:49.42 },
		"bat_chatillon25t":            { title:"Bat.-Châtillon 25 t",       id:3649,  tier:10, nation:"FR", type:"MT", frag:1.12, dmg:1821.23, spot:2.04, def:0.87, win:49.04 },
		"b1":                          { title:"B1",                        id:1089,  tier:4,  nation:"FR", type:"HT", frag:1.04, dmg:335.58,  spot:1.11, def:1.19, win:52.91 },
		"bdr_g1b":                     { title:"BDR G1 B",                  id:6721,  tier:5,  nation:"FR", type:"HT", frag:1.22, dmg:648.05,  spot:0.88, def:0.99, win:54.31 },
		"arl_44":                      { title:"ARL 44",                    id:2625,  tier:6,  nation:"FR", type:"HT", frag:0.95, dmg:806.35,  spot:0.91, def:0.79, win:52.33 },
		"amx_m4_1945":                 { title:"AMX M4 mle. 45",            id:6977,  tier:7,  nation:"FR", type:"HT", frag:0.88, dmg:1024.94, spot:0.94, def:0.92, win:51.70 },
		"amx_50_100":                  { title:"AMX 50 100",                id:3137,  tier:8,  nation:"FR", type:"HT", frag:1.10, dmg:1405.35, spot:0.92, def:1.02, win:51.27 },
		"fcm_50t":                     { title:"FCM 50 t",                  id:64065, tier:8,  nation:"FR", type:"HT", frag:0.93, dmg:1244.66, spot:1.51, def:1.07, win:50.04, prem:1 },
		"amx_50_120":                  { title:"AMX 50 120",                id:3905,  tier:9,  nation:"FR", type:"HT", frag:1.02, dmg:1667.38, spot:0.87, def:0.80, win:49.45 },
		"f10_amx_50b":                 { title:"AMX 50 B",                  id:6209,  tier:10, nation:"FR", type:"HT", frag:1.05, dmg:1980.08, spot:0.95, def:0.82, win:48.19 },
		"renaultft_ac":                { title:"Renault FT AC",             id:7745,  tier:2,  nation:"FR", type:"TD", frag:2.03, dmg:331.49,  spot:0.94, def:1.93, win:59.36 },
		"fcm_36pak40":                 { title:"FCM 36 Pak 40",             id:2369,  tier:3,  nation:"FR", type:"TD", frag:1.86, dmg:450.04,  spot:1.08, def:1.77, win:60.06, prem:1 },
		"renaultue57":                 { title:"Renault UE 57",             id:8257,  tier:3,  nation:"FR", type:"TD", frag:1.49, dmg:375.37,  spot:1.11, def:1.80, win:58.75 },
		"somua_sau_40":                { title:"Somua SAu 40",              id:9793,  tier:4,  nation:"FR", type:"TD", frag:1.18, dmg:399.26,  spot:0.57, def:0.98, win:54.53 },
		"s_35ca":                      { title:"S35 CA",                    id:10049, tier:5,  nation:"FR", type:"TD", frag:1.39, dmg:697.03,  spot:0.92, def:1.42, win:55.13 },
		"arl_v39":                     { title:"ARL V39",                   id:11585, tier:6,  nation:"FR", type:"TD", frag:0.95, dmg:731.25,  spot:0.65, def:1.00, win:50.75 },
		"amx_ac_mle1946":              { title:"AMX AC mle. 46",            id:10817, tier:7,  nation:"FR", type:"TD", frag:0.90, dmg:989.07,  spot:0.68, def:1.01, win:51.48 },
		"amx_ac_mle1948":              { title:"AMX AC mle. 48",            id:12097, tier:8,  nation:"FR", type:"TD", frag:0.96, dmg:1315.14, spot:0.79, def:0.95, win:50.00 },
		"amx50_foch":                  { title:"AMX 50 Foch",               id:11073, tier:9,  nation:"FR", type:"TD", frag:0.99, dmg:1650.32, spot:0.97, def:0.87, win:50.07 },
		"amx_50fosh_155":              { title:"AMX 50 Foch (155)",         id:13889, tier:10, nation:"FR", type:"TD", frag:1.27, dmg:2346.05, spot:0.92, def:0.76, win:49.73 },
		"renaultbs":                   { title:"Renault FT 75 BS",          id:833,   tier:2,  nation:"FR", type:"SP", frag:1.41, dmg:247.23,  spot:0.15, def:2.18, win:55.88 },
		"lorraine39_l_am":             { title:"Lorraine 39L AM",           id:3393,  tier:3,  nation:"FR", type:"SP", frag:1.36, dmg:491.42,  spot:0.15, def:2.05, win:54.84 },
		"amx_ob_am105":                { title:"AMX 105 AM mle. 47",        id:14657, tier:4,  nation:"FR", type:"SP", frag:1.09, dmg:427.29,  spot:0.12, def:1.58, win:54.04 },
		"_105_lefh18b2":               { title:"105 leFH18B2",              id:2113,  tier:5,  nation:"FR", type:"SP", frag:1.40, dmg:703.54,  spot:0.10, def:1.88, win:54.89, prem:1 },
		"amx_105am":                   { title:"AMX 13 105 AM mle. 50",     id:4161,  tier:5,  nation:"FR", type:"SP", frag:1.18, dmg:649.76,  spot:0.10, def:2.30, win:52.34 },
		"amx_13f3am":                  { title:"AMX 13 F3 AM",              id:4673,  tier:6,  nation:"FR", type:"SP", frag:1.12, dmg:1061.24, spot:0.08, def:1.69, win:52.13 },
		"lorraine155_50":              { title:"Lorraine 155 mle. 50",      id:7233,  tier:7,  nation:"FR", type:"SP", frag:0.95, dmg:1266.11, spot:0.06, def:1.36, win:50.45 },
		"lorraine155_51":              { title:"Lorraine 155 mle. 51",      id:7489,  tier:8,  nation:"FR", type:"SP", frag:0.98, dmg:1443.84, spot:0.06, def:1.14, win:50.11 },
		"bat_chatillon155_55":         { title:"Bat.-Châtillon 155 55",     id:14401, tier:9,  nation:"FR", type:"SP", frag:0.95, dmg:1598.09, spot:0.05, def:1.04, win:49.62 },
		"bat_chatillon155_58":         { title:"Bat.-Châtillon 155 58",     id:11841, tier:10, nation:"FR", type:"SP", frag:1.12, dmg:1887.05, spot:0.07, def:1.25, win:48.81 },
		"ch06_renault_nc31":           { title:"Renault NC-31",             id:1329,  tier:1,  nation:"CH", type:"LT", frag:1.92, dmg:252.45,  spot:1.49, def:1.66, win:57.82 },
		"ch07_vickers_mke_type_bt26":  { title:"Vickers Mk. E Type B",      id:2353,  tier:2,  nation:"CH", type:"LT", frag:1.70, dmg:280.61,  spot:1.52, def:1.41, win:59.70 },
		"ch08_type97_chi_ha":          { title:"Type 2597 Chi-Ha",          id:4401,  tier:3,  nation:"CH", type:"LT", frag:1.48, dmg:365.03,  spot:1.36, def:1.37, win:59.50 },
		"ch09_m5":                     { title:"M5A1 Stuart",               id:3121,  tier:4,  nation:"CH", type:"LT", frag:0.95, dmg:346.57,  spot:2.40, def:1.05, win:55.71 },
		"ch15_59_16":                  { title:"59-16",                     id:4913,  tier:6,  nation:"CH", type:"LT", frag:0.53, dmg:383.93,  spot:2.71, def:0.51, win:52.00 },
		"ch02_type62":                 { title:"Type 62",                   id:305,   tier:7,  nation:"CH", type:"LT", frag:0.58, dmg:616.27,  spot:2.35, def:0.67, win:50.46, prem:1 },
		"ch24_type64":                 { title:"Type 64",                   id:64817, tier:6,  nation:"CH", type:"LT", frag:0.62, dmg:528.91,  spot:2.67, def:0.74, win:51.69, prem:1 },
		"ch16_wz_131":                 { title:"WZ-131",                    id:3377,  tier:7,  nation:"CH", type:"LT", frag:0.59, dmg:645.60,  spot:2.56, def:0.58, win:52.08 },
		"ch17_wz131_1_wz132":          { title:"WZ-132",                    id:3889,  tier:8,  nation:"CH", type:"LT", frag:0.55, dmg:731.77,  spot:2.74, def:0.58, win:50.72 },
		"ch21_t34":                    { title:"Type T-34",                 id:4657,  tier:5,  nation:"CH", type:"MT", frag:1.10, dmg:511.81,  spot:1.49, def:1.09, win:53.93 },
		"ch20_type58":                 { title:"Type 58",                   id:5169,  tier:6,  nation:"CH", type:"MT", frag:1.00, dmg:701.37,  spot:1.60, def:0.97, win:53.07 },
		"ch04_t34_1":                  { title:"T-34-1",                    id:1073,  tier:7,  nation:"CH", type:"MT", frag:0.97, dmg:967.93,  spot:1.57, def:0.97, win:54.07 },
		"ch05_t34_2":                  { title:"T-34-2",                    id:1585,  tier:8,  nation:"CH", type:"MT", frag:0.82, dmg:1035.29, spot:1.66, def:0.88, win:50.43 },
		"ch14_t34_3":                  { title:"T-34-3",                    id:64049, tier:8,  nation:"CH", type:"MT", frag:0.89, dmg:1112.93, spot:1.50, def:0.75, win:49.60, prem:1 },
		"ch01_type59":                 { title:"Type 59",                   id:49,    tier:8,  nation:"CH", type:"MT", frag:0.88, dmg:1056.54, spot:1.70, def:0.91, win:50.94, prem:1 },
		"ch01_type59_gold":            { title:"Type 59 G",                 id:561,   tier:8,  nation:"CH", type:"MT", frag:0.88, dmg:1056.54, spot:1.70, def:0.91, win:50.94, prem:1 },
		"ch18_wz-120":                 { title:"WZ-120",                    id:1841,  tier:9,  nation:"CH", type:"MT", frag:0.90, dmg:1453.89, spot:1.51, def:0.69, win:50.42 },
		"ch19_121":                    { title:"121",                       id:4145,  tier:10, nation:"CH", type:"MT", frag:0.93, dmg:1787.87, spot:1.41, def:0.68, win:48.20 },
		"ch10_is2":                    { title:"IS-2",                      id:3633,  tier:7,  nation:"CH", type:"HT", frag:1.06, dmg:1134.25, spot:1.13, def:0.83, win:54.18 },
		"ch11_110":                    { title:"110",                       id:2865,  tier:8,  nation:"CH", type:"HT", frag:0.91, dmg:1304.61, spot:1.15, def:0.80, win:52.40 },
		"ch23_112":                    { title:"112",                       id:64561, tier:8,  nation:"CH", type:"HT", frag:0.94, dmg:1278.38, spot:1.35, def:0.75, win:52.25, prem:1 },
		"ch03_wz-111":                 { title:"WZ-111",                    id:817,   tier:8,  nation:"CH", type:"HT", frag:1.11, dmg:1431.77, spot:1.19, def:0.83, win:53.64, prem:1 },
		"ch12_111_1_2_3":              { title:"WZ-111 model 1-4",          id:2097,  tier:9,  nation:"CH", type:"HT", frag:0.92, dmg:1657.16, spot:1.29, def:0.63, win:51.35 },
		"ch22_113":                    { title:"113",                       id:5425,  tier:10, nation:"CH", type:"HT", frag:0.84, dmg:1771.13, spot:1.31, def:0.63, win:47.91 },
		"nc27":                        { title:"Renault Otsu",              id:609,   tier:1,  nation:"JP", type:"LT", frag:1.75, dmg:217.76,  spot:1.31, def:1.88, win:58.33 },
		"ha_go":                       { title:"Type 95 Ha-Go",             id:865,   tier:2,  nation:"JP", type:"LT", frag:1.64, dmg:279.18,  spot:1.71, def:1.26, win:58.94 },
		"te_ke":                       { title:"Type 97 Te-Ke",             id:3169,  tier:2,  nation:"JP", type:"LT", frag:1.51, dmg:265.35,  spot:1.54, def:1.80, win:58.65, prem:1 },
		"ke_ni":                       { title:"Type 98 Ke-Ni",             id:2401,  tier:3,  nation:"JP", type:"LT", frag:1.36, dmg:332.40,  spot:1.80, def:1.35, win:59.48 },
		"ke_ni_b":                     { title:"Type 98 Ke-Ni Otsu",        id:51809, tier:3,  nation:"JP", type:"LT", frag:1.36, dmg:332.40,  spot:1.80, def:1.35, win:59.48, prem:1 },
		"ke_ho":                       { title:"Type 5 Ke-Ho",              id:2913,  tier:4,  nation:"JP", type:"LT", frag:1.19, dmg:425.95,  spot:1.84, def:1.32, win:57.71 },
		"chi_ni":                      { title:"Chi-Ni",                    id:353,   tier:2,  nation:"JP", type:"MT", frag:1.51, dmg:249.89,  spot:1.42, def:1.29, win:58.96 },
		"chi_ha":                      { title:"Type 97 Chi-Ha",            id:2145,  tier:3,  nation:"JP", type:"MT", frag:1.48, dmg:362.98,  spot:1.31, def:1.33, win:58.57 },
		"chi_he":                      { title:"Type 1 Chi-He",             id:1633,  tier:4,  nation:"JP", type:"MT", frag:1.07, dmg:398.04,  spot:1.27, def:1.09, win:55.72 },
		"chi_nu":                      { title:"Type 3 Chi-Nu",             id:1377,  tier:5,  nation:"JP", type:"MT", frag:1.00, dmg:512.14,  spot:1.23, def:1.06, win:54.07 },
		"chi_nu_kai":                  { title:"Type 3 Chi-Nu Kai",         id:51553, tier:5,  nation:"JP", type:"MT", frag:1.06, dmg:550.49,  spot:1.08, def:1.19, win:53.90, prem:1 },
		"chi_to":                      { title:"Type 4 Chi-To",             id:1889,  tier:6,  nation:"JP", type:"MT", frag:1.03, dmg:761.32,  spot:1.12, def:1.09, win:52.19 },
		"chi_ri":                      { title:"Type 5 Chi-Ri",             id:1121,  tier:7,  nation:"JP", type:"MT", frag:0.95, dmg:950.98,  spot:1.05, def:1.07, win:51.43 },
		"sta_1":                       { title:"STA-1",                     id:2657,  tier:8,  nation:"JP", type:"MT", frag:0.89, dmg:1196.34, spot:1.34, def:1.05, win:51.48 },
		"j18_sta_2_3":                 { title:"STA-2",                     id:52065, tier:8,  nation:"JP", type:"MT", frag:0.89, dmg:1196.34, spot:1.34, def:1.05, win:51.48, prem:1 },
		"type_61":                     { title:"Type 61",                   id:3425,  tier:9,  nation:"JP", type:"MT", frag:0.96, dmg:1625.42, spot:1.31, def:0.82, win:50.60 },
		"st_b1":                       { title:"STB-1",                     id:3681,  tier:10, nation:"JP", type:"MT", frag:1.04, dmg:1968.87, spot:1.58, def:0.83, win:49.75 }
	};

	// variable for statistics
	var s = {
			b:{0:{c:0,p:0},1:{c:0,p:0},2:{c:0,p:0},3:{c:0,p:0},4:{c:0,p:0},5:{c:0,p:0}}, // badges
			s:{p:{b:0,w:0,bg:0},t:{b:0,w:0,bg:0}}, // custom tank tables
			t:{1:{b:0,c:0},2:{b:0,c:0},3:{b:0,c:0},4:{b:0,c:0},5:{b:0,c:0},6:{b:0,c:0},7:{b:0,c:0},8:{b:0,c:0},9:{b:0,c:0},10:{b:0,c:0}},  // tiers
			v:{a:0,bats:0,tier:0}, // vehicles
			h:{}, // hex colours
			w:{e:{frag:0,dmg:0,spot:0,def:0,win:0},r:{},w:{},n:{}}, // wn8 expected values
			f:{wn8:{},wn7:{},eff:{}} // formulas
		},
		premArr = [], tenArr = [], vehList = {};

	// total mastery badge and colouring tank table category rows
	var typeRow_class = d.getElementsByClassName('t-profile_tankstype js-table-dropdown-link');
		for (var _tr=0; _tr<typeRow_class.length; _tr++) {
		var typeBats = filter(typeRow_class[_tr].cells[1].innerHTML,1),
			typeWinrate = filter(typeRow_class[_tr].cells[2].innerHTML,1),
			typeWins = parseFloat((typeBats*(typeWinrate/100)).toFixed(0));

			// modify table
			typeRow_class[_tr].cells[2].innerHTML = colStat(typeWinrate, "wrv", 0, "%")+"<span>"+filter(typeWins,2)+"</span>";
		}

	// average tier, colouring premium tanks and winrates in vehicle tables
	var vehRow_class = d.getElementsByClassName('t-profile_tankstype t-profile_tankstype__item'),
		vehRowStats_class = d.getElementsByClassName('t-profile_slidedown tablesorter-childRow');
		for (var _vr=0; _vr<vehRow_class.length; _vr++) {
		var vehImg = vehRow_class[_vr].cells[0].getElementsByTagName('img')[0],
			vehImgBdg = vehRow_class[_vr].cells[3].getElementsByTagName('img')[0],
			vehSpan = vehRow_class[_vr].cells[0].getElementsByTagName('span')[1],
			vehImgName = vehImg.src.match(/\w+-([\w-]+).png/),
			vehBats = filter(vehRow_class[_vr].cells[1].innerHTML,1),
			vehWinrate = filter(vehRow_class[_vr].cells[2].innerHTML,1),
			vehWins = parseFloat((vehBats*(vehWinrate/100)).toFixed(0)),
			vehBadge = (vehImgBdg) ? vehImgBdg.getAttribute('data-badge_code') : 0;

			// modify table
			vehImg.src = "http://"+wg.host+"/static/3.13.0.2.1/encyclopedia/tankopedia/vehicle/"+vehImgName[0];
			vehRow_class[_vr].cells[2].innerHTML = colStat(vehWinrate, "wrv", 0, "%")+"<span>"+filter(vehWins,2)+"</span>";

			// vehicle badges
			s.b[vehBadge].c ++;

			// check vehicle with statObj - warn if not
			if (statObj[vehImgName[1]]) {
				var vehStat = statObj[vehImgName[1]];

				// process information and push into arrays
				var vehTier = vehStat.tier;
				s.t[vehTier].b += vehBats;
				s.t[vehTier].c ++;
				s.v.tier += vehTier*vehBats;
				s.v.bats += vehBats;
				s.v.a ++;

				// summarize expected stat from every vehicle for WN8
				s.w.e.frag += vehStat.frag*vehBats;
				s.w.e.dmg  += vehStat.dmg *vehBats;
				s.w.e.spot += vehStat.spot*vehBats;
				s.w.e.def  += vehStat.def *vehBats;
				s.w.e.win  += vehStat.win *vehBats;

				// get info for premium table
				if (!!vehStat.prem) {
					s.s.p.b += vehBats;
					s.s.p.w += vehWins;
					vehSpan.className += " b-gold-name";
					premArr.push([vehRow_class[_vr].cloneNode(true), vehRowStats_class[_vr].cloneNode(true)]);
					if (vehRow_class[_vr].cells[3].innerHTML.length > 2) { s.s.p.bg ++; }
				}

				// get info for tier 10 table
				if (vehTier == 10) {
					s.s.t.b += vehBats;
					s.s.t.w += vehWins;
					tenArr.push([vehRow_class[_vr].cloneNode(true), vehRowStats_class[_vr].cloneNode(true)]);
					if (vehRow_class[_vr].cells[3].innerHTML.length > 2) { s.s.t.bg ++; }
				}

				// summarize player vehicles into dedicated array for console
				vehList[vehStat.id] = {
					"infoNameFull": vehStat.title,
					"infoName": vehImgName[1],
					"infoId": vehStat.id,
					"vehNation": vehStat.nation,
					"vehTier": vehStat.tier,
					"vehType": vehStat.type,
					"vehBadge": vehBadge,
					"vehPrem": vehStat.prem,
					"vehStat": {battles: vehBats, battlesWins: parseFloat(vehWins)},
					"vehStatExpected": {frag: vehStat.frag, dmg: vehStat.dmg, spot: vehStat.spot, def: vehStat.def, win: vehStat.win}
				};
			}
			else {
				vehSpan.className += " b-red-name";
				vehSpan.innerHTML += " - "+loc.p77+"!";
				console.error("Vehicle named "+vehImgName[1]+" doesn't exist in statObj, please report!");
			}
		}

	// finding statistic tables
	var mb_table = d.getElementsByClassName('b-result-classes')[0].getElementsByClassName('t-dotted')[0],
		or_table = d.getElementsByClassName('b-result')[0].getElementsByClassName('t-dotted')[0],
		bp_table = d.getElementsByClassName('b-result')[1].getElementsByClassName('t-dotted')[0],
		sm_ratio = d.getElementsByClassName('b-speedometer-ratio');

	// fetching info, calculate averages, colourize and store into var s
	// r = raw stats
	s.r = {
		"days": (new Date() - new Date(d.getElementsByClassName('js-date-format')[0].getAttribute('data-timestamp')*1000))/1000/60/60/24,
		"bats": filter(or_table.rows[0].cells[1].innerHTML,1),
		"wins": filter(or_table.rows[1].cells[1].innerHTML.match(/([\d.,\s|&nbsp;]+\d+)\s/)[1],1),
		"loss": filter(or_table.rows[2].cells[1].innerHTML.match(/([\d.,\s|&nbsp;]+\d+)\s/)[1],1),
		"surv": filter(or_table.rows[3].cells[1].innerHTML.match(/([\d.,\s|&nbsp;]+\d+)\s/)[1],1),
		"exp": filter(or_table.rows[4].cells[1].innerHTML,1),
		"expA": filter(or_table.rows[5].cells[1].innerHTML,1),
		"expM": filter(or_table.rows[6].cells[1].innerHTML,1),
		"frag": filter(bp_table.rows[0].cells[1].innerHTML,1),
		"spot": filter(bp_table.rows[1].cells[1].innerHTML,1),
		"hits": parseFloat(bp_table.rows[2].cells[1].innerHTML.replace(/[,]/g,".")),
		"dmgD": filter(bp_table.rows[3].cells[1].innerHTML,1),
		"caps": filter(bp_table.rows[5].cells[1].innerHTML,1),
		"defs": filter(bp_table.rows[6].cells[1].innerHTML,1),
		"dths": filter(sm_ratio[0].innerHTML.match(/\/(.+)$/)[1],1),
		"dmgR": filter(sm_ratio[1].innerHTML.match(/\/(.+)$/)[1],1)
	};
	s.r.draw = s.r.bats-(s.r.wins+s.r.loss);
	s.r.winLR = s.r.wins/s.r.loss;
	// a = average stats
	s.a = {
		"bats": s.r.bats/s.r.days,
		"wins": (s.r.wins/s.r.bats)*100,
		"loss": (s.r.loss/s.r.bats)*100,
		"draw": (s.r.draw/s.r.bats)*100,
		"surv": (s.r.surv/s.r.bats)*100,
		"frag": s.r.frag/s.r.bats,
		"dths": s.r.dths/s.r.bats,
		"spot": s.r.spot/s.r.bats,
		"dmgD": s.r.dmgD/s.r.bats,
		"dmgR": s.r.dmgR/s.r.bats,
		"caps": s.r.caps/s.r.bats,
		"defs": s.r.defs/s.r.bats,
		"tier": s.v.tier/s.v.bats
	};
	// c = coloured stats
	s.c = {
		"winsR": colStat(s.a.wins, "wr", 2, "%"),
		"lossR": colStat(s.a.loss, "wr", 2, "%"),
		"survR": colStat(s.a.surv, "sr", 2, "%"),
		"hitsR": colStat(s.r.hits, "hr", 2, "%"),
		"drawR": colStat(s.a.draw, "",   2, "%"),
		"batsC": colStat(s.r.bats, "bat", 0),
		"dmgTier": colStat(s.a.dmgD/s.a.tier, "dmg", 0, "", s.a.dmgD),
		"api": "<span class='t-dotted_minor'>API:</span> <font color='CD3333'>"+filter(s.v.bats,2)+"</font>"
	};
	// calculate badge percent
	s.b[5].c = s.v.a;
	s.b[5].p = parseFloat((s.v.a/s.v.a*100).toFixed(0));
	for (var _b in s.b) {
		if (s.b.hasOwnProperty(_b)) {
			s.b[_b].p = parseFloat((s.b[_b].c/s.b[5].c*100).toFixed(0));
		}
	}
	// prepare numbers for WN8 formula
	// r = ratios
	s.w.r = {
		"frag": s.w.e.frag/s.v.bats,
		"dmg": s.w.e.dmg/s.v.bats,
		"spot": s.w.e.spot/s.v.bats,
		"def": s.w.e.def/s.v.bats,
		"win": s.w.e.win/s.v.bats
	};
	// w = weighted
	s.w.w = {
		"frag": s.a.frag/s.w.r.frag,
		"dmg": s.a.dmgD/s.w.r.dmg,
		"spot": s.a.spot/s.w.r.spot,
		"def": s.a.defs/s.w.r.def,
		"win": s.a.wins/s.w.r.win
	};
	// n = normalized
	s.w.n.win = Math.max((s.w.w.win-0.71)/(1-0.71),0);
	s.w.n.dmg = Math.max((s.w.w.dmg-0.22)/(1-0.22),0);
	s.w.n.frag = Math.max(Math.min(s.w.n.dmg+0.2,(s.w.w.frag-0.12)/(1-0.12)),0);
	s.w.n.spot = Math.max(Math.min(s.w.n.dmg+0.1,(s.w.w.spot-0.38)/(1-0.38)),0);
	s.w.n.def = Math.max(Math.min(s.w.n.dmg+0.1,(s.w.w.def-0.10)/(1-0.10)),0);

	// calculate ratings
	// WN8
	s.f.wn8 = (function() {
		var frag = 210*s.w.n.dmg*s.w.n.frag,
			dmg  = 980*s.w.n.dmg,
			spot = 155*s.w.n.frag*s.w.n.spot,
			def  = 75*s.w.n.def*s.w.n.frag,
			win  = 145*Math.min(1.8,s.w.n.win),
			rating = frag+dmg+spot+def+win,
			pct = rating<=colArr.sUni[6] ? (rating/colArr.sUni[6])*100 : 100,
			scale = rating<=colArr.sUni[6] ? Math.max(0, Math.min(100,rating*(rating*(rating*(rating*(rating*(rating*0.00000000000000000009553-0.0000000000000001644)-0.00000000000426)+0.0000000197)-0.00003192)+0.056265)-0.157)) : 100;
		return { frag: frag, dmg: dmg, spot: spot, def: def, win: win, rating: rating, pct: pct, scale: scale, ratCol: colStat(rating,"wn8",2), scaleCol: colStat(scale,"wn8",2) };
	})();
	// WN7 - legacy support
	s.f.wn7 = (function() {
		var frag = s.a.frag*(1240-1040/(Math.pow(Math.min(s.a.tier,6),0.164))),
			dmg  = s.a.dmgD*530/(184*Math.exp(0.24*s.a.tier)+130),
			spot = s.a.spot*125*Math.min(s.a.tier,3)/3,
			def  = Math.min(2.2,s.a.defs)*100,
			win  = (((185/(0.17+Math.exp((s.a.wins-35)*-0.134)))-500)*0.45),
			norm = -Math.abs((((5-Math.min(s.a.tier,5))*125)/(1+Math.exp(s.a.tier-Math.pow(s.r.bats/220,3/s.a.tier))*1.5))),
			rating = frag+dmg+spot+def+win+norm,
			pct = rating<=colArr.sUni[7] ? (rating/colArr.sUni[7])*100 : 100,
			scale = rating<=colArr.sUni[7] ? Math.max(0, Math.min(100,rating*(rating*(rating*(rating*(rating*(rating*0.00000000000000000466-0.000000000000032413)+0.00000000007524)-0.00000006516)+0.00001307)+0.05153)-3.9)) : 100;
		return { frag: frag, dmg: dmg, spot: spot, def: def, win: win, norm: norm, rating: rating, pct: pct, scale: scale, ratCol: colStat(rating,"wn7",2), scaleCol: colStat(scale,"wn7",2) };
	})();
	// efficiency - improved
	s.f.eff = (function() {
		var frag = s.a.frag*250,
			dmg  = s.a.dmgD*(10/(s.a.tier+2))*(0.23+2*s.a.tier/100),
			spot = s.a.spot*150,
			cap  = (Math.log(s.a.caps+1)/Math.log(1.732))*150,
			def  = s.a.defs*150,
			rating = frag+dmg+spot+cap+def,
			pct = rating<=colArr.sUni[8] ? (rating/colArr.sUni[8])*100 : 100,
			scale = rating<=colArr.sUni[8] ? Math.max(0, Math.min(100,rating*(rating*(rating*(rating*(rating*(rating*0.00000000000000003388-0.0000000000002469)+0.00000000069335)-0.00000095342)+0.0006656)-0.1485)-0.85)) : 100;
		return { frag: frag, dmg: dmg, spot: spot, cap: cap, def: def, rating: rating, pct: pct, scale: scale, ratCol: colStat(rating,"eff",2), scaleCol: colStat(scale,"eff",2) };
	})();
	// end formula calculations and variables

	// start modifying and enhancing the rest of the page
	// removing elements
	var layoutfix_class = d.getElementsByClassName('b-hr-layoutfix');
		layoutfix_class[0].parentNode.removeChild(layoutfix_class[0]);

	// profile wrapper
	var profile_div = elem("div", "b-profile-wrpr", ""),
		profileHead_div = elem("div", "b-profile-header", sc.link);
		profileName_class.lastElementChild.innerHTML += " - "+s.r.days.toFixed(0)+" "+loc.p03;
		profileName_class.parentNode.insertBefore(profile_div, profileName_class.nextSibling);
		profile_div.appendChild(profileHead_div);
		profile_div.appendChild(profileName_class);

	// profile header - check for missing battles and notify
	var profileError_div = elem("div", "b-profile-error", loc.p69);
		if (s.v.bats != s.r.bats) {
			profileError_div.style.display="inline-block";
		}
		else {
			s.c.api = " ";
		}
		profileHead_div.insertBefore(profileError_div, profileHead_div.firstElementChild);

	// button for saving stats to clipboard
	var ratingsClipboard = loc.p72+" "+wg.name+": \n"+loc.p73+" "+s.r.bats+" \nWR: "+s.a.wins.toFixed(2)+" \nWN8: "+s.f.wn8.rating.toFixed(2)+" \nWN7: "+s.f.wn7.rating.toFixed(2)+" \nEff: "+s.f.eff.rating.toFixed(2),
		ratingsClipboard_div = elem("div", "b-ratingsClip", "<div class='ratingsClip-holder js-noobmeter' style='display:none;'>"+ratingsClipboard+"</div><div class='ratingsClip-holder' style='display:none;'>"+loc.p64+"</div><a class='b-ratingsButton' onclick='copyClipboard()'>"+loc.p63+"</a>");
		profileHead_div.insertBefore(ratingsClipboard_div, profileHead_div.firstElementChild.nextSibling);

	// background behind profile wrapper
	var background_div = elem("div", "b-background", "<img src='"+css.l[6]+"'>");
		background_div.style.background = s.h.wn8;
		profile_div.parentNode.insertBefore(background_div, profile_div);

	// page navigation
	var lcontent_class = d.getElementsByClassName('l-content')[0],
		dropdown_class = d.getElementsByClassName('wrapper-dropdown')[0];
		lcontent_class.appendChild(elem("div", "b-profile-nav", "<a class='bot' onclick='window.scrollTo(0, 0)'><span>"+loc.p02+"</span></a>"));
		dropdown_class.appendChild(elem("div", "b-profile-nav", "<a class='top' onclick='window.scrollTo(0, 9999)'><span>"+loc.p01+"</span></a>"));

	// player statistic links
	var profileStat_table = elem("table", "t-profile-table", ""),
		statUrl = [
			[
				[loc.p04],
				[srv.wl, "<a target='_blank' href='http://wotlabs.net/"+srv.wl+"/player/"+wg.name+"'>WoTLabs</a>"],
				[srv.nm, "<a target='_blank' href='"+sc.nm.url+"'>Noobmeter</a>"],
				[srv.wn, "<a target='_blank' href='http://wot-news.com/stat/pstat/"+srv.wn+"/"+wg.name+"/'>Wot-news</a>"]
			],
			[
				[""],
				[srv.ws, "<a target='_blank' href='http://wotstats.org/stats/"+srv.ws+"/"+wg.name+"/'>WoTstats</a>"],
				[srv.cs, "<a target='_blank' href='http://wotcs.com/player.php?wid="+wg.id+"'>WoT-CS</a>"],
				(sc.srv=="ru") ? [srv.wots, "<a target='_blank' href='http://wots.com.ua/user/stats/"+wg.name+"/'>WOTS</a>"] : [srv.wlife, "<a target='_blank' href='http://en.wot-life.com/"+srv.wlife+"/player/"+wg.name+"/'>WoT-Life</a>"]
			],
			[
				[loc.p05],
				[srv.wl, "<a target='_blank' href='http://wotlabs.net/sig/"+srv.wl+"/"+wg.name+"/signature.png'>"+loc.p06+"</a>"],
				[srv.wl, "<a target='_blank' href='http://wotlabs.net/sig_dark/"+srv.wl+"/"+wg.name+"/signature.png'>"+loc.p07+"</a>"]
			],
			[
				[loc.p08],
				[srv.wr, "<a target='_blank' href='http://wotreplays."+srv.wr+"/player/"+wg.name+"'>WoTReplays</a>"]
			]
		];
		linksHnd(profileStat_table, statUrl, "table");
		profileName_class.appendChild(profileStat_table);

	// player clan history
	var clanHist_div = elem("div", "b-clanHistory-wrpr", "<span class='clanname'>"+loc.p74+"</span>");
		profile_div.appendChild(clanHist_div);

	// clan handler - clan container is delayed by Wargaming
	var clanBlock = d.getElementById('js-clan-block-container'),
		clanChecker, clanCheckSeq = 0,
		clanStat_table = elem("table", "", "");
		clanStat_table.id = "js-profile-clan-table";
		profileName_class.parentNode.insertBefore(clanBlock, profileName_class.nextSibling);
		clanChecker = setInterval(function() {
		var ci_class = d.getElementById('js-profile-clan'),
			ct_class = d.getElementById('js-profile-clan-table');
			clanCheckSeq ++;
			if (ci_class !== null && ct_class === null) {
			// clan info
			var cl_class = ci_class.getElementsByTagName('a')[1];
				wg.clan.id = cl_class.getAttribute('href').match(/\/(\d+)/)[1];
				wg.clan.name = cl_class.getElementsByTagName('span')[0].innerHTML.match(/[\w.+\-]+/)[0];
			// clan statistic links
			var clanUrl = [
					[
						[loc.p66],
						[srv.wl, "<a target='_blank' href='http://wotlabs.net/"+srv.wl+"/clan/"+wg.clan.name+"'>WoTLabs</a>"],
						[srv.nm, "<a target='_blank' href='http://noobmeter.com/clan/"+srv.nm+"/"+wg.clan.name+"/"+wg.clan.id+"'>Noobmeter</a>"],
						[srv.wn, "<a target='_blank' href='http://wot-news.com/stat/clanstat/"+srv.wn+"/"+wg.clan.id+"/'>Wot-news</a>"]
					],
					[
						[""],
						[srv.cs, "<a target='_blank' href='http://wotcs.com/clan.php?wid="+wg.clan.id+"'>WoT-CS</a>"],
						[srv.wlife, "<a target='_blank' href='http://en.wot-life.com/"+srv.wlife+"/clan/"+wg.clan.name+"-"+wg.clan.id+"/'>WoT-Life</a>"]
					],
					[
						[loc.p67],
						[srv.wr, "<a target='_blank' href='http://wotreplays."+srv.wr+"/player/"+wg.clan.name+"'>WoTReplays</a>"]
					]
				];
				linksHnd(clanStat_table, clanUrl, "table");
				clanBlock.appendChild(clanStat_table);
				// clan history retrieval
				if (!!srv.cs) reqHnd(sc.chApi, chHnd, chHnd_error);
				clearInterval(clanChecker);
			}
			else if (clanCheckSeq == 5 || ct_class !== null) {
				// clan history retrieval
				if (!!srv.cs) reqHnd(sc.chApi, chHnd, chHnd_error);
				clearInterval(clanChecker);
			}
		}, 1000);

	// move fame points block, if it exists
	var gp_class = d.getElementById('js-glory-points-block');
		if (gp_class) {
			profile_div.appendChild(gp_class);
		}

	// move sidebar
		profile_div.appendChild(sidebar_class);
	// end profile wrapper

	// personal data - modify table - add ratings
	var persDataTable = d.getElementsByClassName('t-personal-data')[0];
		persDataTable.rows[0].cells[0].innerHTML = loc.p09; // winrate
		persDataTable.rows[1].cells[0].innerHTML = s.c.winsR;
		persDataTable.rows[0].cells[1].innerHTML = loc.p10; // battles
		persDataTable.rows[1].cells[1].innerHTML = s.c.batsC;
		persDataTable.rows[0].cells[1].parentNode.insertBefore(elem("th", "t-personal-data_ico t-personal-data_ico__exp", loc.p11), persDataTable.rows[0].cells[1].nextSibling); // xp
		persDataTable.rows[1].cells[1].parentNode.insertBefore(elem("td", "t-personal-data_value", filter(s.r.expA,2)), persDataTable.rows[1].cells[1].nextSibling);
		persDataTable.rows[0].cells[4].innerHTML = loc.p70;
		persDataTable.rows[1].cells[3].innerHTML = s.c.hitsR; // hitrate
		persDataTable.rows[0].cells[4].className = "t-personal-data_ico t-personal-data_ico__hitrate";
		persDataTable.rows[0].cells[5].innerHTML = loc.p71; // damage
		persDataTable.rows[1].cells[4].innerHTML = s.c.dmgTier;
		persDataTable.rows[0].appendChild(elem("th", "t-personal-data_ico t-personal-data_ico__tier", loc.p12)); // avg tier
		persDataTable.rows[1].appendChild(elem("td", "t-personal-data_value", s.a.tier.toFixed(2)));
		persDataTable.appendChild(elem("tbody", "t-ratings-info", "<tr><th colspan='2'><a href='http://wiki.wnefficiency.net/pages/WN8' target='_blank'>"+loc.p15+"</a></th><th>"+loc.p30+"</th><th></th><th>"+loc.p16+"</th><th colspan='2'><a class='rating-url_nm' target='_blank' href="+sc.nm.url+">"+loc.p17+"</a></th></tr><tr><td colspan='2'>"+s.f.wn8.ratCol+"</td><td>"+s.f.wn7.ratCol+"</td><td></td><td>"+s.f.eff.ratCol+"</td><td colspan='2' class='js-noobmeter'>"+loc.p18+"</td></tr>"));

	// speedometer - win/loss ratio
	var smBody_class = d.getElementsByClassName('b-speedometer-body')[0],
		smWinWeight = (isFinite(s.r.winLR)) ? s.r.winLR.toFixed(2) : 1,
		smWinArrow = (isFinite(s.r.winLR)) ? Math.min(30*(s.r.winLR-1),31) : 0;
		smBody_class.appendChild(elem("div", "b-speedometer", "<div class='b-speedometer-arrow' data-deg='"+smWinArrow+"' style='transform: rotate("+smWinArrow+"deg); -webkit-transform: rotate("+smWinArrow+"deg); -ms-transform: rotate("+smWinArrow+"deg);'></div><div class='b-speedometer-round'></div><p class='b-speedometer-title'>"+loc.p13+"</p><p class='b-speedometer-weight'>"+smWinWeight+"</p><p class='b-speedometer-ratio'>"+filter(s.r.wins,2)+" / "+filter(s.r.loss,2)+"</p>"));

	// performance ratings calculations table
	var userBlockSprk = d.getElementsByClassName('b-user-block__sparks')[0],
		rTable_div = elem("div", "ratings-table", "<h3>"+loc.p19+"</h3>"),
		rTable = elem("table", "t-table-ratings", ""),
		ratingsArr = [
			[loc.p20, loc.p21, loc.p22, loc.p23, loc.p24, loc.p25, loc.p26, loc.p27, loc.p28],
			["wn8", s.f.wn8.pct, loc.p29, s.f.wn8.ratCol, s.f.wn8.scaleCol, s.f.wn8.frag.toFixed(2), s.f.wn8.dmg.toFixed(2), s.f.wn8.spot.toFixed(2), "–",                    s.f.wn8.def.toFixed(2), s.f.wn8.win.toFixed(2)],
			["wn7", s.f.wn7.pct, loc.p30, s.f.wn7.ratCol, s.f.wn7.scaleCol, s.f.wn7.frag.toFixed(2), s.f.wn7.dmg.toFixed(2), s.f.wn7.spot.toFixed(2), "–",                    s.f.wn7.def.toFixed(2), s.f.wn7.win.toFixed(2)],
			["eff", s.f.eff.pct, loc.p31, s.f.eff.ratCol, s.f.eff.scaleCol, s.f.eff.frag.toFixed(2), s.f.eff.dmg.toFixed(2), s.f.eff.spot.toFixed(2), s.f.eff.cap.toFixed(2), s.f.eff.def.toFixed(2), "–"                   ]
		];
		for (var _r=0; _r<ratingsArr.length; ++_r) {
			var rRow = elem("tr", "", "");
			if (_r === 0) {
				for (var _rh=0; _rh<ratingsArr[_r].length; ++_rh) {
					rRow.appendChild(elem("th", "", ratingsArr[_r][_rh]));
				}
				rTable.appendChild(rRow);
			}
			else {
				for (var _rc=2; _rc<ratingsArr[_r].length; ++_rc) {
					rRow.appendChild(elem("td", "td-center", ratingsArr[_r][_rc]));
				}
				rTable.appendChild(rRow);
				rTable.appendChild(elem("tr", "td-rating-meter", "<td colspan='9'><div class='rating-meter rating-meter_"+ratingsArr[_r][0]+"'><div class='rating-meter-dail_line' style='width:"+ratingsArr[_r][1]+"%;'><div class='rating-meter-marker'></div></div></div></td>"));
			}
		}
		rTable_div.appendChild(rTable);
		userBlockSprk.appendChild(rTable_div);
		// link to WN thread
		userBlockSprk.appendChild(elem("div", "wnelink", "<a class ='b-orange-arrow wnelink_info' target='_blank' href='http://wiki.wnefficiency.net/pages/WN8:_Summary'>"+loc.p32+"</a>"));
	// end performance ratings calculations table

	// statistics wrapper
	var userBlock_div = d.getElementsByClassName('b-userblock-wrpr')[0],
		statistics_div = d.getElementsByClassName('b-result-classes')[0].parentNode;
		statistics_div.className = "b-statistics-wrpr";
		userBlock_div.parentNode.insertBefore(statistics_div, userBlock_div.nextSibling);

	// clean the old tables and populate them with new values (master badges, overall results and battle performance)
	var statTables = [
			[
				["<img src='"+css.l[7]+"'>", loc.p33, s.b[4].c+"<span>("+s.b[4].p+"%)</span>"],
				["<img src='"+css.l[8]+"'>", loc.p34, s.b[3].c+"<span>("+s.b[3].p+"%)</span>"],
				["<img src='"+css.l[9]+"'>", loc.p35, s.b[2].c+"<span>("+s.b[2].p+"%)</span>"],
				["<img src='"+css.l[10]+"'>", loc.p36, s.b[1].c+"<span>("+s.b[1].p+"%)</span>"],
				["<img src='"+css.u.bad1+"'>", loc.p37, s.b[0].c+"<span>("+s.b[0].p+"%)</span>"],
				["<img src='"+css.u.bad2+"'>", loc.p38, s.b[5].c+"<span>("+s.b[5].p+"%)</span>"]
			],
			[
				[loc.p39, filter(s.r.bats,2), s.c.api],
				[loc.p40, filter(s.r.wins,2), "("+s.c.winsR+")"],
				[loc.p41, filter(s.r.loss,2), "("+s.c.lossR+")"],
				[loc.p42, filter(s.r.draw,2), "("+s.c.drawR+")"],
				[loc.p43, filter(s.r.surv,2), "("+s.c.survR+")"],
				[loc.p44, "", s.a.bats.toFixed(2)],
				[loc.p45, "", filter(s.r.exp,2)],
				[loc.p46, "", filter(s.r.expA,2)],
				[loc.p47, "", filter(s.r.expM,2)]
			],
			[
				[loc.p48, filter(s.r.frag,2), s.a.frag.toFixed(2)],
				[loc.p49, filter(s.r.dths,2), s.a.dths.toFixed(2)],
				[loc.p50, filter(s.r.spot,2), s.a.spot.toFixed(2)],
				[loc.p51, "", s.c.hitsR],
				[loc.p52, filter(s.r.dmgD,2), s.c.dmgTier],
				[loc.p53, filter(s.r.dmgR,2), filter(s.a.dmgR.toFixed(0),2)],
				[loc.p54, filter(s.r.caps,2), s.a.caps.toFixed(2)],
				[loc.p55, filter(s.r.defs,2), s.a.defs.toFixed(2)],
				[loc.p56, "", s.a.tier.toFixed(2)]
			],
			[
				mb_table,
				or_table,
				bp_table
			]
		];
		mb_table.innerHTML = "";
		or_table.innerHTML = "";
		bp_table.innerHTML = "";
		for (var _s=0; _s<(statTables.length-1); ++_s) {
			for (var _sr=0; _sr<statTables[_s].length; ++_sr) {
				statTables[3][_s].appendChild(elem("tr", "", "<td class='"+(statTables[3][_s] == mb_table ? 't-dotted_class-ico t-dotted_minor__middle' : 't-dotted_minor')+"'>"+statTables[_s][_sr][0]+"</td><td class='"+(statTables[3][_s] == mb_table ? 't-dotted_minor t-dotted_minor__middle' : 't-dotted_value')+"'>"+statTables[_s][_sr][1]+"</td><td class='"+(statTables[3][_s] == mb_table ? 't-dotted_value t-dotted_minor__middle' : 't-dotted_value')+"'>"+statTables[_s][_sr][2]+"</td>"));
			}
		}

	// cake diagrams - adding tier diagram
	var diagSector_class = d.getElementsByClassName('b-diagrams-sector')[0],
		diagTier_div = elem("div", "b-diagram-block b-diagram-tiers js-diagram-block", "<h3>"+loc.p57+"</h3><div class='b-diagram-wrpr'><div class='b-diagram' id='holder-mechanism-tier'></div><div class='b-diagram-round js-diagram-round'><span class='b-diagram-round_title'></span><span class='b-diagram-round_value js-result'>"+s.v.a+"</span></div></div>"),
		diagTier_table = elem("table", "t-dotted t-dotted__diagram js-diagram-mechanism-legend", ""),
		diagTierCol = {1:"496877",2:"2b591f",3:"831818",4:"303766",5:"814f07",6:"1A775F",7:"B0D23A",8:"763D46",9:"936C19",10:"471952"};
		diagTier_div.appendChild(diagTier_table);
		diagSector_class.insertBefore(diagTier_div, diagSector_class.firstElementChild.nextSibling);
		for (var _t in s.t) {
			if (s.t.hasOwnProperty(_t)) {
				if (s.t[_t].c !== 0) {
					diagTier_table.appendChild(elem("tr", "", "<td class='t-dotted_diagram-first'><span class='t-dotted_diagram-bg'></span></td><td><span class='t-dotted_diagram-bg'><span class='t-dotted_diagram-info'><span class='t-diagram_battle'>"+filter(s.t[_t].b,2)+"</span><span class='t-dotted_diagram-percent'>(<span class=''>"+(s.t[_t].b/s.r.bats*100).toFixed(2)+"%</span>)</span><span class='t-diagram_tiers js-results'>"+s.t[_t].c+"</span><span class='t-dotted_diagram-percent'>(<span class='js-value'>"+(s.t[_t].c/s.v.a*100).toFixed(2)+"%</span>)</span></span><span class='b-diagram-ico b-diagram-ico_tier b-diagram-ico_tier-"+_t+"'>"+loc.p58+" "+_t+"</span></span></td><td class='t-dotted_diagram-last'><span class='t-dotted_diagram-bg'><span class='js-colors'>#"+diagTierCol[_t]+"</span></span></td>"));
				}
			}
		}
		diagSector_class.firstElementChild.innerHTML += "<div class='b-diagram-total'><h3>"+loc.p59+" "+s.v.a+"</h3></div>";
		// fix for cake diagram in chrome
		if (web.chrome) {
			$('.js-diagram-block').each(function() {
				var items = [], values = [], colors = [], results = [], legend, result, holder;
				holder = $('.b-diagram', this).attr('id');
				$('.js-diagram-mechanism-legend tr', this).each(function () {
					items.push($(this));
					values.push(parseInt($('.js-value', this).text(), 10));
					colors.push($('.js-colors', this).text());
					results.push($('.js-results', this).text());
					legend = $('.js-diagram-mechanism-legend');
					result = $('#' + holder).next().find('.js-result');
				});
				new Raphael(holder, 630, 630).pieChart(65, 65.5, 53.5, items, values, colors, results, legend, result);
			});
		}

	// achievements wrapper
	var medal_div = elem("div", "b-achievements-wrpr", ""),
		medalHeader_div = elem("div", "b-head-block", ""),
		medalHeader_class = d.getElementsByClassName('js-achievements-header')[0],
		medalClassArr = ["b-profile-item-empty","js-achivements-showhide","js-short-achievements","js-full-achievements"];
		medalHeader_div.appendChild(medalHeader_class);
		medal_div.appendChild(medalHeader_div);
		for (var _m=0; _m<medalClassArr.length; ++_m) {
			var medalChild = d.getElementsByClassName(medalClassArr[_m])[0];
			if (!!medalChild) {
				medal_div.appendChild(medalChild);
			}
		}
		diagSector_class.parentNode.insertBefore(medal_div, diagSector_class.nextSibling);
		diagSector_class.parentNode.insertBefore(layoutfix_class[0], diagSector_class.nextSibling);

	// vehicles wrapper
	var vehTable_class = d.getElementsByClassName('t-profile t-profile__vehicle')[0],
		vehicles_div = elem("div", "b-vehicles-wrpr", ""),
		vehiclesHeader_div = elem("div", "b-vehicles-header", "<a class='b-orange-arrow b-profile-ratings_link' target='_blank' href='/encyclopedia/vehicles/'>"+loc.p60+"</a><span class='b-profile-vehicles-tankstat'><a class='b-orange-arrow b-profile-ratings_link b-profile-vehicles-tankstat_link' target='_blank' href='http://noobmeter.com/tankStats/"+srv.nm+"'>"+loc.p61+"</a></span>"),
		vehicles_h3_class = vehTable_class.previousElementSibling.previousElementSibling;
		vehicles_h3_class.className = "b-profile-ratings_title";
		vehiclesHeader_div.insertBefore(vehicles_h3_class, vehiclesHeader_div.firstChild);
		vehicles_div.appendChild(vehiclesHeader_div);
		vehTable_class.parentNode.insertBefore(vehicles_div, vehTable_class);
		vehicles_div.appendChild(vehTable_class);

	// add a premium tanks table to the vehicle table
	var premHBody = elem("tbody", "", ""),
		premTBody = elem("tbody", "sortable", "");
		vehTable_class.appendChild(premHBody);
		if (premArr.length === 0) {
			premHBody.appendChild(elem("tr", "t-profile_tankstype t-profile_tankstype-prem t-profile_tankstype__empty", "<td width='388' class='t-profile_head'><span class='b-tankstype-ico b-tankstype-ico__prem'></span><span class='b-tankstype-text'>"+loc.p62+" </span></td><td class='t-profile_right'>&ndash;</td><td class='t-profile_center'>&ndash;</td><td class='t-profile_center'>&ndash;</td><td class='t-profile_dropdown-ico'><!-- empty --></td>"));
		}
		else {
			premHBody.className = "tablesorter-no-sort";
			premHBody.appendChild(elem("tr", "t-profile_tankstype t-profile_tankstype-prem js-table-dropdown-link", "<td width='388' class='t-profile_head'><span class='b-tankstype-ico b-tankstype-ico__prem'></span><span class='b-tankstype-text'>"+loc.p62+" <span class='b-armory-col'>"+premArr.length+"</span></span></td><td class='t-profile_right'>"+filter(s.s.p.b,2)+"</td><td class='t-profile_center'>"+colStat((s.s.p.w/s.s.p.b)*100, "wrv", 0, "%")+"<span>"+filter(s.s.p.w,2)+"</span></td><td class='t-profile_center'>"+s.s.p.bg+"</td><td class='t-profile_dropdown-ico'><a title='Show/hide vehicles' class='t-profile_dropdown-link' href=''></a></td>"));
			premTBody.style.display="none";
			vehTable_class.appendChild(premTBody);
			for (var _p=0; _p<premArr.length; ++_p) {
				premTBody.appendChild(premArr[_p][0]);
				premTBody.appendChild(premArr[_p][1]);
			}
		}

	// add a tier 10 table to the vehicle table
	var tenHBody = elem("tbody", "", ""),
		tenTBody = elem("tbody", "sortable", "");
		vehTable_class.appendChild(tenHBody);
		if (tenArr.length === 0) {
			tenHBody.appendChild(elem("tr", "t-profile_tankstype t-profile_tankstype__empty", "<td width='388' class='t-profile_head'><span class='b-tankstype-ico b-tankstype-ico__ten'>✖</span><span class='b-tankstype-text'>"+loc.p68+" </span></td><td class='t-profile_right'>&ndash;</td><td class='t-profile_center'>&ndash;</td><td class='t-profile_center'>&ndash;</td><td class='t-profile_dropdown-ico'><!-- empty --></td>"));
		}
		else {
			tenHBody.className = "tablesorter-no-sort";
			tenHBody.appendChild(elem("tr", "t-profile_tankstype js-table-dropdown-link", "<td width='388' class='t-profile_head'><span class='b-tankstype-ico b-tankstype-ico__ten'>✖</span><span class='b-tankstype-text'>"+loc.p68+" <span class='b-armory-col'>"+tenArr.length+"</span></span></td><td class='t-profile_right'>"+filter(s.s.t.b,2)+"</td><td class='t-profile_center'>"+colStat((s.s.t.w/s.s.t.b)*100, "wrv", 0, "%")+"<span>"+filter(s.s.t.w,2)+"</span></td><td class='t-profile_center'>"+s.s.t.bg+"</td><td class='t-profile_dropdown-ico'><a title='Show/hide vehicles' class='t-profile_dropdown-link' href=''></a></td>"));
			tenTBody.style.display="none";
			vehTable_class.appendChild(tenTBody);
			for (var _x=0; _x<tenArr.length; ++_x) {
				tenTBody.appendChild(tenArr[_x][0]);
				tenTBody.appendChild(tenArr[_x][1]);
			}
		}
	// end vehicles wrapper

	// debugging to browser console
		console.info("Browser Info:\n"+navigator.appCodeName+" - "+navigator.appName+"\n"+navigator.userAgent+"\n", web);
		console.info(ratingsClipboard);
		console.info("Script Settings:\n", sc, "\n\n\n", "Statistics:\n", s, "\n\n\n", "Vehicle Info:\n", vehList);

	// retrieve and process info from external source
		// noobmeter retrieval
		if (!!srv.nm) {
			reqHnd(sc.nm.api, nmHnd, nmHnd_error);
		}
	}
	else {
		profileName_class.innerHTML += "<div style='width: 950px; top: -15px; text-align: center; position: absolute;'>"+loc.p65+"</div>";
	}
	// end tableBattles
}
// end wg.player
// matches url with clan page
else if (wg.clans) {
// getting claninfo
	wg.clan.id = wg.href.match(/\/(\d+)/)[1];
	wg.clan.name = d.getElementsByClassName('js-clan-tag')[0].innerHTML.match(/[\w.+\-]+/)[0];

// style contents
	styleCSS([
		".b-scriptlink {font-size: 12px; padding: 6px 10px 5px;}",
		".clan_info {float: left; margin-left: 18px; max-width: 500px;}",
		".clan-links {float: right; display: inline-block;}",
		".clan-links li.statname {margin: 0;}",
		".clan-links li {margin-left: 10px;}"
	]);
// end style

// script link
var clanHead_div = elem("li", "global-nav__item", sc.link),
	navService_class = d.getElementsByClassName('global-nav__service')[0];
	navService_class.insertBefore(clanHead_div, navService_class.firstChild);

// script link
var menu_class = d.getElementsByClassName('js-menu')[2],
	menuNick = menu_class.getElementsByTagName('a')[0].innerHTML.match(/(\w)+/)[0],
	menuLink = elem("li", "global-nav__submenu-item", "<a href='http://worldoftanks."+wg.srv+"/community/accounts/named/"+menuNick+"'>My Profile</a>");
	menu_class.getElementsByTagName('ul')[0].insertBefore(menuLink, menu_class.getElementsByTagName('ul')[0].firstChild);

// clan statistic links
var clan_class = d.getElementsByClassName('clan')[1],
	clanStat_list = elem("ul", "clan-links", ""),
	clanUrl = [
		[loc.c01],
		[srv.wl, "<a target='_blank' href='http://wotlabs.net/"+srv.wl+"/clan/"+wg.clan.name+"'>WoTLabs</a>"],
		[srv.nm, "<a target='_blank' href='http://noobmeter.com/clan/"+srv.nm+"/"+wg.clan.name+"/"+wg.clan.id+"'>Noobmeter</a>"],
		[srv.wn, "<a target='_blank' href='http://wot-news.com/stat/clanstat/"+srv.wn+"/"+wg.clan.id+"/'>Wot-news</a>"],
		[srv.cs, "<a target='_blank' href='http://wotcs.com/clan.php?wid="+wg.clan.id+"'>WoT-CS</a>"],
		[srv.wlife, "<a target='_blank' href='http://en.wot-life.com/"+srv.wlife+"/clan/"+wg.clan.name+"-"+wg.clan.id+"/'>WoT-Life</a>"],
		[loc.c02],
		[srv.wr, "<a target='_blank' href='http://wotreplays."+srv.wr+"/clan/"+wg.clan.name+"'>WoTReplays</a>"]
	];
	linksHnd(clanStat_list, clanUrl, "list");
	clan_class.appendChild(clanStat_list);
}
// end wg.clans

// helper functions
// style handler
function styleCSS(text) {
	style.textContent = text.toString().replace(/}(,)/g,"}\n");
}

// filter
function filter(input, type) {
var inputStr = input.toString();
	switch(type) {
		case (1): // input string into number
			return parseFloat(inputStr.replace(/[^\d]/g,""));
		case (2): // output number with locale symbol
			return inputStr.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1"+loc.sym);
		case (3): // remove all symbols
			return inputStr.replace(/[^\w]/g,"");
		default:
			console.error("Error filtering: ", input);
			return input;
	}
}

// colouring
function colStat(input, type, dec, sym, ext) {
var color = colArr.dft[0],
	output = input.toFixed(dec);
	if (sym) {
		output += sym;
	}
	switch(type) {
		case ("bat"):
			output = filter(input,2); break;
		case ("dmg"):
			output = filter(ext.toFixed(0),2); break;
		default: break;
	}
	if (type !== "") {
		if (s.h[type]) {
			color = s.h[type];
		}
		else if (type == "wrv") {
			color = colStatArr(input, "wr");
		}
		else {
			color = colStatArr(input, type);
			s.h[type] = color;
		}
	}
	return "<font color='"+color+"'>"+output+"</font>";
}
function colStatArr(input, type) {
var color;
	for (var _c in colArr) {
		if (colArr.hasOwnProperty(_c)) {
			if (input >= colArr[_c][colArr.id[type]]) {
				color = colArr[_c][0]; break;
			}
		}
	}
	return (color) ? color : colArr.beg[0];
}

// quick creation of element
function elem(tag, name, html, type) {
var element = d.createElement(tag);
	if (name) {element.className = name;}
	if (html) {element.innerHTML = html;}
	if (type) {element.type = type;}
	return element;
}

// links handler
function linksHnd(parent, links, type) {
	for (var _l=0; _l<links.length; ++_l) {
		if (type == "table") {
			var uRow = elem("tr", "", "");
			for (var _lr=0; _lr<links[_l].length; ++_lr) {
				uRow.appendChild(links[_l][_lr][0] && links[_l][_lr][1] ? elem("td", "", links[_l][_lr][1]) : elem("td", "", links[_l][_lr][0]));
			}
			parent.appendChild(uRow);
		}
		else if (type == "list") {
			parent.appendChild(links[_l][0] && links[_l][1] ? elem("li", "", links[_l][1]) : elem("li", "statname", links[_l][0]));
		}
	}
}
// end helper functions

// noobmeter handler
function nmHnd(resp) {
	if (!isNaN(parseFloat(resp.responseText))) {
		nmHnd_insert(parseFloat(resp.responseText));
	}
	else {
		nmHnd_error(resp);
	}
}
function nmHnd_error(err) {
	nmHnd_insert(loc.p75);
	console.error("Error accessing NoobMeter API", err.responseText);
}
function nmHnd_insert(nm) {
var nmDiv = d.getElementsByClassName('js-noobmeter');
	nmDiv[0].innerHTML += !isNaN(nm) ? " NM: "+nm.toFixed(2) : "";
	nmDiv[1].innerHTML = !isNaN(nm) ? colStat(nm,"nm",2) : nm;
}
// end noobmeter handler

// clan history handler
function chHnd(resp) {
	chHnd_insert(JSON.parse(resp.responseText).changes);
}
function chHnd_error(err) {
	clanHist_div.appendChild(elem("span", "", loc.p77));
	console.error("Error accessing WoT-CS API", err.responseText);
}
function chHnd_insert(ch) {
var prevClan, clanHist_span;
	if (ch.length > 0) {
		for (var _h=0; _h<ch.length; ++_h) {
			if (ch[_h].clan_tag && prevClan !== ch[_h].clan_tag) {
				clanHist_span = elem("span", (ch[_h].clan_tag == wg.clan.name) ? "clantag curr" : "clantag", "<a href='http://"+srv.ch+".wargaming.net/clans/"+ch[_h].clan_id+"/' target='_blank'>["+ch[_h].clan_tag+"]</a>");
				clanHist_div.insertBefore(clanHist_span, clanHist_div.firstChild.nextSibling);
			}
			prevClan = ch[_h].clan_tag;
		}
	}
	else {
		clanHist_div.appendChild(elem("span", "clantag", loc.p76));
	}
}
// end clan history handler

// retrieval function
function reqHnd(url, handler, error) {
	GM_xmlhttpRequest({
		method: "GET",
		url: url,
		headers: {
			"Accept": "text/xml"
		},
		onload: function(resp) {
			if (resp.readyState == 4 && resp.status == 200 && resp.statusText == "OK") {
				handler(resp);
			}
			else {
				error(resp);
			}
		},
		onerror: function(resp) {
			error(resp);
		}
	});
}

// global functions inserted into head
// clipboard helper
function copyClipboard() {
var cpText = d.getElementsByClassName('ratingsClip-holder')[0].innerHTML,
	cpLoc = d.getElementsByClassName('ratingsClip-holder')[1].innerHTML;
	window.prompt(cpLoc, cpText);
}
// end global functions
}());