[Edit Description]
The bookmarklets below send the currently highlighted text to the search engine of the English Wikipedia and then display the results in a new browser window. If no text is highlighted when the bookmarklet is activated, a popup dialog appears and allows the user to enter search terms. If they don't enter any search terms, they will be sent to the Wikipedia main page. Javascript needs to be enabled in your browser for this to work.
Source (math-www.uni-paderborn.de)
[Edit Javascript]
Show Source Code
javascript%3As%3Ddocument.getSelection%28%29%3Bfor%28i%3D0%3Bi%3Cframes.length%3Bi++%29%7Bif%28s%29break%3Bs%3Dframes%5Bi%5D.document.getSelection%28%29%3B%7Dif%28%21s%29void%28s%3Dprompt%28%27Enter%2520search%2520terms%2520for%2520Wikipedia%27%2C%27%27%29%29%3Bwikiw%3Dopen%28%27http%3A//en.wikipedia.org/%27+%28s%3F%27w/wiki.phtml%3Fsearch%3D%27+escape%28s%29%3A%27%27%29%29%3Bwikiw.focus%28%29%3B
Wikipedia
Works great, no problems at all.