<SCRIPT LANGUAGE="JavaScript">
// get the window from which the call is made
var oWin = external.menuArguments;
// get the document hosted in the window
var oDoc = oWin.document;
// get the selected text in the document
var oSelText = oDoc.selection;
// get the selected text range
var oSelRange = oSelText.createRange();
// get the selection
var queryStr = oSelRange.text;
// launch the query in the search engine
var ie = new ActiveXObject("InternetExplorer.Application");
ie.Navigate("http://www.live.com/?q=" + queryStr);
ie.visible = true;
</SCRIPT>
Check out the SelectSearch utility for IE. To install, just run the selsearchinstall.bat file. If you want to change the search engine used in the tool, just open up c:\selectsearch\selsearch.htm and change the URL in the line "ie.Navigate("http://www.live.com/?q=" + queryStr);" to the one you are interested. Here are few of the top ones –
Google – http://www.google.com/search?hl=en&q=<queryStr>
Yahoo – http://search.yahoo.com/search?p=<queryStr>
Wikipedia – http://en.wikipedia.org/wiki/Special:Search?search=<queryStr>
If I get more free time, I will write a nice little installer for this.