// Script for Look up a term
var NS = (navigator.appName == "Netscape") ? 1 : 0;
if (NS) document.captureEvents(Event.DBLCLICK);
document.ondblclick = dict;

var newwin;
function dict() {
if (NS) {
t = document.getSelection();
opennewwin(t);
}
else {
t = document.selection.createRange();
if(document.selection.type == 'Text' && t.text != '') {
document.selection.empty();
opennewwin(t.text);
      }
   }
}
function opennewwin(text) {
if (text > '') {
newwin = window.open('http://www.xrefer.com/results.jsp?shelf=search+all&Submit.x=4&Submit.y=20&term='+text, 'dictionary', 'width=700, height=500, resizable=yes, menubar=yes, toolbar=yes, scrollbars=yes');
setTimeout('newwin.focus()', 100);
   }
}
// End of Look up Term script
