home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magazyn Internet 2000 May
/
MICD_2000_05.iso
/
Www
/
Czas
/
ZMIANA
/
BANNER.JS
< prev
next >
Wrap
Text File
|
2000-02-07
|
3KB
|
84 lines
function getCookieVal (offset)
{
{
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
}
function GetCookie (name)
{
{
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen)
{
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0)
break;
}
return null;
}
}
function SetCookie (name, value)
{
{
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
}
document.write("<font size=+1>")
var ilejest=6;
day = new Date();
hr1 = day.getSeconds();
hr2 = (hr1 % ilejest) + 1;
var expdate1 = new Date();
expdate1.setTime(expdate1.getTime() + (365 * 24 * 60 * 60 * 1000));
var num1;
if(!(num1 = GetCookie("czasnalinks")))
{
num1 = hr2
}
else
{
num1++;
if (num1 == (ilejest+1)) num1=1;
}
SetCookie ("cnl_banner", num1, expdate1);
hr=num1;
if (hr==1)
document.write("<p align=center><a href=http://priv6.onet.pl/wro/grafland/><img src=../pic/grafban.gif alt=Netmagia border=0 width=400 height=50 ></a></p>")
if (hr==2)
document.write("<p align=center><a href=http://www.wolf-5.kimip.pl/><img src=../pic/suwalki.gif alt=Suwalszczyzna border=0 width=400 height=50 ></a></p>")
if (hr==3)
document.write("<p align=center><a href=http://www.narkotyki.pl/><img src=../pic/narkotyk.gif alt=Za┐ywasz-Przegrywasz border=0 width=400 height=50></a></p>")
if (hr==4)
document.write("<p align=center><a href=http://www.amnesty.org.pl/><img src=../pic/amnesty.gif alt=Amnesty border=0 width=450 height=50></a></p>")
if (hr==5)
document.write("<p align=center><a href=http://www.creamsoft.com.pl/pajaczek/><img src=../pic/creamsof.gif alt=Paj▒czek border=0 width=400 height=50 ></a></p>")
if (hr==6)
document.write("<p align=center><a href=http://www.reporter.pl/><img src=../pic/reporter.gif alt=Reporter border=0 width=400 height=50></a></p>")