If I knew thats what you wanted to do it for I would have advised against it, but anyway First off dont name multiple divs the same ID names its just not going to work, name your ID's 256a 256b the following code will match the 256. Also I have added things for older browsers but I doubt it will work in older browsers.<script language=javascript type='text/javascript'>function hidediv(pass) {var divs = document.getElementsByTagName('div');for(i=0;i<divs.length;i++){if(divs[i].id.match(pass)){//if they are 'see' divsif (document.getElementById) // DOM3 = IE5, NS6divs[i].style.visibility="hidden";// show/hideelseif (document.layers) // Netscape 4document.layers[divs[i]].display = 'hidden';else // IE 4document.all.hideShow.divs[i].visibility = 'hidden';}}}function showdiv(pass) {var divs = document.getElementsByTagName('div');for(i=0;i<divs.length;i++){if(divs[i].id.match(pass)){if (document.getElementById)divs[i].style.visibility="visible";elseif (document.layers) // Netscape 4document.layers[divs[i]].display = 'visible';else // IE 4document.all.hideShow.divs[i].visibility = 'visible';}}}</script>The document.getElementsByTagName gets the div elements and puts them in an array. Then it sets to visble depending on your div id that you pass to it. I dont think document.getElementsByTagName works in older browsers.Name your divS like so, or whatever you like<div id="256a">My content</div><div id="256b">Blah</div><div id="512a">Blah</div>To hide or show notice only the first few characters are needed.<a href="javascript:hidediv('256')">Hide div 256</a><a href="javascript:showdiv('256')">Show div 256</a><a href="javascript:hidediv('512')">Hide div 512</a><a href="javascript:showdiv('512')">Show div 512</a>