<script language= "JavaScript" >
<!--
var no = 50;
var speed = 1;
var ns4up = (document.layers)? 1:0;
var ie4up = (document.all)? 1:0;
var s, x, Y, SN, CS;
var A, R, CX, CY;
var i, doc_width = Doc_height = 600;
if (ns4up) {
Doc_width = Self.innerwidth;
Doc_height = Self.innerheight;
}
Else
if (ie4up) {
Doc_width = Document.body.clientWidth;
Doc_height = Document.body.clientHeight;
}
x = new Array ();
y = new Array ();
R = new Array ();
CX = new Array ();
cy = new Array ();
s = 8;
for (i = 0; i < no; + + i) {
Initrain ();
if (ns4up) {
if (i = = 0) {
document.write ("<layer name=\" dot "+ i +" \ "left=\" 1\ "");
document.write ("top=\" 1\ "visibility=\" show\ "><font color=\" red\ ">");
document.write (",</font></layer>");
}
else {
document.write ("<layer name=\" dot "+ i +" \ "left=\" 1\ "");
document.write ("top=\" 1\ "visibility=\" show\ "><font color=\" red\ ">");
document.write (",</font></layer>");
}
}
Else
if (ie4up) {
if (i = = 0) {
document.write ("<div id=\" dot "+ i +" \ "style=\" POSITION: ");
document.write ("absolute; Z-index: "+ i +"; VISIBILITY: ");
document.write ("visible; top:15px; Left:15px;\ "><font color=\" red\ ">");
document.write (",</font></div>");
}
else {
document.write ("<div id=\" dot "+ i +" \ "style=\" POSITION: ");
document.write ("absolute; Z-index: "+ i +"; VISIBILITY: ");
document.write ("visible; top:15px; Left:15px;\ "><font color=\" red\ ">");
document.write (",</font></div>");
}
}
}
function Initrain () {
A = 6;
R[i] = 1;
sn = Math.sin (a);
CS = Math.Cos (a);
Cx[i] = math.random () * doc_width + 1;
Cy[i] = math.random () * doc_height + 1;
X[i] = r[i] * sn + cx[i];
Y[i] = Cy[i];
}
function Makerain () {
R[i] = 1;
Cx[i] = math.random () * doc_width + 1;
Cy[i] = 1;
X[i] = r[i] * sn + cx[i];
Y[i] = r[i] * cs + cy[i];
}
function Updaterain () {
R[i] + = s;
X[i] = r[i] * sn + cx[i];
Y[i] = r[i] * cs + cy[i];
}
function Raindropns () {
for (i = 0; i < no; + + i) {
Updaterain ();
if ((X[i] <= 1) | | (X[i] >= (doc_width-20)) | | (Y[i] >= (doc_height-20))) {
Makerain ();
Doc_width = Self.innerwidth;
Doc_height = Self.innerheight;
}
document.layers["dot" +i].top = y[i];
document.layers["dot" +i].left = x[i];
}
SetTimeout ("Raindropns ()", speed);
}
function Raindropie () {
for (i = 0; i < no; + + i) {
Updaterain ();
if ((X[i] <= 1) | | (X[i] >= (doc_width-20)) | | (Y[i] >= (doc_height-20))) {
Makerain ();
Doc_width = Document.body.clientWidth;
Doc_height = Document.body.clientHeight;
}
document.all["dot" +i].style.pixeltop = y[i];
document.all["dot" +i].style.pixelleft = x[i];
}
SetTimeout ("Raindropie ()", speed);
}
if (ns4up) {
Raindropns ();
}
Else
if (ie4up) {
Raindropie ();
}
-
</script>
JavaScript implements popup code in the lower right corner of the Web page