As you can see, the browser's parser has added the missing double quotes to wrap your attribute values. Even though some people don't like to use them, strictly speaking they are mandatory. If you don't provide them, the browser will have to add them which might fail terribly (qed).
So you should add those double quotes yourself at the right positions and it should work.
onclick="SetCookie(........); return false;"