תוינש רפסמ רחאל םלענו ףדה שארב "ףע"ש ןולח
.םירטמרפה לכ תא תונשל ןתינ
היקיתב popupcontent.html ץבוקה תא םג לולכל בל ומיש
<html>
<head>
<TITLE>Simple flying pop-up-window</TITLE> <script>
<!-- Beginning of JavaScript - // CREDITS:
// INSTRUCTIONS:
// Configure the variables below
// **********************************************************************************
// **********************************************************************************

// The name of the pop-up-window. Do not change it.
var popwindow

// The heiht of your pop-up-window (pixels)
var popwindowwidth=200

// The width of your pop-up-window (pixels)
var popwindowheight=150

// Distance to the top margin of the big window.
var popwindowtop=20

// The URL of the HTML-file that contains the content of the pop-up-window
var popwindowURL="popupcontent.html"

// Standstill-time (seconds)
var waitingtime=4

// Configure ths speed of the pop-up-window
var pause=20
var step=40

// Do not change this variable
var popwindowleft=-popwindowwidth-50

// Do not change this variable
var marginright

// Do not change this variable
var pagecenter

// Do not change this variable
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 bgcolor="#FFFFFF" onLoad="showWindow()">