//------------------ cambiar el boton de cancelar respuesta (blog) -----------------
function activar_reply(obj,ruta)
{
	obj.src=ruta+"/images/cerrar.gif";
}

function desactivar_reply(obj,ruta)
{
	obj.src=ruta+"/images/cerrar_off.gif";
}


//--------------- muestra u oculta un elemento ------------------
//id => 'id' del elemento html a mostrar u ocultar (requerido)
//tipo => valor del estilo 'display'; por defecto 'block' (opcional)
function show_hide(id,tipo)
{
	var obj = document.getElementById(id);
	if (obj)
	{
		if (obj.style.display!='none') obj.style.display='none';
		else obj.style.display=(tipo||'block');
	}
	else alert("No existe el elemento '"+id+"'");
}


//--------------- evitar seleccionar texto -----------------
window.onload = function() {
   document.onselectstart = function() {return false;} //con ie lo anulamos todo, pq deja las cajas

   var entradas = document.getElementsByName("contententrada_name");
   for (i=0; i<entradas.length; i++) //con firefox hay que hacerlo bien
      entradas[i].onmousedown = function() { return false; } //mozilla
}