1 // PHP Layers Menu 3.1.1 (C) 2001-2003 Marco Pratesi (marco at telug dot it)
3 function setLMCookie(name
, value
) {
4 document
.cookie
= name
+ "=" + value
;
7 function getLMCookie(name
) {
8 foobar
= document
.cookie
.split(name
+ "=");
9 if (foobar
.length
< 2) {
12 tempString
= foobar
[1];
13 if (tempString
.indexOf(";") == -1) {
16 yafoobar
= tempString
.split(";");
20 function parseExpandString() {
21 expandString
= getLMCookie("expand");
24 expanded
= expandString
.split("|");
25 for (i
=0; i
<expanded
.length
-1; i
++) {
26 expand
[expanded
[i
]] = 1;
31 function parseCollapseString() {
32 collapseString
= getLMCookie("collapse");
33 collapse
= new Array();
35 collapsed
= collapseString
.split("|");
36 for (i
=0; i
<collapsed
.length
-1; i
++) {
37 collapse
[collapsed
[i
]] = 1;
43 parseCollapseString();
45 function saveExpandString() {
47 for (i
=0; i
<expand
.length
; i
++) {
49 expandString
+= i
+ "|";
52 setLMCookie("expand", expandString
);
55 function saveCollapseString() {
57 for (i
=0; i
<collapse
.length
; i
++) {
58 if (collapse
[i
] == 1) {
59 collapseString
+= i
+ "|";
62 setLMCookie("collapse", collapseString
);