You can't directly manipulate a session value from Javascript - they only exist on the server.
You could let your Javascript get and set values in the session by using AJAX calls though.
See also
- Javascript and session variables
- jQuery click event to change php session variable