зеленые сердечки
Код:
<a href="http://web.7li.ru/" target=_blank> <img src="http://i044.radikal.ru/0805/61/d9216af8906b.gif" border="0"alt=" cкрипты, шаблоны, курсоры, часы и многое другое!width=300height=60></a></center>
</script>
</style>
<script language="javascript1.2">
<!-- begin
var no = 15; // image number or falling rate
var speed = 4; // the lower the number the faster the image moves
var snow = new array();
snow[0] = "http://img151.imageshack.us/img151/325/on181jr.gif"
snow[1] = "http://img151.imageshack.us/img151/325/on181jr.gif"
snow[2] = "http://img151.imageshack.us/img151/325/on181jr.gif"
var ns4up = (document.layers) ? 1 : 0; // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getelementbyid&&!document.all) ? 1 : 0;
var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 1800;
if (ns4up||ns6up) {
doc_width = self.innerwidth;
doc_height = self.innerheight;
} else if (ie4up) {
doc_width = document.body.clientwidth;
doc_height = document.body.clientheight;
}
dx = new array();
xp = new array();
yp = new array();
am = new array();
stx = new array();
sty = new array();
j = 0;
for (i = 0; i < no; ++ i) {
dx[i] = 0; // set coordinate variables
xp[i] = math.random()*(doc_width-50); // set position variables
yp[i] = math.random()*doc_height;
am[i] = math.random()*20; // set amplitude variables
stx[i] = 0.02 + math.random()/10; // set step variables
sty[i] = 0.7 + math.random(); // set step variables
if (ns4up) { // set layers
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src=\""+ snow[j] + "\" border=\"0\"></layer>");
} else {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src=\""+ snow[j] + "\" border=\"0\"></layer>");
} } else if (ie4up||ns6up) { if (i == 0)
{
document.write("<div id=\"dot"+ i +"\" style=\"position: absolute; z-index: "+ i +"visibility: visible; top: 15px; left: 15px; width:1;\"><img src=\"" + snow[j] + "\" border=\"0\"></div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"position: absolute; z-index: "+ i +"visibility: visible; top: 15px; left: 15px; width:1;\"><img src=\"" + snow[j] + "\" border=\"0\"></div>");
}
}
if (j == (snow.length-1)) { j = 0; } else { j += 1; }
}
function snowns() { // netscape main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] -= sty[i]; if (yp[i] < -50) {
xp[i] = math.random()*(doc_width-am[i]-30);
yp[i] = doc_height;
stx[i] = 0.02 + math.random()/10;
sty[i] = 0.7 + math.random();
doc_width = self.innerwidth;
doc_height = self.innerheight; }
dx[i] += stx[i];
document.layers["dot"+i].top = yp[i]+pageyoffset;
document.layers["dot"+i].left = xp[i] +
am[i]*math.sin(dx[i]);
}
settimeout("snowns()", speed);
}
function snowie_ns6() { // ie main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] -= sty[i];
if (yp[i] < -50) {
xp[i] = math.random()*(doc_width-am[i]-30);
yp[i] = doc_height;
stx[i] = 0.02 + math.random()/10;
sty[i] = 0.7 + math.random();
doc_width = ns6up?window.innerwidth-5:document.body.clientwidth;
doc_height = ns6up?window.innerheight-5:document.body.clientheight;
}
dx[i] += stx[i];
if (ie4up){
document.all["dot"+i].style.pixeltop = yp[i]+document.body.scrolltop;
document.all["dot"+i].style.pixelleft = xp[i] + am[i]*math.sin(dx[i]);
}
else if (ns6up){
document.getelementbyid("dot"+i).style.top=yp[i]+pageyoffset;
document.getelementbyid("dot"+i).style.left=xp[i] + am[i]*math.sin(dx[i]);
}
}
settimeout("snowie_ns6()", speed);
}
if (ns4up) {
snowns();
} else if (ie4up||ns6up) {
snowie_ns6();
}
// end -->
</script>