I keep getting a "missing ) after argument list" (on line 1) when debugging my javascript with firebug. I don't know what is wrong as it seems all parentheses are there.
The function is supposed to place an image that can be clicked to open a lightbox in the div with id "bigPic".
Here's the relevant code:
<script type="text/javascript">
function addContent(divId,filePath,comment) {
document.getElementById(divId).innerHTML = "<div align=\"center\"><a href="+filePath+" title="+comment+" rel=\"lightbox\"><img src="+filePath+" alt="+comment+" style=\"max-height:270px;max-width:410px;\"/></a></div><div id="+comment+" align=\"center\" style=\"font-family:Verdana;margin-top:-13px;color:white;background-color:#07396B;\"><p>"+comment+"</p></div> ";
}
</script>
...
<div width="420px" height="320px" id="bigPic" name="bigPic">
<img src="http://www.villa-gloria-katouna.com/Pool%20viewsmall.JPG" />
</div>
...
echo "<div align=\"center\" style=\"display:inline; overflow:hidden;\"><img src=\"pics/$file\" style=\"cursor:pointer;cursor:hand;\" alt=\"$file\" height=\"30px\" width=\"30px\" onclick=\"addContent('bigPic', $file, $comment);\"/></a></div> ";