Окно всплывает, а затем исчезает через некоторое время.
<head>
<script>
<!-- Beginning of JavaScript -
var popwindow
var popwindowwidth=200
var popwindowheight=150
var popwindowtop=20
var popwindowURL="СТРАНИЦА.htm"
var waitingtime=4
var pause=20
var step=40
var popwindowleft=-popwindowwidth-50
var marginright
var pagecenter
var timer
waitingtime= waitingtime*1000
function showWindow() {
popwindow = window.open(popwindowURL, "popwindow", "toolbar=no,width="+popwindowwidth+",height="+popwindowheight+",top="+popwindowtop+", left="+(-popwindowwidth)+"");
if (document.all) {marginright = screen.width+50}
if (document.layers) {marginright = screen.width+50}
pagecenter=Math.floor(marginright/2)-Math.floor(popwindowwidth/2)
movewindow()}
function movewindow() {if (popwindowleft<=pagecenter) {popwindow.moveTo(popwindowleft,popwindowtop)
popwindowleft+=step
timer= setTimeout("movewindow()",pause)}
else {clearTimeout(timer)
timer= setTimeout("movewindow2()",waitingtime)}
}
function movewindow2() {
if (popwindowleft<=marginright) {
popwindow.moveTo(popwindowleft,popwindowtop)
popwindowleft+=step
timer= setTimeout("movewindow2()",pause)}
else {clearTimeout(timer)
popwindow.close() }
}
// -->
</script>
</head>
<body onLoad="showWindow()">