DOM = (document.getElementById) ? true : false; IE = (document.all) ? true : false; IE4 = IE && !DOM; function ShowLayer(LayerId) { if (DOM) { LayerItem=document.getElementById(LayerId).style LayerItem.display="block"; LayerItem.visibility="visible"; } if (IE4) { LayerItem=document.all(LayerId).style LayerItem.display="block"; } } function HideLayer(LayerId) { if (DOM) { LayerItem=document.getElementById(LayerId).style LayerItem.display="none"; LayerItem.visibility="hidden"; } if (IE4) { LayerItem=document.all(LayerId).style LayerItem.display="none"; } } function SwitchLayer(LayerId) { if (DOM) { LayerItem=document.getElementById(LayerId).style if (LayerItem.visibility=="hidden") { ShowLayer(LayerId); } else { HideLayer(LayerId); } } if (IE4) { LayerItem=document.all(LayerId).style if (LayerItem.display=="none") { ShowLayer(LayerId); } else { HideLayer(LayerId); } } }