function mi_subsec(el)
{
	document.all[el].style.backgroundColor = "#9CB2CE"
	document.all[el].style.cursor = "hand";
	document.all[el].children[0].style.color = "#FFFFFF";
	document.all[el].title = document.all[el].children[0].title;
}

function mo_subsec(el)
{
	document.all[el].style.backgroundColor = "#E7E7E7"
	document.all[el].style.cursor = "auto";
	document.all[el].children[0].style.textDecorationUnderline = false;
	document.all[el].children[0].style.color = "#000066";
}

function mc_subsec(el)
{
	document.location.href = document.all[el].children[0].href;
}

function mi_sec(el)
{
	document.all[el].style.backgroundColor = "#C6C3C6"
	document.all[el].style.cursor = "hand";
	<!--document.all[el].children[1].style.textDecorationUnderline = true;
	document.all[el].title = document.all[el].children[1].title;
}

function mo_sec(el)
{
	document.all[el].style.backgroundColor = "#E2E2E2"
	document.all[el].style.cursor = "auto";
	//document.all[el].children[1].style.textDecorationUnderline = false;
	//document.all[el].children[1].style.color = "#000066";
}

function mo_sec_con(el)
{
	document.all[el].style.backgroundColor = "#E9E9BC"
	document.all[el].style.cursor = "auto";
	//document.all[el].children[1].style.textDecorationUnderline = false;
	//document.all[el].children[1].style.color = "#000066";
}

function mc_sec(el)
{
	if (document.all[el].children.length > 3)
	{
		document.location.href = document.all[el].children[4].href;
	}
	else
	{
		document.location.href = document.all[el].children[1].href;
	}
}

function pag_glos(el)
{
	var w = window.open('../glosario/glos' + el + '.htm','Glosario','width=275,height=450,dependent,alwaysRaised,resizable,scrollbars');
	w.focus();
}

function pag_glos2(el)
{
	var w = window.open('glosario/glos' + el + '.htm','Glosario','width=275,height=450,dependent,alwaysRaised,resizable');
	w.focus();
}

function pag_ayuda(el)
{
	var w = window.open('/lib/ayuda.asp?termino=' + el ,'Ayuda','width=500,height=500,dependent,alwaysRaised,resizable,scrollbars');
	w.focus();
}

function ValidarAtribBusq(formul) 
{
	var i, numElements, sel;

	sel = false;
	i = 0;	
	numElements = formul.elements.length;
	while (sel == false && i<numElements)
	{
		if (formul.elements[i].type == "checkbox") 
		{
			if (formul.elements[i].checked) sel = true;
		}
		i++;
	}
	if (sel == false) alert("Debes eligir un grupo de busqueda");
	return sel;
}

function MarcarTodos(formul)
{
	var i, numElements;
	
	numElements = formul.elements.length;
	i = 0;
	while(i<numElements)
	{
		if ((formul.elements[i].type == "checkbox")&&(formul.elements[i].name != "SelecTodos"))
		{
			formul.elements[i].checked = formul.elements["SelecTodos"].checked;
		}
		i++;
	}
}

function submitformsubscrip(formul)
{
	aux = formul.email.value;
	if(aux.indexOf("@") < 0)
	{
		alert("La dirección de suscripción no tiene formato de dirección de correo valida.");
		formul.email.select();
		return false;
	}
	var aux2;
	aux2= aux.substring( aux.indexOf("@")+1 , aux.length);	
	if(aux2.indexOf(".") < 0)
	{
		alert("La dirección de suscripción no tiene formato de dirección de correo valida.");
		formul.email.select();
		return false;
	}
	return true;
}

//function delete_cookie (cookie_name)
//{
//  var cookie_date = new Date ( );  // current date & time
//  cookie_date.setTime ( cookie_date.getTime() - 1 );
//  document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString();
//}
//delete_cookie('id_usuario_qsbd');
//delete_cookie('idusuarioqsbd');
//delete_cookie('idusuario');
//document.write('<script language=JavaScript src=/lib/regusr.asp?r=') 
//document.write(escape(document.referrer))
//document.write('&o=')
//document.write(document.URL)
//document.write('>')
//document.write('</sc ript>')


/***************************************************/
/*** Codi Analytics ********************************/
/***************************************************/

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-58340-1']);
_gaq.push(['_trackPageview']);
_gaq.push(['_trackPageLoadTime']);

(function() {
	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

/***************************************************/
/*** Fi codi Analytics *****************************/
/***************************************************/



