// Akrylon Generator Menu v1.1



function SavePosition(o)
{var k=document.getElementById('Menu').getElementsByTagName('A');
 for(var i=0;i<k.length;i++) if(o==k[i]) {SetCookie('a',i);return(i);}
}

function SyncMenu()
{var k=document.getElementById('Menu').getElementsByTagName('A');
 if(o=GetCookie('a')) Expand(k[o]);else Expand(k[0]);
}

function InitMenu()
{if(!is.op) eL('MC').style['border']='none';
 var k=document.getElementById('Menu').getElementsByTagName('A');
 for(var i=0;i<k.length;i++) k[i].onclick=function(event){Expand(this)};
}

function Contract()
{var k=document.getElementById('Menu').getElementsByTagName('DIV');
 for(i=0;i<k.length;i++)k[i].style['display']='none';
 k=document.getElementById('Menu').getElementsByTagName('A');
 for(i=0;i<k.length;i++)k[i].style['border']='none';
}

function Expand(o)
{var found=0;var menu=1;
 var n=o;
 Contract();
 o.style['backgroundColor']="#5b89b9";
 o.style['color']="#FFFFFF";
 SavePosition(o);
 while(n.nextSibling)
  {n=n.nextSibling;
   if(n.nodeName=='A') {o=o.parentNode;break;}
   if(n.nodeName=='DIV') {o=n;break;}
  }
 while(o.parentNode)
 {if(o.nodeName=='DIV') o.style['display']='block';
  o=o.parentNode;
  if(o.className=='Menu') break;
 }
}
