1 function createCookie(name
,value
,days
)
6 date
.setTime(date
.getTime()+(days
*24*60*60*1000));
7 var expires
= "; expires="+date
.toGMTString();
10 document
.cookie
= name
+"="+value
+expires
+"; path=/";
13 function readCookie(name
)
15 var nameEQ
= name
+ "=";
16 var ca
= document
.cookie
.split(';');
17 for(var i
=0;i
< ca
.length
;i
++)
20 while (c
.charAt(0)==' ') c
= c
.substring(1,c
.length
);
21 if (c
.indexOf(nameEQ
) == 0) return c
.substring(nameEQ
.length
,c
.length
);
26 function eraseCookie(name
)
28 createCookie(name
,"",-1);