var concours_form = function()
{
	var id, left, top, width, height, back, cat, titre, regle;
	var isPlaying;
	var contained;
	var formConcoursXHR;
	var formClassXHR;
	
	var nbTable;
	var classe = new Array();
	var concours = new Array();
	var concours_prev = new Array();
	var formContained;
	var currentConcours;
	var lastConcours;
	var regleConcours;
	var buttonContained;
	var returnButton;
	var table = null;
	var me = null;
	var titleTxt = null;
	
	var concours_id = 0;
	var position = 0;
	var currentPage = 1;
	var currentPageOnTable = 0;
	var currentTable = 0;
	
	var isConcLoading = false;
	var isClassLoading = false;
	
	var tablesDiv = null;
	
	this.start = function( node )
	{
		isPlaying = false;
		
		formConcoursXHR = initXHR();
		formClassXHR = initXHR();
		me = this;
		
		id = node.getAttribute('id');
		left = parseInt(node.getAttribute('left'));
		top = parseInt(node.getAttribute('top'));
		width = parseInt(node.getAttribute('width'));
		height = parseInt(node.getAttribute('height'));
		back = node.getAttribute('back');
		cat = node.getAttribute('cat');
		titre = node.getAttribute('titre');
		regle = node.getAttribute('regle');
		
		isConcLoading = true;
		ajaxRequest( "././php/getConcours.php", formConcoursXHR, this.loadingConcoursDone, "cat=" + cat );
	}
	
	this.loadingConcoursDone = function( result )
	{
		isConcLoading = false;
		if( trackSqlError( result ) )
		{
			if( result != "0" )
			{
				var lines = result.split( '&' );
				
				var values = lines[1].split('|');
				if( values.length == 23 )
				{
					concours_id = values[0];
					var toAdd = 1;
					while( toAdd < 23 )
					{
						concours.push(values[toAdd]);
						toAdd++
					}
				}
				
				var values_prev = lines[2].split('|');
				if( values_prev.length == 17 )
				{
					var toAdd = 0;
					while( toAdd < 17 )
					{
						concours_prev.push(values_prev[toAdd]);
						toAdd++
					}
				}
			}
		}
		
		if( concours_id != 0 )
		{
			isClassLoading = true;
			ajaxRequest( "././php/getClassement.php", formClassXHR, me.loadingClassementDone, "id=" + concours_id );
		}
		else
		{
			if( back != "" )
			{
				var preload = new Image();
				preload.onload = makeNextObject;
				preload.src = back;
			}
			else makeNextObject();
		}
	}
	
	this.loadingClassementDone = function( result )
	{
		isClassLoading = false;
		if( trackSqlError( result ) )
		{
			if( result != "0" )
			{
				var lines = result.split( '&' );
				
				var nbT = parseInt(lines[0]);
				nbTable = parseInt( nbT / 10 );
				if( nbT > nbTable * 10 )
					nbTable++;
				
				position = lines[1];
				
				for( var i = 2; i < lines.length; i++ )
				{
					var values = lines[i].split('|');
					if( values.length == 2 )
					{
						var newLine = new Array(2);
						newLine[0] = values[0];
						newLine[1] = values[1];
						classe.push( newLine );
					}
				}
			}
		}
		
		// First time
		if( !isPlaying )
		{
			if( back != "" )
			{
				var preload = new Image();
				preload.onload = makeNextObject;
				preload.src = back;
			}
			else makeNextObject();
		}
		else
			me.fillTable();	// Refresh
	}
	
	this.fillTable = function()
	{
		if( table != null )
		{
			removeAllNodes( table, true );
			table = null;
		}
		
		var widthRef = width - 60;
		
		table = document.createElement("table");
		table.style.position = "absolute";
		table.style.borderColor = "#0D5F05";
		table.style.borderStyle = "solid";
		table.style.borderWidth = "2px";
		table.width = widthRef;
		
		var tbody = document.createElement('tbody');
		table.appendChild(tbody);
		
		var row = document.createElement("tr");
		var cell1 = document.createElement("td");
		cell1.style.width = "220px";
		cell1.style.borderStyle = "solid";
		cell1.style.borderWidth = "2px";
		var celltxt1 = document.createTextNode("Joueur");
		var cell2 = document.createElement("td");
		cell2.style.width = "160px";
		cell2.style.borderStyle = "solid";
		cell2.style.borderWidth = "2px";
		var celltxt2 = document.createTextNode("Points");
		var cell3 = document.createElement("td");
		cell3.style.width = (widthRef - 480) + "0px";
		cell3.style.borderStyle = "solid";
		cell3.style.borderWidth = "2px";
		var celltxt3 = document.createTextNode("Gains potentiels");
		
		cell1.appendChild(celltxt1);
		row.appendChild(cell1);
		cell2.appendChild(celltxt2);
		row.appendChild(cell2);
		cell3.appendChild(celltxt3);
		row.appendChild(cell3);
		tbody.appendChild(row);
		
		var i = 0;
		while( i < classe.length )
		{
			var curRow = document.createElement("tr");
			var curCell1 = document.createElement("td");
			curCell1.style.borderStyle = "solid";
			curCell1.style.borderWidth = "1px";
			var curCell1txt1 = document.createTextNode(classe[i][0]);
			var curCell2 = document.createElement("td");
			curCell2.style.borderStyle = "solid";
			curCell2.style.borderWidth = "1px";
			curCell2.style.textAlign = "center";
			var curCelltxt2 = document.createTextNode(classe[i][1]);
			var curCelltxt3 = null;
			if( currentPage == 1 && i < 5 )
				curCelltxt3 = document.createTextNode(concours[i*4+2]);
			else
				curCelltxt3 = document.createTextNode("");
			var curCell3 = document.createElement("td");
			curCell3.style.borderStyle = "solid";
			curCell3.style.borderWidth = "1px";
			
			if( position == ((currentPage - 1) * 10 + i + 1) )
			{
				curCell1.style.fontWeight = "bold";
				curCell2.style.fontWeight = "bold";
				curCell3.style.fontWeight = "bold";
			}
			else
			{
				curCell1.style.fontWeight = "normal";
				curCell2.style.fontWeight = "normal";
				curCell3.style.fontWeight = "normal";
			}
			
			curCell1.appendChild(curCell1txt1);
			curRow.appendChild(curCell1);
			curCell2.appendChild(curCelltxt2);
			curRow.appendChild(curCell2);
			curCell3.appendChild(curCelltxt3);
			curRow.appendChild(curCell3);
			tbody.appendChild(curRow);
		
			i++;
		}
		
		currentConcours.appendChild(table);
	}
	
	this.fillTablePrev = function()
	{
		var widthRef = width - 60;
		
		var table_last = document.createElement("table");
		table_last.style.position = "absolute";
		table_last.style.top = "60px";
		table_last.style.borderColor = "#0D5F05";
		table_last.style.borderStyle = "solid";
		table_last.style.borderWidth = "2px";
		table_last.width = widthRef;
		
		var tbody = document.createElement('tbody');
		table_last.appendChild(tbody);
		
		var row = document.createElement("tr");
		var cell1 = document.createElement("td");
		cell1.style.width = "220px";
		cell1.style.borderStyle = "solid";
		cell1.style.borderWidth = "2px";
		var celltxt1 = document.createTextNode("Joueur");
		var cell2 = document.createElement("td");
		cell2.style.width = "160px";
		cell2.style.borderStyle = "solid";
		cell2.style.borderWidth = "2px";
		var celltxt2 = document.createTextNode("Points");
		var cell3 = document.createElement("td");
		cell3.style.width = (widthRef - 480) + "0px";
		cell3.style.borderStyle = "solid";
		cell3.style.borderWidth = "2px";
		var celltxt3 = document.createTextNode("Gains");
		
		cell1.appendChild(celltxt1);
		row.appendChild(cell1);
		cell2.appendChild(celltxt2);
		row.appendChild(cell2);
		cell3.appendChild(celltxt3);
		row.appendChild(cell3);
		tbody.appendChild(row);
		
		var i = 2;
		while( i < concours_prev.length )
		{
			var curRow = document.createElement("tr");
			var curCell1 = document.createElement("td");
			curCell1.style.borderStyle = "solid";
			curCell1.style.borderWidth = "1px";
			curCell1.style.fontWeight = "normal";
			var curCell1txt1 = document.createTextNode(concours_prev[i+1]);
			var curCell2 = document.createElement("td");
			curCell2.style.borderStyle = "solid";
			curCell2.style.borderWidth = "1px";
			curCell2.style.fontWeight = "normal";
			curCell2.style.textAlign = "center";
			var curCelltxt2 = document.createTextNode(concours_prev[i+2]);
			var curCelltxt3 = null;
			curCelltxt3 = document.createTextNode(concours_prev[i]);
			var curCell3 = document.createElement("td");
			curCell3.style.borderStyle = "solid";
			curCell3.style.borderWidth = "1px";
			curCell3.style.fontWeight = "normal";
			
			curCell1.appendChild(curCell1txt1);
			curRow.appendChild(curCell1);
			curCell2.appendChild(curCelltxt2);
			curRow.appendChild(curCell2);
			curCell3.appendChild(curCelltxt3);
			curRow.appendChild(curCell3);
			tbody.appendChild(curRow);
		
			i+=3;
		}
		
		lastConcours.appendChild(table_last);
	}

	this.play = function( parent )
	{	
		if( isPlaying == false )
		{
			contained = document.createElement("div");

			contained.setAttribute("id", id);

			contained.style.top = top + "px";
			contained.style.left = left + "px";
			contained.style.width = width + "px";
			contained.style.height = height + "px";
			contained.style.position = "absolute";
			contained.style.background = "url('" + back + "')";
			contained.style.backgroundRepeat = "no-repeat";
			
			// Form contained
			formContained = document.createElement("div");
			formContained.style.left = "30px";
			formContained.style.color = "#0B0B64";
			formContained.style.position = "absolute";
			formContained.style.fontWeight = "bold";
			formContained.style.fontFamily = "times";
			
			var widthRef = width - 80;
			var divTitle = document.createElement("div");
			divTitle.style.textAlign = "center";
			divTitle.style.top = "10px";
			divTitle.style.width = widthRef + "px";
			divTitle.style.position = "absolute";
			divTitle.style.fontSize = "14px";
			
			if( concours.length > 0 )
			{
				titleTxt = document.createTextNode(titre + " du " + DateTimeToFrStr(concours[0]) + " à 22h au " + DateTimeToFrStr(concours[1]) + " à 22h");
				
				buttonContained = document.createElement("div");
				buttonContained.style.position = "absolute";
				buttonContained.style.top = "40px";
				buttonContained.style.width = widthRef + "px";
				
				var but1 = document.createElement("div");
				but1.style.position = "absolute";
				but1.style.left = "40px";
				but1.style.top = "0px";
				but1.style.width = "150px";
				but1.style.background = "#B99506";
				but1.style.textAlign = "center";
				but1.style.cursor = "pointer";
				but1.style.border = "double";
				but1.onclick = function()
				{
					currentConcours.style.display = "none";
					buttonContained.style.display = "none";
					returnButton.style.display = "block";
					regleConcours.style.display = "block";
				}
				var but1_txt = document.createTextNode("Régles et Cadeaux !");
				but1.appendChild(but1_txt);
				buttonContained.appendChild(but1);
				
				var but2 = document.createElement("div");
				but2.style.position = "absolute";
				but2.style.left = "270px";
				but2.style.top = "0px";
				but2.style.width = "230px";
				but2.style.background = "#B99506";
				but2.style.textAlign = "center";
				but2.style.cursor = "pointer";
				but2.style.border = "double";
				but2.onclick = function()
				{
					currentConcours.style.display = "none";
					buttonContained.style.display = "none";
					returnButton.style.display = "block";
					lastConcours.style.display = "block";
					if( concours_prev.length > 0 )
						titleTxt.nodeValue = "Résultats : " + titre + " du " + DateTimeToFrStr(concours_prev[0]) + " à 22h au " + DateTimeToFrStr(concours_prev[1]) + " à 22h";
					else
						titleTxt.nodeValue = "Pas d'ancien concours...";
				}
				var but2_txt = document.createTextNode("Résultats du concours précédent");
				but2.appendChild(but2_txt);
				buttonContained.appendChild(but2);
				
				var but3 = document.createElement("div");
				but3.style.position = "absolute";
				but3.style.left = "420px";
				but3.style.top = "0px";
				but3.style.width = "130px";
				but3.style.background = "#B99506";
				but3.style.textAlign = "center";
				but3.style.cursor = "pointer";
				but3.style.border = "double";
				but3.onclick = function()
				{
					currentTable = parseInt(position / 100);
					currentPageOnTable = parseInt((position - currentTable * 100) / 10);
					var popI = classe.length;
					while( popI > 0 )
					{
						classe.pop();
						popI--;
					}
					if( !isClassLoading )
					{
						isLoading = true;
						currentPage = currentTable * 10 + currentPageOnTable;
						var correctOffset = currentPage * 10;
						ajaxRequest( "././php/getClassement.php", formClassXHR, me.loadingClassementDone, "id=" + concours_id + "&offset=" + correctOffset );
					}
					me.makeNumTable(10, 10);
				}
				but3.style.display = "none";
				var but3_txt = document.createTextNode("Aller à ma position");
				but3.appendChild(but3_txt);
				buttonContained.appendChild(but3);
				
				returnButton = document.createElement("div");
				returnButton.style.position = "absolute";
				returnButton.style.left = (widthRef - 220) / 2 + "px";
				returnButton.style.top = "40px";
				returnButton.style.width = "220px";
				returnButton.style.background = "#B99506";
				returnButton.style.textAlign = "center";
				returnButton.style.cursor = "pointer";
				returnButton.style.border = "double";
				returnButton.style.display = "none";
				returnButton.onclick = function()
				{
					currentConcours.style.display = "block";
					buttonContained.style.display = "block";
					returnButton.style.display = "none";
					regleConcours.style.display = "none";
					lastConcours.style.display = "none";
					titleTxt.nodeValue = titre + " du " + DateTimeToFrStr(concours[0]) + " à 22h au " + DateTimeToFrStr(concours[1]) + " à 22h";
				}
				var but4_txt = document.createTextNode("Retour au concours actuel");
				returnButton.appendChild(but4_txt);
				formContained.appendChild(returnButton);
				
				var pos_div = document.createElement("div");
				pos_div.style.position = "absolute";
				pos_div.style.textAlign = "center";
				pos_div.style.top = "30px";
				pos_div.style.left = "0px";
				pos_div.style.width = widthRef + "px";
				
				var pos_txt = null;
				
				if( connected )
				{
					if( position == '0' )
						pos_txt = document.createTextNode("Vous n'avez aucun point dans ce classement...");
					else
					{
						pos_txt = document.createTextNode("Vous êtes en position " + position);
						but3.style.display = "block";
						but1.style.left = "0px";
						but2.style.left = "170px";
					}
				}
				else
					pos_txt = document.createTextNode("En vous inscrivant, vous pourriez être en haut du classement !");
				
				pos_div.appendChild(pos_txt);
				buttonContained.appendChild(pos_div);
				formContained.appendChild(buttonContained);
				
				// Reglement
				regleConcours = document.createElement("div");
				regleConcours.style.position = "absolute";
				regleConcours.style.top = "90px";
				regleConcours.style.width = widthRef + "px";
				regleConcours.style.display = "none";
				
				var regle_u = document.createElement("u");
				var regle_txt = document.createTextNode("Règles :");
				regle_u.appendChild(regle_txt);
				regleConcours.appendChild(regle_u);
				
				var splitRegle = regle.split( '-' );
				var ri = 0;
				while( ri < splitRegle.length )
				{
					var regle_brr = document.createElement("br");
					var regle_txtr = document.createTextNode(" - " + splitRegle[ri]);
					regleConcours.appendChild(regle_brr);
					regleConcours.appendChild(regle_txtr);
					ri++;
				}
				
				var regle_brc = document.createElement("br");
				var regle_brc1 = document.createElement("br");
				var regle_txtc = document.createTextNode("En cas d'égalité entre plusieurs joueurs, les joueurs seront départagés par leur date d'entrée au classement du plus ancien au plus récent !");
				regleConcours.appendChild(regle_brc);
				regleConcours.appendChild(regle_brc1);
				regleConcours.appendChild(regle_txtc);
				
				var lot_br = document.createElement("br");
				var lot_br1 = document.createElement("br");
				var lot_u = document.createElement("u");
				var lot_txt = document.createTextNode("Lots :");
				regleConcours.appendChild(lot_br);
				regleConcours.appendChild(lot_br1);
				lot_u.appendChild(lot_txt);
				regleConcours.appendChild(lot_u);
				
				var table_lot = document.createElement("table");
				table_lot.style.borderColor = "#0D5F05";
				table_lot.style.borderStyle = "solid";
				table_lot.style.borderWidth = "2px";
				table_lot.width = widthRef;
				
				var tbody_lot = document.createElement('tbody');
				table_lot.appendChild(tbody_lot);
				
				var row_lot = document.createElement("tr");
				var row_lot_img = document.createElement("tr");
				
				var loti = 0;
				while( loti < 5 )
				{
					var cell_lot = document.createElement("td");
					var cell_lot_txt = document.createTextNode((loti==0)?"1 er":(loti+1+" ème"));
					var cell_img = document.createElement("td");
					var cell_img_val = document.createElement("img");
					cell_img_val.src = concours[loti*4+3];
					cell_img_val.width = parseInt(widthRef / 5.25);
					cell_img_val.height = 120;
					cell_img_val.id = loti;
					
					cell_img_val.onmouseover = function()
					{
						var ind = parseInt(this.id);
						var titleVal = concours[ind*4+2];
						var imgVal = concours[ind*4+3];
						var descVal = concours[ind*4+4];
						var sendVal = concours[ind*4+5];
						var stockVal = "Concours";
						var destVal = "0";
						isOnLink = true;
						shopDialogPlay( this, titleVal, imgVal, descVal, sendVal, stockVal, destVal );
					}
					cell_img_val.onmouseout = function()
					{
						isOnLink = false;
						shopDialogStop();
					}
					
					cell_lot.style.borderStyle = "solid";
					cell_lot.style.borderWidth = "2px";
					cell_lot.style.textAlign = "center";
					cell_img.style.borderStyle = "solid";
					cell_img.style.borderWidth = "2px";
					
					cell_lot.appendChild(cell_lot_txt);
					row_lot.appendChild(cell_lot);
					cell_img.appendChild(cell_img_val);
					row_lot_img.appendChild(cell_img);
					
					loti++;
				}
				tbody_lot.appendChild(row_lot);
				tbody_lot.appendChild(row_lot_img);
				
				regleConcours.appendChild(table_lot);
				formContained.appendChild(regleConcours);
				// Fin reglement
				
				// Classement précédent
				lastConcours = document.createElement("div");
				lastConcours.style.position = "absolute";
				lastConcours.style.top = "120px";
				lastConcours.style.width = widthRef + "px";
				lastConcours.style.display = "none";
				
				if( concours_prev.length > 0 )
				{
					var fel_div = document.createElement("div");
					fel_div.style.textAlign = "center";
					fel_div.style.fontSize = "24px";
					fel_div.style.width = widthRef + "px";
					var fel_txt = document.createTextNode("Félicitation à nos grands gagnants !");
					fel_div.appendChild(fel_txt);
					lastConcours.appendChild(fel_div);
					
					this.fillTablePrev();
				}
				else
				{
					var no_con_div = document.createElement("div");
					no_con_div.style.position = "absolute";
					no_con_div.style.left = "20px";
					no_con_div.style.top = "80px";
					no_con_div.style.textAlign = "center";
					no_con_div.style.fontSize = "28px";
					no_con_div.style.width = widthRef + "px";
					var no_conc_txt = document.createTextNode("Il n'y a pas d'ancien concours...");
					no_con_div.appendChild(no_conc_txt);
					lastConcours.appendChild(no_con_div);
				}
				
				formContained.appendChild(lastConcours);
				
				// Classement
				currentConcours = document.createElement("div");
				currentConcours.style.position = "absolute";
				currentConcours.style.top = "100px";
				currentConcours.style.width = widthRef + "px";
				
				if( classe.length > 0 )
				{
					this.fillTable();
					
					if( nbTable > 1 )
					{
						currentPageOnTable = 1;
						currentTable = 0;
						me.makeNumTable(10, 10);
					}
				}
				else
				{
					var no_conc_div = document.createElement("div");
					no_conc_div.style.position = "absolute";
					no_conc_div.style.textAlign = "center";
					no_conc_div.style.top = "120px";
					no_conc_div.style.left = "0px";
					no_conc_div.style.fontSize = "22px";
					no_conc_div.style.width = widthRef + "px";
				
					var no_conc_txt = document.createTextNode("Aucun joueur n'est classé pour le moment...");
					var no_conc_br = document.createElement("br");
					var no_conc_txt1 = document.createTextNode("Profitez en pour prendre la première place !");
				
					no_conc_div.appendChild(no_conc_txt);
					no_conc_div.appendChild(no_conc_br);
					no_conc_div.appendChild(no_conc_txt1);
					currentConcours.appendChild(no_conc_div);
				}
				
				formContained.appendChild(currentConcours);
			}
			else
				titleTxt = document.createTextNode("Pas de concours actuellement");
			
			divTitle.appendChild(titleTxt);
			formContained.appendChild(divTitle);
			
			contained.appendChild(formContained);
			parent.appendChild(contained);
			
			if( parent == document.getElementById('map_contained') )redimMapContained( left, top, width, height );

			isPlaying = true;
		}
	}
	
	this.makeNumTable = function(rowPerPage, nbPages)
	{
		var widthRef = width - 80;
		
		if( tablesDiv != null )
		{
			removeAllNodes( tablesDiv, true );
			tablesDiv = null;
		}
		tablesDiv = document.createElement("div");
		tablesDiv.style.position = "absolute";
		tablesDiv.style.top = height - 140 + "px";
		tablesDiv.style.textAlign = "center";
		tablesDiv.style.width = widthRef + "px";
		
		var iT = currentTable * nbPages;
		
		if( currentTable > 0 )
		{
			var curButDiv = document.createElement("b");
			curButDiv.style.cursor = "pointer";
			curButDiv.style.color = "#226622";
			curButDiv.style.padding = "2px";
			curButDiv.style.borderStyle = "solid";
			curButDiv.style.borderWidth = "1px";
			curButDiv.onclick = function()
			{
				currentPageOnTable = nbPages;
				currentTable--;
				var popI = classe.length;
				while( popI > 0 )
				{
					classe.pop();
					popI--;
				}
				if( !isClassLoading )
				{
					isLoading = true;
					currentPage = currentTable * nbPages + currentPageOnTable;
					var correctOffset = (currentPage - 1) * rowPerPage;
					ajaxRequest( "././php/getClassement.php", formClassXHR, me.loadingClassementDone, "id=" + concours_id + "&offset=" + correctOffset );
				}
				me.makeNumTable(rowPerPage, nbPages);
			}
			var curText = document.createTextNode("< ");
			
			curButDiv.appendChild(curText);
			tablesDiv.appendChild(curButDiv);
		}
		
		currentPage = currentTable * nbPages + currentPageOnTable;
		
		var maxIT = 10;
		while( iT < nbTable && maxIT > 0 )
		{
			if( iT > 0 )
			{
				var curSep = document.createTextNode(" - ");
				tablesDiv.appendChild(curSep);
			}
			var curButDiv = document.createElement("b");
			if( iT == currentPage - 1 )
			{
				previousSelected = curButDiv;
				curButDiv.style.background = "#8888AA";
			}
			curButDiv.style.cursor = "pointer";
			curButDiv.style.color = "#226622";
			curButDiv.style.padding = "2px";
			curButDiv.style.borderStyle = "solid";
			curButDiv.style.borderWidth = "1px";
			curButDiv.onclick = function()
			{
				previousSelected.style.background = "";
				this.style.background = "#8888AA";
				previousSelected = this;
				var popI = classe.length;
				while( popI > 0 )
				{
					classe.pop();
					popI--;
				}
				
				var butOffset = parseInt(this.firstChild.nodeValue);
				var correctOffset = (butOffset - 1) * rowPerPage;
				if( !isClassLoading )
				{
					isLoading = true;
					currentPage = butOffset;
					currentPageOnTable = parseInt(currentPage / nbPages);
					ajaxRequest( "././php/getClassement.php", formClassXHR, me.loadingClassementDone, "id=" + concours_id + "&offset=" + correctOffset );
				}
			}
			var curText = document.createTextNode(iT + 1);
			
			curButDiv.appendChild(curText);
			tablesDiv.appendChild(curButDiv);
			iT++;
			maxIT--;
		}
		
		if( nbTable > currentTable * nbPages + nbPages )
		{
			var curSep = document.createTextNode(" - ");
			tablesDiv.appendChild(curSep);
			
			var curButDiv = document.createElement("b");
			curButDiv.style.cursor = "pointer";
			curButDiv.style.color = "#226622";
			curButDiv.style.padding = "2px";
			curButDiv.style.borderStyle = "solid";
			curButDiv.style.borderWidth = "1px";
			curButDiv.onclick = function()
			{
				currentPageOnTable = 1;
				currentTable++;
				var popI = classe.length;
				while( popI > 0 )
				{
					classe.pop();
					popI--;
				}
				if( !isClassLoading )
				{
					isLoading = true;
					currentPage = currentTable * nbPages + currentPageOnTable;
					var correctOffset = (currentPage - 1) * rowPerPage;
					ajaxRequest( "././php/getClassement.php", formClassXHR, me.loadingClassementDone, "id=" + concours_id + "&offset=" + correctOffset );
				}
				me.makeNumTable(rowPerPage, nbPages);
			}
			var curText = document.createTextNode(">");
			
			curButDiv.appendChild(curText);
			tablesDiv.appendChild(curButDiv);
		}
		
		currentConcours.appendChild(tablesDiv);
	}
	
	this.stop = function()
	{
		if( isPlaying == true )
		{
			removeAllNodes( contained, true );
			isPlaying = false;
		}
	}
}