var state = 'hidden';

function showhide(layer_ref) {
 
 if (state == 'visible') { 
   state = 'hidden'; 
 }
 else { 
   state = 'visible';
 }
 
 if (document.getElementById && !document.all) {
  maxwell_smart = document.getElementById(layer_ref);
  maxwell_smart.style.visibility = state;
 }
}
