document.write("") function show(cid){ var thatstyle = document.getElementById(cid).style thatstyle.display=(thatstyle.display!="block")? "block" : "none" } /* example: onclick="show('html')"