var idHL;

function highlightsense(eltId) {
    var oDocIframe = parent.opener.document.getElementById("frame_dictionary");
    var oDest = oDocIframe.contentDocument.getElementById(eltId);

    //Unselect the previous highlight by security if the user click on 2 senses very quickly
    if (idHL) {
        if(oDocIframe.contentDocument.getElementById(idHL))
            oDocIframe.contentDocument.getElementById(idHL).setAttribute("style", "");
    }
    if (oDest.nodeName == "DIV") {
        ScrollToElt(oDest.firstChild, oDocIframe, true); //scroll to 'phrasal verbs'
    }
    else
        ScrollToElt(oDest, oDocIframe, true);
    oDest.setAttribute("style", "background-color:#F0F0F0");
    idHL = eltId
           // bug 5244
           setTimeout("colorizesense()", 1500);
}

function colorizesense() {
    var oDocIframe = window.parent.opener.document.getElementById("frame_dictionary");
    var oDest = oDocIframe.contentDocument.getElementById(idHL);
    oDest.setAttribute("style", "");
}

//Function called after a click on title of popup menu
function goTopOfPage() {
    var oIframe = window.parent.opener.document.getElementById("frame_dictionary");
    var oBody =  oIframe.contentDocument.getElementsByTagName("body").item(0);
    ScrollToElt(oBody,oIframe);
}
