<script type="text/javascript"> var now = false;
function show(id, event)
{
hide();
document.getElementById(id).style.display = 'block';
now = id;
stopEvent(event);
}
var tag;
function hide()
{
if(now)
{
document.getElementById(now).style.display = 'none';
}
}
function stopEvent(event)
{
if (event.stopPropagation) {
event.stopPropagation();
} else {
event.cancelBubble = true;
}
}
<div onclick="stopEvent(event);" id="jeden" style="width: 50%; height: 50%; border: 1px solid black; display: none;">fdf1
</div> <div onclick="stopEvent(event);" id="dwa" style="width: 50%; height: 50%; border: 1px solid black; display: none;">fdf2
</div> <div onclick="stopEvent(event);" id="trzy" style="width: 50%; height: 50%; border: 1px solid black; display: none;">fdf33
</div>
<a href="#null" onclick="show('jeden', event);">jeden
</a><br /> <a href="#null" onclick="show('dwa', event);">dwa
</a><br /> <a href="#null" onclick="show('trzy', event);">trzy
</a><br />