(Also, I'm testing how to put this on the page here.)
[javascript:q=document.getSelection();for(i=0;i<frames.length;i++){q=frames[i].document.getSelection();if(q)break;}if(!q)void(q=prompt('Enter text to search using Wikipedia. You can also highlight a word on this web page before clicking Wikipedia.',''));if(q)location.href='http://www.wikipedia.com/search.fcgi?client=magic_button&request='+escape(q)]
Just drag this link up to your navigation toolbar
Then, you can go to any web page, highlight any text of interest, click the button and magically search on Wikipedia for that text.