﻿/*============================================================================	Auteur : Frédéric Scholer - intégrateur et développeur Web (frederic.scholer@gmail.com)	Version 2011/2012 : pour 8 équipes Messieurs (dont une brûlée) et des tableaux de 6 colonnes============================================================================*/var aData = ["19:15", "02-01-4", "166350", "6-10", "Castors A - Biermonfoy A","19:00", "05-01-3", "166745", "6-10", "Ourthoise B - Biermonfoy B","19:15", "04-01-4", "166614", "10-6", "Biermonfoy C - V. Ste Gertrude C","19:15", "11-01-4", "167538", "12-4", "Marche A - Biermonfoy D","19:15", "10-01-4", "167406", "5-11", "Biermonfoy E - Sainlez B","19:15", "18-01-1", "168459", "12-4", "Longchamps D - Biermonfoy F","-", "19-01-3", "170309", "0-0", "Biermonfoy G - Libramont E","-", "27-01-1", "195177", "0-0", "Biermonfoy H - Bye","19:15", "02-02-6", "166358", "10-6", "Biermonfoy A - Athus A","19:15", "05-02-5", "166753", "9-7", "Biermonfoy B - On C","19:00", "04-02-2", "166618", "11-5", "Chêne al'Pierre B - Biermonfoy C","19:15", "11-02-6", "167546", "5-11", "Biermonfoy D - Aye G","19:00", "10-02-2", "167410", "12-4", "Sibret B - Biermonfoy E","19:15", "18-02-1", "168465", "8-8", "Biermonfoy F - Wellin F","-", "19-02-3", "170315", "0-0", "Saint Hubert A - Biermonfoy G","-", "27-02-5", "195187", "0-0", "Ourthoise F - Biermonfoy H","19:15", "02-03-3", "166361", "8-8", "Tillet A - Biermonfoy A","19:15", "05-03-6", "166760", "5-11", "Wellin A - Biermonfoy B","19:15", "04-03-2", "166624", "3-13", "Biermonfoy C - Melreux B","15:30", "11-03-3", "167549", "7-9", "Tenneville G - Biermonfoy D","19:15", "10-03-2", "167416", "2-14", "Biermonfoy E - Melreux C","19:15", "18-03-1", "168471", "15-1", "Marloie D - Biermonfoy F","-", "19-03-1", "170319", "0-0", "Biermonfoy G - On F","19:15", "27-03-4", "195192", "4-12", "Biermonfoy H - Saint Hubert B","19:15", "02-04-2", "166366", "5-11", "Bouillon B - Biermonfoy A","19:15", "05-04-2", "166762", "11-5", "Biermonfoy B - Vilval A","19:15", "04-04-4", "166632", "4-12", "Biermonfoy C - Sibret A","19:00", "11-04-2", "167554", "13-3", "Devantave A - Biermonfoy D","19:15", "10-04-4", "167424", "8-8", "Biermonfoy E - Bourcy A","-", "18-04-1", "168477", "0-0", "Biermonfoy F - Bye","-", "19-04-6", "170330", "0-0", "Wellin E - Biermonfoy G","13:00", "27-04-5", "195199", "10-6", "Aye J - Biermonfoy H","19:15", "02-05-3", "166373", "9-7", "Biermonfoy A - Neufchâteau B","19:00", "05-05-2", "166768", "4-12", "Dinez D - Biermonfoy B","19:15", "04-05-4", "166638", "12-4", "Joubieval C - Biermonfoy C","19:15", "11-05-3", "167561", "7-9", "Biermonfoy D - Lomme D","19:00", "10-05-4", "167430", "2-14", "Lomme E - Biermonfoy E","15:30", "18-05-1", "168483", "8-8", "Bastogne C - Biermonfoy F","-", "19-05-4", "170334", "0-0", "Biermonfoy G - Marche B","19:15", "27-05-6", "195206", "5-11", "Biermonfoy H - Wellin I","19:00", "02-06-1", "166377", "0-16", "Virton C - Biermonfoy A","19:15", "05-06-3", "166775", "13-3", "Biermonfoy B - Lomme C","19:15", "04-06-4", "166644", "2-14", "Biermonfoy C - On B","19:00", "11-06-1", "167565", "3-13", "On E - Biermonfoy D","19:15", "10-06-4", "167436", "7-9", "Biermonfoy E - Longchamps C","19:15", "18-06-1", "168489", "2-14", "Biermonfoy F - Lomme H","-", "19-06-5", "170341", "0-0", "Lomme F - Biermonfoy G","15:30", "27-06-4", "195210", "0-16", "Lomme K - Biermonfoy H","19:15", "02-07-2", "166384", "15-1", "Biermonfoy A - Tenneville C","19:00", "05-07-3", "166781", "7-9", "Libramont B - Biermonfoy B","19:00", "04-07-4", "166650", "11-5", "Gouvy A - Biermonfoy C","19:15", "11-07-2", "167572", "11-5", "Biermonfoy D - Ambly B","19:15", "10-07-4", "167442", "3-13", "Wellin D - Biermonfoy E","15:30", "18-07-1", "168495", "3-13", "Lomme J - Biermonfoy F","-", "19-07-6", "170348", "0-0", "Biermonfoy G - Aye I","19:15", "27-07-5", "195217", "16-0", "Biermonfoy H - Aye K","19:15", "02-08-3", "166391", "11-5", "Biermonfoy A - Jamoigne B","19:15", "05-08-1", "166785", "5-11", "Longchamps B - Biermonfoy B","19:00", "04-08-4", "166656", "10-6", "Aye C - Biermonfoy C","19:15", "11-08-3", "167579", "5-11", "Biermonfoy D - Lamouline B","19:00", "10-08-4", "167448", "13-3", "Aye F - Biermonfoy E","19:15", "18-08-1", "168501", "7-9", "Biermonfoy F - Marloie E","-", "19-08-6", "170354", "0-0", "Biermonfoy G - Les Fosses D","15:30", "27-08-6", "195224", "6-10", "Marloie G - Biermonfoy H","19:15", "02-09-4", "166398", "16-0", "Les Fosses A - Biermonfoy A","19:15", "05-09-3", "166793", "14-2", "Biermonfoy B - Aye D","19:15", "04-09-1", "166659", "7-9", "Biermonfoy C - Longchamps A","19:15", "11-09-4", "167586", "15-1", "Beausaint A - Biermonfoy D","19:15", "10-09-1", "167451", "5-11", "Biermonfoy E - On D","15:30", "18-09-1", "168507", "7-9", "Marche D - Biermonfoy F","-", "19-09-6", "170360", "0-0", "Lomme I - Biermonfoy G","19:15", "27-09-4", "195228", "12-4", "Biermonfoy H - Castors H","19:15", "02-10-4", "166404", "11-5", "Marloie A - Biermonfoy A","19:15", "05-10-3", "166799", "4-12", "Tillet B - Biermonfoy B","19:15", "04-10-2", "166666", "12-4", "Biermonfoy C - Dinez E","19:15", "11-10-4", "167592", "16-0", "Marloie B - Biermonfoy D","19:15", "10-10-2", "167458", "1-15", "Biermonfoy E - Ambly A","15:30", "18-10-1", "168513", "12-4", "Aye H - Biermonfoy F","-", "19-10-4", "170364", "0-0", "Biermonfoy G - Tillet E","-", "27-10-5", "195235", "0-0", "Biermonfoy H - Bye","19:15", "02-11-6", "166412", "9-7", "Biermonfoy A - Dinez B","19:15", "05-11-1", "166803", "11-4", "Biermonfoy B - Tenneville D","19:00", "04-11-1", "166671", "7-9", "Lomme B - Biermonfoy C","19:15", "11-11-6", "167600", "6-10", "Biermonfoy D - Wellin C","19:15", "10-11-1", "167463", "13-3", "Marloie C - Biermonfoy E","19:15", "18-11-3", "168521", "10-6", "Biermonfoy F - Bourcy C","-", "19-11-5", "170371", "0-0", "Tenneville H - Biermonfoy G","15:30", "27-11-4", "195240", "7-9", "Melreux E - Biermonfoy H","19:15", "02-12-4", "166416", "9-7", "Biermonfoy A - Castors A","19:15", "05-12-3", "166811", "9-7", "Biermonfoy B - Ourthoise B","19:00", "04-12-4", "166680", "1-15", "V. Ste Gertrude C - Biermonfoy C","19:15", "11-12-4", "167604", "4-12", "Biermonfoy D - Marche A","19:15", "10-12-4", "167472", "11-5", "Sainlez B - Biermonfoy E","19:15", "18-12-1", "168525", "2-14", "Biermonfoy F - Longchamps D","-", "19-12-3", "170375", "0-0", "Libramont E - Biermonfoy G","-", "27-12-1", "195243", "0-0", "Bye - Biermonfoy H","19:15", "02-13-6", "166424", "7-9", "Athus A - Biermonfoy A","19:00", "05-13-5", "166819", "4-12", "On C - Biermonfoy B","19:15", "04-13-2", "166684", "7-9", "Biermonfoy C - Chêne al'Pierre B","15:30", "11-13-6", "167612", "11-5", "Aye G - Biermonfoy D","19:15", "10-13-2", "167476", "4-12", "Biermonfoy E - Sibret B","19:15", "18-13-1", "168531", "8-8", "Wellin F - Biermonfoy F","-", "19-13-3", "170381", "0-0", "Biermonfoy G - Saint Hubert A","19:15", "27-13-5", "195253", "0-0", "Biermonfoy H - Ourthoise F","19:15", "02-14-3", "166427", "13-3", "Biermonfoy A - Tillet A","19:15", "05-14-6", "166826", "8-8", "Biermonfoy B - Wellin A","19:00", "04-14-2", "166690", "13-3", "Melreux B - Biermonfoy C","19:15", "11-14-3", "167615", "6-10", "Biermonfoy D - Tenneville G","19:00", "10-14-2", "167482", "16-0", "Melreux C - Biermonfoy E","19:15", "18-14-1", "168537", "5-11", "Biermonfoy F - Marloie D","-", "19-14-1", "170385", "0-0", "On F - Biermonfoy G","19:15", "27-14-4", "195258", "15-1", "Saint Hubert B - Biermonfoy H","19:15", "02-15-2", "166432", "11-5", "Biermonfoy A - Bouillon B","19:00", "05-15-2", "166828", "4-12", "Vilval A - Biermonfoy B","19:00", "04-15-4", "166698", "10-6", "Sibret A - Biermonfoy C","19:15", "11-15-2", "167620", "5-11", "Biermonfoy D - Devantave A","19:00", "10-15-4", "167490", "6-10", "Bourcy A - Biermonfoy E","-", "18-15-1", "168543", "0-0", "Bye - Biermonfoy F","-", "19-15-6", "170396", "0-0", "Biermonfoy G - Wellin E","19:15", "27-15-5", "195265", "11-5", "Biermonfoy H - Aye J","19:00", "02-16-3", "166439", "9-7", "Neufchâteau B - Biermonfoy A","19:15", "05-16-2", "166834", "16-0", "Biermonfoy B - Dinez D","19:15", "04-16-4", "166704", "0-16", "Biermonfoy C - Joubieval C","19:00", "11-16-3", "167627", "6-10", "Lomme D - Biermonfoy D","19:15", "10-16-4", "167496", "13-3", "Biermonfoy E - Lomme E","19:15", "18-16-1", "168549", "11-5", "Biermonfoy F - Bastogne C","-", "19-16-4", "170400", "0-0", "Marche B - Biermonfoy G","15:30", "27-16-6", "195272", "8-8", "Wellin I - Biermonfoy H","19:15", "02-17-1", "166443", "-", "Biermonfoy A - Virton C","19:00", "05-17-3", "166841", "-", "Lomme C - Biermonfoy B","19:00", "04-17-4", "166710", "-", "On B - Biermonfoy C","19:15", "11-17-1", "167631", "-", "Biermonfoy D - On E","19:15", "10-17-4", "167502", "-", "Longchamps C - Biermonfoy E","15:30", "18-17-1", "168555", "-", "Lomme H - Biermonfoy F","-", "19-17-5", "170407", "0-0", "Biermonfoy G - Lomme F","19:15", "27-17-4", "195276", "-", "Biermonfoy H - Lomme K","19:15", "02-18-2", "166450", "-", "Tenneville C - Biermonfoy A","19:15", "05-18-3", "166847", "-", "Biermonfoy B - Libramont B","19:15", "04-18-4", "166716", "-", "Biermonfoy C - Gouvy A","19:00", "11-18-2", "167638", "-", "Ambly B - Biermonfoy D","19:15", "10-18-4", "167508", "-", "Biermonfoy E - Wellin D","19:15", "18-18-1", "168561", "-", "Biermonfoy F - Lomme J","-", "19-18-6", "170414", "0-0", "Aye I - Biermonfoy G","13:00", "27-18-5", "195283", "-", "Aye K - Biermonfoy H","19:15", "02-19-3", "166457", "-", "Jamoigne B - Biermonfoy A","19:15", "05-19-1", "166851", "-", "Biermonfoy B - Longchamps B","19:15", "04-19-4", "166722", "-", "Biermonfoy C - Aye C","19:15", "11-19-3", "167645", "-", "Lamouline B - Biermonfoy D","19:15", "10-19-4", "167514", "-", "Biermonfoy E - Aye F","19:15", "18-19-1", "168567", "-", "Marloie E - Biermonfoy F","-", "19-19-6", "170420", "0-0", "Les Fosses D - Biermonfoy G","19:15", "27-19-6", "195290", "-", "Biermonfoy H - Marloie G","19:15", "02-20-4", "166464", "-", "Biermonfoy A - Les Fosses A","19:00", "05-20-3", "166859", "-", "Aye D - Biermonfoy B","19:15", "04-20-1", "166725", "-", "Longchamps A - Biermonfoy C","19:15", "11-20-4", "167652", "-", "Biermonfoy D - Beausaint A","19:00", "10-20-1", "167517", "-", "On D - Biermonfoy E","19:15", "18-20-1", "168573", "-", "Biermonfoy F - Marche D","-", "19-20-6", "170426", "0-0", "Biermonfoy G - Lomme I","15:30", "27-20-4", "195294", "-", "Castors H - Biermonfoy H","19:15", "02-21-4", "166470", "-", "Biermonfoy A - Marloie A","19:15", "05-21-3", "166865", "-", "Biermonfoy B - Tillet B","19:00", "04-21-2", "166732", "-", "Dinez E - Biermonfoy C","19:15", "11-21-4", "167658", "-", "Biermonfoy D - Marloie B","19:00", "10-21-2", "167524", "-", "Ambly A - Biermonfoy E","19:15", "18-21-1", "168579", "-", "Biermonfoy F - Aye H","-", "19-21-4", "170430", "0-0", "Tillet E - Biermonfoy G","-", "27-21-5", "195301", "0-0", "Bye - Biermonfoy H","19:00", "02-22-6", "166478", "-", "Dinez B - Biermonfoy A","19:00", "05-22-1", "166869", "-", "Tenneville D - Biermonfoy B","19:15", "04-22-1", "166737", "-", "Biermonfoy C - Lomme B","19:15", "11-22-6", "167666", "-", "Wellin C - Biermonfoy D","19:15", "10-22-1", "167529", "-", "Biermonfoy E - Marloie C","15:30", "18-22-3", "168587", "-", "Bourcy C - Biermonfoy F","-", "19-22-5", "170437", "0-0", "Biermonfoy G - Tenneville H","19:15", "27-22-4", "195306", "-", "Biermonfoy H - Melreux E"]/*-----------------------------------------------------------------------	Conversions HTML et initialisation des events-------------------------------------------------------------------------*/jQuery(document).ready(function($) {var i, w, week;	for (i=0; i<aData.length; i++) {		aData[i] = aData[i].replace("é","&eacute;");		aData[i] = aData[i].replace("â","&acirc;");		aData[i] = aData[i].replace("ê","&ecirc;");		if (i%5 != 1)  aData[i] = aData[i].replace("-","&ndash;");		if (i%5 == 3) aData[i] = aData[i].replace("&ndash;"," &ndash; ");	}	var wtds = $('#weeks td');	for (w=0; w<wtds.length; w++) {		wtds[w].onclick = moveCursor;		if (wtds[w].className=='current') week = w + 1;	}	refreshData(week);/*-----------------------------------------------------------------------	Déplacement du "curseur"-------------------------------------------------------------------------*/	function moveCursor(e) {var i, choice;		if (!e) var e = window.event;		if (e.target) choice = e.target;		else if (e.srcElement) choice = e.srcElement;		var week = choice.firstChild.data;		for (i=0; i<wtds.length; i++) {			if (i+1!=week) wtds[i].className = 'ghost';			else					 wtds[i].className = 'current';		}		refreshData(week);		return false;	}/*-----------------------------------------------------------------------	Mise à jour des données-------------------------------------------------------------------------*/	function refreshData(week) {var i;		var series = [2156, 2159, 2158, 2172, 2171, 2200, 2202, 2213];		var sH3 = 'http://affrbtt-asbl.be/listings/res_championnat_par_division.php?';		var sH4 = '<a target="_blank" title="Feuille de match Biermonfoy" '					  + 'href="http://affrbtt-asbl.be/listings/res_lf_par_division_affiche.php?IC=';		var sH5 = 'http://affrbtt-asbl.be/listings/res_lf_par_division.php?';		var itds = $('#interclubs td');		var t = 8; // nombre d'équipes		var c = 6; // nombre de colonnes		var v = 5; // nombre de valeurs par ligne de la matrice de données		var x = (week-1)* t * v; // x = le pointeur		for (i=0; i<t; i++) {var temp;			itds[i*c].innerHTML = aData[x+i*v];			itds[i*c+1].innerHTML = aData[x+i*v+4];			itds[i*c+2].innerHTML = aData[x+i*v+3];			temp = 'INDICES=' + series[i] + '&JOURNEE=' + week;			itds[i*c+3].getElementsByTagName('a')[0].href = sH3 + temp;			itds[i*c+4].innerHTML = sH4 + aData[x+i*v+2] + '">' + aData[x+i*v+1] + '</a>';			itds[i*c+5].getElementsByTagName('a')[0].href = sH5 + temp;		}	}} );
