// ocultar div (recursos)
OCULTO="none";
VISIBLE="block";
function mostrar(blo,off,on) {
  document.getElementById(blo).style.display=VISIBLE;
  document.getElementById(off).style.display=VISIBLE;
  document.getElementById(on).style.display=OCULTO;
}
 
function ocultar(blo,off,on) {
  document.getElementById(blo).style.display=OCULTO;
  document.getElementById(off).style.display=OCULTO;
  document.getElementById(on).style.display=VISIBLE;
}
// POP UP

// barra de estado
window.status = "Red de Universidades por el Clima";

// favoritos Firefox
function bookmarksite(title, url){
	if (document.all)
		window.external.AddFavorite(url, title);
	else if (window.sidebar)
			window.sidebar.addPanel(title, url, "")
}

// favoritos IE
function agregar(){
	if ((navigator.appName== "Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>=4)){
		var url="http://www.universidadesporelclima.org";
		var titulo="Red de Universidades por el Clima";
			window.external.AddFavorite(url,titulo);
	}else{
		if(navigator.appName == "Netscape")
			alert ("Presione Ctrl+D para agregar este sitio en sus Bookmarks");
	}
}
		
// tamaņo letra
function zoomText(Accion,Elemento){
	//inicializaciones
	obj=document.getElementById(Elemento);
	if (obj.style.fontSize==""){
		obj.style.fontSize="100%";
	}
	actual=parseInt(obj.style.fontSize); //valor actual del tamaņo del texto
	incremento=10;// el valor del incremento o decremento en el tamaņo

	//accion sobre el texto
	if(Accion=="reestablecer"){
		obj.style.fontSize="100%"
	}
	if(Accion=="aumentar"){
		valor=actual+incremento;
		obj.style.fontSize=valor+"%"
	}
	if(Accion=="disminuir"){
		valor=actual-incremento;
		obj.style.fontSize=valor+"%"
	}
}

// abrir en nueva ventana
function prepareTargetBlank(){
   var className = 'external';
   var as = document.getElementsByTagName('a');
   for(i=0;i<as.length;i++){
      var a = as[i];
      r=new RegExp("(^| )"+className+"($| )");
      if(r.test(a.className)){
         a.onclick = function(){
            window.open(this.href);
            return false;
         }
      }
    }
}  
window.onload = prepareTargetBlank;