Hi everyone;

At the pages of my site I have a module which shows related articles belonging to same category. If the category contains only one article, I only have the header.
I have this code;
<script type="text/javascript">
if(document.getElementById('documentlist').getElementsByTagName('li').length < 1){document.getElementById('moduleheader').style.display = 'none';}}
What I trying to do is to hide "documentheader" div if <ul id="documentlist"> has less than 1 li tagged document. What is wrong with that, or what can I do other than this codding?