Page A is using PHP to set the cookie. Page B is using Javascript to retrieve it. Page A simply contains a hyperlink to Page B.
why wouldn't you use PHP to retrieve it?
Because the page that retrieves it is part of a custom software (Ultimate Bulliten Board). It used cookies to determine who is logged in for both pages.