Hi! I'm a beginner and really struggling here!

This code makes a custom li tag and hopefully fills it with an image, amongst a few other things...

Code:
<script type="text/javascript">
myObject = new Object();
myObject.active = true;
myObject.name = "myObject";
myObject.tooltip = "myObject tooltip text";
myObject.activeImg = "images/icons/pic1.png";
myObject.rolloverImg = "images/icons/pic2.png";
myObject.disableImg = "images/icons/pic3.png";

function makeButton(buttonName){
	var buttonObject = buttonName;
	if(buttonObject.active == true)
	{
		document.write("<li id='" + buttonObject.name +"'	href='#' onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('" + buttonObject.name +"','','" + buttonObject.rolloverImg +"',1)\" title='" + buttonObject.tooltip +"'><img src='" + buttonObject.activeImg +"' name='" + buttonObject.name +"' \/><\li>");
	}
	else
	{
		document.write("<li	href='#' title='" + buttonObject.tooltip +"'><img src='" + buttonObject.disableImg +"' name='" + buttonObject.name +"' \/><\li>");
	}
}

function disableButton(buttonName)
{
	//alert(buttonName.name);
	console.log("buttonName.name = " + buttonName.name);
	console.log("buttonName.tooltip = " + buttonName.name.tooltip);
	console.log("buttonName.activeImg = " + buttonName.activeImg);
	console.log("buttonName.rolloverImg = " + buttonName.rolloverImg);
	console.log("buttonName.disableImg = " + buttonName.disableImg);
	
	//var theString = "<li href='#' title='" + buttonName.tooltip + "'><img src='" + buttonName.disableImg +"' name='" + buttonName.name + "' \/><\li>";
	//$("li#" + buttonName.name).replaceWith(theString);
}
/**/
</script>

.... later on in the document I have this, in the body tag:
--------------------------------------------------------

<body>
	<div id="iframe-sidebar">
		<script type="text/javascript">makeButton(myObject);</script>
	</div><!--div#iframe-sidebar-->

	<a onClick="disableButton(myObject)" href="#">Disable</a>

</body>
So, when I click on the <a> link at the bottom, I was really hoping the console would say:

Code:
buttonName.name = "myObject"
buttonName.tooltip = "myObject tooltip text"
etc, but instead I get

Code:
buttonName.name = "myObject"
buttonName.tooltip = undefined
buttonName.activeImg = undefined
buttonName.rolloverImg = undefined
buttonName.disableImg = undefined
I think the problem lies in the fact that if I output "buttonName" to the console, it comes out as

Code:
[object HTMLImageElement]
instead of

Code:
[object object]
Help! I know I'm doing something silly/seriously wrong - what is it?!

Many thanks in advance, first post - wahoo!!

DAve