
var iGlobalMouseX=-1000;var iGlobalMouseY=-1000;var iCursorEmitter=10;var iMaxBubbles=0;var iCursorBubbles=40;var iBubbleSpeed=25;var asBubbles=["bubble-small","bubble-small","bubble-small","bubble-medium","bubble-medium","bubble-large"];var iMinX=parseInt((document.body.clientWidth-952)/2);if(iMinX<0){iMinX=0;}
var iActiveWidth=670;var iActiveHeight=500;var dx,xp,yp;var am,stx,sty;var i;dx=new Array();xp=new Array();yp=new Array();am=new Array();stx=new Array();sty=new Array();j=0;for(i=0;i<iMaxBubbles+iCursorBubbles;++i){dx[i]=0;am[i]=Math.random()*10;if(i<iMaxBubbles){xp[i]=Math.random()*(iActiveWidth-am[i]-30);yp[i]=Math.random()*iActiveHeight;}
else{xp[i]=-1000;yp[i]=-1000;}
stx[i]=0.02+Math.random()/10;sty[i]=0.9+Math.random();document.write('<div id="dot'+i+'\" class="'+asBubbles[j]+'"></div>');if(j==(asBubbles.length-1)){j=0;}
else{++j;}}
function AnimateBubbles(){for(i=0;i<iMaxBubbles;++i){yp[i]-=sty[i];if(yp[i]<-50){am[i]=Math.random()*10;xp[i]=Math.random()*(iActiveWidth-am[i]-30);yp[i]=iActiveHeight;stx[i]=0.02+Math.random()/10;sty[i]=0.9+Math.random();}
dx[i]+=stx[i];var oBubble=document.getElementById("dot"+i);oBubble.style.left=parseInt(iMinX+xp[i]+am[i]*Math.sin(dx[i]))+"px";oBubble.style.top=parseInt(yp[i])+"px";}
for(i=iMaxBubbles;i<iMaxBubbles+iCursorBubbles;++i){yp[i]-=sty[i];if(iCursorEmitter<=0){if(yp[i]<-50){am[i]=Math.random()*10;xp[i]=iGlobalMouseX+50;yp[i]=iGlobalMouseY+50;stx[i]=0.02+Math.random()/10;sty[i]=0.9+Math.random();break;}}
dx[i]+=stx[i];var oBubble=document.getElementById("dot"+i);oBubble.style.left=parseInt(xp[i]+am[i]*Math.sin(dx[i]))+"px";oBubble.style.top=parseInt(yp[i])+"px";}
if(iCursorEmitter<=0){iCursorEmitter=10;}
--iCursorEmitter;setTimeout("AnimateBubbles()",iBubbleSpeed);}
AnimateBubbles();function MoveSpongeBob(e){var oSpongeBob=document.getElementById("spongebob");e=e||window.event;var posx=0;var posy=0;if(e.pageX!==undefined){posx=e.pageX;posy=e.pageY;}
else if(e.clientX!==undefined){posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;}
oSpongeBob.style.left=posx+"px";oSpongeBob.style.top=posy+"px";iGlobalMouseX=posx;iGlobalMouseY=posy;}
document.write('<div id="spongebob"></div>');document.onmousemove=MoveSpongeBob;


