My code works in Firefox.
There is a problem in Opera 9.23
After I click X to close the popup, main.htm is grey. main.htm must be white. Div must be hidden. What can I do? Thanks...
main.htm
Code:
  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=UTF-8"
 http-equiv="content-type">
  <title></title>
<style type="text/css">
.transparent {
position:absolute;
left:0px;
top:0px;
width:100&#37;;
height:100%;
display:none;
z-index:-1;
background-color: #EAEAEA;
-moz-opacity:0.95;
filter:Alpha(Opacity=95);
opacity: 0.95;
-khtml-opacity: 0.95;
}
</style>
<script type="text/javascript">
function openPopup() {
var pencere = window.open("popup_window.htm","title of window", "height=450,width=400");
var el = document.getElementById('divid');
el.style.display= "block";
el.style.zIndex = "1";
}
</script>

</head>
<body id="bodyid">
<input type="button" value="open popup" onclick="openPopup()">
<br>
<div id="divid" class="transparent">
</div>
</body>
</html>
popup_window.htm
Code:
  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<title></title>
<style type="text/css">
</style>
<script type="text/javascript">
function hideDiv() {
var el = opener.document.getElementById('divid');
el.style.zIndex = "-1";
el.style.display="none"; 
}
window.onunload= function() { hideDiv(); }

</script>
</head>
<body>
<input type="button" onclick="hideDiv(); window.close()" value="close me and return main page">
ayşe buradaydı
</body>
</html>