...But my point is, it has the same function as changing the image from the image tag 
Anyway, you might have a reason behind it, i'll just show you this example:
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
window.onload = function()
{
document.getElementById('image1').src = 'images/nav1_on.gif';
document.getElementById('clickme').onmouseover = function()
{
document.getElementById('image1').src = 'images/nav1_on.gif';
}
document.getElementById('clickme').onmouseout = function()
{
document.getElementById('image1').src = 'images/nav1_off.gif';
}
}
</script>
</head>
<body>
<a href="index.htm" id="clickme">
<img name="image1" src="images/nav1_off.gif" border=0></a>
</body>
</html>
Ideally, it has your wish of having images/nav1_on.gif as the default image during onload 
Just a suggestion, you should (if possible) avoid combining presentation (JS) from markups (HTML). See example 
See if it helps
Bookmarks