thank you both for your help, worked great.
but then i thought i might try optimise my code i have elsewhere.
Basicly you click the image, it changes and also hides/unhides a div id...
I tryed to reference the code you gave me, and tryed a few changes but i can get it to show (from its default hidden). but i cant get it to hide again etc.
function toggle_visibility(id, a, b)
var f = document.getElementById( id+'img' );
var e = document.getElementById( id );
f.src = ( f.src.indexOf( a ) > -1 ) ? b : a;
e.style.display = ( e.style.display > -1 ) ? 'none' : 'block';