your page should have the following code in the head:
<script src="../webassist/cookies/cookies.js"></script>
<script type="text/javascript">
function WA_getFormCookie(cookieObj, formObj, cookieName) {
cookieFormFromString(cookieObj,formObj,cookieName);
}
</script>