why does "nested.style.display='block'" work under IE but not und er Netscape

I send this EMAIL to Experts-exchange and they referred me to you for help.
I want to convert this to DOM. If possible could you please help me. I am
trying to write a web page that are not browser specific.
I have created this in html with some java script added to open and close a
menu. If I uses this on IE it works but if I uses it on Netscape it does not
work. I have traced this to the "nested.style.display='block'" that does not
work, but I do not know how to solve this. I need a solution to solve this
dilemma. 
According to Experts-exchange this is only IE specific. If you could direct
me in the right direction it would greatly be appreciated

thanks
Ronald Mundell

<head>
<STYLE>
#foldheader 
{
list-style-image:url('fold.gif')
}

#foldinglist 
{
list-style-image:url('page.gif')
}
</STYLE>

<title> </title>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

<script type="text/javascript">
<!--
function change()
{
if(!document.all)
{
return
}
if (event.srcElement.id=="foldheader") 
{
var srcIndex = event.srcElement.sourceIndex;
var nested = document.all[srcIndex+1];
if (nested.style.display=="none") 
{
nested.style.display='block'
event.srcElement.style.listStyleImage="url(open.gif)"
}
else
{
nested.style.display='none'
event.srcElement.style.listStyleImage="url(fold.gif)"
parent.MAIN.location.href="main.html" 
}
}
}

//-->
</script>
</head>
<body bgcolor="silver" link="navy" text="navy"
onMouseOver="window.status='Welcome To xyz'; return true">

<ul>
<li id="foldheader" onclick="change()">Accounts</li>
<ul id="foldinglist" style="display: none" style=&{head};>
<li><a target="MAIN" href="main.html" style="text-decoration: none"><font
color="#000080">Add Account</font></a></li>
<li><a target="MAIN" href="main.html" style="text-decoration: none"><font
color="#000080">Add Parents</font></a></li>
<li><a target="MAIN" href="main.html" style="text-decoration: none"><font
color="#000080">Add Child</font></a></li>
<li><a target="MAIN" href="accountpayments.html" style="text-decoration:
none"><font color="#000080">Payments</font></a></li>
</ul>
</ul>

</Body>

</Html> 

Received on Friday, 24 January 2003 12:41:27 UTC