function toggleLayer( layer_ID , toggle_value) { //note: toggle value = {"show", "show_inline", "hide"} var elem, vis; if( document.getElementById ) // this is the way the standards work elem = document.getElementById( layer_ID ); else if( document.all ) // this is the way old msie versions work elem = document.all[layer_ID]; else if( document.layers ) // this is the way nn4 works elem = document.layers[layer_ID]; vis = elem.style; //this is old code // if the style.display value is blank we try to figure it out here //if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined) //vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none'; //vis.display = (vis.display==''||vis.display=='block')?'none':'block'; if (toggle_value == "show") vis.display = 'block'; else if (toggle_value == "show_inline") vis.display = 'inline'; else vis.display = 'none'; }