Well you could certainly write a bunch of JavaScript to go through the page during onload and to shorten text content (perhaps identified via CSS class names), replacing it with the shorter text and link. But it strikes me that this would be much easier to accomplish on the server side with a
JSP cutom tag or ilk.
Are you not using a server-side language?