Both are okay, but they might or might not mean something different depending on how you look at it.
Generally, "Whenever X, Y" means that X happened/happens/is supposed to happen many times, and each and every time Y also happens (or in this case, you're told to make it happen). So your sentence would read as a general rule - "you'll have many chances to hold onto happiness in your life, and each time that happens, make sure to do so".
"When X, Y" can mean a single occurence - X happened/will happen, and Y happened/will happen at the same time. So you'd rather say "...when you get the chance" if there's a particular chance to be had - for example, you know your friend is getting a new job, and he's being anxious for it, so you're telling him to hold onto that once he gets the chance (and that job). Compare "When you get that job, you'll be out of trouble" vs (technically grammatical, but making no sense). !"Whenever you get that job, you'll be out of trouble"
Now, what @Man_From_India said also holds - if the context or grammar already estabilishes that you're talking about a repeating occurence, you can use "when" in place of "whenever". For example, "Check your locks when you leave your house" can be placed in a health and safety guide, and it would mean the same as "...whenever you leave...".
There are at least two ways these terms can be used:
1) They can be used to indicate assent:
For example:
We need some more eggs to make the soufflé. Can you go buy some?
Alright. (or, Okay.)
2) They can be used to indicate that the quality of something is "satisfactory but not exceptionally or especially good":
For example:
How was the movie last night?
It was okay. (or, It was alright)
In these two contexts, I find these terms pretty much interchangeable. In the first, you agree, but without any particular eagerness. In the second, they both convey about the same sense of enthusiasm (or apathy).
I will offer an opinion that differs slightly from Mowzer's: I think they are both somewhat general and informal terms. If for some reason more formality, politeness, or precision is called for, I would recommend using different words altogether. For example:
Judge: I'll need you to approach the bench and take the oath.
My response: Yes, your honor. (not, "Alright" or, "Okay")
English Professor: What did you think of the Faulkner story you read this weekend?
My response: It has a good message, but it's a little dry. (not, "It's alright" or, "It's okay")
Girlfriend's mother: We need some more eggs to make the soufflé. Can you go buy some?
My Response: I'd be glad to. (not, "Alright" or, "Okay")
I think your question is a fair one, and your analogy is a good one. But, in this case, I think the two words are much more interchangeable than, say, broke and bankrupt.
Best Answer
In British English, I've never heard the term foils, although I have heard the term
and
British English speakers so far as I'm aware don't use the word foils in this context.
So whilst it might be worth being aware that some speakers might use the word foils meaning slides, as a learner you'd be well advised to prefer the more standard term slides.
In this context, slides can always be used in place of foils without loss of meaning, and will be clearer to a wider section of your audience.