// by Manda_Chuva (23893) & modified by MkCerusky

// ==UserScript==
// @name           Sokker NT Database
// @description    Version 3.0 - This script fills automaticaly NT Databases forms available on the internet. Version with direct link to Italian and Belarus NT Databases Top-Ten pages, modified by MkCerusky (www.mkvale.it/mk/sokker) - Adapted to new design by MkCerusky.
// @include        http://online.sokker.org/player.php*
// @include        http://217.17.40.90/player.php*
// ==/UserScript==

String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ""); };

//take the current css user style
var css=document.getElementsByTagName("link")[0];
css=css.getAttribute("href");
if(css=="styleclassic.css") css="http://online.sokker.org/styleclassic.css";

//find the div tag where the player is placed - difference between plus and no plus users
var divs = document.getElementsByTagName("div");
position=0;i=0;
while(i<divs.length&&divs[i].getAttribute("class")!="titleBlock1"){
  i++;
}
position=i-3;

/****************************************************************************************/
/* Collect information from the web page                                                */
/****************************************************************************************/

var aux = divs[8].getElementsByTagName("h1");
var name = getNodeValue(aux[0]).replace("]","").split("[")[0];
var pid = getNodeValue(aux[0]).replace("]","").split("[")[1];

var aux = divs[11].getElementsByTagName("a");
var lang = SelectLang(getNodeValue(aux[0]));

var aux = divs[position].getElementsByTagName("strong");
var age = aux[0].childNodes[0].nodeValue.trim();

var aux = divs[position+4].getElementsByTagName("a");
var login = aux[0].childNodes[0].nodeValue.trim();
var tid = aux[0].getAttribute("href").replace("&","=").split("=")[1];
var country = aux[1].getAttribute("href").replace("&","=").split("=")[1];
var flag = "http://files.sokker.org/pic/flags/"+country+".png";

var aux = divs[position+4].getElementsByTagName("span");
var val = aux[0].childNodes[0].nodeValue.trim();
var wag = aux[1].childNodes[0].nodeValue.trim();
var frm = getSkillIndex(aux[2].childNodes[0].nodeValue.trim());
var tac = getSkillIndex(aux[3].childNodes[0].nodeValue.trim());

var aux = divs[position+4].getElementsByTagName("table");
var sta = getSkillIndex(getNodeValue(aux[0].rows[0].cells[0].getElementsByTagName("strong")[0]));
var kee = getSkillIndex(getNodeValue(aux[0].rows[0].cells[1].getElementsByTagName("strong")[0]));
var pac = getSkillIndex(getNodeValue(aux[0].rows[1].cells[0].getElementsByTagName("strong")[0]));
var def = getSkillIndex(getNodeValue(aux[0].rows[1].cells[1].getElementsByTagName("strong")[0]));
var tec = getSkillIndex(getNodeValue(aux[0].rows[2].cells[0].getElementsByTagName("strong")[0]));
var pla = getSkillIndex(getNodeValue(aux[0].rows[2].cells[1].getElementsByTagName("strong")[0]));
var pas = getSkillIndex(getNodeValue(aux[0].rows[3].cells[0].getElementsByTagName("strong")[0]));
var str = getSkillIndex(getNodeValue(aux[0].rows[3].cells[1].getElementsByTagName("strong")[0]));

/****************************************************************************************/
/* Create instructions for the users                                                    */
/****************************************************************************************/

var title="NT DataBase";
if(lang=="pt") title="Banco de Dados da Seleção";

var text="Click on the flag if you want to send this player to the NT Database.";
if(lang=="pt") text="Envie este jogador ao banco de dados da seleção clicando na bandeira abaixo.";

/****************************************************************************************/
/* Set database path                                                                    */
/****************************************************************************************/

var url="http://sokker.awardspace.com/ntdb/error.php"; //if this country database is still not available

if(country==1) url="http://baza.sokkerviewer.net/index_open.php?country=1"; //Poland
if(country==3) url="http://www.jmorobinson.co.uk/sokker/indexsk.php"; //England
if(country==4) url="http://briancoburn.net/usa/indexsk.php"; //USA
if(country==8) url="http://sokker.jateklap.hu/sk-db/indexsk.php"; //Magyarorszýg
if(country==9) url="http://sokker.ciumegul.com/indexsk.php"; //Romania
if(country==10) url="http://sokker.ilbello.com/index.php"; //Italia
if(country==11) url="http://sokker.ilbello.com/Jamaica/"; //Jamaica
if(country==12) url="http://www.deelstar.nl/sokker/database/-p-lang-en"; //Nederland
if(country==13) url="http://baza.sokkerviewer.net/index_open.php?country=13"; //Czech
if(country==15) url="http://db.sokker-deutschland.de/indexsk.php"; //Deutschland
if(country==16) url="http://sokkertables.free-h.net/modules/dtn_detect/update_player.php"; //France
if(country==18) url="http://www.sokker.com.mx/NTMexico/index.php"; //Mexico
if(country==20) url="http://ntpt.quecenafixe.com/indexsk.php"; //Portugal
if(country==21) url="http://www.sokker.domiciano.eng.br/ntdb/indexsk.php"; //Brasil
if(country==22) url="http://baza.sokkerviewer.net/index_open.php?country=22"; //South Africa
if(country==23) url="http://sokker.puslapiai.lt/indexsk.php"; //Lietuva
if(country==24) url="http://sokker.villano.ch/indexsk.php"; //Schweiz
if(country==28) url="http://sokkerbelgium.robis.be/"; //Belgium
if(country==30) url="http://sokker.zapzarap.net/nt/index.php"; //Austria
if(country==32) url="http://sokkereire.freehostia.com/"; //Ireland
if(country==34) url="http://gamsoft.org/main.php?page=requirements&ln=en"; //Hrvatska
if(country==36) url="http://skcolombia.webcindario.com/procesar.php"; //Colombia
if(country==37) url="http://htmasters.pandela.org/sokkerperu/datask.php"; //Peru
if(country==38) url="http://baza.sokkerviewer.net/index_open.php?country=38"; //Nigeria
if(country==39) url="http://24.182.128.62/sksrbija/dbin.cgi"; //Serbia
if(country==40) url="http://ntdbcymru.awardspace.com/indexsk.php"; //Cymru
if(country==41) url="http://www.sokkerturkiye.phpnet.us/index.php"; //Turkye
if(country==42) url="http://sagloc.webcindario.com/procesar.php"; //Chile
if(country==43) url="http://rossokker.h.com.ua/"; //Rossiya
if(country==44) url="http://venezuelabd.webcindario.com/sendSO.php"; //Venezuela
if(country==46) url="http://sokker.ilbello.com/Belorus/"; //Belarus
if(country==45) url="http://sokker.ilbello.com/Latvija/index.php"; //Latvija
if(country==47) url="http://bihsokker.com/nt/"; //Bosna i Hercegovina
if(country==49) url="http://baza.sokkerviewer.net/index_open.php?country=49"; //Hellas
if(country==52) url="http://israelntdb.awardspace.com/indexsk.php"; //Israel
if(country==53) url="http://black_eagle.php0h.com/indexsk.php"; //Shqiperia
if(country==54) url="http://soccer.awardspace.info/ntdb/indexsk.php"; //Bulgaria
if(country==59) url="http://baza.sokkerviewer.net/index_open.php?country=59"; //Malaysia
if(country==60) url="http://hongkong.php0h.com/"; //Hong Kong
if(country==64) url="http://swift.h.com.ua/ukrsoknt/indexsk.php"; //Ukraina
if(country==66) url="http://armensokker.freehostia.com/ntdb/indexsk.php"; //Hayastan
if(country== 67) url="http://ntmalta.awardspace.com"; //Malta
if(country== 67 && age< 21) url="http://under20malta.awardspace.com"; //Malta U20
if(country==69) url="http://moldovant.uv.ro/indexsk.php"; //Moldova
if(country==71) url="http://www.onyar.net/sokkerandorra/"; //Andorra
if(country==79) url="http://sokker.geo.az/"; //Azerbaijan
if(country==82) url="http://baza.sokkerviewer.net/index_open.php?country=82"; //Zhongguo
if(country==83) url="http://sokker.ilbello.com/Singapore/"; //Singapore
if(country==84) url="http://vietnamdb.summerhost.info/"; //Vietnam


/****************************************************************************************/
/* Create new object and the sender                                                     */
/****************************************************************************************/

var NT=document.createElement("div"); //create the div section to add elements
document.getElementsByTagName("div")[position+4].setAttribute("id","result");

var form="<div class='insideTopLeft'><div class='insideTopRight'></div></div>";
form=form+"<div class='content'><strong><p>"+title+"</p></strong><p>"+text+"</p>";
form=form+"<form action='"+url+"' method=post><p>";
form=form+"<input name=teamname type=hidden value='"+login+"'>";
form=form+"<input name=tid type=hidden value='"+tid+"'>";
form=form+"<input name=playername type=hidden value='"+name+"'>";
form=form+"<input name=pid type=hidden value='"+pid+"'>";
form=form+"<input name=age type=hidden value='"+age+"'>";
form=form+"<input name=val type=hidden value='"+val+"'>";
form=form+"<input name=wag type=hidden value='"+wag+"'>";
form=form+"<input name=frm type=hidden value='"+frm+"'>";
form=form+"<input name=tac type=hidden value='"+tac+"'>";
form=form+"<input name=sta type=hidden value='"+sta+"'>";
form=form+"<input name=kee type=hidden value='"+kee+"'>";
form=form+"<input name=pac type=hidden value='"+pac+"'>";
form=form+"<input name=def type=hidden value='"+def+"'>";
form=form+"<input name=tec type=hidden value='"+tec+"'>";
form=form+"<input name=pla type=hidden value='"+pla+"'>";
form=form+"<input name=pas type=hidden value='"+pas+"'>";
form=form+"<input name=str type=hidden value='"+str+"'>";
form=form+"<input name=css type=hidden value='"+css+"'>";
form=form+"<input name=lang type=hidden value='"+lang+"'>";
form=form+"<input type=image src='"+flag+"'>";

if(country==10) form = form +                                     //ads direct link to Italian NT top-ten (added by Mkcerusky)
  " NT Top-Ten: <a href='http://sokker.ilbello.com/stats/index.php?ruolo=GK'>GK</a>" +
  " <a href='http://sokker.ilbello.com/stats/index.php?ruolo=DEF'>DEF</a>" +
  " <a href='http://sokker.ilbello.com/stats/index.php?ruolo=MID'>MID</a>" +
  " <a href='http://sokker.ilbello.com/stats/index.php?ruolo=ATT'>ATT</a>"; 

if(country==46) form = form +                                     //ads direct link to Belarus NT top-ten (added by Mkcerusky)
  " NT Top-Ten: <a href='http://sokker.ilbello.com/statsbel/index.php?ruolo=GK'>GK</a>" +
  " <a href='http://sokker.ilbello.com/statsbel/index.php?ruolo=DEF'>DEF</a>" +
  " <a href='http://sokker.ilbello.com/statsbel/index.php?ruolo=MID'>MID</a>" +
  " <a href='http://sokker.ilbello.com/statsbel/index.php?ruolo=ATT'>ATT</a>"; 

form=form+"</p></form></div>";

NT.innerHTML=form;
document.getElementById("result").appendChild(NT);


function getNodeValue(theNode) {
 for (var i = 0; ((i < 10) && (theNode.nodeValue == null)); i++) {
  theNode = theNode.firstChild;
 }
 return theNode.nodeValue;  
}

/****************************************************************************************/
/* Translate skills                                                                     */
/****************************************************************************************/

function SelectLang(lang){
if(lang=="Le\u00EDr\u00E1s") return "hu"; //hungarian
if(lang=="Descriere") return "ro"; //romanian
if(lang=="Descrizione") return "it"; //italian
if(lang=="Beschrijving") return "nl"; //dutch
if(lang=="Beschreibung") return "de"; //deutsch
if(lang=="Description") return "fr"; //fran�ais
if(lang=="Informa\u00E7\u0151es") return "pt"; //portuguese
if(lang=="Opis") return "hr"; //croatian, bosanski
if(lang=="Descripci\u00F3n") return "es"; //spanish
if(lang=="A\u00E7\u0131klamalar") return "tr"; //turkish
if(lang=="\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435") return "bg"; //bulgarian
if(lang=="Beskriuwing") return "fy"; //frisian
return "en";
}

function getSkillIndex(theSkill) {
//Portuguese
if(theSkill=="Terr\u00EDvel") return 0;
if(theSkill=="P\u00E9ssimo") return 1;
if(theSkill=="Insatisfat\u00F3rio") return 2;
if(theSkill=="Ruim") return 3;
if(theSkill=="Fraco") return 4;
if(theSkill=="Mediano") return 5;
if(theSkill=="Razo\u00E1vel") return 6;
if(theSkill=="Bom") return 7;
if(theSkill=="S\u00F3lido") return 8;
if(theSkill=="Muito Bom") return 9;
if(theSkill=="Excelente") return 10;
if(theSkill=="Formid\u00E1vel") return 11;
if(theSkill=="Fenomenal") return 12;
if(theSkill=="Incr\u00EDvel") return 13;
if(theSkill=="Brilhante") return 14;
if(theSkill=="Magn\u00EDfico") return 15;
if(theSkill=="Sobrenatural") return 16;
if(theSkill=="Lend\u00E1rio") return 17;
//English
if(theSkill=="tragic") return 0;
if(theSkill=="hopeless") return 1;
if(theSkill=="unsatisfactory") return 2;
if(theSkill=="poor") return 3;
if(theSkill=="weak") return 4;
if(theSkill=="average") return 5;
if(theSkill=="adequate") return 6;
if(theSkill=="good") return 7;
if(theSkill=="solid") return 8;
if(theSkill=="very good") return 9;
if(theSkill=="excellent") return 10;
if(theSkill=="formidable") return 11;
if(theSkill=="outstanding") return 12;
if(theSkill=="incredible") return 13;
if(theSkill=="brilliant") return 14;
if(theSkill=="magical") return 15;
if(theSkill=="unearthly") return 16;
if(theSkill=="divine") return 17;
//Espa�ol
if(theSkill=="tr\u00E1gico") return 0;
if(theSkill=="tr\u00E1gica") return 0;
if(theSkill=="terrible") return 1;
if(theSkill=="deficiente") return 2;
if(theSkill=="pobre") return 3;
if(theSkill=="d\u00E9bil") return 4;
if(theSkill=="regular") return 5;
if(theSkill=="aceptable") return 6;
if(theSkill=="bueno") return 7;
if(theSkill=="buena") return 7;
if(theSkill=="s\u00F3lido") return 8;
if(theSkill=="s\u00F3lida") return 8;
if(theSkill=="muy bueno") return 9;
if(theSkill=="muy buena") return 9;
if(theSkill=="excelente") return 10;
if(theSkill=="formidable") return 11;
if(theSkill=="destacado") return 12;
if(theSkill=="destacada") return 12;
if(theSkill=="incre\u00EDble") return 13;
if(theSkill=="brillante") return 14;
if(theSkill=="m\u00E1gico") return 15;
if(theSkill=="m\u00E1gica") return 15;
if(theSkill=="sobrenatural") return 16;
if(theSkill=="divino") return 17;
if(theSkill=="divina") return 17;
//T�rk�e
if(theSkill=="Felaket") return 0;
if(theSkill=="berbat") return 1;
if(theSkill=="yetersiz") return 2;
if(theSkill=="k\u00F6t\u00FC") return 3;
if(theSkill=="zay\u0131f") return 4;
if(theSkill=="vasat") return 5;
if(theSkill=="yeterli") return 6;
if(theSkill=="iyi") return 7;
if(theSkill=="kaliteli") return 8;
if(theSkill=="\u00E7ok iyi") return 9;
if(theSkill=="\u00FCst\u00FCn") return 10;
if(theSkill=="m\u00FCkemmel") return 11;
if(theSkill=="muhte\u015Fem") return 12;
if(theSkill=="ola\u011Fan\u00FCst\u00FC") return 13;
if(theSkill=="g\u00F6rkemli") return 14;
if(theSkill=="sihirli") return 15;
if(theSkill=="d\u00FCnya d\u0131\u015F\u0131") return 16;
if(theSkill=="tanr\u0131sal ") return 17;
//Dutch
if(theSkill=="tragisch") return 0;
if(theSkill=="hopeloos") return 1;
if(theSkill=="waardeloos") return 2;
if(theSkill=="slecht") return 3;
if(theSkill=="zwak") return 4;
if(theSkill=="matig") return 5;
if(theSkill=="redelijk") return 6;
if(theSkill=="goed") return 7;
if(theSkill=="solide") return 8;
if(theSkill=="zeer goed") return 9;
if(theSkill=="uitstekend") return 10;
if(theSkill=="formidabel") return 11;
if(theSkill=="uitmuntend") return 12;
if(theSkill=="wonderbaarlijk") return 13;
if(theSkill=="briljant") return 14;
if(theSkill=="magisch") return 15;
if(theSkill=="buitenaards") return 16;
if(theSkill=="goddelijk") return 17;
//Romanian
if(theSkill=="tragic") return 0;
if(theSkill=="f\u0103r\u0103 speran\u0163\u0103") return 1;
if(theSkill=="insuficient") return 2;
if(theSkill=="foarte slab") return 3;
if(theSkill=="slab") return 4;
if(theSkill=="mediu") return 5;
if(theSkill=="adecvat") return 6;
if(theSkill=="bun") return 7;
if(theSkill=="solid") return 8;
if(theSkill=="foarte bun") return 9;
if(theSkill=="excelent") return 10;
if(theSkill=="formidabil") return 11;
if(theSkill=="remarcabil") return 12;
if(theSkill=="incredibil") return 13;
if(theSkill=="briliant") return 14;
if(theSkill=="magic") return 15;
if(theSkill=="extraterestru") return 16;
if(theSkill=="divin") return 17;
//\u0421\u0440\u043F\u0441\u043A\u0438 (serbian?)
if(theSkill=="\u0442\u0440\u0430\u0433\u0438\u0447\u0430\u043D (0)") return 0;
if(theSkill=="\u0431\u0435\u0437\u043D\u0430\u0434\u0435\u0436\u0430\u043D (1)") return 1;
if(theSkill=="\u043D\u0435\u0437\u0430\u0434\u043E\u0432\u043E\u0459\u0430\u0432\u0430\u0458\u0443\u045B\u0438 (2)") return 2;
if(theSkill=="\u0458\u0430\u0434\u0430\u043D (3)") return 3;
if(theSkill=="\u0441\u043B\u0430\u0431 (4)") return 4;
if(theSkill=="\u043F\u0440\u043E\u0441\u0435\u0447\u0430\u043D (5)") return 5;
if(theSkill=="\u0437\u0430\u0434\u043E\u0432\u043E\u0459\u0430\u0432\u0430\u0458\u0443\u045B\u0438 (6)") return 6;
if(theSkill=="\u0434\u043E\u0431\u0430\u0440 (7)") return 7;
if(theSkill=="\u0441\u043E\u043B\u0438\u0434\u0430\u043D (8)") return 8;
if(theSkill=="\u0432\u0435\u043E\u043C\u0430 \u0434\u043E\u0431\u0430\u0440 (9)") return 9;
if(theSkill=="\u043E\u0434\u043B\u0438\u0447\u0430\u043D (10)") return 10;
if(theSkill=="\u0441\u0438\u043B\u0430\u043D (11)") return 11;
if(theSkill=="\u0438\u0437\u0443\u0437\u0435\u0442\u0430\u043D (12)") return 12;
if(theSkill=="\u043D\u0435\u0432\u0435\u0440\u043E\u0432\u0430\u0442\u0430\u043D (13)") return 13;
if(theSkill=="\u0431\u0440\u0438\u0459\u0430\u043D\u0442\u0430\u043D (14)") return 14;
if(theSkill=="\u043C\u0430\u0433\u0438\u0447\u0430\u043D (15)") return 15;
if(theSkill=="\u043D\u0430\u0442\u043F\u0440\u0438\u0440\u043E\u0434\u0430\u043D (16)") return 16;
if(theSkill=="\u0431\u043E\u0436\u0430\u043D\u0441\u043A\u0438 (17)") return 17;
//Hungarian
if(theSkill=="tragic") return 0;
if(theSkill=="rem\u00E9nytelen") return 1;
if(theSkill=="felejthet\u0151") return 2;
if(theSkill=="pocs\u00E9k") return 3;
if(theSkill=="gyenge") return 4;
if(theSkill=="\u00E1tlagos") return 5;
if(theSkill=="megfelel\u0151") return 6;
if(theSkill=="j\u00F3") return 7;
if(theSkill=="er\u0151s") return 8;
if(theSkill=="nagyon j\u00F3") return 9;
if(theSkill=="nagyszer\u0171") return 10;
if(theSkill=="f\u00E9lelmetes") return 11;
if(theSkill=="kiv\u00E1l\u00F3") return 12;
if(theSkill=="hihetetlen") return 13;
if(theSkill=="brili\u00E1ns") return 14;
if(theSkill=="var\u00E1zslatos") return 15;
if(theSkill=="mennyei") return 16;
if(theSkill=="isteni") return 17;
//Croatian
if(theSkill=="tragi\u010Dan") return 0;
if(theSkill=="o\u010Dajan") return 1;
if(theSkill=="nedovoljan") return 2;
if(theSkill=="lo\u0161") return 3;
if(theSkill=="slab") return 4;
if(theSkill=="prosje\u010Dan") return 5;
if(theSkill=="dovoljan") return 6;
if(theSkill=="dobar") return 7;
if(theSkill=="solidan") return 8;
if(theSkill=="vrlo dobar") return 9;
if(theSkill=="odli\u010Dan") return 10;
if(theSkill=="impresivan") return 11;
if(theSkill=="izvanredan") return 12;
if(theSkill=="sjajan") return 13;
if(theSkill=="briljantan") return 14;
if(theSkill=="\u010Daroban") return 15;
if(theSkill=="izvanzemaljski") return 16;
if(theSkill=="bo\u017Eanski") return 17;
//Bosanski
if(theSkill=="tragic (0)") return 0;
if(theSkill=="hopeless (1)") return 1;
if(theSkill=="unsatisfactory (2)") return 2;
if(theSkill=="poor (3)") return 3;
if(theSkill=="weak (4)") return 4;
if(theSkill=="average (5)") return 5;
if(theSkill=="adequate (6)") return 6;
if(theSkill=="good (7)") return 7;
if(theSkill=="solid (8)") return 8;
if(theSkill=="very good (9)") return 9;
if(theSkill=="excellent (10)") return 10;
if(theSkill=="formidable (11)") return 11;
if(theSkill=="outstanding (12)") return 12;
if(theSkill=="incredible (13)") return 13;
if(theSkill=="brilliant (14)") return 14;
if(theSkill=="magical (15)") return 15;
if(theSkill=="unearthly (16)") return 16;
if(theSkill=="divine (17)") return 17;
//Italian
if(theSkill=="tragico") return 0;
if(theSkill=="tragica") return 0;
if(theSkill=="tremendo") return 1;
if(theSkill=="tremenda") return 1;
if(theSkill=="insoddisfacente") return 2;
if(theSkill=="scarso") return 3;
if(theSkill=="scarsa") return 3;
if(theSkill=="debole") return 4;
if(theSkill=="medio") return 5;
if(theSkill=="media") return 5;
if(theSkill=="accettabile") return 6;
if(theSkill=="buono") return 7;
if(theSkill=="buona") return 7;
if(theSkill=="solido") return 8;
if(theSkill=="solida") return 8;
if(theSkill=="ottimo") return 9;
if(theSkill=="ottima") return 9;
if(theSkill=="eccellente") return 10;
if(theSkill=="formidabile") return 11;
if(theSkill=="straordinario") return 12;
if(theSkill=="straordinaria") return 12;
if(theSkill=="incredibile") return 13;
if(theSkill=="splendido") return 14;
if(theSkill=="splendida") return 14;
if(theSkill=="magico") return 15;
if(theSkill=="magica") return 15;
if(theSkill=="sovrumano") return 16;
if(theSkill=="sovrumana") return 16;
if(theSkill=="divino") return 17;
if(theSkill=="divina") return 17;
//German
if(theSkill=="tragisch") return 0;
if(theSkill=="hoffnungslos") return 1;
if(theSkill=="unbefriedigend") return 2;
if(theSkill=="armselig") return 3;
if(theSkill=="schwach") return 4;
if(theSkill=="durchschnittlich") return 5;
if(theSkill=="akzeptabel") return 6;
if(theSkill=="gut") return 7;
if(theSkill=="zuverl\u00E4ssig") return 8;
if(theSkill=="sehr gut") return 9;
if(theSkill=="ausgezeichnet") return 10;
if(theSkill=="eindrucksvoll") return 11;
if(theSkill=="\u00FCberragend") return 12;
if(theSkill=="unglaublich") return 13;
if(theSkill=="bravour\u00F6s") return 14;
if(theSkill=="magisch") return 15;
if(theSkill=="\u00FCberirdisch") return 16;
if(theSkill=="g\u00F6ttlich") return 17;
//French
if(theSkill=="tragique") return 0;
if(theSkill=="d\u00E9sesp\u00E9rant") return 1;
if(theSkill=="d\u00E9cevant") return 2;
if(theSkill=="m\u00E9diocre") return 3;
if(theSkill=="faible") return 4;
if(theSkill=="moyen") return 5;
if(theSkill=="ad\u00E9quat") return 6;
if(theSkill=="bon") return 7;
if(theSkill=="honorable") return 8;
if(theSkill=="tr\u00E8s bon") return 9;
if(theSkill=="excellent") return 10;
if(theSkill=="formidable") return 11;
if(theSkill=="exceptionnel") return 12;
if(theSkill=="incroyable") return 13;
if(theSkill=="brillant") return 14;
if(theSkill=="magique") return 15;
if(theSkill=="extra-terrestre") return 16;
if(theSkill=="divin") return 17;
//Catalan
if(theSkill=="Tr\u00E0gica") return 0;
if(theSkill=="Tr\u00E0gico") return 0;
if(theSkill=="Terrible") return 1;
if(theSkill=="Deficient") return 2;
if(theSkill=="Pobre") return 3;
if(theSkill=="D\u00E8bil") return 4;
if(theSkill=="Regular") return 5;
if(theSkill=="Acceptable") return 6;
if(theSkill=="Bo") return 7;
if(theSkill=="S\u00F2lid") return 8;
if(theSkill=="Molt bo") return 9;
if(theSkill=="Excel\u00B7lent") return 10;
if(theSkill=="Formidable") return 11;
if(theSkill=="Destacat") return 12;
if(theSkill=="Incre\u00EFble") return 13;
if(theSkill=="Brillant") return 14;
if(theSkill=="M\u00E0gic") return 15;
if(theSkill=="Extraterrestre") return 16;
if(theSkill=="Div\u00ED") return 17;
//Polish
if(theSkill=="tragiczny") return 0;
if(theSkill=="tragiczna") return 0;
if(theSkill=="tragiczne") return 0;
if(theSkill=="beznadziejna") return 1;
if(theSkill=="beznadziejne") return 1;
if(theSkill=="beznadziejny") return 1;
if(theSkill=="niedostateczna") return 2;
if(theSkill=="niedostateczne") return 2;
if(theSkill=="niedostateczny") return 2;
if(theSkill=="mierna") return 3;
if(theSkill=="mierne") return 3;
if(theSkill=="mierny") return 3;
if(theSkill=="s\u0142aba") return 4;
if(theSkill=="s\u0142abe") return 4;
if(theSkill=="s\u0142aby") return 4;
if(theSkill=="przeci\u0119tna") return 5;
if(theSkill=="przeci\u0119tne") return 5;
if(theSkill=="przeci\u0119tny") return 5;
if(theSkill=="dostateczna") return 6;
if(theSkill=="dostateczne") return 6;
if(theSkill=="dostateczny") return 6;
if(theSkill=="dobra") return 7;
if(theSkill=="dobre") return 7;
if(theSkill=="dobry") return 7;
if(theSkill=="solidna") return 8;
if(theSkill=="solidne") return 8;
if(theSkill=="solidny") return 8;
if(theSkill=="bardzo dobra") return 9;
if(theSkill=="bardzo dobre") return 9;
if(theSkill=="bardzo dobry") return 9;
if(theSkill=="celuj\u0105ca") return 10;
if(theSkill=="celuj\u0105ce") return 10;
if(theSkill=="celuj\u0105cy") return 10;
if(theSkill=="\u015Bwietna") return 11;
if(theSkill=="\u015Bwietne") return 11;
if(theSkill=="\u015Bwietny") return 11;
if(theSkill=="znakomita") return 12;
if(theSkill=="znakomite") return 12;
if(theSkill=="znakomity") return 12;
if(theSkill=="niesamowita") return 13;
if(theSkill=="niesamowite") return 13;
if(theSkill=="niesamowity") return 13;
if(theSkill=="ol\u015Bniewaj\u0105ca") return 14;
if(theSkill=="ol\u015Bniewaj\u0105ce") return 14;
if(theSkill=="ol\u015Bniewaj\u0105cy") return 14;
if(theSkill=="magiczna") return 15;
if(theSkill=="magiczne") return 15;
if(theSkill=="magiczny") return 15;
if(theSkill=="nieziemska") return 16;
if(theSkill=="nieziemski") return 16;
if(theSkill=="nieziemskie") return 16;
if(theSkill=="boska") return 17;
if(theSkill=="boski") return 17;
if(theSkill=="boskie") return 17;
//Bulgarian
if(theSkill=="\u0442\u0440\u0430\u0433\u0438\u0447\u043D\u043E") return 0;
if(theSkill=="\u0431\u0435\u0437\u043D\u0430\u0434\u0435\u0436\u0434\u043D\u043E") return 1;
if(theSkill=="\u043D\u0435\u0437\u0430\u0434\u043E\u0432\u043E\u043B\u0438\u0442\u0435\u043B\u043D\u043E") return 2;
if(theSkill=="\u043B\u043E\u0448\u043E") return 3;
if(theSkill=="\u0441\u043B\u0430\u0431\u043E") return 4;
if(theSkill=="\u0441\u0440\u0435\u0434\u043D\u043E") return 5;
if(theSkill=="\u0430\u0434\u0435\u043A\u0432\u0430\u0442\u043D\u043E") return 6;
if(theSkill=="\u0434\u043E\u0431\u0440\u043E") return 7;
if(theSkill=="\u0441\u0442\u0430\u0431\u0438\u043B\u043D\u043E") return 8;
if(theSkill=="\u043C\u043D\u043E\u0433\u043E \u0434\u043E\u0431\u0440\u043E") return 9;
if(theSkill=="\u043E\u0442\u043B\u0438\u0447\u043D\u043E") return 10;
if(theSkill=="\u043F\u0440\u0435\u043A\u0440\u0430\u0441\u043D\u043E") return 11;
if(theSkill=="\u0438\u0437\u043A\u043B\u044E\u0447\u0438\u0442\u0435\u043B\u043D\u043E") return 12;
if(theSkill=="\u043D\u0435\u0432\u0435\u0440\u043E\u044F\u0442\u043D\u043E") return 13;
if(theSkill=="\u0431\u0440\u0438\u043B\u044F\u043D\u0442\u043D\u043E") return 14;
if(theSkill=="\u043C\u0430\u0433\u0438\u0447\u0435\u0441\u043A\u043E") return 15;
if(theSkill=="\u043D\u0435\u0437\u0435\u043C\u043D\u043E") return 16;
if(theSkill=="\u0431\u043E\u0436\u0435\u0441\u0442\u0432\u0435\u043D\u043E") return 17; 
return 0;
//Frisian
if(theSkill=="tragysk") return 0;
if(theSkill=="hopeleas") return 1;
if(theSkill=="\u00FBnbefredigjend") return 2;
if(theSkill=="min") return 3;
if(theSkill=="weak") return 4;
if(theSkill=="trochsnee") return 5;
if(theSkill=="adekwaat") return 6;
if(theSkill=="goed") return 7;
if(theSkill=="solide") return 8;
if(theSkill=="poerb\u00EAst") return 9;
if(theSkill=="\u00FAtstekkend") return 10;
if(theSkill=="formidabel") return 11;
if(theSkill=="b\u00FBtengewoan") return 12;
if(theSkill=="\u00FBnwurklik") return 13;
if(theSkill=="briljant") return 14;
if(theSkill=="magysk") return 15;
if(theSkill=="b\u00FBtenierds") return 16;
if(theSkill=="godlik") return 17;
}
