I posted a couple of XPages examples showing how you can stop server-side events from firing from a client script and also how you can retrieve values for use in client-side script using inline server-side script in your client js.
Here is a link to the post:
http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7GLFZG
John