PageSourceSearch

https://s3.elespanol.com/vendor_js/opta/widgets-opta-tenis.js

js elespanol.com collected 2026-09-24 09:08:36 UTC 26,853 bytes, 877 lines download raw bytes

1$jOPTA = jQuery.noConflict();
2var cursorpointer = "cursor:pointer";
3var cursornone = "cursor:default";
4var iOpcionCarpeta = -1
5var array_diferencias = new Array();
6var t_carpetas = new Array();
7var t_visibles = new Array();
8var iRefresh;
9var refreshtime;
10var widthWidget;
11var wGraficoCAMPO;
12var hGraficoCAMPO;
13var cadena_svg;
14var cadena_svg_puntos;
15var bGraficos = true;
16var numero_sets = 0;
17var numero_juegos = 0;
18
19
20$jOPTA(document).ready(function () {
21	
22	
23	/*
24      google.setOnLoadCallback(drawChart);
25      function drawChart() {
26        var data = google.visualization.arrayToDataTable([
27          ['Task', 'Hours per Day'],
28          ['Work',     11],
29          ['Eat',      2],
30          ['Commute',  2],
31          ['Watch TV', 2],
32          ['Sleep',    7]
33        ]);
34
35        var options = {
36          title: 'My Daily Activities',
37          pieHole: 0.4,
38        };
39
40        var chart = new google.visualization.PieChart(document.getElementById('donutchart'));
41        chart.draw(data, options);
42      }
43	*/
44	cargar_xml_idiomas()
45//console.log("Inicio del widget. Se supone cargado el fichero de idiomas, sin ;")
46	preparar_widget()
47});
48
49
50function preparar_widget() {
51	$jOPTA('#widgets-opta-tenis-contenido').empty();
52	
53	t_carpetas = paramCARPETAS.split(',');
54	iOpcionCarpeta = t_carpetas[0]
55	widthWidget = $jOPTA("#widgets-opta-tenis-contenido").width();
56	
57	//alert (	widthWidget)
58	$jOPTA('#widgets-opta-tenis-contenido').append('<div id="widgets-opta-tenis-marcador"></div>');
59	$jOPTA('#widgets-opta-tenis-contenido').append('<div id="widgets-opta-tenis-carpetas"></div>');
60	$jOPTA('#widgets-opta-tenis-contenido').append('<div id="widgets-opta-tenis-narracion"></div>');
61	$jOPTA('#widgets-opta-tenis-contenido').append('<div id="widgets-opta-tenis-estadisticas"></div>');
62	$jOPTA('#widgets-opta-tenis-contenido').append('<div id="widgets-opta-tenis-evolucion"></div>');
63	$jOPTA('#widgets-opta-tenis-contenido').append('<div id="widgets-opta-tenis-powerby"></div>');
64	
65	iwidth = $jOPTA("#widgets-opta-tenis-jugadores").width();
66	
67	if (typeof(paramPW) == "undefined") { paramPW = "S" };
68	scadena = "&nbsp;";
69	if (paramPW !== "X") { scadena = ' <img src="' + paramPathImg + 'pb_opta.png' + '" border="0">'; };
70	$jOPTA('#widgets-opta-tenis-powerby').append(scadena);
71	
72	//setInterval(function(){ alert("Hello"); }, 3000);
73	/*  JFe 
74	
75	
76	iRefresh = Number(paramREFRESH);
77	if ( datos_partido.EST !== "7" )
78	{
79		setInterval(function(){ alert("Hello"); }, 3000);
80		refreshtime = setInterval("Recargar_Xml_Directos();", Number(paramREFRESH));
81	};
82	 
83	fin modificación 
84	*/
85
86	iRefresh = Number(paramREFRESH);
87	if ( datos_partido.EST !== "7" )
88	{
89		refreshtime = setInterval("Recargar_Xml_Directos();", Number(paramREFRESH));
90	};
91
92
93	rellenar_widget();
94
95};
96
97function rellenar_widget()
98{
99	//alert("rellenar_widget ");
100	Cargar_Xml_Directo_POB();
101	
102	click_en_carpeta (iOpcionCarpeta)
103	rellenar_datos_marcador ();
104	rellenar_datos_narracion ()
105	rellenar_datos_estadisticas ();
106	//rellenar_datos_evolucion ();
107};
108
109function rellenar_datos_carpetas ()
110{
111	
112	
113	iwidth = 100 / t_carpetas.length;
114	
115	//if ( iOpcionCarpeta == -1 ) { iOpcionCarpeta = t_carpetas[0] };
116	
117	scadena = '';
118	//-----------------------------------------------------------------------------
119	// CARPETAS
120	//-----------------------------------------------------------------------------
121	scadena += '<div class="opta-table opta-contenido-carpetas">';
122	scadena += '	<div class="opta-table-row opta-carpetas">';
123	for (var c=0; c<t_carpetas.length; c++) {
124		if ( Number(t_carpetas[c]) == iOpcionCarpeta )
125		{
126			scadena += '		<div class="opta-table-cell opta-carpetas-opcion opta-carpetas-opcion-activa" style="width:' + iwidth + '%;';
127		}
128		else
129		{
130			scadena += '		<div class="opta-table-cell opta-carpetas-opcion" style="width:' + iwidth + '%;';
131		};
132		scadena += '"';
133		scadena += ' 			onclick="click_en_carpeta(\'' + t_carpetas[c] + '\'' + ',\'' + 'opta-info' + '\')" ';
134		scadena += '			>';
135		scadena +=  			array_idiomas_MENU[t_carpetas[c]];
136		scadena += '		</div>';
137	};
138	scadena += '	</div>';
139	scadena += '</div>';
140	$jOPTA("#widgets-opta-tenis-carpetas").empty();
141	$jOPTA('#widgets-opta-tenis-carpetas').append(scadena);
142
143};
144
145function click_en_carpeta (iOpc)
146{
147	$jOPTA('#widgets-opta-tenis-narracion').css("display", "none");
148	$jOPTA('#widgets-opta-tenis-estadisticas').css("display", "none");
149	$jOPTA('#widgets-opta-tenis-evolucion').css("display", "none");
150	
151	for (var c=0; c<t_carpetas.length; c++) {
152		
153		if ( t_carpetas[c] == iOpc ) { 
154			switch ( Number(t_carpetas[c]) ) 
155			{
156				case 1:
157					$jOPTA('#widgets-opta-tenis-narracion').css("display", "block");
158					break;
159				case 2:
160					$jOPTA('#widgets-opta-tenis-estadisticas').css("display", "block");
161					break;
162				case 3:
163					$jOPTA('#widgets-opta-tenis-evolucion').css("display", "block");
164					break;
165			};
166		};
167	};
168
169	iOpcionCarpeta = iOpc;
170	rellenar_datos_carpetas ();
171}
172
173
174
175
176function rellenar_datos_marcador ()
177{
178	numero_sets = sacar_numero_sets ()
179	
180	var c = '';
181	c += '<div class="opta-marcador">'
182	c += '	<div class="opta-table">'
183	c += '		<div class="opta-table-row">'
184	c += '			<div class="opta-table-cell opta-datos-foto-w opta-vertical-align-top">'
185	c += 			rellenar_foto_jugador (datos_resultado[0].NIDJUG1) 
186	c += '			</div>'
187	c += '			<div class="opta-table-cell opta-datos-marcador-w opta-vertical-align-top opta-padding-rl">'
188	c += 			rellenar_datos_marcador_detalle () 
189	c += '			</div>'
190	c += '			<div class="opta-table-cell opta-datos-foto-w opta-vertical-align-top">'
191	c += 			rellenar_foto_jugador (datos_resultado[1].NIDJUG1) 
192	c += '			</div>'
193	c += '		</div>'
194	c += '	</div>'	
195	
196	
197	$jOPTA("#widgets-opta-tenis-marcador").empty();
198	$jOPTA('#widgets-opta-tenis-marcador').append(c);
199}
200
201function rellenar_datos_marcador_detalle ()
202{
203	var c = '';
204	c += '	<div class="opta-table">'
205	c += '		<div class="opta-table-row opta-datos-marcador-res">'
206	c += '			<div class="opta-table-cell">'
207	c += 			"&nbsp;"
208	c += '			</div>'
209	c += 			rellenar_datos_marcador_puntos_sets_cab ()
210	c += '		</div>'
211	c += '		<div class="opta-table-row opta-datos-marcador-jug">'
212	c += '			<div class="opta-table-cell opta-datos-marcador-jug1 opta-border2">'
213	c += 			datos_resultado[0].NOMJUG1
214	if ( datos_resultado[0].NOMJUG2 !== "0" )
215	{
216		c += 			'<BR>' + datos_resultado[0].NOMJUG2
217	}
218	c += '			</div>'
219	c += 			rellenar_datos_marcador_puntos_sets(0)
220	c += '		</div>'
221	c += '		<div class="opta-table-row opta-datos-marcador-jug">'
222	c += '			<div class="opta-table-cell opta-datos-marcador-jug2 opta-border2">'
223	c += 			datos_resultado[1].NOMJUG1
224	if ( datos_resultado[1].NOMJUG2 !== "0" )
225	{
226		c += 			'<BR>' + datos_resultado[1].NOMJUG2
227	}
228	c += '			</div>'
229	c += 			rellenar_datos_marcador_puntos_sets(1)
230	c += '		</div>'
231	c += '	</div>'
232	
233	return c;
234}
235function rellenar_datos_marcador_puntos_sets (ind)
236{
237	var c = '';
238	var puntos;	
239	var cls = ind + 1;
240	
241	
242	switch ( datos_partido.EST )
243	{
244		case "0":
245			puntos = '&nbsp;'
246			break;
247		case "7":
248			puntos = '&nbsp;'
249			if ( datos_resultado[ind].CLF == "1" )
250			{
251				puntos = '<img src="' + paramPathImg + 'opta-ganador-blanco-w24.png' + '" border="0">'
252			}
253			break;
254		default:
255			puntos = datos_resultado[ind].PTOS;
256			break;
257	}
258	c += '<div class="opta-table-cell  opta-datos-marcador-jug' + cls + ' opta-datos-marcador-set opta-border2">'
259	c += 	puntos
260	c += '</div>'
261	
262	
263	for (var j=1; j<=numero_sets; j++) 
264	{
265		c += '<div class="opta-table-cell  opta-datos-marcador-jug' + cls + ' opta-datos-marcador-set opta-border2">'
266		c += 	datos_resultado[ind]["SET" + j]
267		c += '</div>'
268	}
269	return c;
270}
271function rellenar_datos_marcador_puntos_sets_cab ()
272{
273	var c = '';
274	
275	c += '<div class="opta-table-cell opta-datos-marcador-set-cab opta-border2">'
276	c += array_idiomas_TRA[1]
277	c += '</div>'
278	
279	for (var j=1; j<=numero_sets; j++) 
280	{
281		c += '<div class="opta-table-cell opta-datos-marcador-set-cab opta-border2">'
282		//c += array_idiomas_TRA[2] + j
283		c += '(' + j + ')'
284		c += '</div>'
285	}
286	return c;
287}
288function rellenar_foto_jugador (id)
289{
290	var c = '';
291	c += '<img src="' + paramPathFotos + id + '.jpg"';
292	c += ' onerror="this.src=' + '\'' + paramPathFotos + '00000000.jpg' + '\'' + '">';
293	return c;
294
295}
296/*
297-------------------------------------------------------
298NARRACIÓN
299-------------------------------------------------------
300*/
301function rellenar_datos_narracion ()
302{
303	var c = '';
304
305	c += '<div class="scroll-pane" style="width:100%;max-height:' + paramALTO_COM + 'px;">';
306	c += '	<div class="opta-table opta-narracion">';
307	
308	for (var n=array_pelicula.length-1; n>=0; n--) {
309		if ( array_pelicula[n].TEXTO !== '??' )
310		{
311			c += rellenar_datos_narracion_pelicula (array_pelicula, n)
312			/*
313			c += '	<div class="opta-table-row opta-contenido-narracion">';
314			c += '		<div class="opta-table-cell opta-narracion-marcador">'
315			c += 		rellenar_datos_narracion_marcador (n);
316			c += '		</div>';
317			c += '		<div class="opta-table-cell opta-narracion-juego">'
318			c += 		array_pelicula[n].NJ;
319			c += '		</div>';
320			c += '		<div class="opta-table-cell opta-narracion-texto">'
321			c += 		array_pelicula[n].TEXTO;
322			c += '		</div>';
323			c += '	</div>';
324			*/
325		}
326	}
327	c += '	</div>';
328	c += '</div>';
329	
330
331	//-----------------------------------------------------------------------------
332	// AÑADIR A DIV
333	//-----------------------------------------------------------------------------
334	$jOPTA("#widgets-opta-tenis-narracion").empty();
335	$jOPTA('#widgets-opta-tenis-narracion').append(c);
336	
337}
338function rellenar_datos_narracion_pelicula (array_accion, n)
339{
340	var c = '';
341	c += '	<div class="opta-table-row opta-contenido-narracion">';
342	c += '		<div class="opta-table-cell opta-narracion-marcador">'
343	c += 		rellenar_datos_narracion_marcador (array_accion, n);
344	c += '		</div>';
345	c += '		<div class="opta-table-cell opta-narracion-juego">'
346	c += 		array_accion[n].NJ;
347	c += '		</div>';
348	c += '		<div class="opta-table-cell opta-narracion-texto">'
349	c += 		array_accion[n].TEXTO;
350	c += '		</div>';
351	c += '	</div>';
352	return c;
353};
354function rellenar_datos_narracion_marcador (array_accion, n) 
355{
356	var c = '';
357	if ( Number(array_accion[n].SET) > 0 ) 
358	{
359		if ( array_accion[n].ACC == "5" ) 
360		{
361			c += '&nbsp;';
362		}
363		else
364		{
365			saqueL = '&nbsp;' 
366			saqueV = '&nbsp;' 
367			iW = 8;
368			if ( array_accion[n].SAQUE == "L" ) { saqueL = '<img src="' + paramPathImg + 'opta-pelota.png' + '" width="' + iW + '" border="0">' }
369			if ( array_accion[n].SAQUE == "V" ) { saqueV = '<img src="' + paramPathImg + 'opta-pelota.png' + '" width="' + iW + '" border="0">' }
370			
371			c += '<div class="opta-table">';
372			c += '	<div class="opta-table-row">';
373			c += '		<div class="opta-table-cell">'
374			c += '			<div class="opta-table">';
375			c += '				<div class="opta-table-row">';
376			//c += '					<div class="opta-table-cell">' + '&nbsp;' + '</div>';
377			c += '					<div class="opta-table-cell opta-narracion-marcador-total-cab">' + 'Total' + '</div>';
378			c += '				</div>';
379			c += '				<div class="opta-table-row">';
380			c += '					<div class="opta-table-cell opta-narracion-marcador-total-dat">' + array_accion[n].TOTSETL + '</div>';
381			c += '				</div>';
382			c += '				<div class="opta-table-row">';
383			c += '					<div class="opta-table-cell opta-narracion-marcador-total-dat">' + array_accion[n].TOTSETV + '</div>';
384			c += '				</div>';
385			c += '			</div>';
386			c += '		</div>';
387			
388			c += '		<div class="opta-table-cell">'
389			c += '			<div class="opta-table">';
390			c += '				<div class="opta-table-row">';
391			c += '					<div class="opta-table-cell opta-narracion-marcador-set-cab">' + 'SET ' + array_accion[n].SET  + '</div>';
392			c += '				</div>';
393			c += '				<div class="opta-table-row">';
394			c += '					<div class="opta-table-cell">' 
395			c += '						<div class="opta-table">';
396			c += '							<div class="opta-table-row">';
397			c += '								<div class="opta-table-cell opta-narracion-marcador-set-dat">' + array_accion[n].GL  + '</div>';
398			c += '								<div class="opta-table-cell opta-narracion-marcador-set-dat">' + array_accion[n].PL  + '</div>';
399			//c += '								<div class="opta-table-cell opta-narracion-marcador-set-saque">' + saqueL  + '</div>';
400			c += '							</div>';
401			c += '							<div class="opta-table-row">';
402			c += '								<div class="opta-table-cell opta-narracion-marcador-set-dat">' + array_accion[n].GV + '</div>';
403			c += '								<div class="opta-table-cell opta-narracion-marcador-set-dat">' + array_accion[n].PV + '</div>';
404			//c += '								<div class="opta-table-cell opta-narracion-marcador-set-saque">' + saqueV + '</div>';
405			c += '							</div>';
406			c += '						</div>';
407			c += '					</div>';
408			c += '				</div>';
409			c += '			</div>';
410			c += '		</div>';
411			
412			c += '		<div class="opta-table-cell">'
413			c += '			<div class="opta-table">';
414			c += '				<div class="opta-table-row">';
415			c += '					<div class="opta-table-cell">' + '&nbsp;' + '</div>';
416			c += '				</div>';
417			c += '				<div class="opta-table-row">';
418			c += '					<div class="opta-table-cell opta-narracion-marcador-set-saque">' + saqueL  + '</div>';
419			c += '				</div>';
420			c += '				<div class="opta-table-row">';
421			c += '					<div class="opta-table-cell opta-narracion-marcador-set-saque">' + saqueV + '</div>';
422			c += '				</div>';
423			c += '			</div>';
424			c += '		</div>';
425			
426			
427			c += '	</div>';
428			c += '</div>';
429			
430			
431			
432			
433			/*
434			c += '		<div class="opta-table-cell">'
435			c += '			<div class="opta-table">';
436			c += '			</div>';
437			c += '		</div>';
438			*/
439			
440			
441			
442			
443			
444			
445			
446			
447			/*
448			c += '			<div class="opta-table">';
449			c += '				<div class="opta-table-row">';
450			c += '					<div class="opta-table-cell opta-narracion-marcador-total-cab">' + 'Total' + '</div>';
451			c += '					<div class="opta-table-cell opta-narracion-marcador-set-cab">' + 'SET ' + array_accion[n].SET  + '</div>';
452			c += '				</div>';
453			c += '				<div class="opta-table-row">';
454			c += '					<div class="opta-table-cell opta-narracion-marcador-total-dat">' + array_accion[n].TOTSETL + '</div>';
455			c += '					<div class="opta-table-cell">' 
456			c += '						<div class="opta-table">';
457			c += '							<div class="opta-table-row">';
458			c += '								<div class="opta-table-cell opta-narracion-marcador-set-dat">' + array_accion[n].GL  + '</div>';
459			c += '								<div class="opta-table-cell opta-narracion-marcador-set-dat">' + array_accion[n].PL + '</div>';
460			c += '							</div>';
461			c += '						</div>';
462			c += '					</div>';
463			c += '				</div>';
464			c += '				<div class="opta-table-row">';
465			c += '					<div class="opta-table-cell opta-narracion-marcador-total-dat">' + array_accion[n].TOTSETV + '</div>';
466			c += '					<div class="opta-table-cell">' 
467			c += '						<div class="opta-table">';
468			c += '							<div class="opta-table-row">';
469			c += '								<div class="opta-table-cell opta-narracion-marcador-set-dat">' + array_accion[n].GV + '</div>';
470			c += '								<div class="opta-table-cell opta-narracion-marcador-set-dat">' + array_accion[n].PV + '</div>';
471			c += '							</div>';
472			c += '						</div>';
473			c += '					</div>';
474			c += '				</div>';
475			c += '			</div>';
476			*/
477		};
478	}
479	else
480	{
481		c += '&nbsp;'
482	};
483	return c;
484}
485/*
486-------------------------------------------------------
487ESTADÍSTICAS
488-------------------------------------------------------
489*/
490function rellenar_datos_estadisticas ()
491{
492	var c = '';
493	
494	i = 0
495	for (var j=1; j<10; j++) 
496	{
497		c += '<div class="opta-accion">'
498		c += '	<div class="opta-table">'
499		c += '		<div class="opta-table-row opta-row-est-h">'
500		//alert ("1 ..... " + array_idiomas_EST_COD[j] + "  .... " + datos_acciones[1][0][array_idiomas_EST_COD[j]] );
501		c += '			<div class="opta-table-cell opta-datos-est-w opta-border">' + datos_acciones[1][i][array_idiomas_EST_COD[j]]  + '</div>'
502		//alert ("2");
503		c += '			<div class="opta-table-cell opta-datos-tit-w opta-border">' + array_idiomas_EST[j] + '</div>'
504		c += '			<div class="opta-table-cell opta-datos-est-w opta-border">' + datos_acciones[2][i][array_idiomas_EST_COD[j]] + '</div>'
505		c += '		</div>'
506		c += '	</div>'
507		
508		//alert ("3");
509		
510		w1 = rellenar_grafico_estadisticas (1, i, array_idiomas_EST_COD[j])
511		
512		c += '	<div class="opta-table opta-padding-tb">'
513		c += '		<div class="opta-table-row opta-row-gra-h">'
514		c += '			<div class="opta-table-cell opta-datos-gra-w">'
515		c += 				rellenar_grafico_estadisticas (1, i, array_idiomas_EST_COD[j])
516		c += '			</div>'
517		c += '			<div >' + '&nbsp;' + '</div>'
518		c += '			<div class="opta-table-cell opta-datos-gra-w">'
519		c += 				rellenar_grafico_estadisticas (2, i, array_idiomas_EST_COD[j])
520		c += '			</div>'
521		c += '		</div>'
522		c += '	</div>'
523		
524		c += '</div>'
525		
526	}
527	$jOPTA("#widgets-opta-tenis-estadisticas").empty();
528	$jOPTA('#widgets-opta-tenis-estadisticas').append(c);
529}
530
531function rellenar_grafico_estadisticas (id, i, accion)
532{
533	var c = '';
534	var iW1 = 100;
535	var iW2 = 0;
536	var sC1 = ''
537	var sC2 = ''
538	
539	switch ( id )
540	{
541		case 1:
542			sC1 = ''
543			sC2 = 'opta-fondo-esta-gra1'
544			break;
545		case 2:
546			sC1 = 'opta-fondo-esta-gra2'
547			sC2 = ''
548			break;
549	}
550	
551	//valor = 
552	
553	switch ( accion )
554	{
555		case "SER1":
556		case "GANSER1":
557		case "GANSER2":
558		case "RESTOSG":
559		case "BREAK":
560			valor = Number(datos_acciones_total[id][i][array_idiomas_EST_COD[j]] )
561			switch ( id )
562			{
563				case 1:
564					iW1 = 100 - valor
565					iW2 = valor
566					break;
567				case 2:
568					iW1 = valor
569					iW2 = 100 - valor
570					break;
571			}
572			break;
573		default:
574			total = Number(datos_acciones_total[1][i][array_idiomas_EST_COD[j]] ) + Number(datos_acciones_total[2][i][array_idiomas_EST_COD[j]] )
575			valor = (Number(datos_acciones_total[id][i][array_idiomas_EST_COD[j]] ) * 100 ) / total
576			switch ( id )
577			{
578				case 1:
579					iW1 = 100 - valor
580					iW2 = valor
581					break;
582				case 2:
583					iW1 = valor
584					iW2 = 100 - valor
585					break;
586			}
587			break;
588	}
589	
590	c += '	<div class="opta-table">'
591	c += '		<div class="opta-table-row  opta-row-gra-h">'
592	c += '			<div class="opta-table-cell ' + sC1 + '"' + ' style="width:' + iW1 + '%;"' + '>' + '&nbsp;'   + '</div>'
593	c += '			<div class="opta-table-cell ' + sC2 + '"' + ' style="width:' + iW2 + '%;"' + '>' + '&nbsp;'   + '</div>'
594	c += '		</div>'
595	c += '	</div>'
596	
597	
598	
599	
600	
601	return c;
602}
603
604function rellenar_datos_estadisticas_accion (jugador, set, accion)
605{
606	var r = '';
607	switch ( accion )
608	{
609		case 1:
610			r = datos_estadisticas[jugador][set].SER1OK + '/' + datos_estadisticas[jugador][set].SER1TOT + '=' + datos_estadisticas[jugador][set].SER1POR;
611	};
612	return r;
613}
614
615function rellenar_datos_evolucion ()
616{
617	var c = '';
618	
619	c += '<div id="widgets-opta-tenis-evolucion-detalle">'
620	
621	c += '	<div id="opta-evolucion" class="opta-table">'
622	c += 		rellenar_datos_evolucion_juegos(false)
623	//c += 		rellenar_datos_evolucion_jugador (1, 4, "L")
624	c += 		rellenar_datos_evolucion_jugador (0, 4, "L")
625	c += 		rellenar_datos_evolucion_juegos()
626	//c += 		rellenar_datos_evolucion_jugador (5, 8, "V")
627	c += 		rellenar_datos_evolucion_jugador (5, 9, "V")
628	c += 		rellenar_datos_evolucion_juegos(true)
629	c += '	</div>'
630	c += '	<div id="opta-evolucion-narracion-juego" style="display:none;">'
631	c += '	</div>'
632	c += '</div>'
633
634	
635	$jOPTA("#widgets-opta-tenis-evolucion").empty();
636	$jOPTA('#widgets-opta-tenis-evolucion').append(c);
637
638}
639function rellenar_datos_evolucion_jugador (ind_ini, ind_fin, jugador)
640{
641	iwidth = 100 / (numero_juegos + 1);
642	style = ' style="width:' + iwidth + '%;"'
643	
644	var c = '';
645	for (var k=ind_ini; k<=ind_fin; k++) 
646	{
647		c += '<div class="opta-table-row opta-evolucion-linea">'
648		for (var j=0; j<=numero_juegos; j++) 
649		{
650			fondo = ""
651			if ( array_juegos[j][k] == "1" ) 
652			{
653				fondo = "opta-evolucion-juego-perdedor"
654				if ( array_juegos_loc[j] > array_juegos_vis[j] && jugador == "L") { fondo = "opta-evolucion-juego-ganador" }
655				if ( array_juegos_loc[j] < array_juegos_vis[j] && jugador == "V") { fondo = "opta-evolucion-juego-ganador" }
656			}
657			
658			valor = '&nbsp;'
659			iW = 16;
660			if ( array_saques[j] == "L" && k == ind_fin && jugador == "L" ) { valor = '<img src="' + paramPathImg + 'opta-pelota-amarilla-w30.png' + '" width="' + iW + '" border="0">' }
661			if ( array_saques[j] == "V" && k == ind_ini && jugador == "V" ) { valor = '<img src="' + paramPathImg + 'opta-pelota-amarilla-w30.png' + '" width="' + iW + '" border="0">' }
662			
663			stitulo = ''
664			if ( array_aces[j][k] == "1") 
665			{ 
666				valor = '<img src="' + paramPathImg + 'opta-pelota-verde-w30.png' + '" width="' + iW + '" border="0">' 
667				stitulo = 'Ace'
668			}
669			if ( array_doblef[j][k] == "1") 
670			{ 
671				valor = '<img src="' + paramPathImg + 'opta-pelota-negra-w30.png' + '" width="' + iW + '" border="0">' 
672				//stitulo = array_idiomas['0202049'] //''Doble falta'
673				stitulo = array_idiomas['0202049'].replace('&JA2', datos_resultado[1].NOMJUG1); //'Doble falta' //0202049
674			}
675			if ( j == 0 )
676			{
677				if ( k == 4 || k == 5 ) { valor = "15" }
678				if ( k == 3 || k == 6 ) { valor = "30" }
679				if ( k == 2 || k == 7 ) { valor = "40" }
680				if ( k == 1 || k == 8 ) { valor = "ad" }
681				if ( k == 0 || k == 9 ) { valor = "tb" }
682			}
683			//c += '<div class="opta-table-cell opta-evolucion-celda ' + fondo + '"' + style + '>' + valor + '</div>'
684			c += '<div class="opta-table-cell opta-evolucion-celda ' + fondo //+ '"' + style + '>' + valor + '</div>'
685			if ( stitulo != "" )
686			{
687				c += ' tooltip2"' + ' name="' + stitulo ;
688			}
689			c += '"' 
690			c += style 
691			c += '>'
692			c += valor
693			c += '</div>'
694		}
695		c += '</div>'
696	}
697	return c;
698}
699
700/*
701function rellenar_datos_evolucion_jugador (ind_ini, ind_fin, jugador)
702{
703	iwidth = 100 / (numero_juegos + 1);
704	style = ' style="width:' + iwidth + '%;"'
705	
706	var c = '';
707	for (k=ind_ini; k<=ind_fin; k++) 
708	{
709		c += '<div class="opta-table-row opta-evolucion-linea">'
710		for (j=0; j<=numero_juegos; j++) 
711		{
712			fondo = ""
713			if ( array_juegos[j][k] == "1" ) 
714			{
715				fondo = "opta-evolucion-juego-perdedor"
716				if ( array_juegos_loc[j] > array_juegos_vis[j] && jugador == "L") { fondo = "opta-evolucion-juego-ganador" }
717				if ( array_juegos_loc[j] < array_juegos_vis[j] && jugador == "V") { fondo = "opta-evolucion-juego-ganador" }
718			}
719			
720			valor = '&nbsp;'
721			iW = 16;
722			if ( array_saques[j] == "L" && k == ind_fin && jugador == "L" ) { valor = '<img src="' + paramPathImg + 'opta-pelota-amarilla-w30.png' + '" width="' + iW + '" border="0">' }
723			if ( array_saques[j] == "V" && k == ind_ini && jugador == "V" ) { valor = '<img src="' + paramPathImg + 'opta-pelota-amarilla-w30.png' + '" width="' + iW + '" border="0">' }
724			
725			stitulo = ''
726			if ( array_aces[j][k] == "1") 
727			{ 
728				valor = '<img src="' + paramPathImg + 'opta-pelota-verde-w30.png' + '" width="' + iW + '" border="0">' 
729				stitulo = 'Ace'
730			}
731			if ( array_doblef[j][k] == "1") 
732			{ 
733				valor = '<img src="' + paramPathImg + 'opta-pelota-negra-w30.png' + '" width="' + iW + '" border="0">' 
734				//stitulo = array_idiomas['0202049'] //''Doble falta'
735				stitulo = array_idiomas['0202049'].replace('&JA2', datos_resultado[1].NOMJUG1); //'Doble falta' //0202049
736			}
737			if ( j == 0 )
738			{
739				if ( k == 4 || k == 5 ) { valor = "15" }
740				if ( k == 3 || k == 6 ) { valor = "30" }
741				if ( k == 2 || k == 7 ) { valor = "40" }
742				if ( k == 1 || k == 8 ) { valor = "ad" }
743			}
744			//c += '<div class="opta-table-cell opta-evolucion-celda ' + fondo + '"' + style + '>' + valor + '</div>'
745			c += '<div class="opta-table-cell opta-evolucion-celda ' + fondo //+ '"' + style + '>' + valor + '</div>'
746			if ( stitulo != "" )
747			{
748				c += ' tooltip2"' + ' name="' + stitulo ;
749			}
750			c += '"' 
751			c += style 
752			c += '>'
753			c += valor
754			c += '</div>'
755		}
756		c += '</div>'
757	}
758	return c;
759}
760*/
761function rellenar_datos_evolucion_juegos (valor)
762{
763	iwidth = 100 / (numero_juegos + 1);
764	style = ' style="width:' + iwidth + '%;"'
765
766	var c = '';
767	c += '<div class="opta-table-row">'
768	for (var j=0; j<=numero_juegos; j++) 
769	{
770		bPar = false 
771		if ( j%2==0) { bPar = true }
772		
773		nro = j;
774		if ( bPar !== valor) { nro = '&nbsp;' }
775		if ( nro == "0") { nro = '&nbsp;' }
776		c += '<div class="opta-table-cell opta-evolucion-celda-juego"' + style// + '>' + nro + '</div>'
777		c += ' 			onclick="click_en_juego(\'' + j + '\')" ';
778		c += '			>';
779		c +=  			nro
780		c += '		</div>';
781
782	}
783	c += '</div>'
784
785	return c;
786}
787
788function click_en_juego (ind)
789{
790	var c = '';
791
792	//titulo = array_idiomas_TRA[38].replace('&NRO', array_idiomas_TRA[2] + ' ' + ind);
793	titulo = array_idiomas_TRA[38].replace('&NRO', ind);
794
795	
796	c += '<div class="opta-evolucion-detalle-juego">' + titulo + '</div>' ;
797	/*
798	c += '	<div class="scroll-pane" style="width:100%;max-height:' + paramALTO_COM + 'px;">';
799	c += '		<div class="opta-table opta-narracion">';
800	
801	for (var n=array_pelicula_juego[ind].length-1; n>=0; n--) {
802		if ( array_pelicula_juego[ind][n].TEXTO !== '??' )
803		{
804			alert (array_pelicula_juego[ind][n].TEXTO)
805			c += rellenar_datos_narracion_pelicula (array_pelicula_juego[ind], n)
806		}
807	}
808	c += '		</div>';
809	c += '	</div>';
810	*/
811	
812	for (var n=array_pelicula.length-1; n>=0; n--) {
813		if ( array_pelicula[n].TEXTO !== '??' )
814		{
815			if ( Number(array_pelicula[n].NJ) == ind) 
816			{
817				if ( array_pelicula[n].ACC !== "5") 
818				{
819					c += rellenar_datos_narracion_pelicula (array_pelicula, n)
820				}
821			}
822		}
823	}
824	c += '	</div>';
825	c += '</div>';
826	
827	
828	
829	$jOPTA("#opta-evolucion-narracion-juego").empty();
830	$jOPTA('#opta-evolucion-narracion-juego').append(c);
831	$jOPTA('#opta-evolucion-narracion-juego').css("display", "block");
832
833}
834
835function Recargar_Xml_Directos ()
836{
837	//Jfe
838 //alert("Recargar_Xml_Directos ");
839	switch ( Number(datos_partido.EST) )
840	{
841		case 7:
842		case 8:
843		case 9:
844			clearInterval(refreshtime);
845			break;
846	};
847
848	//alert("Antes Rellenar Widget");
849	rellenar_widget();
850	
851	//if ( Number (paramMODELO) == 2 )
852	//{
853		//click_en_carpeta (iOpcionCarpeta, "");
854	//};
855};
856
857function sacar_numero_sets ()
858{
859	nro_sets = 0
860	if ( datos_partido.NS !== undefined )
861	{
862		nro_sets = Number(datos_partido.NS)
863	}
864	else
865	{
866		for (var j=1; j<=5; j++) 
867		{
868			if (datos_resultado[0]["SET" + j] !== "" )
869			{
870				nro_sets = nro_sets + 1
871			}
872		}
873	};
874	if ( nro_sets == 0 ) { nro_sets = 3 }
875	
876	return nro_sets;
877};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.