function _poner_texto_dinamico(txt, donde) {
    var clase

    replaceChildNodes(donde, null)
    for (i=0;i<txt.length;i++) {
        var t = strip(txt[i])
        if (t.charAt(0) == '=') {
            clase = 'titulo'
            t = t.substring(1)
        } else if (t.charAt(0) == '-'){
            clase = 'resaltado izarza'
            t = t.substring(1)
        } else if (t.charAt(0) == '*'){
            clase = 'resaltado'
            t = t.substring(1)
        } else {
            clase = null
        }

        if (t.charAt(0) == '@'){
            elementos = t.substring(1).split('@')
            t = A({href:elementos[0]}, elementos[1])
        }
        appendChildNodes(donde, DIV({'class': clase}, t))
    }
}

function dinamico(url, div, callback) {
    var req = MochiKit.Async.getXMLHttpRequest();
    req.open('GET', url+'?_no_cache=' + (new Date).getTime(), true)

    d = MochiKit.Async.sendXMLHttpRequest(req, null);
    d.addCallback(function(doc) {
        var txt = doc.responseText .replace(/^#.*\n/gm, '')
        if (!strip(txt)) return
        var _txt = txt.split('\n')
         _poner_texto_dinamico(_txt, div)

        if (typeof(callback) != 'undefined') callback()
    })

}

