//SCRIPT PARA EXTENDER/CONTRAER CON UNA VELOCIDAD DETERMINADA. NO FUNCIONA CORRECTAMENTE CON LA CABECERA "DOCTYPE" 
	var altura = 0;
	var velocidad = 10;
	function extender() {
		var objeto = document.getElementById('texto');
		objeto.style.visibility = 'visible';
		altura += velocidad;
		if (!(altura >= 250)) {
			objeto.style.height = altura;
			window.setTimeout ("extender();", 20);
		}
		
	}
	function contraer() {
		var objeto2 = document.getElementById('texto');
		altura -= velocidad;
		if (!(altura <= 0)) {
			objeto2.style.height = altura;
			window.setTimeout ("contraer();", 20);
		} else {
			objeto2.style.visibility = 'hidden';
			objeto2.style.height = '0px';
		}
		
	}
	function extender_contraer () {
		if (	altura <= 0) {
			extender();
		} else {
			contraer();
		}
	}		

//SCRIPT PARA VER/OCULTAR UN DIV MUY SIMPLE CAMBIANDO LAS PROPIEDADES CSS DEL DIV IMEDIATAMENETE SIGUIENTE AL link DE VER/OCULTAR
function nextObject(obj){
	var n = obj;
	do n = n.nextSibling;
	while (n && n.nodeType != 1);
	return n;
	}
function previousObject(obj){
	var n = obj;
	do n = n.previousSibling;
	while (n && n.nodeType != 1);
	return n;
	}	

function verocultar(desde) {
          var cual=previousObject(desde);
          if(cual.style.display=='none') {
               cual.style.display='block';
			   desde.className = 'linkExpandido';
          } else {
               cual.style.display='none';
			   desde.className = 'linkContraido';
          }
          return false;
     }

function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array();
	if ( node == null )
		node = document;
	if ( tag == null )
		tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
	for (i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}

function ocultainicial() {//función para ocultar la info_oculta cuando tenemos javascript activado. Sino se muestra la info desplegada normalmente
		var aux;
		aux=getElementsByClass('info_oculta');
		for(i=0;i<aux.length;i++){
              aux[i].style.display='none';
		}
          return false;
     }
	 
	 
function addLoadEvent(func){ //en realidad esta función no es necesario, pero con el onload nos aseguramos que se hayan cargado todos los elementos.
	//alert('stop');
    var oldonload = window.onload;
    if (typeof window.onload != 'function')
    {
        window.onload = func;
    }else{
        window.onload = function(){
            if (oldonload)
            {
                oldonload();
            }
            func();
        }
    }
}
