<!--  Fireworks script by kurt.grigg@virgin.net (http://website.lineone.net/~kurt.grigg/javascript/)
<!--  IE4+, NS4+, NS6 Fireworks script by kurt.grigg@virgin.net

NS4=(document.layers);
NS6=(document.getElementById&&!document.all);
IE4=(document.all);

CL=new Array('#df0000','#00df00','#dfdfdf','#df00df','#dfa500','#dfdf00','#00df00','#dfdfdf','#df00df')
CL2=new Array('#df8500','#00df00','#dF8AdF','#dfd000','#dfdfdf')

var fire;
var stopIt = 0;

Xpos=130;
Ypos=130;
I='#00ff00';
C=0;
S=5;
H=null;
W=null;
Y=null;
A=14;
E=120;
L=null;

if (NS4) {
 for (i=0; i < A; i++)
  document.write('<LAYER NAME="nsstars'+i+'" TOP="-2" LEFT="-2" BGCOLOR='+I+' CLIP="0,0,2,2"></LAYER>');
}

if (NS6) {
 window.document.body.style.overflow='hidden';
 for (i=0; i < A; i++)
  document.write('<div id="ns6stars'+i+'" style="position:absolute;top:-2px;left:-2px;height:2px;width:2px;font-size:2px;background:'+I+'"></div>');
}

if (IE4){
 document.write('<div id="ie" style="position:absolute;top:-2px;left:-2px"><div style="position:relative">');
 for (i=0; i < A; i++)
  document.write('<div id="iestars" style="position:absolute;top:-2;left:-2;width:2px;height:2px;background:'+I+';font-size:2px"></div>');
 document.write('</div></div>');
}



function Fireworks(display) {

 H=(NS4||NS6)?window.innerHeight:window.document.body.clientHeight;
 W=(NS4||NS6)?window.innerWidth:window.document.body.clientWidth;
 Y=(NS4||NS6)?window.pageYOffset:window.document.body.scrollTop;
 for (i=0; i < A; i++){
  if (IE4)L=iestars[i].style;
  if (NS4)L=document.layers["nsstars"+i];
  if (NS6)L=document.getElementById("ns6stars"+i).style;
  var F = CL[Math.floor(Math.random()*CL.length)];
  var RS=Math.round(Math.random()*2);
  L.top = Ypos + E*Math.sin((C+i*5)/3)*Math.sin(C/100);
  L.left= Xpos + E*Math.cos((C+i*5)/3)*Math.sin(C/100);
  if (C < 110){
   if (NS4) {L.bgColor=I;L.clip.width=1;L.clip.height=1}
   if (IE4||document.getElementById) {L.background=I;L.width=5;L.height=5;L.fontSize=5}
  }
  else{
//   if (NS4){L.bgColor=F;L.clip.width=RS;L.clip.height=RS}
//   if (IE4||document.getElementById){L.background=F;L.width=RS;L.height=RS;L.fontSize=RS}
  }
 }
 if (C > 220){
  C=0;
  var NC = CL2[Math.floor(Math.random()*CL2.length)];
  I=NC;
  E=Math.round(100+Math.random()*90);
  Ypos = E+Math.round(Math.random()*(H-(E*2.2)))+Y;
  Xpos = E+Math.round(Math.random()*(W-(E*2.2)));

 }
 C+=S;

 if (display == 1) {
  for (i=0; i < A; i++){
   if (IE4)L=iestars[i].style.visibility = 'hidden';
   if (NS4)L=document.layers["nsstars"+i].style.visibility = 'hide';
   if (NS6)L=document.getElementById("ns6stars"+i).style.visibility = 'hidden';
  }

  clearTimeout(fire);
  stopIt = 0;
 }
 else {
  fire = setTimeout("Fireworks(stopIt)",10);
 }

}


function startFireworks() {

 for (i=0; i < A; i++){
  if (IE4)L=iestars[i].style.visibility = 'visible';
  if (NS4)L=document.layers["nsstars"+i].style.visibility = 'show';
  if (NS6)L=document.getElementById("ns6stars"+i).style.visibility = 'visible';
 }

 Fireworks();

}


function stopFireworks() {

 stopIt = 1;

}



// -->

