Never used cookies before and have only started using JS

So what I'm trying to do is use cookies to remember if the user want's to have snow displaying or not (using an external on my MyBB forums.
By default I've got it hidden because it does cause some lag which somes users may not be able to handle.

I've got a link in the nav bar with (Show/hide snow) which when clicked I want to enable/disable the JavaScript (

I searched the forums but I was getting nowhere so I thought it was time to start a new thread.

I've really no idea what I'm doing :/