
var NS = (navigator.appName == "Netscape") ? 1 : 0;
if (NS) document.captureEvents(Event.DBLCLICK);
document.ondblclick = ludict;

var newwin;
function ludict() {
if (NS) {
lutxt = document.getSelection();
openDictWin(lutxt);
}
else {
lutxt = document.selection.createRange();
if(document.selection.type == 'Text' && lutxt.text != '') {
document.selection.empty();
openDictWin(lutxt.text);
      }
   }
}
function openDictWin(text) {
if (text > '') {
newwin = window.open('http://app.iln.net/db/dict/default.asp?Word='+text, 'dictionary', 'width=770, height=570, resizable=no, menubar=no, toolbar=no, scrollbars=no');
setTimeout('newwin.focus()', 100);
   }
}
