i dont know why this piece of code is not swapping my images in IE6 and Opera; they are working fine in NS6.2 and Mozilla 1.1

Code:
<html>
<head>
<title> manipulating with the DOM </title>
<style type="text/css">

body	{
	font-family: verdana;
	font-size: 12px;
	background-color: #ccc
	}

#logo	{
	border: 1px solid #000
	}

</style>

<script language="javascript">
	
	function imageSwap()
	{
	var up = "img1.jpg";
	var over = "img2.jpg";
	var imageObj = document.getElementById("logo");
	var imageSrc = imageObj.getAttribute("src");
		if (imageSrc == up)
			{
			imageObj.setAttribute("src", over );
			}
		else
			{
			imageObj.setAttribute("src", up );
			}
	}
</script>

</head>
<body>

<a href="" onmouseover="imageSwap()"  
	   onmouseout="imageSwap()">
	   <img id="logo" src="img1.jpg" />
</a>
</body>
</html>
Please help!