Create a cookie to handle java:function();

Is it doable to use javascript functions to set a cookie parameter
and call the function if the cookie is detected?

heres the javascript that changes the background attribute.

<script language="javascript" type="text/javascript">

function Blacker(){
function Blacker2(){
function Blacker3(){

<body id="background_colour" style="background:#000000;">
<a href="javascript:Blacker()">adasdasdasdasada</a><br>
<a href="javascript:Blacker2()">adasdasdasdasada</a><br>
<a href="javascript:Blacker3()">adasdasdasdasada</a>

Can I store this data in acookie so when the user goes to the next page it automatically remembers the colour they have selected??

if this makes any sense