/ Published in: JavaScript
// v6.0 SCHMOE Mod v.2:
// switches between (display:'block';) and (display:'none';)
// bsp: MM_SCHMOE_showHideLayers('swissmap');
// switches between (display:'block';) and (display:'none';)
// bsp: MM_SCHMOE_showHideLayers('swissmap');
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function SCHMOE_onOffElement() { var i, p, v, obj, k; var args=SCHMOE_onOffLayers.arguments; for (i=0; i<(args.length); i++) { if ((obj=MM_findObj(args[i]))!=null) { if (obj.style) { obj=obj.style; if (obj.display == 'none') { v='block'; } if (obj.display == 'block') { v='none'; } if (obj.display == '') { v='none'; } } obj.display=v; } } }