function layerswap(layername) { if (document.getElementById(layername)) { if (document.getElementById(layername).style.visibility=='visible') { document.getElementById(layername).style.visibility='hidden'; document.getElementById(layername).style.display='none'; } else { document.getElementById(layername).style.visibility='visible'; document.getElementById(layername).style.display='block'; } } } function layerswapWithControl(layername, hide) { if (document.getElementById(layername)){ if (hide){ document.getElementById(layername).style.visibility='hidden'; document.getElementById(layername).style.display='none'; } else { document.getElementById(layername).style.visibility='visible'; document.getElementById(layername).style.display='block'; } } }