function Starto() { var biografioj = $$(".biografio"); biografioj.each(function(bio) { bio.onclick = MontriBiografion; bio.PreniBiografion = PreniBiografion; bio.Respondi = PrezentiBiografion; }); Ajax.Responders.register({ onComplete: function(mendo, respondo) { if (mendo.options.respondanto) { if (!respondo.status || (respondo.status >= 200 && respondo.status < 300)) { mendo.options.respondanto.Respondi(respondo); } else { mendo.options.respondanto.Respondi(0); } } } }); } function MontriBiografion(e) { if (!e) { e = window.event; } var li = this.parentNode; if (this.parentNode.lastChild.className == 'biografio') { this.parentNode.removeChild(this.parentNode.lastChild); } else { this.PreniBiografion(); } Event.stop(e); } function PreniBiografion() { if (this.href) { var parametroj = new Object; parametroj.ajakso = 'ajakso'; this.ajakso = new Ajax.Request( this.href, { method: "get", parameters: parametroj, respondanto: this } ); } } function PrezentiBiografion(respondo) { if (respondo && respondo.responseXML) { var biodiv; var divoj = respondo.responseXML.getElementsByTagName('div'); if (divoj.length) { for (var i = 0; i < divoj.length; i++) { if (divoj[i].className && divoj[i].className == 'biografio') { biodiv = this.parentNode.appendChild(divoj[i]); } } } else { var ujo = new Element("div"); var teksto = respondo.responseText; teksto = teksto.replace(/[\s\S]*?(