This is tough since it uses another function from dreamweaver (mm_findobj). So anyway, here is a piece of code that should work.
Code:
function show_hide_layer(the_layer){
if(document.getElementById(the_layer).style.display == 'none'){
document.getElementById(the_layer).style.display = 'inline';
}else{
document.getElementById(the_layer).style.display = 'none';
}
}
Works for me in IE, Firefox, Safari and so on. Even Opera does it (I think!

).