<!--
// bSupportsDHTML = true para Internet Explorer 4 o mayor
var bDoesDHTML = ( (navigator.userAgent.indexOf("MSIE") >= 0) &&
                   (navigator.appVersion.substring(0,1) >= 4) )

// items de menu si browser soporta DHTML
if(bDoesDHTML){document.write("<STYLE>.off{display:none}</STYLE>")}


// Script para mostrar imágenes con aparicion pixelada
// Especificar la velocidad en mili segundos
var slidespeed=3000
// Especificar las imágnes
var slideimages=new Array("img/nal/1.jpg","img/nal/2.jpg")
// Especificar los Links Correspondientes
var slidelinks=new Array("http://www.ucb.edu.bo","http://www.ucb.edu.bo")

var imageholder=new Array()
var ie55=window.createPopup
for (i=0;i<slideimages.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideimages[i]
}

function gotoshow(){
window.location=slidelinks[whichlink]
}
// FIN Script para mostrar imágenes con aparicion pixelada

function doSection(secNum)
{
	secNum.className="off"
}

function addFilt(oWhich)
{
	oWhich.style.filter="glow(color=red, strength=5)"
}
function removeFilt(oWhich)
{
	oWhich.style.filter=" "
}

	var bn = navigator.appName; 
	var bv = parseFloat(navigator.appVersion);
	var IE = (bn == "Microsoft Internet Explorer"); 
	var IE3 = (IE && bv >= 3); 
	var IE4 = (IE && bv >= 4); 
	var IE41 = (IE && bv >= 4 && navigator.appVersion.indexOf('MSIE 4.0;') < 0 && navigator.appVersion.indexOf('MSIE 4.01;') < 0);
	var NS = (bn == "Netscape"); 
	var NS3 = (NS && bv >= 3); 
	var NS4 = (NS && bv >= 4); 
	var NS41 = (NS && bv >= 4.04);


	var n = 3; 
	var r = 15; 
	if (IE3 || NS3) 
		{
		  n = (Math.round(Math.random()*r) + 1);
		}
	function random_image()
		{
		  document.write('<img src="img/permanente/' + n + '.jpg" alt="35 años de excelencia académica"  border=1><\/a>');
		}


	var nn = 3; 
	var rr = 7; 
	if (IE3 || NS3) 
		{
		  nn = (Math.round(Math.random()*rr) + 1);
		}

	function random_nal()
		{
		  document.write('<img src="img/nal/' + nn + '.jpg" alt="Imágenes de la UCB"  border=2><\/a>');
		}

function makeArray(m)
{
  this.length = m;
  for (i=1;i<=m;i++)
  {
    this[i]=0;
  }
  return this;
}

function displayDate() {
    var this_month = new makeArray(12);
    this_month[0]  = "Enero";
    this_month[1]  = "Febrero";
    this_month[2]  = "Marzo";
    this_month[3]  = "Abril";
    this_month[4]  = "Mayo";
    this_month[5]  = "Junio";
    this_month[6]  = "Julio";
    this_month[7]  = "Agosto";
    this_month[8]  = "Septiembre";
    this_month[9]  = "Octubre";
    this_month[10] = "Noviembre";
    this_month[11] = "Diciembre";
	var today = new Date();
	var day   = today.getDate();
	var month = today.getMonth();
	var year  = today.getYear();
	if (year < 100){
		year += 1900;
	}
  return(", "+day+" de "+this_month[month]+" de 2004");
}
               var datos_a = new Image();
                    datos_a.src = "imagenes/datos_1.gif";		

		var datos_b = new Image();
                    datos_b.src = "imagenes/datos_2.gif";		


                var temas_a = new Image();
                    temas_a.src = "imagenes/temas_1.gif";		

                var temas_b = new Image();
                    temas_b.src = "imagenes/temas_2.gif";	


                function MouseOn(imageName)
		{ 
			document.images[imageName].src="imagenes/" + imageName + "_2.gif";
		}
	
		function MouseOff(imageName)
		{
			document.images[imageName].src="imagenes/" + imageName + "_1.gif";
		}


// Funcion para poner texto
var enablepersist="on" //Enable saving state of content structure? (on/off)

if (document.getElementById){
document.write('<style type="text/css">')
document.write('.switchcontent{display:none;}')
document.write('</style>')
}

function getElementbyClass(classname){
ccollect=new Array()
var inc=0
var alltags=document.all? document.all : document.getElementsByTagName("*")
for (i=0; i<alltags.length; i++){
if (alltags[i].className==classname)
ccollect[inc++]=alltags[i]
}
}

function contractcontent(omit){
var inc=0
while (ccollect[inc]){
if (ccollect[inc].id!=omit)
ccollect[inc].style.display="none"
inc++
}
}

function expandcontent(cid, cid2){
document.getElementById(cid2).className = "off"
if (typeof ccollect!="undefined"){
contractcontent(cid)
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"
selectedItem=cid+"|"+document.getElementById(cid).style.display
}
}

function revivecontent(){
selectedItem=getselectedItem()
selectedComponents=selectedItem.split("|")
contractcontent(selectedComponents[0])
document.getElementById(selectedComponents[0]).style.display=selectedComponents[1]
}

function get_cookie(Name) { 
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { 
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function getselectedItem(){
if (get_cookie(window.location.pathname) != ""){
selectedItem=get_cookie(window.location.pathname)
return selectedItem
}
else
return ""
}

function saveswitchstate(){
if (typeof selectedItem!="undefined")
document.cookie=window.location.pathname+"="+selectedItem
}

function do_onload(){
getElementbyClass("switchcontent")
if (enablepersist=="on" && getselectedItem()!="")
revivecontent()
}


if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload

if (enablepersist=="on" && document.getElementById)
window.onunload=saveswitchstate
//-->
