Hello all, I have a website with some navigation buttons on top.
When one button is clicked I replace it's content with the content of a red button using this code:
document.getElementById('button').innerHTML = '
<a href="javascript:void(0)">
	<img src="header/button_active.jpg" border="0" />
The original code was enclosed in a DIV and I cant just change the img src because the original code is:
<div id="aanbiedingen">
	<a  href="javascript:void(0)"
	<img  src="1px_tranceparent.gif" name="Aanbiedingen" width="99px" height="20px" border="0" />
But when the orignal button is clicked, a ajax event goes off and loads the new page without reloading the button.
Using this code a button becomkes red once you click it. This is what I want.

Just one problem: when I click on another button, the first one stays red because it doesn't reload the page.
Now I thought, I'll refresh the navigation page using a div and ajax.

open_url('navigation.php', 'navigation');
Open url sends navigation.php GET result to the div navigation, works fine, firebug says.
But when I implement this code before the page load. JavaScript can no longer access the div elements in navigation.php
Anyone knows why?

Firebug says this when I refresh the navigation:
document.getElementById("button") has no properties

Thanks in advance!