home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magazyn Internet 2000 May
/
MICD_2000_05.iso
/
Www
/
Czas
/
BANNER.JS
< prev
next >
Wrap
Text File
|
2000-03-05
|
3KB
|
96 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=9;
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("cnl_banner")))
{
num1 = hr2
}
else
{
num1++;
if (num1 == (ilejest+1)) num1=0;
}
SetCookie ("cnl_banner", num1, expdate1);
hr=num1;
document.write('<p align=center>');
if (hr==0) {
document.write('<B>To miejsce na Tw≤j banner.</B><BR>A je┐eli nie przepadasz za bannerami, polecamy Ci program: ');
document.write('<A HREF="http://www.webwasher.com/">WebWasher</A>');
}
if (hr==1)
document.write('<a href="http://www.thehungersite.com/"><img src="pic/0001.jpg" alt="Hungersite" border=0 width=400 height=50 ></a>');
if (hr==2)
document.write('<a href="http://basketlinks.jest.o.k.pl/"><img src="pic/0002.jpg" alt="Basketlinks" border=0 width=400 height=50 ></a>');
if (hr==3)
document.write('<a href="http://www.link.pl/news-pl/"><img src="pic/news-pl.gif" alt="News-PL" border=0 width=400 height=50></a>');
if (hr==4)
document.write('<a href="http://www.pragma.com.pl/broker/"><img src="pic/niebo5.gif" alt="Broker" border=0 width=400 height=50></a>');
if (hr==5)
document.write('<a href="http://www.wolf-5.kimip.pl/"><img src="pic/suwalki.gif" alt="Suwalszczyzna" border=0 width=400 height=50 ></a>');
if (hr==6)
document.write('<a href="http://www.creamsoft.com.pl/pajaczek/"><img src="pic/creamsof.gif" alt="Paj▒czek" border=0 width=400 height=50 ></a>');
if (hr==7)
document.write('<a href="http://www.amnesty.org.pl/"><img src="pic/amnesty.gif" alt="Amnesty" border=0 width=450 height=50></a>');
if (hr==8)
document.write('<a href="http://priv6.onet.pl/wro/grafland/"><img src="pic/grafban.gif" alt="Grafland" border=0 width=400 height=50 ></a>');
if (hr==9)
document.write('<a href="http://www.reporter.pl/"><img src="pic/reporter.gif" alt="Reporter" border=0 width=400 height=50></a>');
document.writeln('</p>');