Hey I have a problem witht this menu I've created. The problem is that when you enter the page it takes TWO clicks to open the menu item the first time if the menu item default is display: none;. After the first time it works fine, but happens again if you refresh the page. The image swap works fine though which is strange considering is uses the same type of code as the item open/close. Any help would be great.

Here's the code:
//Left Navigation

if(document.images) {
mainup = new Image(90,20); mainup.src="mainup.gif";
maindn = new Image(90,20); maindn.src="maindn.gif";
resumeup = new Image(90,20); resumeup.src="resumeup.gif";
resumedn = new Image(90,20); resumedn.src="resumedn.gif";
portup = new Image(90,20); portup.src="portup.gif";
portdn = new Image(90,20); portdn.src="portdn.gif";
contactup = new Image(90,20); contactup.src="contactup.gif";
contactdn =new Image(90,20); contactdn.src="contactdn.gif";

function img_toggle(mnu_id) {
var img_obj = document.getElementById(mnu_id).getElementsByTagName('IMG');
for(i=0;i<img_obj.length;i++) {
var imgName = img_obj[i].name;
var imgNow = img_obj[i].src;

if(document.images) {
var imgOpen = eval(imgName + "dn.src"); 
var imgClose = eval(imgName + "up.src"); 

	{img_obj[i].src=imgOpen;} //no problem with this one

function sub_toggle(mnu_id) {
var sub_menu = document.getElementById(mnu_id).getElementsByTagName('UL');
for(j=0;j<sub_menu.length;j++) {
var menu_state = sub_menu[j].style.display;

    {sub_menu[j].style.display="block";} //problem seems to be here.
else                                                // don't get why.

function menu_toggle(mnu_id) {
//End Left Navigation
Any help would be great. Thanks.