Hi, i am having some problems implementing the tool tip as shown here http://www.walterzorn.com/tooltip/tooltip_e.htm

Apologies if this is in the wrong section, i'm not sure if the problem is related to JS, html or php.

To give an overview i am using the tooltip to display the results of a db query. The input used is a
Code HTML4Strict:
<textarea name="details"></textarea>
. I have used this post function to capture the text:

Code PHP:
html_entity_decode($_POST['details'], ENT_QUOTES, "UTF-8")

and then this function to query the db:

Code PHP:
$details = nl2br($row['details']);

The problem arises when i input data into the text area with line breaks. As you can see from the 2 source codes the one with the line breaks doesnt work.

This one works as i have NOT inputted any linebreaks into the textarea. (the line breaks you can see are the ones that i have included in the original html).
Code HTML4Strict:
<tr bgcolor="#FFFFFF" onMouseOver="this.bgColor='#c6cdff'; Tip('<strong>Details for Custom Order ID# 86</strong><br /><br />Item: Diet Coke<br /><br />Details:<br /><br />I once bought a bottle of diet coke. It was occasionally nice, and sometimes it was not', BALLOON, true, ABOVE, true, DELAY, 1000, WIDTH, 200);" onMouseOut="this.bgColor='#FFFFFF'; UnTip();">

And this is the source code from the one that had line breaks in the original text area input, and DOES NOT work.
Code HTML4Strict:
<tr bgcolor="#FFFFFF" onMouseOver="this.bgColor='#c6cdff'; Tip('<strong>Details for Custom Order ID# 88</strong><br /><br />Item: Pepsi Max<br /><br />Details:<br /><br />Once i bought a bottle of pepsi max. <br />
<br />
somtimes it was nice,<br />
<br />
sometimes it was not.', BALLOON, true, ABOVE, true, DELAY, 1000, WIDTH, 200);" onMouseOut="this.bgColor='#FFFFFF'; UnTip();">

All the line breaks that you can see after
Code HTML4Strict:
Details:<br /><br />
have been inputted via the <textarea> eg: the input textarea would look something like this:

"Once i bought a bottle of pepsi max.

somtimes it was nice,

sometimes it was not."

I'm not sure if this is a php or html or JS issue. Any help and guidance would be greatly appreciated.

Rob