I think this can be worked around. I'm not great with cookies,but try this.
Replace
Code:
function savemenustate(){
var inc=1, blockid=""
while (document.getElementById("sub"+inc)){
if (document.getElementById("sub"+inc).style.display=="block"){
blockid="sub"+inc
break
}
inc++
}
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
var cookievalue=(persisttype=="sitewide")? blockid+";path=/" : blockid
document.cookie=cookiename+"="+cookievalue
}
from step one. With this
Code:
function savemenustate(){
var inc=1, blockid=""
while (document.getElementById("sub"+inc)){
if (document.getElementById("sub"+inc).style.display=="block"){
blockid="sub"+inc
break
}
inc++
}
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
var cookievalue=(persisttype=="sitewide")? blockid+";path=/" : blockid
var loc = RemoveSub(window.location.host);
cookievalue += ";domain="+loc
document.cookie=cookiename+"="+cookievalue
}
function RemoveSub(url){
var ua = url.split('.');
if(ua.length > 2){
ua.shift();
}
var uaj = ua.join('.');
return uaj;
}
Bookmarks