//don't forget to add <body ondblclick="dictionary()">
function dictionary() {
	if (navigator.appName!='Microsoft Internet Explorer') {
		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 > '')
			window.open('http://www.theknowledgebrokers.com/find/search.php?search=1&results=20&query='+escape(text), 'dictionary');
	}
}
