> var broken_cookie = the_cookie.split(":"); Do you need to define that as an array first? var broken_cookie = new Array()