var ie6 = (document.all) ? 1 : 0;
var ns7 = document.getElementById&&!document.all?1:0;
var speed = 1500;
var m = 20;
var n = 25;
var no = 30;
var imgx1 = "b-leaf1t.gif";
var imgx2 = "b-leaf2t.gif";
var imgx3 = "b-leaf3t.gif";
var imgx4 = "b-leaf4t.gif";
var imgx5 = "snow5-n.gif";
var imgx6 = "snow6-n.gif";
var imgx7 = "snow7-n.gif";
var imgx8 = "snow8-n.gif";
var dx, xp, yp;
var am, stx, sty;
var qdx, qxp, qyp;
var qam, qstx, qsty;
var mdx, mxp, myp;
var mam, mstx, msty;
var gdx, gxp, gyp;
var gam, gstx, gsty;
var dw2, dh2;
var i, j, k, l, kk, ll = 0;
var xoff;
var Clr= "#000000";
var ss = 2;
var yBase;
var xBase;
var xx;
var yy;
var dy;
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
qdx = new Array();
qxp = new Array();
qyp = new Array();
qam = new Array();
qstx = new Array();
qsty = new Array();
mdx = new Array();
mxp = new Array();
myp = new Array();
mam = new Array();
mstx = new Array();
msty = new Array();
gdx = new Array();
gxp = new Array();
gyp = new Array();
gam = new Array();
gstx = new Array();
gsty = new Array();
document.write("<table width=100% bgcolor=#000000><tr><td bgcolor=#000000></td></tr></table>");
if (ie6) {
dw2 = .9*document.body.clientWidth;
dh2 = .9*document.body.clientHeight;
} else if (ns7) {
dw2 = .9*window.innerWidth;
dh2 = .9*window.innerHeight;
}

for (i = m; i < n; ++ i) { 
k=i          // *2-m; 
dx[i] = 0;
xp[i] = Math.random()*(dw2-80);
yp[i] = 20 + Math.random()*dh2;
am[i] = Math.random()*20;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 1 + Math.random();
mdx[i] = 0;
mxp[i] = Math.random()*(dw2-80);
myp[i] = 20 +Math.random()*dh2;
mam[i] = Math.random()*20;
mstx[i] = 0.02 + Math.random()/10;
msty[i] = 1 + Math.random();
// if (k <= no) {
gdx[k] = 0;
gxp[k] = Math.random()*(dw2-80);
gyp[k] = 20 + Math.random()*dh2;
gam[k] = Math.random()*20;
gstx[k] = 0.02 + Math.random()/10;
gsty[k] = 1 + Math.random();
qdx[k] = 0;
qxp[k] = Math.random()*(dw2-80);
qyp[k] = 20 + Math.random()*dh2;
qam[k] = Math.random()*20;
qstx[k] = 0.02 + Math.random()/10;
qsty[k] = 1 + Math.random();
//}
//  k = i * 2 -m;
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY:visible;");
document.write("filter:glow(color="+Clr+",strength="+ss+");");
document.write("top:0px;left:0px;height:90px;width:90px;\"><img src=\"");
document.write(imgx1 + "\" border=\"0\" style=\"position:absolute;");
document.write("top:15px;left:15px;\"></div>");
document.write("<div id=\"mdot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY:visible;");
document.write("filter:glow(color="+Clr+",strength="+ss+");");
document.write("top:0px;left:0px;height:90px;width:90px;\"><img src=\"");
document.write(imgx2 + "\" border=\"0\" style=\"position:absolute;");
document.write("top:20px;left:20px;\"></div>");
// if (k <= no) {
document.write("<div id=\"gdot"+ k +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ k +"; VISIBILITY:visible;");
document.write("filter:glow(color="+Clr+",strength="+ss+");");
document.write("top:0px;left:0px;height:85px;width:85px;\"><img src=\"");
document.write(imgx3 + "\" border=\"0\" style=\"position:absolute;");
document.write("top:20px;left:20px;\"></div>");
document.write("<div id=\"qdot"+ k +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ k +"; VISIBILITY:visible;");
document.write("filter:glow(color="+Clr+",strength="+ss+");");
document.write("top:0px;left:0px;height:85px;width:85px;\"><img src=\"");
document.write(imgx4 + "\" border=\"0\" style=\"position:absolute;");
document.write("top:20px;left:20px;\"></div>");
//   }
}

for (i = n; i < no; ++ i) { 
k=i          // *2-m; 
dx[i] = 0;
xp[i] = Math.random()*(dw2-80);
yp[i] = 20 + Math.random()*dh2;
am[i] = Math.random()*20;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
mdx[i] = 0;
mxp[i] = Math.random()*(dw2-80);
myp[i] = 20 +Math.random()*dh2;
mam[i] = Math.random()*20;
mstx[i] = 0.02 + Math.random()/10;
msty[i] = 1.5 + Math.random();
// if (k <= no) {
gdx[k] = 0;
gxp[k] = Math.random()*(dw2-80);
gyp[k] = 20 + Math.random()*dh2;
gam[k] = Math.random()*20;
gstx[k] = 0.02 + Math.random()/10;
gsty[k] = 1.0 + Math.random();
qdx[k] = 0;
qxp[k] = Math.random()*(dw2-80);
qyp[k] = 20 + Math.random()*dh2;
qam[k] = Math.random()*20;
qstx[k] = 0.02 + Math.random()/10;
qsty[k] = 0.7 + Math.random();
//}
//  k = i * 2 -m;
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY:visible;");
document.write("filter:glow(color="+Clr+",strength="+ss+");");
document.write("top:0px;left:0px;height:90px;width:90px;\"><img src=\"");
document.write(imgx5 + "\" border=\"0\" style=\"position:absolute;");
document.write("top:15px;left:15px;\"></div>");
document.write("<div id=\"mdot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY:visible;");
document.write("filter:glow(color="+Clr+",strength="+ss+");");
document.write("top:0px;left:0px;height:90px;width:90px;\"><img src=\"");
document.write(imgx6 + "\" border=\"0\" style=\"position:absolute;");
document.write("top:20px;left:20px;\"></div>");
// if (k <= no) {
document.write("<div id=\"gdot"+ k +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ k +"; VISIBILITY:visible;");
document.write("filter:glow(color="+Clr+",strength="+ss+");");
document.write("top:0px;left:0px;height:85px;width:85px;\"><img src=\"");
document.write(imgx7 + "\" border=\"0\" style=\"position:absolute;");
document.write("top:20px;left:20px;\"></div>");
document.write("<div id=\"qdot"+ k +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ k +"; VISIBILITY:visible;");
document.write("filter:glow(color="+Clr+",strength="+ss+");");
document.write("top:0px;left:0px;height:85px;width:85px;\"><img src=\"");
document.write(imgx8 + "\" border=\"0\" style=\"position:absolute;");
document.write("top:20px;left:20px;\"></div>");
//   }
}

function imxzIE1() {
dw2 = .9*document.body.clientWidth;
dh2 = .9*document.body.clientHeight;
yBase = window.document.body.scrollTop;
xBase = window.document.body.scrollLeft;
for (i = m; i < no; ++ i) {
yp[i] += sty[i];
if (yp[i] > dh2-60) {
xp[i] = Math.random()*(dw2-am[i]-60);
yp[i] = 20;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 1 + Math.random();
}
dx[i] += stx[i];
document.all["dot"+i].style.pixelTop = yBase + yp[i];
document.all["dot"+i].style.pixelLeft = xBase + xp[i] + am[i]*Math.sin(dx[i]);
} 
xspeed=25+speed*Math.random();
setTimeout("imxzIE1()", xspeed);
}

function imxzIE2() {
dw2 = .9*document.body.clientWidth;
dh2 = .9*document.body.clientHeight;
yBase = window.document.body.scrollTop;
xBase = window.document.body.scrollLeft;
for (j = m; j < no; ++ j) {
myp[j] += msty[j];
if (myp[j] > dh2-60) {
mxp[j] = Math.random()*(dw2-mam[j]-60);
myp[j] = 20;
mstx[j] = 0.02 + Math.random()/10;
msty[j] = 1 + Math.random();
}
mdx[j] += mstx[j];
document.all["mdot"+j].style.pixelTop = yBase + myp[j];
document.all["mdot"+j].style.pixelLeft = xBase + mxp[j] + mam[j]*Math.sin(mdx[j]);
}
xspeed=25+speed*Math.random();
setTimeout("imxzIE2()", xspeed);
}

function imxzIE3() {
dw2 = .9*document.body.clientWidth;
dh2 = .9*document.body.clientHeight;
yBase = window.document.body.scrollTop;
xBase = window.document.body.scrollLeft;
for (kk = m; kk < no; ++ kk) {
// kk=k*2-m;
// if (kk <= no) {
gyp[kk] += gsty[kk];
if (gyp[kk] > dh2-60) {
gxp[kk] = Math.random()*(dw2-gam[kk]-60);
gyp[kk] = 20;
gstx[kk] = 0.02 + Math.random()/10;
gsty[kk] = 1 + Math.random();
}
gdx[kk] += gstx[kk];
document.all["gdot"+kk].style.pixelTop = yBase + gyp[kk];
document.all["gdot"+kk].style.pixelLeft = xBase + gxp[kk] + gam[kk]*Math.sin(gdx[kk]);
// }
} 
xspeed=25+speed*Math.random();
setTimeout("imxzIE3()", xspeed);
}

function imxzIE4() {
dw2 = .9*document.body.clientWidth;
dh2 = .9*document.body.clientHeight;
yBase = window.document.body.scrollTop;
xBase = window.document.body.scrollLeft;
for (ll = m; ll < no; ++ ll) {
// ll=l*2-m;
// if (ll <= no) {
qyp[ll] += qsty[ll];
if (qyp[ll] > dh2-60) {
qxp[ll] = Math.random()*(dw2-qam[ll]-60);
qyp[ll] = 20;
qstx[ll] = 0.02 + Math.random()/10;
qsty[ll] = 1 + Math.random();
}
qdx[ll] += qstx[ll];
document.all["qdot"+ll].style.pixelTop = yBase + qyp[ll];
document.all["qdot"+ll].style.pixelLeft = xBase + qxp[ll] - 2*qam[ll]*Math.sin(qdx[ll]);
// }
} 
xspeed=25+speed*Math.random();
setTimeout("imxzIE4()", xspeed);
}

function imxzNS1() {
dw2=.9*window.innerWidth;
dh2=.9*window.innerHeight;
yBase = window.pageYOffset;
xBase = window.pageXOffset;
for (i = m; i < no; ++ i) {
yp[i] += sty[i];
if (yp[i] > dh2-60) {
xp[i] = Math.random()*(dw2-am[i]-65);
yp[i] = 20;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 1 + Math.random();
}
dx[i] += stx[i];
document.getElementById("dot"+i).style.top = yBase + yp[i];
document.getElementById("dot"+i).style.left = xBase + xp[i] + am[i]*Math.sin(dx[i]);
}
xspeed=25+speed*Math.random();
setTimeout("imxzNS1()", xspeed);
}

function imxzNS2() {
dw2=.9*window.innerWidth;
dh2=.9*window.innerHeight;
yBase = window.pageYOffset;
xBase = window.pageXOffset;
for (j = m; j < no; ++ j) {
myp[j] += msty[j];
if (myp[j] > dh2-60) {
mxp[j] = Math.random()*(dw2-mam[j]-65);
myp[j] = 20;
mstx[j] = 0.02 + Math.random()/10;
msty[j] = 1 + Math.random();
}
mdx[j] += mstx[j];
document.getElementById("mdot"+j).style.top = yBase + myp[j];
document.getElementById("mdot"+j).style.left = xBase + mxp[j] + mam[j]*Math.sin(mdx[j]);
}
xspeed=25+speed*Math.random();
setTimeout("imxzNS2()", xspeed);
}

function imxzNS3() {
dw2=.9*window.innerWidth;
dh2=.9*window.innerHeight;
yBase = window.pageYOffset;
xBase = window.pageXOffset;
for (kk = m; kk < no; ++ kk) {
// kk=k*2-m;
// if (kk <= no) {
gyp[kk] += gsty[kk];
if (gyp[kk] > dh2-60) {
gxp[kk] = Math.random()*(dw2-gam[kk]-65);
gyp[kk] = 20;
gstx[kk] = 0.02 + Math.random()/10;
gsty[kk] = 1 + Math.random();
}
gdx[kk] += gstx[kk];
document.getElementById("gdot"+kk).style.top = yBase + gyp[kk];
document.getElementById("gdot"+kk).style.left = xBase + gxp[kk] + gam[kk]*Math.sin(gdx[kk]);
// }
}
xspeed=25+speed*Math.random();
setTimeout("imxzNS3()", xspeed);
}

function imxzNS4() {
dw2=.9*window.innerWidth;
dh2=.9*window.innerHeight;
yBase = window.pageYOffset;
xBase = window.pageXOffset;
for (ll = m; ll < no; ++ ll) {
// ll=l*2-m;
// if (ll <= no) {
qyp[ll] += qsty[ll];
if (qyp[ll] > dh2-60) {
qxp[ll] = Math.random()*(dw2-qam[ll]-65);
qyp[ll] = 20;
qstx[ll] = 0.02 + Math.random()/10;
qsty[ll] = 1 + Math.random();
}
qdx[ll] += qstx[ll];
document.getElementById("qdot"+ll).style.top = yBase + qyp[ll];
document.getElementById("qdot"+ll).style.left = xBase + qxp[ll] - 2*qam[ll]*Math.sin(qdx[ll]);
// }
}
xspeed=25+speed*Math.random();
setTimeout("imxzNS4()", xspeed);
//staticize();
}

function doimxz() {
if (ie6) {
imxzIE1();
imxzIE2();
imxzIE3();
imxzIE4();
} else if (ns7){
imxzNS1();
imxzNS2();
imxzNS3();
imxzNS4();
}
}

doimxz();