не уверен на счет оперы и мазиЛЛы - не пробовал.
скрипт не идеальный конечно, но так, вроде работает.
Код:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html"; charset="windows-1251">
<title>njh</title>
<style>
div.item{display:block; color:#555555; cursor:hand}
div.list{display:none; color:#ff0000}
a{ font: 8pt 'tahoma'; color: #94dfc6; text-decoration: none; }
a:link{ font: 8pt 'tahoma'; color: #94dfc6; text-decoration: none; }
a:active{ font: 8pt 'tahoma'; color: #94dfc6; text-decoration: none; }
a:visited{ font: 8pt 'tahoma'; color: #94dfc6; text-decoration: none; }
a:hover{ font: 8pt 'tahoma'; color: #5f9aa5; text-decoration: underline; }
a.m{ font: 10pt 'tahoma'; color: #054e48; text-decoration: none; font-weight: bold;}
a.m:link{ font: 10pt 'tahoma'; color: #054e48; text-decoration: none; font-weight: bold;}
a.m:active{ font: 10pt 'tahoma'; color: #054e48; text-decoration: none; font-weight: bold;}
a.m:visited{ font: 10pt 'tahoma'; color: #054e48; text-decoration: none; font-weight: bold;}
a.m:hover{ font: 10pt 'tahoma'; color: #08499f; text-decoration: none; font-weight: bold; background-color:#cbedeb;}
a.e{ font: 9pt 'tahoma'; color: #057067; text-decoration: none; font-weight: bold;}
a.e:link{ font: 9pt 'tahoma'; color: #52b2bd; text-decoration: none; font-weight: bold;}
a.e:active{ font: 9pt 'tahoma'; color: #52b2bd; text-decoration: none; font-weight: bold;}
a.e:visited{ font: 9pt 'tahoma'; color: #52b2bd; text-decoration: none; font-weight: bold;}
a.e:hover{ font: 9pt 'tahoma'; color: #5e6689; text-decoration: none; font-weight: bold; background-color: #9fbf9a;}
</style>
</head>
<script language="javascript">
function additem(content,path)
{
var owner=path;
var child;
var offset;
var objimage;
var actimage;
for(i=owner.length-1;i>0;i--)
{
if (owner.substring(i-1,i)=='>')
{
owner=path.substring(0,i-1);
child=owner+':'+path.substring(i,path.length);
break;
}
}
os = document.getElementById('list'+owner).style.textIndent;
os = os.substring(0,os.length-2);
offset = Math.round(os)+10;
document.getElementById('list'+owner).innerHTML+=
'<div class="item" id="item'+child+'" onclick=expand("'+child+'")>'+content+'</div>'+
'<div style="display:none; text-indent:'+offset+'px" class=list id="list'+child+'"></div>';
}
function expand(path)
{
tmp=document.getElementById('list'+path);
if (tmp.innerHTML.length>0)
{
if (tmp.style.display==''||tmp.style.display=='block')
{ tmp.style.display='none';} else { tmp.style.display='block'; };
}
}
</script>
<body>
<div id="item">
<div id="list0">
</div>
<div id="act0">
</div><a href=""></a>
</div>
<script language='javascript'>
additem('<a class=m href="#">punct1</a>','0>1');
additem('<a href="#">punct1.1</a>','0:1>1');
additem('<a href="#">punct1.2</a>','0:1>2');
additem('<a class=e href="#">punct1.3</a>','0:1>3');
additem('<a href="#">punct1.3.1</a>','0:1:3>1');
additem('<a class=e href="#">punct1.3.2</a>','0:1:3>2');
additem('<a href="#">punct1.3.2.1</a>','0:1:3:2>1');
additem('<a href="#">punct1.3.3</a>','0:1:3>3');
additem('<a class=m href="#">punct2</a>','0>2');
additem('<a class=e href="#">punct2.1</a>','0:2>1');
additem('<a class=e href="#">punct2.1.1</a>','0:2:1>1');
additem('<a href="#">punct2.1.1.1</a>','0:2:1:1>1');
additem('<a href="#">punct2.1.1.2</a>','0:2:1:1>2');
additem('<a href="#">punct2.1.1.3</a>','0:2:1:1>3');
additem('<a class=e href="#">punct2.1.2</a>','0:2:1>2');
additem('<a href="#">punct2.1.2.1</a>','0:2:1:2>1');
additem('<a href="#">punct2.1.2.2</a>','0:2:1:2>2');
additem('<a href="#">punct2.1.2.3</a>','0:2:1:2>3');
additem('<a href="#">punct2.2</a>','0:2>2');
additem('<a href="#">punct2.3</a>','0:2>3');
</script>
</body>
</html>
там уже сами перекрасите.
пр. пр. - пример не могу выложить