/* Dynamic Version: 1.0.0, Hash: a388b9fd0cdd02b1e13b06d0e0d32de1; 23.12.2025 17:29 */
if(!window.silv) silv=new Object();
silv.layerNo=0;
silv.createElem = function(htmlStr, x, y) {
var elem = null;
if(document.layers) {
elem=new Layer(2000);
elem.document.open();
elem.document.write(htmlStr);
elem.document.close();
elem.moveTo(x,y);
elem.innerHTML = htmlStr;
}
else if(document.all)
{
var xName = "xLayer" + silv.layerNo++;
var txt = "
"+htmlStr+"
";
document.body.insertAdjacentHTML("BeforeEnd",txt);
elem = document.all[xName];
}
else if(document.getElementById)
{
var xName="xLayer" + silv.layerNo++;
var txt = ""+"position:absolute;"+ "left:"+x+"px;"+"top:"+y+"px;"+"visibility:hidden";
var newRange = document.createRange();
elem = document.createElement("DIV");
elem.setAttribute("style",txt);
elem.setAttribute("id", xName);
document.body.appendChild(elem);
newRange.setStartBefore(elem);
strFrag = newRange.createContextualFragment(htmlStr);
elem.appendChild(strFrag);
}
return elem;
}
silv.Layer = function(newLayer, x, y) {
if(!newLayer) return;
if(x==null)x=0;
if(y==null)y=0;
if(typeof newLayer == "string") this.elem = silv.createElem(newLayer, x, y);
else this.elem=newLayer;
if(document.layers)
{
this.images=this.elem.document.images;
this.style = this.elem;
}
else
{
this.images = document.images;
this.style = this.elem.style;
}
}
silv.findLayer = function(theDiv, d)
{
if(document.layers)
{
var i;
if(d==null) d = document;
var theLayer = d.layers[theDiv];
if(theLayer != null)
return(theLayer);
else
for(i=0 ; i";
this.superC = silv.Layer;
this.superC(htmlStr, 0, 0);
this.frame = 0;
this.state = "OFF";
this.fwImages = theImages;
this.imgName = imgName;
this.ay = 0.1;
this.resizeTo(2,2);
}
silv.Firework.prototype = new silv.Layer;
silv.Firework.prototype.animate = function() {
if(this.state == "ON") {
this.frame++
if(this.frame == this.fwImages.length)
{
this.frame = 0;
this.state = "OFF";
this.hide();
}
else
{
this.images[this.imgName].src = this.fwImages[this.frame].src;
}
} else if(this.state == "OFF") {
var ydiff = silv.Browser.getMaxY() - silv.Browser.getMinY();
if(ydiff > 800)
this.dy = -12;
else if(ydiff > 600)
this.dy = -10;
else if(ydiff > 400)
this.dy = -8;
else if(ydiff > 300)
this.dy = -7;
else
this.dy = -4;
this.dx = Math.random()*-8 + 4;
this.dy += Math.random()*2.5;
this.clip(0,0,2,2);
this.setBgColor(Math.random()>.33 ? Math.random()>.33 ? "#FF0000" : "#00FF00" : "#0000FF");
this.x=silv.Browser.getMaxX()/2.5;
this.y=silv.Browser.getMaxY()-100;
this.moveTo(this.x,this.y);
this.show();
this.state="TRAVEL";
} else if(this.state == "TRAVEL") {
this.x += this.dx;
this.y += this.dy;
this.dy += this.ay;
this.moveTo(this.x,this.y);
if(this.dy > -1 && Math.random()<.05)
{
this.state = "ON";
this.setBgColor(null);
this.clip(0,0,100,100);
this.x -=50;
this.y -=50;
this.moveTo(this.x, this.y);
}
}
}
if(navigator.appName.indexOf("Netscape") != -1 && !document.getElementById) {
if(!silv.ns_resize) {
silv.ow = outerWidth;
silv.oh = outerHeight;
silv.ns_resize = function() {
if(outerWidth != silv.ow || outerHeight != silv.oh )
location.reload();
}
}
window.onresize=silv.ns_resize;
}
function setup_xtra() {
silv.FireworkDisplay(10);
}