it was poste din this thread by "adithya"..its for wordpress though i think, dunno if it makes diff, but it php code, i think if u put it at top of any page even if it aint wordpress it'll work but i dunno... http://www.inverudio.com/programs/WordPressBlog/NewTabWindowTargetBlankPlugin.php
when u add new external link there is an option, in which window link will be open there select new window instead of default.