$$('a').each(function(ln){
    var pos = 0;
    var teclaAcceso, strTexto;
    if(ln.accessKey != ''){
        if(window.ie){
            if(ln.id == 'previoLink'){
                ln.onfocus = function(){
                    this.href = path + '/faq?idasunto='+$("asunto").value
                    this.blur();
                    this.click();
                }
            }else{
                ln.onfocus = function(){
                    this.blur();
                    this.click();
                }
            }
        }else{
            if(ln.id == 'previoLink'){
                ln.onfocus = function(){
					if(this.oldTitle == null){
						this.oldTitle = this.title;
						//alert(this.oldTitle);
					}
					this.title = "Preguntas Frecuentes sobre "+$("asunto").options[$("asunto").selectedIndex].text;
                    this.href = path + '/faq?idasunto='+$("asunto").value
                }
            }
        }
        while(ln.firstChild.nodeValue.substr(pos,1).toUpperCase() != ln.accessKey.toUpperCase()){
            pos++;
        }
        if((pos > 0) && (pos == (ln.firstChild.nodeValue.length-1))){
            strTexto = new Array(ln.firstChild.nodeValue.substr(0,pos));
        }else if(pos > 0){
            strTexto = new Array(ln.firstChild.nodeValue.substr(0,pos),ln.firstChild.nodeValue.substr(pos+1));
        }else{
            strTexto = new Array(ln.firstChild.nodeValue.substr(pos+1));
        }
        teclaAcceso = ln.firstChild.nodeValue.substr(pos,1);
        var span = new Element('span');
        span.setProperty('class', 'keyResalt');
        span.appendChild(document.createTextNode(teclaAcceso));
        while (ln.hasChildNodes())
            ln.removeChild(ln.firstChild);
        if(strTexto.length > 1){
            ln.appendChild(document.createTextNode(strTexto[0]));
            ln.appendChild(span);
            ln.appendChild(document.createTextNode(strTexto[1]));
        }else if(0 == pos){
            ln.appendChild(span);
            ln.appendChild(document.createTextNode(strTexto[0]));
        }else{
            ln.appendChild(document.createTextNode(strTexto[0]));
            ln.appendChild(span);
        }
    }
});
