Hi!
First, you have an error in your javascript - you should always close statements with a semicolon, so you have to replace
echo "\n<a href=\"#\" onclick=\"display.writeIt('$linkText'); return false\">$linkKey</a>";
to
echo "\n<a href=\"#\" onclick=\"display.writeIt('$linkText'); return false;\">$linkKey</a>";
Second, you do not need to use next($AboutLinks); on an array which is enumerated using foreach statement.
Try to fix this, the error might lie in the Javascript, although these are the first things I noticed and there might be another thing which is wrong about the script.
Best regards,
Stas