/********************************************************************
 ********************************************************************
 * Conjunto de funciones para el tratamiento de la selección de 
 * series y tasas en el arbol de búsquedas en el propio cliente
 * en vez de en el servidor.
 ********************************************************************
 ********************************************************************/

var lastCheckBox = null;

/** 
 * Comprueba la compatibilidad del navegador.
 */
function CheckBrowserCompatible () {

	if ( !document.getElementById  ) {
		alert ('La versión de su navegador es demasiado antigua, por favor, actualícela');
	}// if ( !document.getElementById )
}// function CheckBrowserCompatible ()

/**
 * Lee la cookie con información de las series en una búsqueda.
 */
function GetCookie(name) {
	var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1) {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    } else {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1) {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}// function GetCookie(name)

/**
 * Crea una cookie
 */
function createCookie(name,value,days)
{
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

/**
 * Obtiene la fecha de expiración de la cookie seriesBusqueda
 */
function getexpirydate(noSecs){
	var UTCstring;
	Today = new Date();
	nomilli=Date.parse(Today);
	Today.setTime(nomilli+noSecs*1000);
	UTCstring = Today.toUTCString();
	return UTCstring;
}// function getexpirydate(noSecs)

/**
 * Elimina cualquier selección previa.
 */
function ClearPrevSelection() {

	var hidden = document.getElementById('__hiddenArbol');
	hidden.value = '';
}// function ClearPrevSelection()

/**
 * Habilita o deshabilita la funcionalidad del árbol.
 */
function HabilitarArbol(enabled) {

	document.getElementById('divArbolBusquedas').disabled = !enabled;
	document.getElementById('tblControles').disabled = !enabled;
	document.getElementById('divArbolBusquedas').style.cursor = enabled ? 'default' : 'wait';
	document.getElementById('tblControles').style.cursor = enabled ? 'default' : 'wait';
}// function HabilitarArbol(enabled)

/**
 * Deselecciona los checks del árbol de búsquedas.
 */ /*
 function SetSeriesHojasArbol() {

	var checks = document.getElementsByTagName('input');
	var cont;
	var ult = -1;

	var FocoSinSeleccion = 0; /* Teresa: 7-4-2006 Esta variable se crea para fijar el foco
	cuando no hay ninguna serie seleccionada. Hay ocasiones que al desplegar las series del arbol
	no se ve el despliege porque queda oculto, con esto "y solo si no hay ninguna serie seleccionada"
	guardo la primer serie de la rama y la avanzo 4 mas para poner el foco en una posición que al menos
	permita ver algunas series del arbol */ /*

	lastCheckBox = null;

	// Buscamos los checks del árbol para deshabilitarlos.			
	for ( cont = 0; cont < checks.length; cont++ ) {

		if ( checks[cont].type == 'checkbox' ) {
			
			// Comprobamos si es un check del árbol de búsquedas.
			var aux = checks[cont].id;
			var pos = aux.indexOf ('_$');
			
			if ( pos != -1 ) {
				if ( FocoSinSeleccion == 0 ) { /* la primera vez que encuentro una serie guardo su posición
				y la avanza 6 más, el 6 es porque en las pruebas que he hecho parece que es el valor que mejor
				coloca el foco, si es mas pequeño no se ven y si es mas grande hay ocasiones en que se situa por
				debajo de la primer serie de la rama */  /*
					FocoSinSeleccion = cont + 6
				}
						
				var id = aux.substring(0, pos +2);
				var cod = ExtraerCodigo(aux);
				
				if ( checks [cont].checked ) {
					
					if ( id == 'chkBoxSerie_$' ) {
						AddSerie(cod);						
					}
					else if ( id == 'chkBoxTasa_$' ) {
						cod += '_T';
						AddSerie(cod);
					}// if ( id == 'chkBoxSerie_$' )
					
					ult = cont;
					lastCheckBox = aux;
				}// if ( checks [cont].checked )

			
			}// if ( pos != -1 )
		}// if ( checks[cont].type == 'checkbox' )
	}// for ( cont = 0; cont < checks.length; cont++ )	
	if (FocoSinSeleccion != 0 && lastCheckBox == null) {
	  lastCheckBox = checks[FocoSinSeleccion].id; //solo si no hay series seleccionadas fijo el foco
	}
}// function SetSeriesHojasArbol() */

/*
	30-1-2007 (Tomás). Se añade un parámetro a la función. A partir de este momento
	en ArbolBusquedasSeries se pueden seleccionar simultaneamente series de diferentes
	nodos. Con el parámetro, controlamos el nodo que se está abriendo para situar el foco
	en el sitio oportuno, y no en la última serie que se selecciono.
	Parm vid: informa del último nodo que se expandió.
*/
function SetSeriesHojasArbol(vid) {

	var checks = document.getElementsByTagName('input');
	var cont;
	var ult = -1;
	var ls_aux;

	var FocoSinSeleccion = 0; /* Teresa: 7-4-2006 Esta variable se crea para fijar el foco
	cuando no hay ninguna serie seleccionada. Hay ocasiones que al desplegar las series del arbol
	no se ve el despliege porque queda oculto, con esto "y solo si no hay ninguna serie seleccionada"
	guardo la primer serie de la rama y la avanzo 4 mas para poner el foco en una posición que al menos
	permita ver algunas series del arbol */

	lastCheckBox = null;

	// Buscamos los checks del árbol para deshabilitarlos.			
	for ( cont = 0; cont < checks.length; cont++ ) {

		if ( checks[cont].type == 'checkbox' ) {
			
			// Comprobamos si es un check del árbol de búsquedas.
			var aux = checks[cont].id;
			var pos = aux.indexOf ('_$');
			
			if ((vid != 'ArbolBusquedaSeries1') && (pos != -1)){
				ls_aux = aux.slice(pos + 2)		
			}
			else {
				ls_aux = ""
			}
			
			if (pos != -1) {
				if (( FocoSinSeleccion == 0 ) && (vid == ls_aux)) { /* la primera vez que encuentro una serie guardo su posición
					y la avanza 6 más, el 6 es porque en las pruebas que he hecho parece que es el valor que mejor
					coloca el foco, si es mas pequeño no se ven y si es mas grande hay ocasiones en que se situa por
					debajo de la primer serie de la rama. Si estamos en el último nodo que se ha expandido. */
					FocoSinSeleccion = cont + 6
				}
						
				var id = aux.substring(0, pos +2);
				var cod = ExtraerCodigo(aux);
				
				if ( checks [cont].checked ) {
					
					if ( id == 'chkBoxSerie_$' ) {
						AddSerie(cod);						
					}
					else if ( id == 'chkBoxTasa_$' ) {
						cod += '_T1';
						AddSerie(cod);
					}// if ( id == 'chkBoxSerie_$' )
					else if ( id == 'chkBoxT3_$' ) {
						cod += '_T3';
						AddSerie(cod);
					}// if ( id == 'chkBoxSerie_$' )
					
					ult = cont;
					/* Nos situamos en la última selección si pertenece
					al último nodo expandido */
					if (vid == ls_aux.slice(0, vid.length)) {
						lastCheckBox = aux;
					}
				}// if ( checks [cont].checked )

			
			}// if ( pos != -1 )
		}// if ( checks[cont].type == 'checkbox' )
	}// for ( cont = 0; cont < checks.length; cont++ )	
	if (FocoSinSeleccion != 0 && lastCheckBox == null) {
	  lastCheckBox = checks[FocoSinSeleccion].id; //solo si no hay series seleccionadas fijo el foco
	}
}// function SetSeriesHojasArbol() */

function SetFocusLastCheckBox () {

	if ( lastCheckBox ) {
		if ( document.getElementById ) {
			var check = null;
			
			check = document.getElementById(lastCheckBox);
			if ( check && check.checked ) {
				check.focus ();
			}
			else{
				if (check) {
					check.focus ();
				}
			} // if ( check )
		}// if ( document.getElementById )
	}// if ( lastCheckBox )
}// function SetFocusLastCheckBox ()

/** 
 * Restaura los checks habilitados tras un PostBack al
 * servidor.
 */
/* function RestoreChecks () {
	
	HabilitarArbol(false);
	
	// Leemos el contenido del campo oculto
	var series = GetSeriesSeleccionadas();
	var i;
	var serie;
	var idChk;
	var chkBox = null;
	
	if ( series ) {
		
		if ( series.length == 0 ) {
			
			var val = GetCookie('seriesBusqueda');
			
			if (!val) {
			
				// La cookie está vacía, así que hay que deshabilitar cualquier
				// check que esté marcado.
				if ( !document.getElementsByTagName ) {
					
					alert('No esta disponible getElementsByTagName()');
					// Habilitamos controles
					HabilitarArbol(true);
					return;
				}// if ( !document.getElementsByTagName )
				
				// Restauramos las series seleccionadas.
				SetSeriesHojasArbol();			
				
				// Habilitamos controles
				HabilitarArbol(true);
				return;
			}
			else {
			
					
				// Extraemos las series seleccionadas de la cookie
				series = val.split('$');
								
				// Borramos la cookie.
				createCookie ('seriesBusqueda', '', -1);
			}// if (!val)
			
			var hidden = document.getElementById('__hiddenArbol');
								
			var i;
			for ( i = 0; i < series.length; i++ ) {
			
				if ( series[i].length > 0 ) {
					hidden.value = hidden.value + series[i] + ';';
				}// if ( series[i].length > 0 )
			}// for ( i = 0; i < series.length; i++ ) 
		}// if ( series.length == 0 )
		
		HabilitarArbol(false);
		
		// Por cada serie, buscamos su check correspondiente y
		// lo habilitamos.
		for ( i = 0; i < series.length; i++ ) {
		
			serie = series[i];
			
			if ( serie.length > 0 ) {
			
				// Hay dos tipos de series, las naturales y las
				// tasas, diferenciamos entre ellas por el código.
				if ( serie.indexOf("_T") == -1 ) {
					idChk = 'chkBoxSerie_$' + serie;
				}
				
				else {
					serie = serie.replace(/_T/, '');
					idChk = 'chkBoxTasa_$' + serie;
				}// if ( serie.indexOf("_T") == -1 )
				
				// Buscamos el check correspondiente.
				chkBox = document.getElementById(idChk);
				
				if ( chkBox ) {
					// Y, si existe, lo habilitamos.
					chkBox.checked = true;	
				}// if ( chkBox )
			}// if ( serie.length > 0 )
		}// for ( i = 0; i < series.length; i++ )
	}// if ( series )
	
	// Habilitamos controles
	HabilitarArbol(true);
}// function RestoreChecks () */

/*
	30-1-2007 (Tomás). Se incluye un parámetro de entrada en la función 
	RestoreCheck para tener en cuenta el nodo que se está desplegando
	cuando se haga el postback. Queda comentada arriba la función original. 
*/
 function RestoreChecks (vid) {
	HabilitarArbol(false);
	
	// Leemos el contenido del campo oculto
	var series = GetSeriesSeleccionadas();
	var i;
	var serie;
	var idChk;
	var chkBox = null;
	
	if ( series ) {
		
		if ( series.length == 0 ) {
			
			var val = GetCookie('seriesBusqueda');
			
			if (!val) {
			
				// La cookie está vacía, así que hay que deshabilitar cualquier
				// check que esté marcado.
				if ( !document.getElementsByTagName ) {
					
					alert('No esta disponible getElementsByTagName()');
					// Habilitamos controles
					HabilitarArbol(true);
					return;
				}// if ( !document.getElementsByTagName )
				
				// Restauramos las series seleccionadas.
				SetSeriesHojasArbol(vid);			
				
				// Habilitamos controles
				HabilitarArbol(true);
				return;
			}
			else {
			
					
				// Extraemos las series seleccionadas de la cookie
				series = val.split('$');
								
				// Borramos la cookie.
				createCookie ('seriesBusqueda', '', -1);
			}// if (!val)
			
			var hidden = document.getElementById('__hiddenArbol');
								
			var i;
			for ( i = 0; i < series.length; i++ ) {
			
				if ( series[i].length > 0 ) {
					hidden.value = hidden.value + series[i] + ';';
				}// if ( series[i].length > 0 )
			}// for ( i = 0; i < series.length; i++ ) 
		}// if ( series.length == 0 )
		
		HabilitarArbol(false);
		
		// Por cada serie, buscamos su check correspondiente y
		// lo habilitamos.
		for ( i = 0; i < series.length; i++ ) {
		
			serie = series[i];
			
			if ( serie.length > 0 ) {
			
				// Hay tres tipos de series, las naturales y las
				// tasas (2), diferenciamos entre ellas por el código.
				if ( serie.indexOf("_T1") == -1 && serie.indexOf("_T3") == -1 ) {
					idChk = 'chkBoxSerie_$' + serie;
				}
				
				if ( serie.indexOf("_T1") > -1 ) {
					serie = serie.replace(/_T1/, '');
					idChk = 'chkBoxTasa_$' + serie;
				}
				
				if ( serie.indexOf("_T3") > -1 ) {
					serie = serie.replace(/_T3/, '');
					idChk = 'chkBoxT3_$' + serie;
				}
				
				// Buscamos el check correspondiente.
				chkBox = document.getElementById(idChk);
				
				if ( chkBox ) {
					// Y, si existe, lo habilitamos.
					chkBox.checked = true;	
				}// if ( chkBox )
			}// if ( serie.length > 0 )
		}// for ( i = 0; i < series.length; i++ )
	}// if ( series )
	
	// Habilitamos controles
	HabilitarArbol(true);
}// function RestoreChecks ()


function LastCheckBox ( idCheck ) {

	createCookie ("lastChk", idCheck, 1);
}// function LastCheckBox ( idCheck )
 
/** 
 * Maneja la selección deselección de un capítulo del árbol.
 */
function CheckCapitulo(idCheck) {

	var chkCapitulo = document.getElementById(idCheck);
	
	if ( !chkCapitulo ) {
		alert('No se ha encontrado el check para el capítulo');
		return;
	}// if ( !chkCapitulo )
	
	var codigo = ExtraerCodigo(idCheck);
	
	var chkSerie;
	var idChkSerie;
	
	var chks = GetChecksCapitulo(codigo);
	
	for ( i = 0; i < chks.length; i++ ) {
	
		chkSerie = document.getElementById(chks[i]);

		// Si el capítulo está seleccionado, seleccionamos todas
		// las series, si no está seleccionado, no hacemos nada.		
		if ( chkSerie ) {
			
			// Hacemos click en el check de la serie si los estados 
			// de selección del check de la serie y del check del
			// capítulo son diferentes.
			if ( chkSerie.checked ^ chkCapitulo.checked ) {
				chkSerie.click();
			}// if ( chkSerie.checked ^ chkCapitulo.checked )
		}
		else {
			alert('No se encuentra [' + chks[i] + ']');
		}// if ( chkSerie )
	}// for ( i = 0; i < chks.length; i++ )
}// function CheckCapitulo(idCheck)

/*
function CheckCapitulo(idCheck) {
	
	var chkCapitulo = document.getElementById(idCheck);
	if ( !chkCapitulo ) {
		alert('No se ha encontrado el check para el capítulo');
		return;
	}// if ( !chkCapitulo )
	
	var codigo = ExtraerCodigo(idCheck);
	var chkSerie;
	var idChkSerie;
	var chks = GetChecksCapitulo();
	
	for ( i = 0; i < chks.length; i++ ) {
		chkSerie = document.getElementById(chks[i]);
		
		if ( chkSerie ) {
			//codigo Juan 
			//chkSerie.click();
			//fin codigo juan
			/// codigo de Teresa que sustituiria al anterior 
			if (chkCapitulo.checked != true) {
				chkSerie.click();
			} 
			else{
				if ( chkSerie.checked != true ){
					chkSerie.click();
			}
		//}
		//Fin codigo Teresa
		}
		else {
			alert('No se encuentra [' + chks[i] + ']');
		}// if ( chkSerie )
	}// for ( i = 0; i < chks.length; i++ )
}// function CheckCapitulo(idCheck)
*/
/**
 * Función para habilitar o deshabilitar los controles
 * para las operaciones con las series temporales.
 */
function HabilitarOperacionesSeries(habilitar) {

	// No se va a deshabilitar ningún control.
	habilitar = true;
	
	// Comprobamos que el campo con los últimos años contiene
	// algún valor.
	var tbAnho = document.getElementById('tbUltimosAnhos');

	habilitar = tbAnho && habilitar && (tbAnho.value.length > 0);

	EnableControl('ddlFormatos', habilitar);
	EnableControl('ddlFrecuencia', habilitar);
	EnableControl('btDescargar', habilitar);
	if (tbAnho) {	
		if (tbAnho.value.length == 0 ) {
			// Si no hay nada escrito siempre habilitamos para
			// dar la posibilidad de que el usuario escriba
			EnableControl('tbUltimosAnhos', true);
		}
		else {
			EnableControl('tbUltimosAnhos', habilitar);
		}// if (tbAnho.value.length == 0 )
	}// if (tbAnho)
	EnableControl('btnMostrarDatos', habilitar);
	EnableControl('btnVisualizarDatos', habilitar);
}// function HabilitarOperacionesSeries(habilitar)

/**
 * Función que habilita o deshabilita un control determinado.
 */
function EnableControl (idCntrl, habilitar) {

	habilitar=true;

	var cntrl = document.getElementById(idCntrl);
	if ( cntrl ) {
	
		cntrl.disabled = !habilitar;
	}// if ( cntrl )
}// function EnableControl (idCntrl, habilitar)

/**
 * Maneja el evento de cambio de texto en el TextBox de últimos años.
 */
function UltimosAnhosChanged () {

	var tbAnho = document.getElementById('tbUltimosAnhos');
	var habilitar = false;
	
	alert('Encontrado tbUltimosAnhos');
	alert(tbAnho.value);
	
	habilitar = tbAnho && tbAnho.value.length > 0;	
	
	EnableControl('btnMostrarDatos', true);
	EnableControl('btnVisualizarDatos', true);
}// function UltimosAnhosChanged ()

/**
 * Extrae de un campo oculto los diferentes identificadores
 * de los checkbox de las series del capítulo
 */	/*
function GetChecksCapitulo() {

	var result = new Array();
	var hidden = document.getElementById('__hiddenChckSeries');
	
	if ( !hidden ) {
		alert('Hubo un error inesperado, por favor, inténtelo de nuevo más tarde');
		return null;
	}// if ( !hidden )
		
	result = hidden.value.split(';');
	
	return result;
}// function GetChecksCapitulo()
*/
/**
 * Tomás 5-1-2007
 * Extrae de un campo oculto los diferentes identificadores
 * de los checkbox de las series del capítulo
 * Seleccionamos sólo los codigos que coincidan con el parm.
 */
function GetChecksCapitulo(idCod) {

	var result = new Array();
	var resultT = new Array();
	var hidden = document.getElementById('__hiddenChckSeries');
	
	if ( !hidden ) {
		alert('Hubo un error inesperado, por favor, inténtelo de nuevo más tarde');
		return null;
	}// if ( !hidden )
		
	result = hidden.value.split(';');
	z = 0
	for ( i = 0; i < result.length; i++ ) {
		if (result[i].toString().indexOf("_$" + idCod) > -1) {
			resultT[z] = result[i];
			z++;
		}
	}
	return resultT;
}// function GetChecksCapitulo()
/**
 * Añade o elimina una serie de las series seleccionadas.
 */
function CheckSerie(idCheck) {

	var chkBox = document.getElementById(idCheck);
	var codigo;
		
	if ( chkBox ) {

		codigo = ExtraerCodigo(idCheck);
							
		if ( chkBox.checked ) {
		
			AddSerie(codigo);
		}
		else {
		
			RemoveSerie(codigo);
		}// if ( chkBox.checked )
	} 
	else {
		// Error, no se encuentra el check!!
		alert('CheckSerie: Se produjo un error desconocido, por favor inténtelo otra vez más tarde');
	}// if ( chkBox )
}// function CheckSerie(idCheck)

/**
 * Añade o elimina una tasa de las series seleccionadas.
 */
function CheckTasa(idCheck) {

	var chkBox = document.getElementById(idCheck);
	var codigo;
	
	if ( chkBox ) {

		codigo = ExtraerCodigo(idCheck);
		codigo += '_T1';
		
		if ( chkBox.checked ) {
		
			AddSerie(codigo);
		}
		else {
		
			RemoveSerie(codigo);
		}// if ( chkBox.checked )
	} 
	else {
		// Error, no se encuentra el check!!
		alert('CheckSerie: Se produjo un error desconocido, por favor inténtelo otra vez más tarde');
	}// if ( chkBox )
}// function CheckTasa(idCheck)

/**
 * Añade o elimina una tasa de las series seleccionadas.
 */
function CheckT3(idCheck) {

	var chkBox = document.getElementById(idCheck);
	var codigo;
	
	if ( chkBox ) {

		codigo = ExtraerCodigo(idCheck);
		codigo += '_T3';
		
		if ( chkBox.checked ) {
		
			AddSerie(codigo);
		}
		else {
		
			RemoveSerie(codigo);
		}// if ( chkBox.checked )
	} 
	else {
		// Error, no se encuentra el check!!
		alert('CheckSerie: Se produjo un error desconocido, por favor inténtelo otra vez más tarde');
	}// if ( chkBox )
}// function CheckT3(idCheck)

/**
 * Extrae el código de una serie o capítulo.
 */
function ExtraerCodigo(idCheck) {
	var tmp = new Array();
	
	tmp = idCheck.split('_$');
	
	return tmp[1];
}// function ExtraerCodigo(idCheck)
					
/**
 * Añade una serie a la lista de series seleccionadas.
 */
function AddSerie (serie) {

	var i;
	var series = GetSeriesSeleccionadas();
	var aux = serie + ';';
	
	if ( series ) {
		var nSeries = series.length;
		
		for ( i = 0; i < nSeries; i++ ) {
		
			if ( ( series[i].length >  0 ) && ( series[i] != serie ) ) {
			
				aux = aux + series [i] + ';';
			}// if ( ( series[i].length >  0 ) && ( series[i] != serie ) )
		}// for ( i = 0; i < nSeries; i++ )
	}// if ( series ) 

	var hidden = document.getElementById('__hiddenArbol');
	if ( hidden ) {
		hidden.value = aux;
	}
	else {
		// Error, no se encuentra el check!!
		alert('AddSerie: Se produjo un error desconocido, por favor inténtelo otra vez más tarde');
	}// if ( hidden )
	
	// Por último, como al menos hay una serie seleccionada, habilitamos los controles
	// para operar sobre dicha serie.
	//HabilitarOperacionesSeries(true);
}// function AddSerie (serie, series)

/**
 * Elimina una serie de la lista de series seleccionadas.
 */
function RemoveSerie (serie) {

	var i;
	var series = GetSeriesSeleccionadas();
	var aux = '';
	
	if ( series ) {
	
		// El número de series seleccionadas siempre sale uno mayor porque se detecta
		// una serie vacía.
		var nSeries = series.length;
		
		for ( i = 0; i < nSeries; i++ ) {
		
			if ( ( series[i].length >  0 ) && ( series[i] != serie ) ) {
			
				aux = aux + series [i] + ';';
			}// if ( ( series[i].length >  0 ) && ( series[i] != serie ) )
		}// for ( i = 0; i < nSeries; i++ )
		
		if ( nSeries == 2 ) {
			// Por último, como sólo había una serie seleccionada y la hemos deseleccionado,
			// deshabilitamos los controles para operar sobre las series.
			//HabilitarOperacionesSeries(false);
		}// ( nSeries == 1 )
	}// if ( series ) 

	var hidden = document.getElementById('__hiddenArbol');
	if ( hidden ) {
		hidden.value = aux;
	}
	else {
		// Error, no se encuentra el check!!
		alert('RemoveSerie: Se produjo un error desconocido, por favor inténtelo otra vez más tarde');
	}// if ( hidden )
}// function RemoveSerie (serie) 

/**
 * Extrae las series seleccionadas hasta el momento en el árbol.
 */
function GetSeriesSeleccionadas() {

	var result = new Array ();

	var hidden = document.getElementById('__hiddenArbol');
	
	if ( !hidden ) {
		// Error, no se encuentra el check!!
		alert('GetSeriesSeleccionadas: Se produjo un error desconocido, por favor inténtelo otra vez más tarde');
		return;
	}// if ( hidden )
	
	if ( hidden.value.length > 0 ) {
		result = hidden.value.split(';');
	}// if ( window.Form1.__hiddenArbol.value.length > 0 )

	return result;
}// function ExtraerSeries()


