You should use drupal_add_js() and Drupal.behaviors syntax for this sort of thing. Look at other modules for guidance. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/support/attachments/20110823/bffafd3f/attachment.html