//don't forget to add <body ondblclick="dictionary()">
function dictionary() {
if (navigator.appName == "Netscape") {
t = document.getSelection();
opennewdictwin(t);
}
else {
t = document.selection.createRange();
if(document.selection.type == 'Text' && t.text != '') {
document.selection.empty();
opennewdictwin(t.text);
      }
   }
}
function opennewdictwin(text) {
while (text.substr(text.length-1,1)==' ')
	text=text.substr(0,text.length-1)
while (text.substr(0,1)==' ')
	text=text.substr(1)
if (text > '') {
var newwin = window.open('http://www2.thefreedictionary.com/'+escape(text), 'dictionary', 'width=700,height=500,resizable=yes,menubar=yes,scrollbars=yes,status=yes,titlebar=yes,toolbar=yes,location=yes,personalbar=yes');
   }
}
function dictlookup(form)
{
	var url;
	url='http://'+form.Set.value+'.thefreedictionary.com/';
	url+=escape(form.Word.value)+form.mode.options[form.mode.selectedIndex].value;
	top.location=url;
}

function PageSubmit()
{
	if(obj.Word.value == "")
	{
		alert("Please enter the word.");
		obj.Word.focus();
		return false;
	}
}
