X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=htdocs%2Fphplayersmenu%2Flayerstreemenu-cookies.js;fp=htdocs%2Fphplayersmenu%2Flayerstreemenu-cookies.js;h=3c855eb6d495cdd8a169937ec4d62ccb6b46fdf1;hb=6855525e48fad5de270500a5445c4f4ff85d8bda;hp=0000000000000000000000000000000000000000;hpb=e69709aa8ee6108a1197e46b45367ba8dab55a52;p=diogenes.git diff --git a/htdocs/phplayersmenu/layerstreemenu-cookies.js b/htdocs/phplayersmenu/layerstreemenu-cookies.js new file mode 100644 index 0000000..3c855eb --- /dev/null +++ b/htdocs/phplayersmenu/layerstreemenu-cookies.js @@ -0,0 +1,64 @@ +// PHP Layers Menu 3.1.1 (C) 2001-2003 Marco Pratesi (marco at telug dot it) + +function setLMCookie(name, value) { + document.cookie = name + "=" + value; +} + +function getLMCookie(name) { + foobar = document.cookie.split(name + "="); + if (foobar.length < 2) { + return null; + } + tempString = foobar[1]; + if (tempString.indexOf(";") == -1) { + return tempString; + } + yafoobar = tempString.split(";"); + return yafoobar[0]; +} + +function parseExpandString() { + expandString = getLMCookie("expand"); + expand = new Array(); + if (expandString) { + expanded = expandString.split("|"); + for (i=0; i