<!--
ns4 = (document.layers)? true:false;
ie4 = (document.all)? true:false;

nStars=27;
nFarStars=45;
starSpeed=100;
starConst=0.02;
starColors=new Array('#FFFFFF','#99CCFF','#FFFFFF','#99CCFF','#FF9999');
centerSpot=0.4;

function initStars() {
 xc=0.5*winW;
 yc=0.5*winH;

 for (var i=0;i<nFarStars;i++) {
  createStar('farStar'+i+'Div',winW*Math.random(),winH*Math.random(),1,'#6699CC',1);
 }
 for (var i=0;i<nStars;i++) {
  starSize=1+i%2;
  createStar('star'+i+'Div',winW*Math.random(),winH*Math.random(),starSize,starColors[i%starColors.length],1)
  eval('star'+i+' = new DynLayer("star'+i+'Div")')
 }
 setTimeout("moveStars()",starSpeed);
}

function moveStars() {
 for (var i=0;i<nStars;i++) {
  starCoeff=starConst*(1+i%2);
  newX=eval('star'+i+'.x')*(1+starCoeff)-xc*starCoeff;
  newY=eval('star'+i+'.y')*(1+starCoeff)-yc*starCoeff;
  if (newX<0 || newX>winW || newY<0 || newY>winH) {
   newX=winW*(0.5+(Math.random()-0.5)*centerSpot);
   newY=winH*(0.5+(Math.random()-0.5)*centerSpot);
  }
  eval('star'+i+'.moveTo(newX,newY)');
 }
 setTimeout("moveStars()",starSpeed);
}

function createStar(id,left,top,size,bgColor,zIndex) {
 if (ns4) {
  var lyr = document.layers[id] = new Layer(size);
  eval("document."+id+" = lyr");
  lyr.name= id;
  lyr.left= left;
  lyr.top = top;
  lyr.clip.height= size;
  lyr.bgColor= bgColor;
  lyr.visibility= 'show';
  lyr.zIndex= zIndex;
 }
 else if (ie4) {
  var str= '\n<DIV id='+id+' style="position:absolute; left:'+left+'; top:'+top+'; width:'+size;
  str+= '; height:'+size;
  str+= '; clip:rect(0,'+size+','+size+',0)';
  str+= '; background-color:'+bgColor;
  str+= '; z-index:'+zIndex;
  str+= '; visibility:visible';
  str+= ';"></DIV>';
  document.body.insertAdjacentHTML("BeforeEnd",str);
 }
}

bodyLoaded=0;

function init() {
 if (ns4 || ie4) setTimeout("initStars()",100);
 setTimeout("bodyLoaded=1",1500);
}

function reloadFromCache() {if(bodyLoaded){self.location=''+self.location} }
if (ns4||ie4) window.onresize=reloadFromCache;

//-->
