<html>
<head>
<script type="text/javascript">
function showImageDiv(image_href) {
my_div = document.getElementById('gi_div');
my_div.innerHTML = '<img id="gi_image" src='+image_href+' width=200>';
my_div.style.visibility = 'visible';
return true;
}
</script>
<style type="text/css">
.gi {
position: absolute;
border: 0px;
padding: 0px;
top: 0px;
left: 0px;
width: 200px;
height: 200px;
visibility: hidden;
background-color: #FFFFFF }
</style>
</head>
<body>
<div id='gi_div' class='gi'></div>
<a href="#" onclick = "showImageDiv('http://domen/img/ajax.gif')">показать</a>
</body>
</html>
так работает