TrophyManager - Super Squad

Show a super detayled TrophyManager player page.

  1. // ==UserScript==
  2. // @name TrophyManager - Super Squad
  3. // @version 2.0.0
  4. // @description Show a super detayled TrophyManager player page.
  5. // @namespace https://trophymanager.com
  6. // @include http://static.trophymanager.com/players/*
  7. // @include http://www.trophymanager.com/players/*
  8. // @include http://trophymanager.com/players/*
  9. // @include https://static.trophymanager.com/players/*
  10. // @include https://www.trophymanager.com/players/*
  11. // @include https://trophymanager.com/players/*
  12. // @author Joao Manuel Ferreira Fernandes
  13. // @github https://github.com/etnepres/trophymanager.git
  14. // @grant none
  15. // ==/UserScript==
  16.  
  17.  
  18. function embed() {
  19.  
  20. function setCookie(c_name,value,exdays)
  21. {
  22. var exdate=new Date();
  23. exdate.setDate(exdate.getDate() + exdays);
  24. var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
  25. document.cookie=c_name + "=" + c_value;
  26. }
  27.  
  28. function isNaNVer(xnum)
  29. {
  30. if(isNaN(xnum)){ return 0; } else { return xnum;}
  31. }
  32.  
  33. function getCookie(c_name)
  34. {
  35. var i,x,y,ARRcookies=document.cookie.split(";");
  36. for (i=0;i<ARRcookies.length;i++)
  37. {
  38. x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
  39. y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
  40. x=x.replace(/^\s+|\s+$/g,"");
  41. if (x==c_name)
  42. {
  43. return unescape(y);
  44. }
  45. }
  46. }
  47. var oldFunc = makeTable;
  48.  
  49. var show_non_pro_graphs = false;
  50. var filtersAnterior = "";
  51. if(getCookie("show_setpieces") === "true"){
  52. document.show_setpieces = true;
  53. } else {
  54. document.show_setpieces = false;
  55. }
  56. if(getCookie("show_teamA_det") === "true"){
  57. document.show_teamA_det = true;
  58. } else {
  59. document.show_teamA_det = false;
  60. }
  61. if(getCookie("show_teamB_det") === "true"){
  62. document.show_teamB_det = true;
  63. } else {
  64. document.show_teamB_det = false;
  65. }
  66. if(getCookie("show_fieldperformance") === "true"){
  67. document.show_fieldperformance = true;
  68. } else {
  69. document.show_fieldperformance = false;
  70. }
  71. if(getCookie("show_convocados") === "true"){
  72. document.show_convocados = true;
  73. } else {
  74. document.show_convocados = false;
  75. }
  76.  
  77. if(getCookie("show_convocados") == undefined){
  78. document.show_convocados = true;
  79. }
  80. //document.show_training = false;
  81.  
  82.  
  83. if(getCookie("show_scoutskills") === "true"){
  84. document.show_scoutskills = true;
  85. }else {
  86. document.show_scoutskills = false;
  87. }
  88. if(getCookie("show_last_data") === "true"){
  89. document.show_last_data = true;
  90. }else {
  91. document.show_last_data = false;
  92. }
  93. if(getCookie("show_total_data") === "true"){
  94. document.show_total_data = true;
  95. }else {
  96. document.show_total_data = false;
  97. }
  98. if(getCookie("show_posicoes") === "true"){
  99. document.show_posicoes = true;
  100. }else {
  101. document.show_posicoes = false;
  102. }
  103. // [Str,Sta,Pac,Mar,Tac,Wor,Pos,Pas,Cro,Tec,Hea,Fin,Lon,Set]
  104. var positions = [[ 1, 3, 1, 1, 1, 3, 3, 2, 2, 2, 1, 3, 3, 3], // D C
  105. [ 2, 3, 1, 1, 1, 3, 3, 2, 2, 2, 2, 3, 3, 3], // D L
  106. [ 2, 3, 1, 1, 1, 3, 3, 2, 2, 2, 2, 3, 3, 3], // D R
  107. [ 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 3, 3, 3], // DM C
  108. [ 2, 3, 1, 1, 1, 3, 3, 2, 2, 2, 2, 3, 3, 3], // DM L
  109. [ 2, 3, 1, 1, 1, 3, 3, 2, 2, 2, 2, 3, 3, 3], // DM R
  110. [ 2, 2, 3, 1, 1, 1, 1, 1, 3, 1, 2, 3, 3, 3], // M C
  111. [ 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3], // M L
  112. [ 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3], // M R
  113. [ 2, 3, 3, 2, 2, 1, 1, 1, 3, 1, 2, 1, 1, 3], // OM C
  114. [ 2, 2, 1, 3, 3, 2, 2, 3, 1, 1, 2, 2, 2, 3], // OM L
  115. [ 2, 2, 1, 3, 3, 2, 2, 3, 1, 1, 2, 2, 2, 3], // OM R
  116. [ 1, 2, 2, 3, 3, 2, 2, 3, 3, 2, 1, 1, 1, 3], // F
  117. [ 2, 3, 2, 1, 2, 1, 2, 2, 3, 3, 3]]; // GK
  118.  
  119.  
  120. // [ 2, 3, 2, 1, 2, 1, 2, 2, 3, 3, 3]
  121. // Weights need to total 100
  122. var weights = [ [85,12, 3], // D C
  123. [70,25, 5], // D L
  124. [70,25, 5], // D R
  125. [90,10, 0], // DM C
  126. [50,40,10], // DM L
  127. [50,40,10], // DM R
  128. [85,12, 3], // M C
  129. [90, 7, 3], // M L
  130. [90, 7, 3], // M R
  131. [90,10, 0], // OM C
  132. [60,35, 5], // OM L
  133. [60,35, 5], // OMR
  134. [80,18, 2], // F
  135. [50,42, 8]]; // GK
  136.  
  137. //D C L R DMC L R MC L R OMC L R F GR
  138. var positionsLost = [[0,20,20,10,30,30,20,40,40,40,40,40,40,40], // D C
  139. [20,0,10,30,10,20,40,20,30,40,40,40,40,40], // D L
  140. [20,10,0,30,20,10,40,30,20,40,40,40,40,40], // D R
  141. [10,30,30,0,20,20,10,30,30,30,40,40,40,40], // DM C
  142. [20,10,20,20,0,10,30,10,20,40,20,30,40,40], // DM L
  143. [20,20,10,20,10,0,30,20,10,40,30,20,40,40], // DM R
  144. [20,40,40,10,30,30,0,20,20,10,30,30,20,40], // M C
  145. [40,20,30,30,10,20,20,0,10,30,10,20,40,40], // M L //rever
  146. [40,30,20,30,20,10,20,10,0,30,20,10,40,40], // M R
  147. [40,40,40,30,40,40,10,30,30,0,20,20,10,40], // OM C
  148. [40,40,40,40,20,30,30,10,20,20,0,10,30,40], // OM L
  149. [40,40,40,40,30,20,30,20,10,20,10,0,30,40], // OM R
  150. [40,40,40,40,40,40,20,40,40,10,30,30,0,40], // F
  151. [100,100,100,100,100,100,100,100,100,100,100,100,100,0]]; // GK
  152. var positionNames = ["D C", "D L", "D R", "DM C", "DM L", "DM R", "M C", "M L", "M R", "OM C", "OM L", "OM R", "F", "GK"];
  153. var positionFullNames = ["Defender Center", "Defender Left", "Defender Right", "Defensive Midfielder Center", "Defensive Midfielder Left", "Defensive Midfielder Right", "Midfielder Center", "Midfielder Left", "Midfielder Right", "Offensive Midfielder Center", "Offensive Midfielder Left", "Offensive Midfielder Right", "Forward", "Goalkeeper"];
  154. var defendingPositionNames = ["D C", "D L", "D R", "DM C", "DM L", "DM R"];
  155. document.calculateSkill = function(positionIndex, skills) {
  156. var totSkill = 0;
  157. for (var i=0; i< positions[positionIndex].length; i++) {
  158. if (skills[i]>0) {
  159. totSkill += skills[i]*document.calculateSkillWeight(positions[positionIndex], weights[positionIndex], i);
  160. }
  161. }
  162. totSkill = totSkill / 200;
  163. totSkill = Math.round(totSkill*1000)/1000;
  164. return totSkill;
  165. };
  166. document.calculateSkillWeight = function(positionWeightLevels, weights, index) {
  167. var weight = 0;
  168. weight = weights[positionWeightLevels[index]-1] / document.numberAtWeight(positionWeightLevels, positionWeightLevels[index]) * 10;
  169. return weight;
  170. };
  171. document.numberAtWeight = function(positionWeightLevels, value) {
  172. var count = 0;
  173. for (var i=0; i< positionWeightLevels.length; i++) {
  174. if (positionWeightLevels[i] == value) {
  175. count++;
  176. }
  177. }
  178. return count;
  179. };
  180. document.findPositionIndex = function(position) {
  181. var index = -1;
  182. for (var k=0; k< positionNames.length; k++) {
  183. if (position.indexOf(positionNames[k]) == 0) {
  184. index = k;
  185. k = positionNames.length;
  186. }
  187. }
  188. return index;
  189. };
  190. document.getSkills = function(indicePlayer) {
  191. var skillArray = [];
  192. if (players_ar[indicePlayer]["fp"] == "GK"){
  193. skillArray.push(players_ar[indicePlayer]["str"]);
  194. skillArray.push(players_ar[indicePlayer]["sta"]);
  195. skillArray.push(players_ar[indicePlayer]["pac"]);
  196. skillArray.push(players_ar[indicePlayer]["han"]);
  197. skillArray.push(players_ar[indicePlayer]["one"]);
  198. skillArray.push(players_ar[indicePlayer]["ref"]);
  199. skillArray.push(players_ar[indicePlayer]["ari"]);
  200. skillArray.push(players_ar[indicePlayer]["jum"]);
  201. skillArray.push(players_ar[indicePlayer]["com"]);
  202. skillArray.push(players_ar[indicePlayer]["kic"]);
  203. skillArray.push(players_ar[indicePlayer]["thr"]);
  204. } else {
  205. skillArray.push(players_ar[indicePlayer]["str"]);
  206. skillArray.push(players_ar[indicePlayer]["sta"]);
  207. skillArray.push(players_ar[indicePlayer]["pac"]);
  208. skillArray.push(players_ar[indicePlayer]["mar"]);
  209. skillArray.push(players_ar[indicePlayer]["tac"]);
  210. skillArray.push(players_ar[indicePlayer]["wor"]);
  211. skillArray.push(players_ar[indicePlayer]["pos"]);
  212. skillArray.push(players_ar[indicePlayer]["pas"]);
  213. skillArray.push(players_ar[indicePlayer]["cro"]);
  214. skillArray.push(players_ar[indicePlayer]["tec"]);
  215. skillArray.push(players_ar[indicePlayer]["hea"]);
  216. skillArray.push(players_ar[indicePlayer]["fin"]);
  217. skillArray.push(players_ar[indicePlayer]["lon"]);
  218. skillArray.push(players_ar[indicePlayer]["set"]);
  219. }
  220. players_ar[indicePlayer].totalSkill = 0;
  221. for (var i = 0; i < skillArray.length; i++){
  222. players_ar[indicePlayer].totalSkill = players_ar[indicePlayer].totalSkill + skillArray[i];
  223. }
  224. return skillArray;
  225. };
  226.  
  227. function checkIdPos(positionX) {
  228. var idPos;
  229. for (var k=0; k< positionNames.length; k++) {
  230. if (positionNames[k] == positionX) {
  231. idPos = k;
  232. }
  233. }
  234. return idPos;
  235. }
  236. function checkIfDefender(positionX, positionY) {
  237. var isPositionDefender = false;
  238. for (var k=0; k< defendingPositionNames.length; k++) {
  239. if (defendingPositionNames[k] == positionX || defendingPositionNames[k] == positionY) {
  240. isPositionDefender = true;
  241. }
  242. }
  243. return isPositionDefender;
  244. }
  245. function computeSKdefenida(SK,skills){
  246. var SKs = 0;
  247. var positionIndex = document.findPositionIndex(SK);
  248. if (positionIndex > -1) {
  249. SKs = document.calculateSkill(positionIndex, skills);
  250. }
  251.  
  252. return [[SK],[SKs]];
  253. }
  254. function computeSK(idJogador,skills){
  255. var SKs = [0, 0];
  256.  
  257. var positionArray = [];
  258. var posicoesAntes = players_ar[idJogador]["fp"].split(", ");
  259. var outraPos = [];
  260. if (posicoesAntes.length == 1){
  261. var posicoes = players_ar[idJogador]["fp"].split("\/");
  262. if (posicoes.length == 1){
  263. outraPos = players_ar[idJogador]["fp"].split(" ");
  264. if(outraPos.length == 2){
  265. if(outraPos[1].length >= 2){
  266. positionArray[0] = outraPos[0] + " " + outraPos[1].substring(0,1);
  267. positionArray[1] = outraPos[0] + " " + outraPos[1].substring(1,2);
  268. } else {
  269. positionArray[0] = players_ar[idJogador]["fp"];
  270. }
  271. }
  272. } else if (posicoes.length == 2){
  273. var outraPos = posicoes[1].split(" ");
  274. positionArray[0] = posicoes[0] + " " + outraPos[1];
  275. positionArray[1] = outraPos[0] + " " + outraPos[1];
  276.  
  277. }
  278. } else if(posicoesAntes.length == 2){
  279. positionArray[0] = posicoesAntes[0];
  280. positionArray[1] = posicoesAntes[1];
  281. }
  282. if(players_ar[idJogador]["fp"] =="F"){
  283. positionArray[0] = "F";
  284. }
  285. if(players_ar[idJogador]["fp"] =="GK"){
  286. positionArray[0] = "GK";
  287. }
  288. for (var i = 0; i < positionArray.length; i++){
  289. var positionIndex = document.findPositionIndex(positionArray[i]);
  290. if (positionIndex > -1) {
  291. SKs[i] = document.calculateSkill(positionIndex, skills);
  292. }
  293. }
  294. return [positionArray,SKs];
  295. }
  296. document.potential = 0;
  297. document.charisma = 0;
  298. document.professionalism = 0;
  299. document.aggression = 0;
  300.  
  301.  
  302. function get_potential(){
  303. return document.potential;
  304. }
  305. function get_charisma(){
  306. return document.charisma;
  307. }
  308. function get_professionalism(){
  309. return document.professionalism;
  310. }
  311. function get_aggression(){
  312. return document.aggression;
  313. }
  314.  
  315. function get_ti_level(){
  316. return document.ti_level;
  317. }
  318. function get_skillsEvoluidas(){
  319. return document.skillsEvoluidas;
  320. }
  321.  
  322.  
  323. var national = 1;
  324. var reserves = 1;
  325.  
  326. document.isPlaying = [];
  327. document.isOnField = [];
  328. document.fieldSpot = [];
  329. document.isOnSub = [];
  330. document.subSpot = [];
  331.  
  332.  
  333. function tactics_init_national(idPlayer){
  334. return [document.isPlaying[idPlayer],document.isOnField[idPlayer]];
  335. }
  336. function tactics_init_national_aux()
  337. {
  338. $.ajaxSetup({async: false});
  339. $.post("/ajax/tactics_get.ajax.php",{"reserves":0,"national":1},function(data){
  340.  
  341. if(data != null)
  342. {
  343. document.players = data["players"];
  344. document.on_field = data["formation"];
  345. document.formation_by_pos = data["formation_by_pos"];
  346. document.on_subs = data["formation_subs"];
  347. document.on_field_assoc = data["formation_assoc"];
  348. document.positions = data["positions"];
  349. for(var i_Player in document.players){
  350.  
  351. if(document.on_field[document.players[i_Player]["player_id"]] != undefined){
  352. document.isOnField[document.players[i_Player]["player_id"]] = true;
  353. document.fieldSpot[document.players[i_Player]["player_id"]] = document.on_field[document.players[i_Player]["player_id"]][document.players[i_Player]["player_id"]];
  354. } else {
  355. document.isOnField[document.players[i_Player]["player_id"]] = false;
  356. document.fieldSpot[document.players[i_Player]["player_id"]] = "";
  357. }
  358. if(document.on_subs[document.players[i_Player]["player_id"]] != undefined){
  359. document.isOnSub[document.players[i_Player]["player_id"]] = true;
  360. document.subSpot[document.players[i_Player]["player_id"]] = document.on_subs[document.players[i_Player]["player_id"]];
  361. } else {
  362. document.isOnSub[document.players[i_Player]["player_id"]] = false;
  363. document.subSpot[document.players[i_Player]["player_id"]] = "";
  364. }
  365. document.isPlaying[document.players[i_Player]["player_id"]] = document.isOnField[document.players[i_Player]["player_id"]] || document.isOnSub[document.players[i_Player]["player_id"]];
  366. }
  367. }
  368. },"json");
  369. $.ajaxSetup({async: true});
  370.  
  371. return [document.isPlaying,document.isOnField,document.fieldSpot,document.isOnSub,document.subSpot];//[info, document.isOnField];
  372.  
  373. }
  374. var arrayRespostaEquipa = tactics_init_national_aux();
  375. document.isPlaying = arrayRespostaEquipa[0];
  376. document.isOnField = arrayRespostaEquipa[1];
  377. document.fieldSpot = arrayRespostaEquipa[2];
  378. document.isOnSub = arrayRespostaEquipa[3];
  379. document.subSpot = arrayRespostaEquipa[4];
  380.  
  381. function tactics_init_reserves(idPlayer){
  382. return [document.isPlaying[idPlayer],document.isOnField[idPlayer]];
  383. }
  384. function tactics_init_reserves_aux(idPlayer)
  385. {
  386. $.ajaxSetup({async: false});
  387. $.post("/ajax/tactics_get.ajax.php",{"reserves":1,"national":0},function(data){
  388.  
  389. if(data != null)
  390. {
  391. document.players = data["players"];
  392. document.on_field = data["formation"];
  393. document.formation_by_pos = data["formation_by_pos"];
  394. document.on_subs = data["formation_subs"];
  395. document.on_field_assoc = data["formation_assoc"];
  396. document.positions = data["positions"];
  397. for(var i_Player in document.players){
  398.  
  399. if(document.on_field[document.players[i_Player]["player_id"]] != undefined){
  400. document.isOnField[document.players[i_Player]["player_id"]] = true;
  401. document.fieldSpot[document.players[i_Player]["player_id"]] = document.on_field[document.players[i_Player]["player_id"]][document.players[i_Player]["player_id"]];
  402. } else {
  403. document.isOnField[document.players[i_Player]["player_id"]] = false;
  404. document.fieldSpot[document.players[i_Player]["player_id"]] = "";
  405. }
  406. if(document.on_subs[document.players[i_Player]["player_id"]] != undefined){
  407. document.isOnSub[document.players[i_Player]["player_id"]] = true;
  408. document.subSpot[document.players[i_Player]["player_id"]] = document.on_subs[document.players[i_Player]["player_id"]];
  409. } else {
  410. document.isOnSub[document.players[i_Player]["player_id"]] = false;
  411. document.subSpot[document.players[i_Player]["player_id"]] = "";
  412. }
  413. document.isPlaying[document.players[i_Player]["player_id"]] = document.isOnField[document.players[i_Player]["player_id"]] || document.isOnSub[document.players[i_Player]["player_id"]];
  414. }
  415. }
  416. },"json");
  417. $.ajaxSetup({async: true});
  418.  
  419. return [document.isPlaying,document.isOnField,document.fieldSpot,document.isOnSub,document.subSpot];//[info, document.isOnField];
  420.  
  421.  
  422. }
  423. var arrayRespostaEquipaR = tactics_init_reserves_aux();
  424. document.isPlaying = arrayRespostaEquipaR[0];
  425. document.isOnField = arrayRespostaEquipaR[1];
  426. document.fieldSpot = arrayRespostaEquipaR[2];
  427. document.isOnSub = arrayRespostaEquipaR[3];
  428. document.subSpot = arrayRespostaEquipaR[4];
  429.  
  430. function get_player_info_history(player_id,show_non_pro_graphs){
  431. $.ajaxSetup({async: false});
  432. $.post("https://trophymanager.com/ajax/players_get_info.ajax.php",{"player_id":player_id, "type":"history","show_non_pro_graphs":show_non_pro_graphs},function(data){
  433. if(data != null){
  434. document.thisSeasonData = data["table"]["nat"][0];
  435. document.allTimeData = data["table"]["nat"][data["table"]["nat"].length-1];
  436. }
  437. },"json").error(function(){ });//json
  438. $.ajaxSetup({async: true});
  439. thisSeasonData = document.thisSeasonData;
  440. allTimeData = document.allTimeData;
  441. document.thisSeasonData = [];
  442. document.allTimeData = [];
  443. return [thisSeasonData,allTimeData];
  444. }
  445. document.isitreallydata = "";
  446. document.isitreallydataAux = "";
  447.  
  448. document.hiddenAdapt = 0;
  449. document.hiddenProf = 0;
  450. document.hiddenInj = 0;
  451. document.hiddenAgr = 0;
  452. document.foundHidden = false;
  453. function get_player_info_hidden_skills(player_id){
  454. $.ajaxSetup({async: false});
  455. $.get(
  456. "https://trophymanager.com/players/"+player_id+"/",
  457. {paramOne : 1, paramX : 'abc'},
  458. function(data) {
  459. if(data != null){
  460. document.isitreallydata = data.split("class=\"skill_table zebra\" id=\"hidden_skill_table\">")[1].split("</table>")[0];
  461. document.isitreallydataAux = document.isitreallydata;
  462. if(document.isitreallydata.split("/20")[1]!=undefined){
  463. document.foundHidden = true;
  464. document.isitreallydata= document.isitreallydataAux.split("/20")[1].split("<strong>")[1];
  465. document.hiddenInj = document.isitreallydata * 1;
  466. document.isitreallydata= document.isitreallydataAux.split("/20")[3].split("<strong>")[1];
  467. document.hiddenAgr=document.isitreallydata * 1;
  468. document.isitreallydata= document.isitreallydataAux.split("/20")[5].split("<strong>")[1];
  469. document.hiddenProf=document.isitreallydata * 1;
  470. document.isitreallydata= document.isitreallydataAux.split("/20")[7].split("<strong>")[1];
  471. document.hiddenAdapt=document.isitreallydata * 1;
  472. } else {
  473. document.foundHidden = false;
  474. }
  475. }
  476. }
  477. );
  478. $.ajaxSetup({async: true});
  479.  
  480. isitreallydata = document.isitreallydata;
  481. foundHidden = document.foundHidden;
  482. hiddenInj=document.hiddenInj;
  483. hiddenAgr=document.hiddenAgr;
  484. hiddenProf=document.hiddenProf;
  485. hiddenAdapt=document.hiddenAdapt;
  486. document.isitreallydata = "";
  487. document.isitreallydataAux = "";
  488. document.foundHidden = false;
  489. document.hiddenAdapt = 0;
  490. document.hiddenProf = 0;
  491. document.hiddenInj = 0;
  492. document.hiddenAgr = 0;
  493.  
  494. return [foundHidden,hiddenInj,hiddenAgr,hiddenProf,hiddenAdapt];
  495. }
  496.  
  497. function get_player_info_scout(player_id, player_fp,show_non_pro_graphs){
  498.  
  499. $.ajaxSetup({async: false});
  500. $.post("https://trophymanager.com/ajax/players_get_info.ajax.php",{"player_id":player_id, "type":"scout","show_non_pro_graphs":show_non_pro_graphs},function(data){
  501. if(data != null)
  502. {
  503. if (data["error"])
  504. {
  505. var report_error = data["error"];
  506. }
  507.  
  508. if (data["reports"].length>-1)
  509. {
  510. for(var eachReport in data["reports"])
  511. {
  512. report = data["reports"][eachReport];
  513. if(report && !report_error)
  514. {
  515.  
  516. //////////////////////////// BLOOM INFO ////////////////////////////////
  517. bloom_status = "";
  518. dev_status = "";
  519. report_age = parseInt(report["report_age"]);
  520. bloom_age = parseInt(report["bloom_age"]);
  521. rem_pot = parseFloat(report["remaining_pot"]);
  522. //var skill_names = ["",global_content["strength"],global_content["stamina"],global_content["pace"],global_content["marking"],global_content["tackling"],global_content["workrate"],global_content["positioning"],global_content["passing"],global_content["crossing"],global_content["technique"],global_content["heading"],global_content["finishing"],global_content["longshots"],global_content["set_pieces"]];
  523. //var skill_names_gk = ["",global_content["strength"],global_content["stamina"],global_content["pace"],global_content["handling"],global_content["one_on_ones"],global_content["reflexes"],global_content["aerial_ability"],global_content["jumping"],global_content["communication"],global_content["kicking"],global_content["throwing"],data['scout_content'][80]];
  524. if (report["bloom_status_txt"]!="") {
  525. bloom_status = report["bloom_status_txt"];
  526. dev_status = report["dev_status"];
  527. }
  528. if(report["potential"] > 0){
  529. if(get_potential() >0){
  530. document.potential = (get_potential()*1 + (report["potential"]*1/2))/2;
  531. } else {
  532. document.potential = (report["potential"]*1/2);
  533. }
  534. }
  535. if (report["specialist"]>0)//data['scout_content'][67]
  536. {
  537. if(player_fp=="GK")
  538. {
  539. if (report["specialist"]>12) report["specialist"] = 12;
  540. specialist = report["specialist"];//skill_names_gk[report["specialist"]];
  541. }
  542. else
  543. {
  544. specialist = report["specialist"];//skill_names[report["specialist"]];
  545. }
  546. } else {
  547. specialist = "N/D";
  548. }
  549. if (report['peak_phy_txt']!="" || report['peak_tac_txt']!="" || report['peak_tec_txt']!="" || report['charisma']>0 || report['professionalism']>0 || report['aggression']>0)
  550. {
  551. //if (report['peak_phy_txt']!="") $div.append(report['peak_phy_txt'],"<br />");
  552. //if (report['peak_tac_txt']!="") $div.append(report['peak_tac_txt'],"<br />");
  553. //if (report['peak_tec_txt']!="") $div.append(report['peak_tec_txt'],"<br />");
  554. if (report['charisma']>0)
  555. {
  556. if(get_charisma() >0){
  557. document.charisma = (get_charisma()*1 + report["charisma"]*1)/2;
  558. } else {
  559. document.charisma = report["charisma"]*1;
  560. }
  561. }
  562. if (report['professionalism']>0)
  563. {
  564. if(get_professionalism() >0){
  565. document.professionalism = (get_professionalism()*1 + report["professionalism"]*1)/2;
  566. } else {
  567. document.professionalism = report["professionalism"]*1;
  568. }
  569. }
  570. if (report['aggression']>0)
  571. {
  572. if(get_aggression() >0){
  573. document.aggression = (get_aggression()*1 + report["aggression"]*1)/2;
  574. } else {
  575. document.aggression = report["aggression"]*1;
  576. }
  577. }
  578. }
  579. }
  580. }
  581. }
  582. }
  583. },"json").error(function(){ });//json
  584. $.ajaxSetup({async: true});
  585. potential = document.potential;
  586. charisma = document.charisma;
  587. professionalism = document.professionalism;
  588. aggression = document.aggression;
  589. document.potential = 0;
  590. document.charisma = 0;
  591. document.professionalism = 0;
  592. document.aggression = 0;
  593. return [potential,charisma,professionalism,aggression];//[aggression] ;
  594.  
  595.  
  596. }
  597.  
  598.  
  599. document.ti_level = [];
  600. document.skillsEvoluidas = [];
  601. document.skillsDEvoluidas = [];
  602. function get_player_info_graphs(player_id,show_non_pro_graphs){
  603.  
  604. $.ajaxSetup({async: false});
  605. $.post("https://trophymanager.com/ajax/players_get_info.ajax.php",{"player_id":player_id, "type":"graphs","show_non_pro_graphs":show_non_pro_graphs},function(data){
  606. if(data != null)
  607. {
  608. //var ti = parseInt(data.graphs.ti[data.graphs.ti.length-1]);
  609. document.ti_level = data.graphs.ti;
  610. if(data.skillpoints.up.length)
  611. {
  612. for(var i in data.skillpoints.up)
  613. {
  614. document.skillsEvoluidas[i] = data.skillpoints.up[i];//global_content[data.skillpoints.up[i]]
  615. }
  616.  
  617. }
  618. if(data.skillpoints.down.length)
  619. {
  620. for(var i in data.skillpoints.down)
  621. {
  622. document.skillsDEvoluidas[i] = data.skillpoints.down[i];//global_content[data.skillpoints.up[i]]
  623. }
  624.  
  625. }
  626. }
  627. },"json").error(function(){ });//json
  628. $.ajaxSetup({async: true});
  629. ti_level = document.ti_level;
  630. skillsEvoluidas = document.skillsEvoluidas;
  631. skillsDEvoluidas = document.skillsDEvoluidas;
  632. document.ti_level = [];
  633. document.skillsEvoluidas = [];
  634. document.skillsDEvoluidas = [];
  635. return [ti_level,skillsEvoluidas,skillsDEvoluidas];//[aggression] ;
  636.  
  637.  
  638. }
  639. document.calculateSkillDefPlay = function(positionX, skills) {
  640. var totSkill = [0,0,[0, 0, 0],[0,0,0,0,0],[0,0,0,0,0]];
  641. var finReg;
  642. var finCab;
  643. var finRem;
  644. var positionIndex;
  645. for (var k=0; k< positionNames.length; k++) {
  646. if (positionNames[k] == positionX) {
  647. positionIndex = k;
  648. }
  649. }
  650. /* if(positionIndex==undefined){
  651. positionIndex= 13;
  652. } */
  653. for (var i=0; i< positions[positionIndex].length; i++) {
  654. if (skills[i]>0) {
  655. totSkill[0] += skills[i]*document.calculateSkillWeight(positions[positionIndex], weights[positionIndex], i);
  656. //totSkill[1] += skills[i];
  657. }
  658. }
  659. for (var i=0; i< skills.length; i++) {
  660. totSkill[1] = totSkill[1]*1 + skills[i]*1;
  661. }
  662. totSkill[0] = totSkill[0] / 200;
  663. if(positionIndex == 13){
  664. totSkill[1] = totSkill[1]*100/220;
  665. } else {
  666. totSkill[1] = totSkill[1]*100/280;
  667. }
  668. totSkill[1] = (totSkill[0] - totSkill[1]);
  669. totSkill[0] = Math.round(totSkill[0]*1000)/1000;
  670. totSkill[1] = Math.round(totSkill[1]*1000)/1000;
  671. //set pieces
  672. totSkill[2][0] = ((skills[8]*2+skills[13]*2)+skills[9]*1)/5;// corner
  673. totSkill[2][1] = ((skills[12]*2+skills[13]*2)+skills[9]*1)/5;// Frk
  674. totSkill[2][2] = ((skills[11]*2+skills[13]*2)+skills[9]*1)/5;// pen
  675. if(positionIndex != 13){ // is not goalkeeper is defender
  676. totSkill[3][0] =(skills[3]*3+skills[6]*3+skills[5]*3+skills[4]*2+skills[2]*2+skills[1]*1)/280;
  677. totSkill[3][1] =(skills[2]*3+skills[4]*3+skills[3]*3+skills[6]*2+skills[5]*2+skills[1]*1+skills[0]*1)/300;
  678. totSkill[3][2] =(skills[3]*3+skills[6]*3+skills[5]*3+skills[4]*2+skills[2]*2+skills[1]*1)/280;
  679. totSkill[3][3] =(skills[3]*3+skills[2]*3+skills[6]*3+skills[5]*3+skills[0]*2+skills[10]*2+skills[4]*2+skills[1]*1)/380;
  680. totSkill[3][4] =(skills[2]*3+skills[3]*2+skills[4]*2+skills[6]*1+skills[5]*1+skills[1]*1)/200;
  681. totSkill[3][0] = Math.round(totSkill[3][0]*10000)/100;
  682. totSkill[3][1] = Math.round(totSkill[3][1]*10000)/100;
  683. totSkill[3][2] = Math.round(totSkill[3][2]*10000)/100;
  684. totSkill[3][3] = Math.round(totSkill[3][3]*10000)/100;
  685. totSkill[3][4] = Math.round(totSkill[3][4]*10000)/100;
  686. //calculo de potencial para estilo de jogo
  687. totSkill[4][0] = (skills[2]*3+skills[1]*3+skills[7]*3+skills[6]*2+skills[5]*2)/260;
  688. totSkill[4][1] = (skills[2]*3+skills[9]*3+skills[8]*3+skills[5]*2+skills[1]*2+skills[0]*1)/280;
  689. totSkill[4][2] = (skills[7]*3+skills[9]*3+skills[5]*2+skills[2]*2+skills[6]*2+skills[1]*2)/280;
  690. totSkill[4][3] = (skills[7]*3+skills[8]*2+skills[9]*2+skills[6]*1+skills[5]*1+skills[1]*1)/200;
  691. totSkill[4][4] = (skills[7]*3+skills[9]*3+skills[8]*3+skills[6]*2+skills[5]*2+skills[7]*2+skills[1]*2)/340;
  692. totSkill[4][0] = Math.round(totSkill[4][0]*100);
  693. totSkill[4][1] = Math.round(totSkill[4][1]*100);
  694. totSkill[4][2] = Math.round(totSkill[4][2]*100);
  695. totSkill[4][3] = Math.round(totSkill[4][3]*100);
  696. totSkill[4][4] = Math.round(totSkill[4][4]*100);
  697. finReg = Math.round((skills[11]*3+skills[9]*3+skills[6]*2+skills[5]*2+skills[0]*1+skills[1]*1+skills[2]*1)/260*100);
  698. finCab = Math.round((skills[10]*3+skills[0]*2+skills[6]*2+skills[5]*1+skills[2]*1)/180*100);
  699. finRem = Math.round((skills[13]*3+skills[9]*3+skills[11]*2+skills[6]*1+skills[1]*1)/200*100);
  700. //calculo de potencial para estilo de finalização
  701. if(positionIndex == 12){//F
  702. totSkill[4][0] = totSkill[4][0]*0.2 + ((finReg*3+finCab*2+finRem*1)/6)*0.8;
  703. totSkill[4][1] = totSkill[4][1]*0.2 + ((finReg*2+finCab*3+finRem*1)/6)*0.8;
  704. totSkill[4][2] = totSkill[4][2]*0.2 + ((finReg*3+finCab*1+finRem*2)/6)*0.8;
  705. totSkill[4][3] = totSkill[4][3]*0.2 + ((finReg*1+finCab*4+finRem*1)/6)*0.8;
  706. totSkill[4][4] = totSkill[4][4]*0.2 + ((finReg*4+finCab*1+finRem*1)/6)*0.8;
  707. }
  708. if(positionIndex >= 9 && positionIndex <= 11){//MO
  709. totSkill[4][0] = totSkill[4][0]*0.45 + ((finReg*3+finCab*2+finRem*1)/6)*0.55;
  710. totSkill[4][1] = totSkill[4][1]*0.45 + ((finReg*2+finCab*3+finRem*1)/6)*0.55;
  711. totSkill[4][2] = totSkill[4][2]*0.45 + ((finReg*3+finCab*1+finRem*2)/6)*0.55;
  712. totSkill[4][3] = totSkill[4][3]*0.45 + ((finReg*1+finCab*4+finRem*1)/6)*0.55;
  713. totSkill[4][4] = totSkill[4][4]*0.45 + ((finReg*4+finCab*1+finRem*1)/6)*0.55;
  714. }
  715. if(positionIndex >= 6 && positionIndex <= 8){//M
  716. totSkill[4][0] = totSkill[4][0]*0.55 + ((finReg*3+finCab*2+finRem*1)/6)*0.45;
  717. totSkill[4][1] = totSkill[4][1]*0.55 + ((finReg*2+finCab*3+finRem*1)/6)*0.45;
  718. totSkill[4][2] = totSkill[4][2]*0.55 + ((finReg*3+finCab*1+finRem*2)/6)*0.45;
  719. totSkill[4][3] = totSkill[4][3]*0.55 + ((finReg*1+finCab*4+finRem*1)/6)*0.45;
  720. totSkill[4][4] = totSkill[4][4]*0.55 + ((finReg*4+finCab*1+finRem*1)/6)*0.45;
  721. }
  722. if(positionIndex >= 3 && positionIndex <= 5){//DM
  723. totSkill[4][0] = totSkill[4][0]*0.65 + ((finReg*3+finCab*2+finRem*1)/6)*0.35;
  724. totSkill[4][1] = totSkill[4][1]*0.65 + ((finReg*2+finCab*3+finRem*1)/6)*0.35;
  725. totSkill[4][2] = totSkill[4][2]*0.65 + ((finReg*3+finCab*1+finRem*2)/6)*0.35;
  726. totSkill[4][3] = totSkill[4][3]*0.65 + ((finReg*1+finCab*4+finRem*1)/6)*0.35;
  727. totSkill[4][4] = totSkill[4][4]*0.65 + ((finReg*4+finCab*1+finRem*1)/6)*0.35;
  728. }
  729. if(positionIndex <= 2){//D
  730. totSkill[4][0] = totSkill[4][0]*0.90 + ((finReg*3+finCab*2+finRem*1)/6)*0.10;
  731. totSkill[4][1] = totSkill[4][1]*0.90 + ((finReg*2+finCab*3+finRem*1)/6)*0.10;
  732. totSkill[4][2] = totSkill[4][2]*0.90 + ((finReg*3+finCab*1+finRem*2)/6)*0.10;
  733. totSkill[4][3] = totSkill[4][3]*0.90 + ((finReg*1+finCab*4+finRem*1)/6)*0.10;
  734. totSkill[4][4] = totSkill[4][4]*0.90 + ((finReg*4+finCab*1+finRem*1)/6)*0.10;
  735. //para diferentes posições diferentes pesos
  736. }
  737. totSkill[4][0] = Math.round(totSkill[4][0]*100)/100;
  738. totSkill[4][1] = Math.round(totSkill[4][1]*100)/100;
  739. totSkill[4][2] = Math.round(totSkill[4][2]*100)/100;
  740. totSkill[4][3] = Math.round(totSkill[4][3]*100)/100;
  741. totSkill[4][4] = Math.round(totSkill[4][4]*100)/100;
  742. }
  743. return totSkill;
  744. };
  745. var skillArray = [];
  746. var SKs = [];
  747. var sk1 = "";
  748. var sk2 = "";
  749. var idJogador;
  750. var skillArrayAnterior = [];
  751. var isDefender ;
  752. var strSkill1;
  753. var strSkill2;
  754. var finReg;
  755. var finCab;
  756. var finRem;
  757. var potencialFuturo;
  758. var potencialFuturoAnterior;
  759. var skillMaior;
  760. var skillMaiorAnterior;
  761. var TotalSkillAnterior;
  762. var resultadoScouts;
  763. var totalSkillP = [];
  764. var stringTeste = "";
  765. var global_content_FS = [];
  766. var var_DDi_a = 0;
  767. var var_DWi_a = 0;
  768. var var_DSh_a = 0;
  769. var var_DLB_a = 0;
  770. var var_DTB_a = 0;
  771. var var_PDi_a = 0;
  772. var var_PWi_a = 0;
  773. var var_PSh_a = 0;
  774. var var_PLB_a = 0;
  775. var var_PTB_a = 0;
  776. var var_DDi_b = 0;
  777. var var_DWi_b = 0;
  778. var var_DSh_b = 0;
  779. var var_DLB_b = 0;
  780. var var_DTB_b = 0;
  781. var var_PDi_b = 0;
  782. var var_PWi_b = 0;
  783. var var_PSh_b = 0;
  784. var var_PLB_b = 0;
  785. var var_PTB_b = 0;
  786. /* if(!is_pro){
  787. var arrows = [{}];
  788. } */
  789. for (z=0; z<players_ar.length; z++) {
  790.  
  791. try {
  792. resultadoScouts = get_player_info_scout(players_ar[z]["id"], players_ar[z]["fp"],show_non_pro_graphs);
  793. if(resultadoScouts != undefined){
  794. if(resultadoScouts[0] !=0){
  795. players_ar[z].potential = Math.round(resultadoScouts[0]*10)/10;
  796. } else {
  797. players_ar[z].potential = "";
  798. }
  799. if(resultadoScouts[1] !=0){
  800. players_ar[z].charisma = Math.round(resultadoScouts[1]*10)/10;
  801. } else {
  802. players_ar[z].charisma = "";
  803. }
  804. if(resultadoScouts[2] !=0){
  805. players_ar[z].professionalism = Math.round(resultadoScouts[2]*10)/10;
  806. } else {
  807. players_ar[z].professionalism = "";
  808. }
  809. if(resultadoScouts[3] !=0){
  810. players_ar[z].aggression = Math.round(resultadoScouts[3]*10)/10;
  811. }else{
  812. players_ar[z].aggression = "";
  813. }
  814. players_ar[z].injury = "";
  815. //Capitao de equipa
  816. if(players_ar[z].charisma != "" && players_ar[z].professionalism != "" && players_ar[z].aggression != ""){ //39
  817. players_ar[z].captain = (((players_ar[z].charisma + players_ar[z].professionalism - players_ar[z].aggression)*100)/39)*(players_ar[z]["routine"]/100);
  818. players_ar[z].captain = Math.round(players_ar[z].captain*10)/10;
  819. }else {
  820. players_ar[z].captain = "";
  821. }
  822. }
  823. }catch (e) {
  824. }
  825. }
  826. // players_ar.push({"id":"9999999999","club":"545003","no":"99","ban":"0","ban_points":"0","inj":null,"name":"Total","routine":"0","retire":"0","nat":null,"age":null,"months":null,"fp":"GK","asi":0,"country":"pt","str":17,"sta":20,"pac":15,"mar":0,"tac":0,"wor":0,"pos":0,"pas":0,"cro":0,"tec":0,"hea":0,"fin":0,"lon":0,"set":0,"han":16,"one":16,"ref":16,"ari":15,"jum":15,"com":15,"kic":13,"thr":16,"trans":0,"wage":"3449691","rec":9,"gp":10,"goals":0,"assists":0,"productivity":0,"rat":"5.00","mom":0,"cards":0,"ga":12,"scout":"4","txt":"","plot":["3"],"status":"","js_name":"Total","ti":null,"ti_dif":null});
  827. for (i=0; i<players_ar.length; i++) {
  828. var info_hidden_player = get_player_info_hidden_skills(players_ar[i]["id"]);
  829. var info_hidden_foundHidden = info_hidden_player[0];
  830. var info_hidden_hiddenInj = info_hidden_player[1];
  831. var info_hidden_hiddenAgr = info_hidden_player[2];
  832. var info_hidden_hiddenProf = info_hidden_player[3];
  833. var info_hidden_hiddenAdapt = info_hidden_player[4];
  834. if(info_hidden_foundHidden){
  835. players_ar[i].professionalism = info_hidden_hiddenProf;
  836. players_ar[i].aggression = info_hidden_hiddenAgr;
  837. players_ar[i].injury = info_hidden_hiddenInj;
  838. if(players_ar[i].charisma != "" && players_ar[i].professionalism != "" && players_ar[i].aggression != ""){ //39
  839. players_ar[i].captain = (((players_ar[i].charisma + players_ar[i].professionalism - players_ar[i].aggression)*100)/39)*(players_ar[i]["routine"]/100);
  840. players_ar[i].captain = Math.round(players_ar[i].captain*10)/10;
  841. }else {
  842. players_ar[i].captain = "";
  843. }
  844. }
  845. //info_hidden_foundHidden,info_hidden_hiddenInj ,info_hidden_hiddenAgr,info_hidden_hiddenProf,info_hidden_hiddenAdapt
  846. strSkill1 = computeSK(i,skillArray)[0][0];
  847. strSkill2 = computeSK(i,skillArray)[0][1];
  848. isDefender = checkIfDefender(strSkill1,strSkill2);
  849. skillArray = document.getSkills(i);
  850. SKs = computeSK(i,skillArray)[1];
  851.  
  852. //skillArray // computeSK(i,skillArray)[1];
  853. if (SKs[0] == 0){
  854. sk1 = 0;
  855. } else {
  856. sk1 = SKs[0];
  857. }
  858. if (SKs[1] == 0){
  859. sk2 = sk1;
  860. } else {
  861. sk2 = SKs[1];
  862. }
  863. players_ar[i].SK1 = Math.round(sk1*10)/10;
  864. players_ar[i].SK2 = Math.round(sk2*10)/10;
  865. skillAuxPos1 = [];
  866. skillAuxPos2 = [];
  867. //####################################################################
  868. if (SKs[0] != 0){
  869. for (var k=0; k< positionNames.length; k++) {
  870. skillAuxPos1[k] = Math.round(computeSKdefenida(positionNames[k] ,skillArray)[1]*10)/10;
  871. }
  872. }
  873. if (SKs[1] != 0){
  874. for (var k=0; k< positionNames.length; k++) {
  875. skillAuxPos2[k] = Math.round(computeSKdefenida(positionNames[k] ,skillArray)[1]*10)/10;
  876. }
  877. }
  878. //players_ar[i]["Adp"] //Adaptabilidade
  879. //info_hidden_foundHidden,info_hidden_hiddenInj ,info_hidden_hiddenAgr,info_hidden_hiddenProf,info_hidden_hiddenAdapt
  880. if(info_hidden_foundHidden){
  881. players_ar[i]["Adp"] = info_hidden_hiddenAdapt;
  882. }
  883. if(players_ar[i]["Adp"] != undefined){
  884. adaptabilidade = 1-(((players_ar[i]["Adp"]*100)/20)/100);
  885. } else {
  886. adaptabilidade = 1; //1 representa 0... valores opostos de adaptabilidade para simplificar calculos
  887. players_ar[i]["Adp"] = "";
  888. }
  889. var bestSKill = 0;
  890. for (var k=0; k< positionNames.length; k++) {
  891. if(skillAuxPos2[k] == undefined){
  892. players_ar[i][positionNames[k]] = skillAuxPos1[k] * ((100-(positionsLost[document.findPositionIndex(strSkill1)][k])*adaptabilidade)/100);
  893. } else {
  894. skse1 = skillAuxPos1[k] * ((100-(positionsLost[document.findPositionIndex(strSkill1)][k])*adaptabilidade)/100);
  895. skse2 = skillAuxPos2[k] * ((100-(positionsLost[document.findPositionIndex(strSkill2)][k])*adaptabilidade)/100);
  896. if(skse1 > skse2){
  897. players_ar[i][positionNames[k]] = skse1;
  898. } else {
  899. players_ar[i][positionNames[k]] = skse2;
  900. }
  901. }
  902. players_ar[i][positionNames[k]] = Math.round(players_ar[i][positionNames[k]]*10)/10;
  903. if(players_ar[i][positionNames[k]] > bestSKill){
  904. bestSKill = players_ar[i][positionNames[k]];
  905. players_ar[i]["bestSkill"] = bestSKill;
  906. }
  907. }
  908.  
  909. //####################################################################
  910. var dadosDeJogador = get_player_info_history(players_ar[i]["id"],show_non_pro_graphs);
  911. var dadosActuaisJogador = dadosDeJogador[0];
  912. var dadosTotaisJogador = dadosDeJogador[1];
  913.  
  914. players_ar[i]["last_games"] = isNaNVer(dadosActuaisJogador["games"]);
  915. players_ar[i]["last_goals"] = isNaNVer(dadosActuaisJogador["goals"]);
  916. players_ar[i]["last_goals_per_games"] = isNaNVer(Math.round(players_ar[i]["last_goals"] / players_ar[i]["last_games"]*100)/100);
  917. players_ar[i]["last_conceded"] = isNaNVer(dadosActuaisJogador["conceded"]);
  918. players_ar[i]["last_conceded_per_games"] = isNaNVer(Math.round(players_ar[i]["last_conceded"] / players_ar[i]["last_games"]*100)/100);
  919. players_ar[i]["last_assists"] = isNaNVer(dadosActuaisJogador["assists"]);
  920. players_ar[i]["last_assists_per_games"] = isNaNVer(Math.round(players_ar[i]["last_assists"] / players_ar[i]["last_games"]*100)/100);
  921. players_ar[i]["last_cards"] = isNaNVer(dadosActuaisJogador["cards"]);
  922. players_ar[i]["last_cards_per_games"] = isNaNVer(Math.round(players_ar[i]["last_cards"] / players_ar[i]["last_games"]*100)/100);
  923. players_ar[i]["last_rating"] = isNaNVer(dadosActuaisJogador["rating"]);
  924. players_ar[i]["last_productivity"] = isNaNVer(dadosActuaisJogador["productivity"]);
  925. players_ar[i]["last_productivity_per_games"] = isNaNVer(Math.round(players_ar[i]["last_productivity"] / players_ar[i]["last_games"]*100)/100);
  926. players_ar[i]["last_rating_avg"] = isNaNVer(dadosActuaisJogador["rating_avg"]);
  927. //DADOS TOTAIS
  928. players_ar[i]["total_games"] = isNaNVer(dadosTotaisJogador["games"]);
  929. players_ar[i]["total_goals"] = isNaNVer(dadosTotaisJogador["goals"]);
  930. players_ar[i]["total_goals_per_games"] = isNaNVer(Math.round(players_ar[i]["total_goals"] / players_ar[i]["total_games"]*100)/100);
  931. players_ar[i]["total_assists"] = isNaNVer(dadosTotaisJogador["assists"]);
  932. players_ar[i]["total_assists_per_games"] = isNaNVer(Math.round(players_ar[i]["total_assists"] / players_ar[i]["total_games"]*100)/100);
  933. players_ar[i]["total_productivity"] = isNaNVer(dadosTotaisJogador["productivity"]);
  934. players_ar[i]["total_productivity_per_games"] = isNaNVer(Math.round(players_ar[i]["total_productivity"] / players_ar[i]["total_games"]*100)/100);
  935. players_ar[i]["total_conceded"] = isNaNVer(dadosTotaisJogador["conceded"]);
  936. players_ar[i]["total_conceded_per_games"] = isNaNVer(Math.round(players_ar[i]["total_conceded"] / players_ar[i]["total_games"]*100)/100);
  937. players_ar[i]["total_cards"] = isNaNVer(dadosTotaisJogador["cards"]);
  938. players_ar[i]["total_cards_per_games"] = isNaNVer(Math.round(players_ar[i]["total_cards"] / players_ar[i]["total_games"]*100)/100);
  939. players_ar[i]["total_rating"] = isNaNVer(dadosTotaisJogador["rating"]);
  940. players_ar[i]["total_rating_avg"] = isNaNVer(dadosTotaisJogador["rating_avg"]);
  941. players_ar[i]["name"] =players_ar[i]["name"] + dadosTotaisJogador["transfer"];
  942. //####################################################################
  943. if(players_ar[i].SK1 >= players_ar[i].SK2){
  944. skillMaior = players_ar[i].SK1;
  945. } else {
  946. skillMaior = players_ar[i].SK2;
  947. }
  948. if(players_ar[i]["fp"] !="GK"){
  949. potencialFuturo = skillMaior - ((players_ar[i].totalSkill*100)/280);
  950. } else {
  951. potencialFuturo = skillMaior - ((players_ar[i].totalSkill*100)/220);
  952. }
  953. if(potencialFuturo != 0){
  954. players_ar[i].growOK = Math.round(potencialFuturo*10)/10;
  955.  
  956. } else {
  957. players_ar[i].growOK = 0;
  958. }
  959. if(players_ar[i].potential != ""){
  960. players_ar[i].potGok = Math.round((((players_ar[i].potential)+(players_ar[i].growOK/4))/2)*10)/10;
  961. } else {
  962. players_ar[i].potGok = "";
  963. }
  964. idJogador = players_ar[i]["id"];
  965. var tactics_init_reserves_var = tactics_init_reserves(idJogador);
  966. var tactics_init_national_var = tactics_init_national(idJogador);
  967. if(SESSION["b_team"] == players_ar[i]["club"]){ //equipa reservas
  968. players_ar[i]["on_field"] = tactics_init_reserves_var[0];
  969. players_ar[i]["on_field_playing_b"] = tactics_init_reserves_var[1];
  970. } else {// equipa principal
  971. players_ar[i]["on_field"] = tactics_init_national_var[0];
  972. players_ar[i]["on_field_playing_a"] = tactics_init_national_var[1];
  973. }
  974. //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  975. if(!is_pro){
  976. players_ar[i]["plot"] = get_player_info_graphs(idJogador,show_non_pro_graphs)[0];
  977. players_ar[i]["ti"] = isNaNVer(players_ar[i]["plot"][players_ar[i]["plot"].length-1]);
  978. players_ar[i]["ti_dif"] = isNaNVer(players_ar[i]["ti"]-players_ar[i]["plot"][players_ar[i]["plot"].length-2]);
  979.  
  980. /* if(!players_by_id[players_ar[i]["id"]]) players_by_id[players_ar[i]["id"]] = {};
  981. players_by_id[players_ar[i]["id"]]["plot"] = players_ar[i]["plot"]; */
  982. if(players_ar[i]["fp"] !="GK"){
  983. arrows[idJogador]= {"raise":[0,0,0,0,0,0,0,0,0,0,0,0,0,0]};
  984. }else {
  985. arrows[idJogador] = {"raise":[0,0,0,0,0,0,0,0,0,0,0]};
  986. }
  987. arrows[idJogador].ti=players_ar[i]["ti"] ;
  988. arrows[idJogador].ti_shift=players_ar[i]["ti_dif"] ;
  989. var get_player_info_graphs_var = get_player_info_graphs(idJogador,show_non_pro_graphs)[1];
  990. var get_player_info_graphs_varD = get_player_info_graphs(idJogador,show_non_pro_graphs)[2];
  991. for (var lu=0; lu< get_player_info_graphs_var.length || lu <get_player_info_graphs_varD.length; lu++) {
  992. var melhorouEm = get_player_info_graphs_var[lu];
  993. var piorouEm = get_player_info_graphs_varD[lu];
  994. if(players_ar[i]["fp"] !="GK"){
  995. if(melhorouEm == "strength"){
  996. arrows[idJogador]["raise"][0] = 2;
  997. }
  998. if (piorouEm == "strength"){
  999. arrows[idJogador]["raise"][0] = -2;
  1000. }
  1001. if(melhorouEm == "stamina"){
  1002. arrows[idJogador]["raise"][1] = 2;
  1003. }
  1004. if (piorouEm == "stamina"){
  1005. arrows[idJogador]["raise"][1] = -2;
  1006. }
  1007. if(melhorouEm == "pace"){
  1008. arrows[idJogador]["raise"][2] = 2;
  1009. }
  1010. if (piorouEm == "pace"){
  1011. arrows[idJogador]["raise"][2] = -2;
  1012. }
  1013. if(melhorouEm == "marking"){
  1014. arrows[idJogador]["raise"][3] = 2;
  1015. }
  1016. if (piorouEm == "marking"){
  1017. arrows[idJogador]["raise"][3] = -2;
  1018. }
  1019. if(melhorouEm == "tackling"){
  1020. arrows[idJogador]["raise"][4] = 2;
  1021. }
  1022. if (piorouEm == "tackling"){
  1023. arrows[idJogador]["raise"][4] = -2;
  1024. }
  1025. if(melhorouEm == "workrate"){
  1026. arrows[idJogador]["raise"][5] = 2;
  1027. }
  1028. if (piorouEm == "workrate"){
  1029. arrows[idJogador]["raise"][5] = -2;
  1030. }
  1031. if(melhorouEm == "positioning"){
  1032. arrows[idJogador]["raise"][6] = 2;
  1033. }
  1034. if (piorouEm == "positioning"){
  1035. arrows[idJogador]["raise"][6] = -2;
  1036. }
  1037. if(melhorouEm == "passing"){
  1038. arrows[idJogador]["raise"][7] = 2;
  1039. }
  1040. if (piorouEm == "passing"){
  1041. arrows[idJogador]["raise"][7] = -2;
  1042. }
  1043. if(melhorouEm == "crossing"){
  1044. arrows[idJogador]["raise"][8] = 2;
  1045. }
  1046. if (piorouEm == "crossing"){
  1047. arrows[idJogador]["raise"][8] = -2;
  1048. }
  1049. if(melhorouEm == "technique"){
  1050. arrows[idJogador]["raise"][9] = 2;
  1051. }
  1052. if (piorouEm == "technique"){
  1053. arrows[idJogador]["raise"][9] = -2;
  1054. }
  1055. if(melhorouEm == "heading"){
  1056. arrows[idJogador]["raise"][10] = 2;
  1057. }
  1058. if (piorouEm == "heading"){
  1059. arrows[idJogador]["raise"][10] = -2;
  1060. }
  1061. if(melhorouEm == "finishing"){
  1062. arrows[idJogador]["raise"][11] = 2;
  1063. }
  1064. if (piorouEm == "finishing"){
  1065. arrows[idJogador]["raise"][11] = -2;
  1066. }
  1067. if(melhorouEm == "longshots"){
  1068. arrows[idJogador]["raise"][12] = 2;
  1069. }
  1070. if (piorouEm == "longshots"){
  1071. arrows[idJogador]["raise"][12] = -2;
  1072. }
  1073. if(melhorouEm == "set_pieces"){
  1074. arrows[idJogador]["raise"][13] = 2;
  1075. }
  1076. if (piorouEm == "set_pieces"){
  1077. arrows[idJogador]["raise"][13] = -2;
  1078. }
  1079. } else {
  1080. if(melhorouEm == "strength"){
  1081. arrows[idJogador]["raise"][0] = 2;
  1082. }
  1083. if (piorouEm == "strength"){
  1084. arrows[idJogador]["raise"][0] = -2;
  1085. }
  1086. if(melhorouEm == "stamina"){
  1087. arrows[idJogador]["raise"][1] = 2;
  1088. }
  1089. if (piorouEm == "stamina"){
  1090. arrows[idJogador]["raise"][1] = -2;
  1091. }
  1092. if(melhorouEm == "pace"){
  1093. arrows[idJogador]["raise"][2] = 2;
  1094. }
  1095. if (piorouEm == "pace"){
  1096. arrows[idJogador]["raise"][2] = -2;
  1097. }
  1098. if(melhorouEm == "handling"){
  1099. arrows[idJogador]["raise"][3] = 2;
  1100. }
  1101. if (piorouEm == "handling"){
  1102. arrows[idJogador]["raise"][3] = -2;
  1103. }
  1104. if(melhorouEm == "one_on_ones"){
  1105. arrows[idJogador]["raise"][4] = 2;
  1106. }
  1107. if (piorouEm == "one_on_ones"){
  1108. arrows[idJogador]["raise"][4] = -2;
  1109. }
  1110. if(melhorouEm == "reflexes"){
  1111. arrows[idJogador]["raise"][5] = 2;
  1112. }
  1113. if (piorouEm == "reflexes"){
  1114. arrows[idJogador]["raise"][5] = -2;
  1115. }
  1116. if(melhorouEm == "aerial_ability"){
  1117. arrows[idJogador]["raise"][6] = 2;
  1118. }
  1119. if (piorouEm == "aerial_ability"){
  1120. arrows[idJogador]["raise"][6] = -2;
  1121. }
  1122. if(melhorouEm == "jumping"){
  1123. arrows[idJogador]["raise"][7] = 2;
  1124. }
  1125. if (piorouEm == "jumping"){
  1126. arrows[idJogador]["raise"][7] = -2;
  1127. }
  1128. if(melhorouEm == "communication"){
  1129. arrows[idJogador]["raise"][8] = 2;
  1130. }
  1131. if (piorouEm == "communication"){
  1132. arrows[idJogador]["raise"][8] = -2;
  1133. }
  1134. if(melhorouEm == "kicking"){
  1135. arrows[idJogador]["raise"][9] = 2;
  1136. }
  1137. if (piorouEm == "kicking"){
  1138. arrows[idJogador]["raise"][9] = -2;
  1139. }
  1140. if(melhorouEm == "throwing"){
  1141. arrows[idJogador]["raise"][10] = 2;
  1142. }
  1143. if (piorouEm == "throwing"){
  1144. arrows[idJogador]["raise"][10] = -2;
  1145. }
  1146. }
  1147. }
  1148. }
  1149. //###############$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  1150. if(players_ar[i].SK1 >= players_ar[i].SK2){
  1151. totalSkillP = document.calculateSkillDefPlay(strSkill1, skillArray);
  1152. } else if (players_ar[i].SK1 < players_ar[i].SK2){
  1153. totalSkillP = document.calculateSkillDefPlay(strSkill2, skillArray);
  1154. }
  1155. players_ar[i].cantos = totalSkillP[2][0];//(players_ar[i]["set"] * 2 + players_ar[i]["cro"] * 2 + players_ar[i]["tec"]) / 5;
  1156. players_ar[i].livres = totalSkillP[2][1];//(players_ar[i]["set"] * 2 + players_ar[i]["lon"] * 2 + players_ar[i]["tec"]) / 5;
  1157. players_ar[i].penaltis = totalSkillP[2][2];//(players_ar[i]["set"] * 2 + players_ar[i]["fin"] * 2 + players_ar[i]["tec"]) / 5;
  1158. players_ar[i].DDi = totalSkillP[3][0];
  1159. players_ar[i].DWi = totalSkillP[3][1];
  1160. players_ar[i].DSh = totalSkillP[3][2];
  1161. players_ar[i].DLB = totalSkillP[3][3];
  1162. players_ar[i].DTB = totalSkillP[3][4];
  1163. players_ar[i].PDi = totalSkillP[4][0];
  1164. players_ar[i].PWi = totalSkillP[4][1];
  1165. players_ar[i].PSh = totalSkillP[4][2];
  1166. players_ar[i].PLB = totalSkillP[4][3];
  1167. players_ar[i].PTB = totalSkillP[4][4];
  1168. //###############$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  1169.  
  1170. if(players_ar[i]["on_field_playing_a"] == true && players_ar[i]["fp"] !="GK"){
  1171. var_DDi_a = var_DDi_a + players_ar[i].DDi;
  1172. var_DWi_a = var_DWi_a + players_ar[i].DWi;
  1173. var_DSh_a = var_DSh_a + players_ar[i].DSh;
  1174. var_DLB_a = var_DLB_a + players_ar[i].DLB;
  1175. var_DTB_a = var_DTB_a + players_ar[i].DTB;
  1176. var_PDi_a = var_PDi_a + players_ar[i].PDi;
  1177. var_PWi_a = var_PWi_a + players_ar[i].PWi;
  1178. var_PSh_a = var_PSh_a + players_ar[i].PSh;
  1179. var_PLB_a = var_PLB_a + players_ar[i].PLB;
  1180. var_PTB_a = var_PTB_a + players_ar[i].PTB;
  1181. }
  1182.  
  1183. if(players_ar[i]["on_field_playing_b"] == true && players_ar[i]["fp"] !="GK"){
  1184. var_DDi_b = var_DDi_b + players_ar[i].DDi;
  1185. var_DWi_b = var_DWi_b + players_ar[i].DWi;
  1186. var_DSh_b = var_DSh_b + players_ar[i].DSh;
  1187. var_DLB_b = var_DLB_b + players_ar[i].DLB;
  1188. var_DTB_b = var_DTB_b + players_ar[i].DTB;
  1189. var_PDi_b = var_PDi_b + players_ar[i].PDi;
  1190. var_PWi_b = var_PWi_b + players_ar[i].PWi;
  1191. var_PSh_b = var_PSh_b + players_ar[i].PSh;
  1192. var_PLB_b = var_PLB_b + players_ar[i].PLB;
  1193. var_PTB_b = var_PTB_b + players_ar[i].PTB;
  1194. }
  1195. if(is_pro || true){ //is_pro
  1196.  
  1197. if(undefined == arrows[idJogador]){
  1198. players_ar[i].SK1ant = 0;
  1199. players_ar[i].SK2ant = 0;
  1200. players_ar[i].growOfGok = 0;
  1201. } else {
  1202. skillArrayAnterior = arrows[idJogador]["raise"].slice();
  1203. skillArrayAnteriorPerda = arrows[idJogador]["raise"].slice();
  1204. TotalSkillAnterior = 0;
  1205. for (entry=0; entry<skillArrayAnterior.length; entry++) {
  1206.  
  1207. if(skillArrayAnterior[entry]==1){
  1208. skillArrayAnterior[entry] = 0
  1209. skillArrayAnteriorPerda[entry] = 0;
  1210.  
  1211. } else if (skillArrayAnterior[entry]==2){
  1212. skillArrayAnterior[entry] = 1;
  1213. skillArrayAnteriorPerda[entry] =0;
  1214. TotalSkillAnterior = TotalSkillAnterior + 1;
  1215.  
  1216. } else if(skillArrayAnterior[entry]==-2){
  1217. skillArrayAnteriorPerda[entry] = 1;
  1218. skillArrayAnterior[entry] = 0;
  1219. TotalSkillAnterior = TotalSkillAnterior + 1;
  1220. }
  1221. }
  1222.  
  1223. SKsAux1 = computeSK(i,skillArrayAnterior)[1];
  1224. SKsAux2 = computeSK(i,skillArrayAnteriorPerda)[1];
  1225. SKs = [SKsAux1[0]-SKsAux2[0],SKsAux1[1]-SKsAux2[1]];
  1226.  
  1227.  
  1228. if (SKs[0] == 0){
  1229. sk1 = 0;
  1230. } else {
  1231. sk1 = SKs[0];
  1232. }
  1233. if (SKs[1] == 0){
  1234. sk2 = sk1;
  1235. } else {
  1236. sk2 = SKs[1];
  1237. }
  1238. players_ar[i].SK1ant = Math.round(sk1*10)/10;
  1239. players_ar[i].SK2ant = Math.round(sk2*10)/10;
  1240. if(players_ar[i].SK1 - players_ar[i].SK1ant >= players_ar[i].SK2 - players_ar[i].SK2ant){
  1241. skillMaiorAnterior = players_ar[i].SK1 - players_ar[i].SK1ant;
  1242. } else {
  1243. skillMaiorAnterior = players_ar[i].SK2 - players_ar[i].SK2ant;
  1244. }
  1245. if(players_ar[i]["fp"] !="GK"){
  1246. potencialFuturoAnterior = skillMaiorAnterior - (((players_ar[i].totalSkill-TotalSkillAnterior)*100)/280);
  1247. } else {
  1248. potencialFuturoAnterior = skillMaiorAnterior - (((players_ar[i].totalSkill-TotalSkillAnterior)*100)/220);
  1249. }
  1250. if(potencialFuturoAnterior != 0){
  1251. players_ar[i].growOKAnterior = potencialFuturoAnterior;
  1252. players_ar[i].growOfGok = Math.round((players_ar[i].growOK - players_ar[i].growOKAnterior)*10)/10; //
  1253. } else {
  1254. players_ar[i].growOfGok = players_ar[i].growOK - 0;
  1255.  
  1256. }
  1257. }
  1258. /* if(arrows[idJogador].ti < 0){
  1259. players_ar[i].SK1ant = players_ar[i].SK1ant * -1;
  1260. players_ar[i].SK2ant = players_ar[i].SK2ant * -1;
  1261. players_ar[i].growOfGok = players_ar[i].growOfGok * -1;
  1262. } */
  1263. }
  1264.  
  1265. } //show_scoutskills
  1266.  
  1267.  
  1268. var_DDi_a = Math.round(var_DDi_a / 11*100)/100;
  1269. var_DWi_a = Math.round(var_DWi_a / 11*100)/100;
  1270. var_DSh_a = Math.round(var_DSh_a / 11*100)/100;
  1271. var_DLB_a = Math.round(var_DLB_a / 11*100)/100;
  1272. var_DTB_a = Math.round(var_DTB_a / 11*100)/100;
  1273. var_PDi_a = Math.round(var_PDi_a / 11*100)/100;
  1274. var_PWi_a = Math.round(var_PWi_a / 11*100)/100;
  1275. var_PSh_a = Math.round(var_PSh_a / 11*100)/100;
  1276. var_PLB_a = Math.round(var_PLB_a / 11*100)/100;
  1277. var_PTB_a = Math.round(var_PTB_a / 11*100)/100;
  1278. var_DDi_b = Math.round(var_DDi_b / 11*100)/100;
  1279. var_DWi_b = Math.round(var_DWi_b / 11*100)/100;
  1280. var_DSh_b = Math.round(var_DSh_b / 11*100)/100;
  1281. var_DLB_b = Math.round(var_DLB_b / 11*100)/100;
  1282. var_DTB_b = Math.round(var_DTB_b / 11*100)/100;
  1283. var_PDi_b = Math.round(var_PDi_b / 11*100)/100;
  1284. var_PWi_b = Math.round(var_PWi_b / 11*100)/100;
  1285. var_PSh_b = Math.round(var_PSh_b / 11*100)/100;
  1286. var_PLB_b = Math.round(var_PLB_b / 11*100)/100;
  1287. var_PTB_b = Math.round(var_PTB_b / 11*100)/100;
  1288.  
  1289.  
  1290. function construct_tr(ply_ar, count, mode) {
  1291. var myRow = myTable.insertRow(-1);
  1292. var training_count=0;
  1293. function construct_cell(assoc) {
  1294. var myCell = myRow.insertCell(-1);
  1295. if (assoc != undefined) {
  1296. var assocs_to_star = ["str","sta","pac","mar","tac","wor","pos","pas","cro","tec","hea","fin","lon","set","han","one","ref","ari","jum","com","kic","thr"];
  1297. if (headers_ar[assoc]["style"]) {
  1298. myCell.className = headers_ar[assoc]["style"];
  1299. }
  1300. if (assoc == "name") {
  1301.  
  1302. /* var ban = "";
  1303. if (ply_ar["ban"].indexOf("r") == 0) {
  1304. ban += "<img src=\"/pics/icons/red_card.gif\" />"+ply_ar["ban"].substr(1);
  1305. } else if (ply_ar["ban"] == "g") {
  1306. ban += "<img src=\"/pics/icons/yellow_card.gif\" tooltip='"+global_content["ban_risk"]+"'/>";
  1307. }
  1308. if(ply_ar["inj"]) {
  1309. ban += "<img src=\"/pics/icons/injury.gif\" />"+ply_ar["inj"];
  1310. } */
  1311. var tmp = "<div class='name'>";
  1312. tmp += " "+get_player_link({"player":{"id":ply_ar["id"],"name":ply_ar["name"]},"auto_tooltip":true,"class":"normal"});
  1313. // tmp += " "+ban;
  1314. if(ply_ar["status"]) tmp += " "+ply_ar["status"];
  1315. if (ply_ar["retire"] == true) {
  1316. tmp += "<img src='/pics/icons/retire.gif' title='This player is retiring after this season' />";
  1317. }
  1318. if (ply_ar["banned_club"])
  1319. {
  1320. tmp += " <img src='/pics/icons/lg_ina.gif' title='Club Banned' />";
  1321. }
  1322. if(ply_ar["country"] != SESSION["country"] && this_page != "shortlist" && this_page != "nt_shortlist")
  1323. {
  1324. tmp += " "+get_flag(ply_ar["country"]);
  1325. }
  1326. if(ply_ar["reserve_team"]){
  1327. tmp += ' <span class="b_team_icon">B</span>';
  1328. }
  1329. tmp +="</div>";
  1330. myCell.innerHTML = tmp;
  1331. $(myCell).addClass("text_fade");
  1332. if (ply_ar['txt'] != "") {
  1333. var tmp = $(" <img src='/pics/icons/transfer_speechbubble.gif' style='cursor:pointer;margin-bottom: 2px;' onclick='player_note("+ply_ar['id']+")'/>").tooltip(global_content[450]+"<br />"+ply_ar['txt']);
  1334. } else {
  1335. var tmp = " <img src='/pics/icons/transfer_speechbubble_empty.gif' style='cursor:pointer;margin-bottom: 2px;' onclick='player_note("+ply_ar['id']+")'/>";
  1336. }
  1337. $(myCell).find(".name").prepend(tmp);
  1338. } else if (assoc == "country") {
  1339. $(myCell).html(get_flag(ply_ar["nat"]));
  1340. } else if (assoc == "fp") {
  1341. myCell.innerHTML = "<div class='position'>"+retColorPos(ply_ar["fp"])+"</div>";
  1342. } else if (assoc == "scout") {
  1343. var url = get_player_link({"player":{"id":ply_ar["id"],"name":ply_ar["name"]},"only_url":true});
  1344. $(myCell).html(make_button("<img src='/pics/binoc.png' />", "href:"+url+"#scout","small_button"));
  1345. } else if (assoc == "rec") {
  1346. $(myCell).addClass("align_center").html("<div class='rec'>"+rec_format(ply_ar["rec"])+"</div>");
  1347. } else if (assocs_to_star.indexOf(assoc) >= 0) {
  1348. if (ply_ar[assoc] == 20) {
  1349. myCell.innerHTML = "<img src='/pics/star.png' />";
  1350. } else if (ply_ar[assoc] == 19) {
  1351. myCell.innerHTML = "<img src='/pics/star_silver.png' />";
  1352. } else if (ply_ar[assoc] == 0 && !show_training) {
  1353. myCell.style.color = "#AAAAAA";
  1354. myCell.innerHTML = "-";
  1355. } else if (ply_ar[assoc] < 6 && !show_training) {
  1356. myCell.style.color = "#AAAAAA";
  1357. myCell.innerHTML = ply_ar[assoc];
  1358. } else {
  1359. myCell.innerHTML = ply_ar[assoc];
  1360. }
  1361. $(myCell).html("<div class='skill'>"+$(myCell).html()+"</div>").addClass("skill");
  1362. if(show_training)
  1363. {
  1364. var $skill = $(myCell).find(".skill").addClass("training subtle");
  1365. if(arrows[ply_ar.id])
  1366. {
  1367. var t = arrows[ply_ar.id].raise[training_count];
  1368. if(t == 2) $skill.addClass("one_up").removeClass("subtle");
  1369. else if(t == 1) $skill.addClass("part_up").removeClass("subtle");
  1370. else if(t == -1) $skill.addClass("part_down").removeClass("subtle");
  1371. else if(t == -2) $skill.addClass("one_down").removeClass("subtle");
  1372. training_count++;
  1373. // if(ply_ar["fp"] == "GK" && training_count==3) training_count=14;
  1374. }
  1375. }
  1376. } else if (assoc == "asi" || assoc == "wage") {
  1377. myCell.innerHTML = "<div class='wage'>"+addCommas(ply_ar[assoc])+"</div>";
  1378. } else if (assoc == "rat") {
  1379. myCell.innerHTML = ply_ar[assoc].toFixed(2);
  1380. } else if (assoc == "no") {
  1381. $(myCell).addClass("minishirt small").html("<span class='faux_link normal' onclick='pop_player_number("+ply_ar["id"]+","+ply_ar["no"]+",\""+ply_ar["js_name"]+"\","+(ply_ar["reserve_team"]?1:0)+")'>"+ply_ar[assoc]+"</span>");
  1382. } else if (assoc == "timeleft"){
  1383. ply_ar["timeleft_string"] = ply_ar["timeleft_string"] || "";
  1384. $(myCell).html("<div class='time_left'>"+ply_ar["timeleft_string"].replace("d",global_content["days_abbr"]).replace("h",global_content["hours_abbr"]).replace("m",global_content["minutes_abbr"])+"</div>").attr("sort",ply_ar["timeleft"]);
  1385. } else if (assoc == "delete"){
  1386. $(myCell).html(make_button("<img src='/pics/icons/recyclebin.gif' style='position:relative;top: 2px;'>","remove_short_list_player("+ply_ar["id"]+",remove_player_from_list)","small_button"));
  1387.  
  1388. } else if (assoc == "bid"){
  1389. if(ply_ar["bid"] == 0)
  1390. {
  1391. $(myCell).html(make_button("<img src='/pics/auction_hammer_small.png' style='position:relative;top: 2px;'>","pop_transfer_bid('"+number_format(ply_ar["next_bid"])+"',"+isPro+",'"+ply_ar["id"]+"','"+ply_ar["name_js"]+"')","small_button"));
  1392. }
  1393. else if(ply_ar["bid"] == 1)
  1394. { // green
  1395. $(myCell).html('<img src="/pics/icons/button_green.gif">');
  1396. }
  1397. else if(ply_ar["bid"] == 2)
  1398. { // yellow
  1399. $(myCell).html('<img src="/pics/icons/button_yellow.gif">');
  1400. }
  1401. else if(ply_ar["bid"] == 3)
  1402. { // red
  1403. $(myCell).html('<img src="/pics/small_red_x.png">');
  1404. }
  1405. }
  1406. else if(assoc== "bteam"){
  1407. if(SESSION["b_team"] > 0)
  1408. {
  1409. if(ply_ar["reserve_team"])
  1410. {
  1411. $(myCell).html(make_button("<img src='/pics/icons/squad_up.png' style='position: relative; top: -2px;' tooltip='"+pagecontent[114]+"'/>","promote_player("+ply_ar["id"]+")","small_button"));
  1412. }
  1413. else
  1414. {
  1415. $(myCell).html(make_button("<img src='/pics/icons/squad_down.png' style='position: relative; top: -2px;' tooltip='"+pagecontent[115]+"'/>","demote_player("+ply_ar["id"]+")","small_button"));
  1416. }
  1417. }
  1418. }
  1419. else if(assoc=="ti")
  1420. {
  1421. if(arrows[ply_ar.id])
  1422. {
  1423. $(myCell).html(arrows[ply_ar.id].ti);
  1424. }
  1425. else $(myCell).html("-");
  1426. }
  1427. else if(assoc=="ti_dif")
  1428. {
  1429. if(arrows[ply_ar.id])
  1430. {
  1431. $(myCell).html(arrows[ply_ar.id].ti_shift);
  1432. }
  1433. else $(myCell).html("-");
  1434. }
  1435. else if(assoc=="age")
  1436. {
  1437. if(show_training) myCell.innerHTML = ply_ar[assoc];
  1438. else myCell.innerHTML = ply_ar[assoc].split(".")[0];
  1439. }
  1440. else {
  1441. myCell.innerHTML = ply_ar[assoc];
  1442. }
  1443. } else {
  1444. myCell.innerHTML = "-";
  1445. }
  1446. }
  1447. for (var i=0; i<ths.length; i++) {
  1448. if (mode) {
  1449. construct_cell(gk_ths[i]);
  1450. } else {
  1451. construct_cell(ths[i]);
  1452. }
  1453. }
  1454. }
  1455.  
  1456.  
  1457. document.toggle_scoutskills = function() {
  1458. document.show_scoutskills = !document.show_scoutskills;
  1459.  
  1460. setCookie("show_scoutskills",document.show_scoutskills,365);
  1461. if(document.show_scoutskills) $("img.toggle_scoutskills").attr("src","/pics/sort_btn_gray_on.gif");
  1462. else $("img.toggle_scoutskills").attr("src","/pics/sort_btn_gray_off.gif");
  1463. document.show_fieldperformance = false;
  1464. document.show_posicoes = false;
  1465. setCookie("show_posicoes",document.show_posicoes,365);
  1466. setCookie("show_fieldperformance",document.show_fieldperformance,365);
  1467. document.show_last_data = false;
  1468. document.show_total_data = false;
  1469. setCookie("show_last_data",document.show_last_data,365);
  1470. setCookie("show_total_data",document.show_total_data,365);
  1471. if(document.show_posicoes) $("img.toggle_posicoes").attr("src","/pics/sort_btn_gray_on.gif");
  1472. else $("img.toggle_posicoes").attr("src","/pics/sort_btn_gray_off.gif");
  1473. if(document.show_fieldperformance) $("img.toggle_fieldperformance").attr("src","/pics/sort_btn_gray_on.gif");
  1474. else $("img.toggle_fieldperformance").attr("src","/pics/sort_btn_gray_off.gif");
  1475. if(document.show_last_data) $("img.toggle_last_data").attr("src","/pics/sort_btn_gray_on.gif");
  1476. else $("img.toggle_last_data").attr("src","/pics/sort_btn_gray_off.gif");
  1477. if(document.show_total_data) $("img.toggle_total_data").attr("src","/pics/sort_btn_gray_on.gif");
  1478. else $("img.toggle_total_data").attr("src","/pics/sort_btn_gray_off.gif");
  1479. document.show_setpieces = false;
  1480. setCookie("show_setpieces",document.show_setpieces,365);
  1481. if(document.show_setpieces) $("img.toggle_setpieces").attr("src","/pics/sort_btn_gray_on.gif");
  1482. else $("img.toggle_setpieces").attr("src","/pics/sort_btn_gray_off.gif");
  1483. makeTable();
  1484. }
  1485.  
  1486. document.toggle_last_data = function() {
  1487. document.show_last_data = !document.show_last_data;
  1488. setCookie("show_last_data",document.show_last_data,365);
  1489.  
  1490. if(document.show_last_data) $("img.toggle_last_data").attr("src","/pics/sort_btn_gray_on.gif");
  1491. else $("img.toggle_last_data").attr("src","/pics/sort_btn_gray_off.gif");
  1492. document.show_fieldperformance = false;
  1493. document.show_posicoes = false;
  1494. setCookie("show_posicoes",document.show_posicoes,365);
  1495. setCookie("show_fieldperformance",document.show_fieldperformance,365);
  1496. document.show_scoutskills = false;
  1497. setCookie("show_scoutskills",document.show_scoutskills,365);
  1498. document.show_setpieces = false;
  1499. document.show_total_data = false;
  1500. setCookie("show_setpieces",document.show_setpieces,365);
  1501. setCookie("show_total_data",document.show_total_data,365);
  1502. if(document.show_posicoes) $("img.toggle_posicoes").attr("src","/pics/sort_btn_gray_on.gif");
  1503. else $("img.toggle_posicoes").attr("src","/pics/sort_btn_gray_off.gif");
  1504. if(document.show_fieldperformance) $("img.toggle_fieldperformance").attr("src","/pics/sort_btn_gray_on.gif");
  1505. else $("img.toggle_fieldperformance").attr("src","/pics/sort_btn_gray_off.gif");
  1506. if(document.show_scoutskills) $("img.toggle_scoutskills").attr("src","/pics/sort_btn_gray_on.gif");
  1507. else $("img.toggle_scoutskills").attr("src","/pics/sort_btn_gray_off.gif");
  1508. if(document.show_setpieces) $("img.toggle_setpieces").attr("src","/pics/sort_btn_gray_on.gif");
  1509. else $("img.toggle_setpieces").attr("src","/pics/sort_btn_gray_off.gif");
  1510. if(document.show_total_data) $("img.toggle_total_data").attr("src","/pics/sort_btn_gray_on.gif");
  1511. else $("img.toggle_total_data").attr("src","/pics/sort_btn_gray_off.gif");
  1512. makeTable();
  1513. }
  1514.  
  1515. document.toggle_total_data = function() {
  1516. document.show_total_data = !document.show_total_data;
  1517. setCookie("show_total_data",document.show_total_data,365);
  1518.  
  1519. if(document.show_total_data) $("img.toggle_total_data").attr("src","/pics/sort_btn_gray_on.gif");
  1520. else $("img.toggle_total_data").attr("src","/pics/sort_btn_gray_off.gif");
  1521. document.show_fieldperformance = false;
  1522. document.show_posicoes = false;
  1523. setCookie("show_posicoes",document.show_posicoes,365);
  1524. setCookie("show_fieldperformance",document.show_fieldperformance,365);
  1525. document.show_scoutskills = false;
  1526. setCookie("show_scoutskills",document.show_scoutskills,365);
  1527. document.show_setpieces = false;
  1528. document.show_last_data = false;
  1529. setCookie("show_setpieces",document.show_setpieces,365);
  1530. setCookie("show_last_data",document.show_last_data,365);
  1531. if(document.show_posicoes) $("img.toggle_posicoes").attr("src","/pics/sort_btn_gray_on.gif");
  1532. else $("img.toggle_posicoes").attr("src","/pics/sort_btn_gray_off.gif");
  1533. if(document.show_fieldperformance) $("img.toggle_fieldperformance").attr("src","/pics/sort_btn_gray_on.gif");
  1534. else $("img.toggle_fieldperformance").attr("src","/pics/sort_btn_gray_off.gif");
  1535. if(document.show_scoutskills) $("img.toggle_scoutskills").attr("src","/pics/sort_btn_gray_on.gif");
  1536. else $("img.toggle_scoutskills").attr("src","/pics/sort_btn_gray_off.gif");
  1537. if(document.show_setpieces) $("img.toggle_setpieces").attr("src","/pics/sort_btn_gray_on.gif");
  1538. else $("img.toggle_setpieces").attr("src","/pics/sort_btn_gray_off.gif");
  1539. if(document.show_last_data) $("img.toggle_last_data").attr("src","/pics/sort_btn_gray_on.gif");
  1540. else $("img.toggle_last_data").attr("src","/pics/sort_btn_gray_off.gif");
  1541. makeTable();
  1542. }
  1543.  
  1544. document.toggle_setpieces = function() {
  1545. document.show_setpieces = !document.show_setpieces;
  1546. setCookie("show_setpieces",document.show_setpieces,365);
  1547.  
  1548. if(document.show_setpieces) $("img.toggle_setpieces").attr("src","/pics/sort_btn_gray_on.gif");
  1549. else $("img.toggle_setpieces").attr("src","/pics/sort_btn_gray_off.gif");
  1550. document.show_fieldperformance = false;
  1551. document.show_posicoes = false;
  1552. setCookie("show_posicoes",document.show_posicoes,365);
  1553. setCookie("show_fieldperformance",document.show_fieldperformance,365);
  1554. document.show_last_data = false;
  1555. document.show_total_data = false;
  1556. setCookie("show_last_data",document.show_last_data,365);
  1557. setCookie("show_total_data",document.show_total_data,365);
  1558. if(document.show_posicoes) $("img.toggle_posicoes").attr("src","/pics/sort_btn_gray_on.gif");
  1559. else $("img.toggle_posicoes").attr("src","/pics/sort_btn_gray_off.gif");
  1560. if(document.show_fieldperformance) $("img.toggle_fieldperformance").attr("src","/pics/sort_btn_gray_on.gif");
  1561. else $("img.toggle_fieldperformance").attr("src","/pics/sort_btn_gray_off.gif");
  1562. if(document.show_last_data) $("img.toggle_last_data").attr("src","/pics/sort_btn_gray_on.gif");
  1563. else $("img.toggle_last_data").attr("src","/pics/sort_btn_gray_off.gif");
  1564. if(document.show_total_data) $("img.toggle_total_data").attr("src","/pics/sort_btn_gray_on.gif");
  1565. else $("img.toggle_total_data").attr("src","/pics/sort_btn_gray_off.gif");
  1566. document.show_scoutskills = false;
  1567. setCookie("show_scoutskills",document.show_scoutskills,365);
  1568. if(document.show_scoutskills) $("img.toggle_scoutskills").attr("src","/pics/sort_btn_gray_on.gif");
  1569. else $("img.toggle_scoutskills").attr("src","/pics/sort_btn_gray_off.gif");
  1570. makeTable();
  1571. }
  1572. //document.show_teamB_det
  1573. document.toggle_teamB_det = function() {
  1574. document.show_teamB_det = !document.show_teamB_det;
  1575. setCookie("show_teamB_det",document.show_teamB_det,365);
  1576.  
  1577. if(document.show_teamB_det) $("img.toggle_teamB_det").attr("src","/pics/sort_btn_gray_on.gif");
  1578. else $("img.toggle_teamB_det").attr("src","/pics/sort_btn_gray_off.gif");
  1579. makeTable();
  1580. }
  1581.  
  1582. document.toggle_teamA_det = function() {
  1583. document.show_teamA_det = !document.show_teamA_det;
  1584. setCookie("show_teamA_det",document.show_teamA_det,365);
  1585.  
  1586. if(document.show_teamA_det) $("img.toggle_teamA_det").attr("src","/pics/sort_btn_gray_on.gif");
  1587. else $("img.toggle_teamA_det").attr("src","/pics/sort_btn_gray_off.gif");
  1588. makeTable();
  1589. }
  1590.  
  1591. document.toggle_convocados = function() {
  1592. document.show_convocados = !document.show_convocados;
  1593. setCookie("show_convocados",document.show_convocados,365);
  1594.  
  1595. if(document.show_convocados) $("img.toggle_convocados").attr("src","/pics/sort_btn_gray_on.gif");
  1596. else $("img.toggle_convocados").attr("src","/pics/sort_btn_gray_off.gif");
  1597. makeTable();
  1598. }
  1599.  
  1600. document.toggle_fieldperformance = function() {
  1601. document.show_fieldperformance = !document.show_fieldperformance;
  1602. setCookie("show_fieldperformance",document.show_fieldperformance,365);
  1603. if(document.show_fieldperformance) $("img.toggle_fieldperformance").attr("src","/pics/sort_btn_gray_on.gif");
  1604. else $("img.toggle_fieldperformance").attr("src","/pics/sort_btn_gray_off.gif");
  1605. document.show_setpieces = false;
  1606. document.show_posicoes = false;
  1607. setCookie("show_setpieces",document.show_setpieces,365);
  1608. document.show_scoutskills = false;
  1609. setCookie("show_scoutskills",document.show_scoutskills,365);
  1610. setCookie("show_posicoes",document.show_posicoes,365);
  1611. document.show_last_data = false;
  1612. document.show_total_data = false;
  1613. setCookie("show_last_data",document.show_last_data,365);
  1614. setCookie("show_total_data",document.show_total_data,365);
  1615. if(document.show_scoutskills) $("img.toggle_scoutskills").attr("src","/pics/sort_btn_gray_on.gif");
  1616. else $("img.toggle_scoutskills").attr("src","/pics/sort_btn_gray_off.gif");
  1617. if(document.show_setpieces) $("img.toggle_setpieces").attr("src","/pics/sort_btn_gray_on.gif");
  1618. else $("img.toggle_setpieces").attr("src","/pics/sort_btn_gray_off.gif");
  1619. if(document.show_posicoes) $("img.toggle_posicoes").attr("src","/pics/sort_btn_gray_on.gif");
  1620. else $("img.toggle_posicoes").attr("src","/pics/sort_btn_gray_off.gif");
  1621. if(document.show_last_data) $("img.toggle_last_data").attr("src","/pics/sort_btn_gray_on.gif");
  1622. else $("img.toggle_last_data").attr("src","/pics/sort_btn_gray_off.gif");
  1623. if(document.show_total_data) $("img.toggle_total_data").attr("src","/pics/sort_btn_gray_on.gif");
  1624. else $("img.toggle_total_data").attr("src","/pics/sort_btn_gray_off.gif");
  1625. makeTable();
  1626. }
  1627.  
  1628. document.toggle_posicoes = function() {
  1629. document.show_posicoes = !document.show_posicoes;
  1630. setCookie("show_posicoes",document.show_posicoes,365);
  1631. if(document.show_posicoes) $("img.toggle_posicoes").attr("src","/pics/sort_btn_gray_on.gif");
  1632. else $("img.toggle_posicoes").attr("src","/pics/sort_btn_gray_off.gif");
  1633. document.show_setpieces = false;
  1634. document.show_scoutskills = false;
  1635. document.show_fieldperformance = false;
  1636. setCookie("show_setpieces",document.show_setpieces,365);
  1637. setCookie("show_scoutskills",document.show_scoutskills,365);
  1638. setCookie("show_fieldperformance",document.show_fieldperformance,365);
  1639. document.show_last_data = false;
  1640. document.show_total_data = false;
  1641. setCookie("show_last_data",document.show_last_data,365);
  1642. setCookie("show_total_data",document.show_total_data,365);
  1643. if(document.show_scoutskills) $("img.toggle_scoutskills").attr("src","/pics/sort_btn_gray_on.gif");
  1644. else $("img.toggle_scoutskills").attr("src","/pics/sort_btn_gray_off.gif");
  1645. if(document.show_setpieces) $("img.toggle_setpieces").attr("src","/pics/sort_btn_gray_on.gif");
  1646. else $("img.toggle_setpieces").attr("src","/pics/sort_btn_gray_off.gif");
  1647. if(document.show_fieldperformance) $("img.toggle_fieldperformance").attr("src","/pics/sort_btn_gray_on.gif");
  1648. else $("img.toggle_fieldperformance").attr("src","/pics/sort_btn_gray_off.gif");
  1649. if(document.show_last_data) $("img.toggle_last_data").attr("src","/pics/sort_btn_gray_on.gif");
  1650. else $("img.toggle_last_data").attr("src","/pics/sort_btn_gray_off.gif");
  1651. if(document.show_total_data) $("img.toggle_total_data").attr("src","/pics/sort_btn_gray_on.gif");
  1652. else $("img.toggle_total_data").attr("src","/pics/sort_btn_gray_off.gif");
  1653.  
  1654.  
  1655. makeTable();
  1656. }
  1657.  
  1658. $e("filters").innerHTML = $e("filters").innerHTML + "<div>Super Squad Toogle: ";
  1659.  
  1660.  
  1661. var togscoutskills = new_toogle_button("toggle_scoutskills", "Scout-Skills");
  1662. $e("filters").innerHTML = $e("filters").innerHTML + togscoutskills;
  1663.  
  1664.  
  1665.  
  1666. var togSetPie = new_toogle_button("toggle_setpieces", "Set-Pieces");
  1667. $e("filters").innerHTML = $e("filters").innerHTML + togSetPie;
  1668.  
  1669.  
  1670.  
  1671. var togConvocados = new_toogle_button("toggle_convocados", "On-Squad");
  1672. $e("filters").innerHTML = $e("filters").innerHTML + togConvocados;
  1673.  
  1674. var togPosicoes = new_toogle_button("toggle_posicoes", "Skills in Positions");
  1675. $e("filters").innerHTML = $e("filters").innerHTML + togPosicoes;
  1676.  
  1677. var togFieldperformance = new_toogle_button("toggle_fieldperformance", "Field Play Skills");
  1678. $e("filters").innerHTML = $e("filters").innerHTML + togFieldperformance;
  1679.  
  1680. var toglast_data = new_toogle_button("toggle_last_data", "Season Player Data");
  1681. $e("filters").innerHTML = $e("filters").innerHTML + toglast_data;
  1682.  
  1683. var togtotal_data = new_toogle_button("toggle_total_data", "Total Player Data");
  1684. $e("filters").innerHTML = $e("filters").innerHTML + togtotal_data;
  1685.  
  1686. $e("filters").innerHTML = $e("filters").innerHTML + "</div>";
  1687.  
  1688.  
  1689. //#######ACTUAL FORMATION DETAILS A###################
  1690. var togteamA_det = new_toogle_button("toggle_teamA_det", "(Show Team A formation details - OnRefresh)");
  1691. $e("filters").innerHTML = $e("filters").innerHTML + "<hr><div>Formation details Team-A:"+togteamA_det+"<br>";
  1692. if(document.show_teamA_det){
  1693. $e("filters").innerHTML = $e("filters").innerHTML + "<b>Defensive:</b>";
  1694. $e("filters").innerHTML = $e("filters").innerHTML + "&nbsp;<b>DDi:</b>"+ var_DDi_a +"&nbsp;";
  1695. $e("filters").innerHTML = $e("filters").innerHTML + "<b>DWi:</b>"+ var_DWi_a +"&nbsp;";
  1696. $e("filters").innerHTML = $e("filters").innerHTML + "<b>DSh:</b>"+ var_DSh_a +"&nbsp;";
  1697. $e("filters").innerHTML = $e("filters").innerHTML + "<b>DLB:</b>"+ var_DLB_a +"&nbsp;";
  1698. $e("filters").innerHTML = $e("filters").innerHTML + "<b>DTB:</b>"+ var_DTB_a +"&nbsp;";
  1699. $e("filters").innerHTML = $e("filters").innerHTML + "<br><b>Playing:&nbsp;&nbsp;&nbsp;&nbsp; </b>";
  1700. $e("filters").innerHTML = $e("filters").innerHTML + "&nbsp;<b>PDi:</b>"+ var_PDi_a +"&nbsp;";
  1701. $e("filters").innerHTML = $e("filters").innerHTML + "<b>PWi:</b>"+ var_PWi_a +"&nbsp;";
  1702. $e("filters").innerHTML = $e("filters").innerHTML + "<b>PSh:</b>"+ var_PSh_a +"&nbsp;";
  1703. $e("filters").innerHTML = $e("filters").innerHTML + "<b>PLB:</b>"+ var_PLB_a +"&nbsp;";
  1704. $e("filters").innerHTML = $e("filters").innerHTML + "<b>PTB:</b>"+ var_PTB_a +"&nbsp;";
  1705. $e("filters").innerHTML = $e("filters").innerHTML + "</div>";
  1706. } else {
  1707. $e("filters").innerHTML = $e("filters").innerHTML + "</div>";
  1708. }
  1709.  
  1710. //#######ACTUAL FORMATION DETAILS B###################
  1711. var togteamB_det = new_toogle_button("toggle_teamB_det", "(Show Team B formation details - OnRefresh)");
  1712. $e("filters").innerHTML = $e("filters").innerHTML + "<hr><div>Formation details Team-B:"+togteamB_det +"<br>";
  1713. if(document.show_teamB_det){
  1714. $e("filters").innerHTML = $e("filters").innerHTML + "<b>Defensive:</b>";
  1715. $e("filters").innerHTML = $e("filters").innerHTML + "&nbsp;<b>DDi:</b>"+ var_DDi_b +"&nbsp;";
  1716. $e("filters").innerHTML = $e("filters").innerHTML + "<b>DWi:</b>"+ var_DWi_b +"&nbsp;";
  1717. $e("filters").innerHTML = $e("filters").innerHTML + "<b>DSh:</b>"+ var_DSh_b +"&nbsp;";
  1718. $e("filters").innerHTML = $e("filters").innerHTML + "<b>DLB:</b>"+ var_DLB_b +"&nbsp;";
  1719. $e("filters").innerHTML = $e("filters").innerHTML + "<b>DTB:</b>"+ var_DTB_b +"&nbsp;";
  1720. $e("filters").innerHTML = $e("filters").innerHTML + "<br><b>Playing:&nbsp;&nbsp;&nbsp;&nbsp; </b>";
  1721. $e("filters").innerHTML = $e("filters").innerHTML + "&nbsp;<b>PDi:</b>"+ var_PDi_b +"&nbsp;";
  1722. $e("filters").innerHTML = $e("filters").innerHTML + "<b>PWi:</b>"+ var_PWi_b +"&nbsp;";
  1723. $e("filters").innerHTML = $e("filters").innerHTML + "<b>PSh:</b>"+ var_PSh_b +"&nbsp;";
  1724. $e("filters").innerHTML = $e("filters").innerHTML + "<b>PLB:</b>"+ var_PLB_b +"&nbsp;";
  1725. $e("filters").innerHTML = $e("filters").innerHTML + "<b>PTB:</b>"+ var_PTB_b +"&nbsp;";
  1726. $e("filters").innerHTML = $e("filters").innerHTML + "</div>";
  1727. } else {
  1728. $e("filters").innerHTML = $e("filters").innerHTML + "</div>";
  1729. }
  1730. //$e("filters").innerHTML = $e("filters").innerHTML + stringTeste;
  1731.  
  1732.  
  1733.  
  1734. function new_toogle_button(classButton, textButton){
  1735.  
  1736. return "<span class=\"padding\" style=\"cursor:pointer;\" onclick=\""+classButton+"()\" >&nbsp;&nbsp;&nbsp;&nbsp;"+textButton+"&nbsp;<img src=\"/pics/sort_btn_gray_on.gif\" class=\""+classButton+"\"/></span>";
  1737. }
  1738. $('#select_age_max').attr('disabled', false);
  1739. $('#select_age_min').attr('disabled', false);
  1740. $('#filters').attr('tooltip', '');
  1741. $('#filters').attr('onclick', '#');
  1742. //$('.training_toggle').attr('onclick', 'toggle_training()');
  1743. if(!is_pro){
  1744. $(".training_toggle").click(function(){
  1745. toggle_training();
  1746. });
  1747. }
  1748. function filter_available(i)
  1749. {
  1750. if(!document.show_convocados && players_ar[i]["on_field"]) return false;
  1751. return true;
  1752. }
  1753. /*
  1754. headers_ar = {
  1755. "no" : { "header":"#", "title":"Numero", "style": "border", "width": "30px"},
  1756. "name" : { "header":"Nome", "title":"", "style": "left name", "width": "50px"},
  1757. "fp" : { "header":"Pf", "title":"Posicao Favorita", "style": "position", "width": "56px"},
  1758. "age" : { "header":"Idade", "title":"", "style": "", "width": "30px"},
  1759. "rec" : { "header":"Ava", "title":"Avaliacao", "style": "rec", "width": "100px"},
  1760. "asi" : { "header":"ASI", "title":"ASI", "style": "asi", "width": "82px"},
  1761. "wage" : { "header":"Salary", "title":"Weekly Salary", "style": "asi", "width": "82px"},
  1762. "SK1" : { "header":"SK1", "title":"SK1", "style": "sk", "width": "82px"},
  1763. "SK2" : { "header":"SK2", "title":"SK2", "style": "sk", "width": "82px"},
  1764. "SK1ant" : { "header":"+SK1", "title":"Incresed SK1", "style": "sk", "width": "82px"},
  1765. "SK2ant" : { "header":"+SK2", "title":"Incresed SK2", "style": "sk", "width": "82px"},
  1766. "routine" : { "header":"Rou", "title":"Routine", "style": "sk", "width": "82px"},
  1767. "str" : { "header":"For", "title":"Forca", "style": "skill"},
  1768. "sta" : { "header":"Res", "title":"Resistencia", "style": "skill"},
  1769. "pac" : { "header":"Vel", "title":"Velocidade", "style": "border skill"},
  1770. "mar" : { "header":"Mar", "title":"Marcacao", "style": "skill"},
  1771. "tac" : { "header":"Des", "title":"Desarme", "style": "border skill"},
  1772. "wor" : { "header":"TrE", "title":"Trabalho de Equipa", "style": "skill"},
  1773. "pos" : { "header":"Pos", "title":"Posicionamento", "style": "skill"},
  1774. "pas" : { "header":"Pas", "title":"Passe", "style": "skill"},
  1775. "cro" : { "header":"Cru", "title":"Cruzamentos", "style": "skill"},
  1776. "tec" : { "header":"Tec", "title":"Tecnica", "style": "border skill"},
  1777. "hea" : { "header":"Cab", "title":"Cabeceamento", "style": "skill"},
  1778. "fin" : { "header":"Fin", "title":"Finalizacao", "style": "skill"},
  1779. "lon" : { "header":"RmL", "title":"Remates de Longe", "style": "border skill"},
  1780. "set" : { "header":"BP", "title":"Bolas Paradas", "style": "border skill"},
  1781. "cantos" : { "header":"Cor", "title":"Corner Kicks", "style": "skill"},
  1782. "livres" : { "header":"FrK", "title":"Free Kicks", "style": "skill"},
  1783. "penaltis" : { "header":"Pen", "title":"Penalty Kicks", "style": "skill"},
  1784. "han" : { "header":"Enc", "title":"Encaixe", "style": "skill"},
  1785. "one" : { "header":"Um", "title":"Saidas de Baliza", "style": "skill"},
  1786. "ref" : { "header":"Ref", "title":"Reflexos", "style": "skill"},
  1787. "ari" : { "header":"Aer", "title":"Capacidade A?a", "style": "skill"},
  1788. "jum" : { "header":"Sal", "title":"Salto", "style": "skill"},
  1789. "com" : { "header":"Com", "title":"Comunicacao", "style": "skill"},
  1790. "kic" : { "header":"Pon", "title":"Pontape", "style": "skill"},
  1791. "thr" : { "header":"Rep", "title":"Reposicao", "style": "skill"},
  1792. "ti" : { "header":"Intensidade", "title":"A intensidade com que o jogador treinou com um TI de 10 equivale a um total de 1 ponto ganho em determinada habilidade", "style": "skill"},
  1793. "ti_dif" : { "header":"+/-", "title":"A mudanca na intensidade de treino comparativamente com a semana anterior", "style": "skill"},
  1794. "bteam" : { "header":"", "title":"Promote/Demote", "style": ""}
  1795. }; */
  1796. headers_ar.wage = { "header":"Salary", "title":"Weekly Salary", "style": "asi", "width": "82px"};
  1797. headers_ar.SK1 = { "header":"SK1", "title":"SK1", "style": "skill", "width": "82px"};
  1798. headers_ar.SK2 = { "header":"SK2", "title":"SK2", "style": "skill", "width": "82px"};
  1799. headers_ar.SK1ant = { "header":"+SK1", "title":"Incresed SK1", "style": "sk", "width": "82px"};
  1800. headers_ar.SK2ant = { "header":"+SK2", "title":"Incresed SK2", "style": "sk", "width": "82px"};
  1801. headers_ar.routine = { "header":"Rou", "title":"Routine", "style": "border skill", "width": "82px"};
  1802. headers_ar.cantos = { "header":"Cor", "title":"Corner Kicks", "style": "skill"};
  1803. headers_ar.livres = { "header":"FrK", "title":"Free Kicks", "style": "skill"};
  1804. headers_ar.penaltis = { "header":"Pen", "title":"Penalty Kicks", "style": "border skill"};
  1805. headers_ar.DDi = { "header":"DDir", "title":"Direct - Defending against (0-100%)", "style": "skillspat"};
  1806. headers_ar.DWi = { "header":"DWin", "title":"Wings - Defending against (0-100%)", "style": "skillspat"};
  1807. headers_ar.DSh = { "header":"DSho", "title":"Shortpassing - Defending against (0-100%)", "style": "skillspat"};
  1808. headers_ar.DLB = { "header":"DLoB", "title":"Long Balls - Defending against (0-100%)", "style": "skillspat"};
  1809. headers_ar.DTB = { "header":"DThB", "title":"Through Balls - Defending against (0-100%)", "style": "border skillspat"};
  1810. headers_ar.PDi = { "header":"PDir", "title":"Direct - Playing in (0-100%)", "style": "skillspat"};
  1811. headers_ar.PWi = { "header":"PWin", "title":"Wings - Playing in (0-100%)", "style": "skillspat"};
  1812. headers_ar.PSh = { "header":"PSho", "title":"Shortpassing - Playing in (0-100%)", "style": "skillspat"};
  1813. headers_ar.PLB = { "header":"PLoB", "title":"Long Balls - Playing in (0-100%)", "style": "skillspat"};
  1814. headers_ar.PTB = { "header":"PThB", "title":"Through Balls - Playing in (0-100%)", "style": "border skillspat"};
  1815. headers_ar.growOK = { "header":"Gok", "title":"How good is the skills placement for development!", "style": "skill"};
  1816. headers_ar.growOfGok = { "header":"+Gok", "title":"Increse of Gok in last training!", "style": "sk"};
  1817. headers_ar.potential = { "header":"Pot", "title":"Player Potential. (0-5) [Send Scout]", "style": "skill"};
  1818. headers_ar.charisma = { "header":"Cha", "title":"Player Charisma. (0-20) [Send Scout]", "style": "skill"};
  1819. headers_ar.professionalism = { "header":"Pro", "title":"Player Professionalism. (0-20) [Send Scout OR use PRO]", "style": "skill"};
  1820. headers_ar.aggression = { "header":"Agg", "title":"Player Aggression. (0-20) [Send Scout OR use PRO]", "style": "skill"};
  1821. headers_ar.injury = { "header":"Inj", "title":"Player Injury Capacity. (0-20) [Only using PRO]", "style": "skill"};
  1822. headers_ar.Adp = { "header":"Adp", "title":"Player Adaptability Capacity. (0-20) [Only using PRO]", "style": "skill"};
  1823. headers_ar.captain = { "header":"Cap", "title":"Game Captain. >+[Send Scout]", "style": "skill"};
  1824. headers_ar.potGok = { "header":"PoG", "title":"Player potencial taking in acount Pot&Gok! (0-5) [Send Scout]", "style": "skill"};
  1825. headers_ar.last_games = { "header":"Games", "title":"This season amount of games played", "style": "asi"};
  1826. headers_ar.last_goals = { "header":"Goals", "title":"This season amount of goals scored", "style": "asi"};
  1827. headers_ar.last_goals_per_games = { "header":"Goa/Ga", "title":"This season amount of goals scored per game", "style": "asi"};
  1828. headers_ar.last_conceded = { "header":"Conc", "title":"This season amount of goals conceded", "style": "asi"};
  1829. headers_ar.last_conceded_per_games = { "header":"Con/Ga", "title":"This season amount of goals conceded per game", "style": "asi"};
  1830. headers_ar.last_assists = { "header":"Assists", "title":"This season amount of assists", "style": "asi"};
  1831. headers_ar.last_assists_per_games = { "header":"Ass/Ga", "title":"This season amount of assists per game", "style": "asi"};
  1832. headers_ar.last_cards = { "header":"Cards", "title":"This season amount of cards received", "style": "asi"};
  1833. headers_ar.last_cards_per_games = { "header":"Car/Ga", "title":"This season amount of cards received per game", "style": "asi"};
  1834. headers_ar.last_productivity = { "header":"Prod", "title":"This season productivity", "style": "asi"};
  1835. headers_ar.last_productivity_per_games = { "header":"Pro/Ga", "title":"This season productivity per game", "style": "asi"};
  1836. headers_ar.last_rating_avg = { "header":"Rating", "title":"This season Rating", "style": "asi"};
  1837.  
  1838. headers_ar.total_games = { "header":"Games", "title":"Total amount of games played", "style": "asi"};
  1839. headers_ar.total_goals = { "header":"Goals", "title":"Total amount of goals scored", "style": "asi"};
  1840. headers_ar.total_goals_per_games = { "header":"Goa/Ga", "title":"Total amount of goals scored per game", "style": "asi"};
  1841. headers_ar.total_conceded = { "header":"Conc", "title":"Total amount of goals conceded", "style": "asi"};
  1842. headers_ar.total_conceded_per_games = { "header":"Con/Ga", "title":"Total amount of goals conceded per game", "style": "asi"};
  1843. headers_ar.total_assists = { "header":"Assists", "title":"Total amount of assists", "style": "asi"};
  1844. headers_ar.total_assists_per_games = { "header":"Ass/Ga", "title":"Total amount of assists per game", "style": "asi"};
  1845. headers_ar.total_cards = { "header":"Cards", "title":"Total amount of cards received", "style": "asi"};
  1846. headers_ar.total_cards_per_games = { "header":"Car/Ga", "title":"Total amount of cards received per game", "style": "asi"};
  1847. headers_ar.total_productivity = { "header":"Prod", "title":"Total productivity", "style": "asi"};
  1848. headers_ar.total_productivity_per_games = { "header":"Pro/Ga", "title":"Total productivity per game", "style": "asi"};
  1849. headers_ar.total_rating_avg = { "header":"Rating", "title":"Total Career Rating", "style": "asi"};
  1850. headers_ar.bestSkill = { "header":"B/sk", "title":"Best skill value", "style": "asi"};
  1851. //"last_games","last_conceded","last_conceded_per_games","last_goals","last_goals_per_games","last_assists","last_assists_per_games","last_cards","last_cards_per_games","last_productivity","last_productivity_per_games","last_rating_avg",
  1852. //"total_games","total_conceded","total_conceded_per_games","total_goals","total_goals_per_games","total_assists","total_assists_per_games","total_cards","total_cards_per_games","total_productivity","total_productivity_per_games","total_rating_avg",
  1853. for (var k=0; k< positionNames.length; k++) {
  1854. headers_ar[positionNames[k]]= { "header":positionNames[k], "title":"Skill in " + positionNames[k], "style": "killspat"};
  1855. }
  1856. function addNewStyle(newStyle) {
  1857. var styleElement = document.getElementById('styles_js');
  1858. if (!styleElement) {
  1859. styleElement = document.createElement('style');
  1860. styleElement.type = 'text/css';
  1861. styleElement.id = 'styles_js';
  1862. document.getElementsByTagName('head')[0].appendChild(styleElement);
  1863. }
  1864. styleElement.appendChild(document.createTextNode(newStyle));
  1865. }
  1866.  
  1867. addNewStyle('.name {width:150px !important;}');
  1868. addNewStyle('.rec {width:70px !important;}');
  1869. addNewStyle('.position {width:45px !important;}');
  1870. addNewStyle('.skill {width:19px !important;}');
  1871. addNewStyle('.sk {width:30px !important;}');
  1872. addNewStyle('.asi {width:45px !important;}');
  1873. addNewStyle('.skillspat {width:35px !important;}');
  1874.  
  1875. makeTable = function() {
  1876.  
  1877. if(document.show_teamA_det) $("img.toggle_teamA_det").attr("src","/pics/sort_btn_gray_on.gif");
  1878. else $("img.toggle_teamA_det").attr("src","/pics/sort_btn_gray_off.gif");
  1879. if(document.show_teamB_det) $("img.toggle_teamB_det").attr("src","/pics/sort_btn_gray_on.gif");
  1880. else $("img.toggle_teamB_det").attr("src","/pics/sort_btn_gray_off.gif");
  1881. if(show_training) $("img.training_toggle").attr("src","/pics/sort_btn_gray_on.gif");
  1882. else $("img.training_toggle").attr("src","/pics/sort_btn_gray_off.gif");
  1883. if(document.show_setpieces) $("img.toggle_setpieces").attr("src","/pics/sort_btn_gray_on.gif");
  1884. else $("img.toggle_setpieces").attr("src","/pics/sort_btn_gray_off.gif");
  1885. if(document.show_scoutskills) $("img.toggle_scoutskills").attr("src","/pics/sort_btn_gray_on.gif");
  1886. else $("img.toggle_scoutskills").attr("src","/pics/sort_btn_gray_off.gif");
  1887. if(document.show_convocados) $("img.toggle_convocados").attr("src","/pics/sort_btn_gray_on.gif");
  1888. else $("img.toggle_convocados").attr("src","/pics/sort_btn_gray_off.gif");
  1889. if(document.show_posicoes) $("img.toggle_posicoes").attr("src","/pics/sort_btn_gray_on.gif");
  1890. else $("img.toggle_posicoes").attr("src","/pics/sort_btn_gray_off.gif");
  1891. if(document.show_fieldperformance) $("img.toggle_fieldperformance").attr("src","/pics/sort_btn_gray_on.gif");
  1892. else $("img.toggle_fieldperformance").attr("src","/pics/sort_btn_gray_off.gif");
  1893. if(document.show_last_data) $("img.toggle_last_data").attr("src","/pics/sort_btn_gray_on.gif");
  1894. else $("img.toggle_last_data").attr("src","/pics/sort_btn_gray_off.gif");
  1895. if(document.show_total_data) $("img.toggle_total_data").attr("src","/pics/sort_btn_gray_on.gif");
  1896. else $("img.toggle_total_data").attr("src","/pics/sort_btn_gray_off.gif");
  1897. if(show_training){
  1898. ths = ["no","name","age","fp","str","sta","pac","mar","tac","wor","pos","pas","cro","tec","hea","fin","lon","set","ti","ti_dif","growOK","growOfGok","SK1","SK1ant","SK2","SK2ant","asi","wage","bteam"];
  1899. gk_ths = ["no","name","age","fp","str","sta","pac","han","one","ref","ari","jum","com","kic","thr",,,,"ti","ti_dif","growOK","growOfGok","SK1","SK1ant","SK2","SK2ant","asi","wage","bteam"];
  1900. } else if(document.show_last_data){
  1901. //"last_games","last_conceded","last_conceded_per_games","last_goals","last_goals_per_games","last_assists","last_assists_per_games","last_cards","last_cards_per_games","last_productivity","last_productivity_per_games","last_rating_avg",
  1902. ths = ["no","name","age","fp","last_games","last_conceded","last_conceded_per_games","last_goals","last_goals_per_games","last_assists","last_assists_per_games","last_cards","last_cards_per_games","last_productivity","last_productivity_per_games","last_rating_avg","routine","SK1","SK2","bteam"];
  1903. gk_ths = ["no","name","age","fp","last_games","last_conceded","last_conceded_per_games","last_goals","last_goals_per_games","last_assists","last_assists_per_games","last_cards","last_cards_per_games","last_productivity","last_productivity_per_games","last_rating_avg","routine","SK1","SK2","bteam"];
  1904.  
  1905. } else if(document.show_total_data){
  1906. //"total_games","total_conceded","total_conceded_per_games","total_goals","total_goals_per_games","total_assists","total_assists_per_games","total_cards","total_cards_per_games","total_productivity","total_productivity_per_games","total_rating_avg",
  1907. ths = ["no","name","age","fp","total_games","total_conceded","total_conceded_per_games","total_goals","total_goals_per_games","total_assists","total_assists_per_games","total_cards","total_cards_per_games","total_productivity","total_productivity_per_games","total_rating_avg","routine","SK1","SK2","bteam"];
  1908. gk_ths = ["no","name","age","fp","total_games","total_conceded","total_conceded_per_games","total_goals","total_goals_per_games","total_assists","total_assists_per_games","total_cards","total_cards_per_games","total_productivity","total_productivity_per_games","total_rating_avg","routine","SK1","SK2","bteam"];
  1909. } else if(document.show_posicoes){
  1910. ths = ["no","name","age","fp","D C", "D L", "D R", "DM C", "DM L", "DM R", "M C", "M L", "M R", "OM C", "OM L", "OM R", "F","bestSkill","asi","rec","bteam"];
  1911. gk_ths = ["no","name","age","fp",, , , , , , , , , , , , , "GK","asi","rec","bteam"];
  1912.  
  1913. } else if(document.show_fieldperformance){
  1914. ths = ["no","name","age","fp","DDi","DWi","DSh","DLB","DTB","PDi","PWi","PSh","PLB","PTB","routine","SK1","SK2","asi","rec","bteam"];
  1915. gk_ths = ["no","name","age","fp",,,,,,,,,,,"routine","SK1","SK2","asi","rec","bteam"];
  1916. }else {
  1917. if(!document.show_setpieces){
  1918. if(document.show_scoutskills){
  1919. ths = ["no","name","age","fp","str","sta","pac","mar","tac","wor","pos","pas","cro","tec","hea","fin","lon","set","potential","Adp","injury","charisma","professionalism","aggression","routine","captain","growOK","potGok","SK1","SK2","bteam"]; //,"wage" |||||
  1920. gk_ths = ["no","name","age","fp","str","sta","pac","han","one","ref","ari","jum","com","kic","thr",,,,"potential","Adp","injury","charisma","professionalism","aggression","routine","captain","growOK","potGok","SK1","SK2","bteam"]; //,"wage"|||||
  1921. } else {
  1922. ths = ["no","name","age","fp","str","sta","pac","mar","tac","wor","pos","pas","cro","tec","hea","fin","lon","set","routine","growOK","SK1","SK2","wage","asi","rec","bteam"]; // |||||
  1923. gk_ths = ["no","name","age","fp","str","sta","pac","han","one","ref","ari","jum","com","kic","thr",,,,"routine","growOK","SK1","SK2","wage","asi","rec","bteam"]; //|||||
  1924. }
  1925. } else {
  1926. if(document.show_scoutskills){
  1927. ths = ["no","name","age","fp","str","sta","pac","mar","tac","wor","pos","pas","cro","tec","hea","fin","lon","set","cantos","livres","penaltis","potential","Adp","injury","charisma","professionalism","aggression","routine","captain","growOK","potGok","SK1","SK2","bteam"]; //,"wage","rec","asi"|||||
  1928. gk_ths = ["no","name","age","fp","str","sta","pac","han","one","ref","ari","jum","com","kic","thr",,,,,,,"potential","Adp","injury","charisma","professionalism","aggression","routine","captain","growOK","potGok","SK1","SK2","bteam"]; //,"wage","rec","asi"|||||
  1929. }else{
  1930. ths = ["no","name","age","fp","str","sta","pac","mar","tac","wor","pos","pas","cro","tec","hea","fin","lon","set","cantos","livres","penaltis","routine","growOK","SK1","SK2","asi","rec","bteam"]; //,"wage","rec","asi"|||||
  1931. gk_ths = ["no","name","age","fp","str","sta","pac","han","one","ref","ari","jum","com","kic","thr",,,,,,,"routine","growOK","SK1","SK2","asi","rec","bteam"]; //,"wage","rec","asi"|||||
  1932. }
  1933. }
  1934. }
  1935. //SESSION["is_pro"] = 1;
  1936. //,"DDi", "DWi", "DSh", "DLB", "DTB"
  1937. myTable = document.createElement('table');
  1938. myTable.className = "hover zebra";
  1939.  
  1940. construct_th();
  1941. var z=0;
  1942. var player_count = 0;
  1943. for (i=0; i<players_ar.length; i++) {
  1944. if (players_ar[i]["fp"] != "GK" && add_me(players_ar[i]) && filter_squads() && filter_available(i)) {
  1945. construct_tr(players_ar[i], z);
  1946. z++;
  1947. player_count++;
  1948. }
  1949. }
  1950. if (z == 0) {
  1951. var myRow = myTable.insertRow(-1);
  1952. var myCell = myRow.insertCell(-1);
  1953. myCell.colSpan = 24;
  1954. // myCell.innerHTML = other_header;
  1955. $(myCell).addClass("bold").css("padding","10px");
  1956. }
  1957. if (filters_ar[1] == 1) {
  1958. var myRow = myTable.insertRow(-1);
  1959. var myCell = myRow.insertCell(-1);
  1960. myCell.className = "splitter";
  1961. myCell.colSpan = "50";
  1962. myCell.innerHTML = gk_header;
  1963. construct_th(true);
  1964. z=0;
  1965. for (i=0; i<players_ar.length; i++) {
  1966. if (players_ar[i]["fp"] == "GK" && filter_squads() && filter_available(i)) {
  1967. if (!(players_ar[i]["age"] < age_min || players_ar[i]["age"] > age_max)) {
  1968. construct_tr(players_ar[i], z, true);
  1969. z++;
  1970. }
  1971. }
  1972. }
  1973. }
  1974. var $player_count = $("#player_count");
  1975. if($player_count.length ==0) $player_count = $("<span/>").attr("id","player_count").addClass("float_right").prependTo("#filters");
  1976. $player_count.text(pc_replace(pagecontent[116],{"[number]":player_count}));
  1977.  
  1978. $e("sq").innerHTML = "";
  1979. $e("sq").appendChild(myTable);
  1980.  
  1981. activate_player_links($(myTable).find("[player_link]"));
  1982. init_tooltip_by_elems($(myTable).find("[tooltip]"))
  1983.  
  1984.  
  1985. //###########################################################################################################
  1986. //###########################################################################################################
  1987. //###########################################################################################################
  1988. zebra();
  1989.  
  1990. };
  1991. }
  1992.  
  1993. var inject = document.createElement("script");
  1994.  
  1995. inject.setAttribute("type", "text/javascript");
  1996. inject.appendChild(document.createTextNode("(" + embed + ")()"));
  1997.  
  1998. document.body.appendChild(inject);
  1999.  
  2000. $(document).ready(function(){
  2001. sort_it("no");
  2002. make_radio("main_squad");
  2003. });
  2004.  
  2005. var load,execute,loadAndExecute;load=function(a,b,c){var d;d=document.createElement("script"),d.setAttribute("src",a),b!=null&&d.addEventListener("load",b),c!=null&&d.addEventListener("error",c),document.body.appendChild(d);return d},execute=function(a){var b,c;typeof a=="function"?b="("+a+")();":b=a,c=document.createElement("script"),c.textContent=b,document.body.appendChild(c);return c},loadAndExecute=function(a,b){return load(a,function(){return execute(b)})};
  2006.  
  2007. loadAndExecute("//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js", function() {
  2008.  
  2009. $.noConflict();
  2010. jQuery(document).ready(function($) {
  2011. $('table.zebra th:eq(1)').click();
  2012. });
  2013. });
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址