Try this out :
<style>
[id^="show"] { /* gets all elements where id starting with show */
display: none;
}
</style>
<script>
function toggleLink(obj)
{
var idCount = obj.id;
idCount = idCount.replace( new RegExp('c', 'g'), '');
var elem = document.getElementById("show"+idCount);
var hide = window.getComputedStyle(elem, null).display =="none";
if (hide) {
elem.style.display="block";
}
else {
elem.style.display="none";
}
}
</script>
<a id='c1' href="#" onclick="toggleLink(this)">Link1</a>
<a id='c2' href="#" onclick="toggleLink(this)">Link2</a>
<a id='c3' href="#" onclick="toggleLink(this)">Link3</a>
<div id="show1" border="0">
More information here for Div1
</div>
<div id="show2" border="0">
More information here for Div2
</div>
<div id="show3" border="0">
More information here for Div3
</div>