Lastedl,
<style type="text/css">
a.a1 { color: green; }
a.a2 { color: violet; }
</style>
<script type="text/javascript">
function displ(b, link) {
for (i = 0; i < link.parentNode.getElementsByTagName("a").length; i++) {
document.getElementById("d" + (i+1)).style.display = "none";
link.parentNode.getElementsByTagName("a")[i].className = "a1";
}
document.getElementById("d" + b).style.display = "block";
link.className = "a2";
};
window.onload = function() {
document.getElementById("linkList").getElementsByTagName("a")[0].click();
}
</script>
<div id="linkList"><a href="#" onClick="displ('1', this);" class="a1">1</a> | <a href="#" onClick="displ('2', this);" class="a1">2</a> | <a href="#" onClick="displ('3', this);" class="a1">3</a> | <a href="#" onClick="displ('4', this);" class="a1">4</a></div>
<div id="d1" style="display: none;">
<p > 1</p>
</div>
<div id="d2" style="display: none;" >
<p>2</p>
</div>
<div id="d3" style="display: none;" >
<p>3</p>
</div>
<div id="d4" style="display: none;" >
<p>4</p>
</div>