Hi All,
There is an interesting JavaScript that i found while using the javascript code in webpart or any aspx page that you are developing for moss or even in master page or anywhere when you require to write a code.
This variable _spUserId is useful to know the ID of the logged in user in javascript.
Just try to login to your site and then go to address bar and then write javascript
javascript:alert(_spUserId); and see what it gives you and try using different IDs.
From there only you will get an idea that it is returning the IDs of the logged in user.
That's it.