The Parameters are used when your context is a component in a composite application, which allows you to pass parameters to the component. It is used exclusively in that context, and is not available otherwise (and is never available client side).
You can use the following line of code to see what the last ID submitted to the server is (which in your onComplete, should be the image you just clicked)
dojo.query('[name="$$xspsubmitid"]')[0].value
That locates the $$xspsubmitid field and retrieves its value. On a partial refresh, the client side XSP object sets the value of this field to the ID of the object receiving the refresh, in this case, your image.
However, it appears to me from your description this is unnecessary, if your image class is computed server side, and the image is the target of the partial refresh, then the refresh should change the class of your image, however, you are then resetting it in the onComplete when you say:
"onComplete of the
event, I use dojo to change all image control's className to iconNotSet."
Would it not be better to use dojo to change all image controls to iconNotSet during the partial refresh's onStart event, and then just let the partial refresh handle recomputing the class for the single image that was clicked, since only one image can be selected at a time anyway.
Also, I am curious, are you using a true profile document? I am curious why ... Does the data need to remain persistent after the users session is over? Or is it strictly for settings during the session, and if so, wouldn't sessionScope.get/put be more appropriate? If it does need to be persistent, then I would look at the use of applicationScope, unless you need that information to be available to other users outside of the XPages and/or the JVM...