var Ymax=8;                                //MAX # OF PIXEL STEPS IN THE "X" DIRECTION
var Xmax=8;                                //MAX # OF PIXEL STEPS IN THE "Y" DIRECTION
var Tmax=10000;                        //MAX # OF MILLISECONDS BETWEEN PARAMETER CHANGES
var floatimages=new Array();

//FLOATING IMAGE URLS FOR EACH IMAGE. ADD OR DELETE ENTRIES. KEEP ELEMENT NUMERICAL ORDER STARTING WITH "0" !!

floatimages[0]='images/estrela041.gif';
floatimages[1]='images/estrela042.gif';
floatimages[2]='images/estrela043.gif';
floatimages[3]='images/estrela044.gif';
floatimages[4]='images/estrela045.gif';
floatimages[5]='images/estrela046.gif';
floatimages[6]='images/estrela041.gif';
floatimages[7]='images/estrela042.gif';

//*********DO NOT EDIT BELOW***********
var wind_w, wind_h, t='';
for(i=0; i<floatimages.length; i++){
t+=(isMinNS4)?'<layer name="pic'+i+'" visibility="hide" width="10" height="10">' : '<div id="pic'+i+'" style="position:absolute; visibility:hidden;width:10px; height:10px">';
t+='<img src="'+floatimages[i]+'" name="p'+i+'" border="0">';
t+=(isMinNS4)? '</layer>':'</div>';
eval('var pic'+i);
}
document.write(t);
function init(){
wind_w=getwindowwidth();
wind_h=getwindowheight();
var tmp;
for(i=0; i<floatimages.length; i++){
eval('pic'+i+'=getlayer("pic'+i+'")');
tmp=eval('pic'+i);
if(isMinNS4){
tmp.W=tmp.document.images["p"+i].width;
tmp.H=tmp.document.images["p"+i].height;
}
if(isMinNS6 || isMinIE4){
tmp.W=document.images["p"+i].width;
tmp.H=document.images["p"+i].height;
}
getnewprops(i);
movelayerto(tmp, Math.floor(Math.random()*(wind_w-tmp.W)), Math.floor(Math.random()*(wind_h-tmp.H)));
showlayer(tmp);
setInterval('moveimage('+i+')',Math.floor(Math.random()*100)+100);
}}
function moveimage(layernum){
var layer=eval('pic'+layernum);
if(getlayerleft(layer)+layer.W+layer.Xstep >= wind_w)layer.Xdir=false;
if(getlayerleft(layer)-layer.Xstep<=0)layer.Xdir=true;
if(getlayertop(layer)+layer.H+layer.Ystep >= wind_h)layer.Ydir=false;
if(getlayertop(layer)-layer.Ystep<=0)layer.Ydir=true;
movelayerby(layer, (layer.Xdir)? layer.Xstep :  -layer.Xstep , (layer.Ydir)?  layer.Ystep:  -layer.Ystep);
}
function getnewprops(layernum){
var layer=eval('pic'+layernum);
layer.Ydir=Math.floor(Math.random()*2)>0;
layer.Xdir=Math.floor(Math.random()*2)>0;
layer.Ystep=Math.ceil(Math.random()*Ymax);
layer.Xstep=Math.ceil(Math.random()*Xmax)
setTimeout('getnewprops('+layernum+')', Math.floor(Math.random()*Tmax));
}
function resize(){
if(isMinNS4)history.go(0);
if(isMinIE4 || isMinNS6){
wind_w=getwindowwidth();
wind_h=getwindowheight();
}}
window.onresize=resize;
window.onload=init;