tinkerbell

  • <script type="text/javascript">

// <![CDATA[ var colour="random"; // in addition to "random" can be set to any valid colour eg "#f0f" or "red" var sparkles=50;

/****************************

  • Tinkerbell Magic Sparkle *
  • (c)2005-13 mf2fm web-design*
  • http://www.mf2fm.com/rv *
  • DON'T EDIT BELOW THIS BOX *
  • ***************************/

var x=ox=400; var y=oy=300; var swide=800; var shigh=600; var sleft=sdown=0; var tiny=new Array(); var star=new Array(); var starv=new Array(); var starx=new Array(); var stary=new Array(); var tinyx=new Array(); var tinyy=new Array(); var tinyv=new Array();

window.onload=function() { if (document.getElementById) { var i, rats, rlef, rdow; for (var i=0; i<sparkles; i++) { var rats=createDiv(3, 3); rats.style.visibility="hidden"; rats.style.zIndex="999"; document.body.appendChild(tiny

=rats); starv
=0; tinyv
=0; var rats=createDiv(5, 5); rats.style.backgroundColor="transparent"; rats.style.visibility="hidden"; rats.style.zIndex="999"; var rlef=createDiv(1, 5); var rdow=createDiv(5, 1); rats.appendChild(rlef); rats.appendChild(rdow); rlef.style.top="2px"; rlef.style.left="0px"; rdow.style.top="0px"; rdow.style.left="2px"; document.body.appendChild(star
=rats); } set_width(); sparkle(); }}

function sparkle() { var c; if (Math.abs(x-ox)>1 || Math.abs(y-oy)>1) { ox=x; oy=y; for (c=0; c<sparkles; c++) if (!starv

) { star
.style.left=(starx
=x)+"px"; star
.style.top=(stary
=y+1)+"px"; star
.style.clip="rect(0px, 5px, 5px, 0px)"; star
.childNodes[0].style.backgroundColor=star
.childNodes[1].style.backgroundColor=(colour=="random")?newColour():colour; star
.style.visibility="visible"; starv
=50; break; } } for (c=0; c<sparkles; c++) { if (starv
) update_star(c); if (tinyv
) update_tiny(c); } setTimeout("sparkle()", 40); }

function update_star(i) { if (--starv

==25) star
.style.clip="rect(1px, 4px, 4px, 1px)"; if (starv
) { stary
+=1+Math.random()*3; starx
+=(i%5-2)/5; if (stary
<shigh+sdown) { star
.style.top=stary
+"px"; star
.style.left=starx
+"px"; } else { star
.style.visibility="hidden"; starv
=0; return; } } else { tinyv
=50; tiny
.style.top=(tinyy
=stary
)+"px"; tiny
.style.left=(tinyx
=starx
)+"px"; tiny
.style.width="2px"; tiny
.style.height="2px"; tiny
.style.backgroundColor=star
.childNodes[0].style.backgroundColor; star
.style.visibility="hidden"; tiny
.style.visibility="visible" } }

function update_tiny(i) { if (--tinyv

==25) { tiny
.style.width="1px"; tiny
.style.height="1px"; } if (tinyv
) { tinyy
+=1+Math.random()*3; tinyx
+=(i%5-2)/5; if (tinyy
<shigh+sdown) { tiny
.style.top=tinyy
+"px"; tiny
.style.left=tinyx
+"px"; } else { tiny
.style.visibility="hidden"; tinyv
=0; return; } } else tiny
.style.visibility="hidden"; }

document.onmousemove=mouse; function mouse(e) { if (e) { y=e.pageY; x=e.pageX; } else { set_scroll(); y=event.y+sdown; x=event.x+sleft; } }

window.onscroll=set_scroll; function set_scroll() { if (typeof(self.pageYOffset)=='number') { sdown=self.pageYOffset; sleft=self.pageXOffset; } else if (document.body && (document.body.scrollTop || document.body.scrollLeft)) { sdown=document.body.scrollTop; sleft=document.body.scrollLeft; } else if (document.documentElement && (document.documentElement.scrollTop || document.documentElement.scrollLeft)) { sleft=document.documentElement.scrollLeft; sdown=document.documentElement.scrollTop; } else { sdown=0; sleft=0; } }

window.onresize=set_width; function set_width() { var sw_min=999999; var sh_min=999999; if (document.documentElement && document.documentElement.clientWidth) { if (document.documentElement.clientWidth>0) sw_min=document.documentElement.clientWidth; if (document.documentElement.clientHeight>0) sh_min=document.documentElement.clientHeight; } if (typeof(self.innerWidth)=='number' && self.innerWidth) { if (self.innerWidth>0 && self.innerWidth<sw_min) sw_min=self.innerWidth; if (self.innerHeight>0 && self.innerHeight<sh_min) sh_min=self.innerHeight; } if (document.body.clientWidth) { if (document.body.clientWidth>0 && document.body.clientWidth<sw_min) sw_min=document.body.clientWidth; if (document.body.clientHeight>0 && document.body.clientHeight<sh_min) sh_min=document.body.clientHeight; } if (sw_min==999999 || sh_min==999999) { sw_min=800; sh_min=600; } swide=sw_min; shigh=sh_min; }

function createDiv(height, width) { var div=document.createElement("div"); div.style.position="absolute"; div.style.height=height+"px"; div.style.width=width+"px"; div.style.overflow="hidden"; return (div); }

function newColour() { var c=new Array(); c[0]=255; c[1]=Math.floor(Math.random()*256); c[2]=Math.floor(Math.random()*(256-c[1]/2)); c.sort(function(){return (0.5 - Math.random());}); return ("rgb("+c[0]+", "+c[1]+", "+c[2]+")"); } // ]]> </script>

underwater

  • <script type="text/javascript">

// <![CDATA[ var colours=new Array("#a6f", "#60f", "#60f", "#a6f", "#ccc"); // colours for top, right, bottom and left borders and background of bubbles var bubbles=66; // maximum number of bubbles on screen var over_or_under="over"; // set to "over" for bubbles to always be on top, or "under" to allow them to float behind other objects

/****************************

  • JavaScript Bubble Cursor *
  • (c)2010-13 mf2fm web-design*
  • http://www.mf2fm.com/rv *
  • DON'T EDIT BELOW THIS BOX *
  • ***************************/

var x=ox=400; var y=oy=300; var swide=800; var shigh=600; var sleft=sdown=0; var bubb=new Array(); var bubbx=new Array(); var bubby=new Array(); var bubbs=new Array(); var sploosh=false;

function addLoadEvent(funky) { var oldonload=window.onload; if (typeof(oldonload)!='function') window.onload=funky; else window.onload=function() { if (oldonload) oldonload(); funky(); } }

addLoadEvent(buble);

function buble() { if (document.getElementById) { var i, rats, div; for (i=0; i<bubbles; i++) { rats=createDiv("3px", "3px"); rats.style.visibility="hidden"; rats.style.zIndex=(over_or_under=="over")?"1001":"0";

div=createDiv("auto", "auto"); rats.appendChild(div); div=div.style; div.top="1px"; div.left="0px"; div.bottom="1px"; div.right="0px"; div.borderLeft="1px solid "+colours[3]; div.borderRight="1px solid "+colours[1];

div=createDiv("auto", "auto"); rats.appendChild(div); div=div.style; div.top="0px"; div.left="1px"; div.right="1px"; div.bottom="0px" div.borderTop="1px solid "+colours[0]; div.borderBottom="1px solid "+colours[2];

div=createDiv("auto", "auto"); rats.appendChild(div); div=div.style; div.left="1px"; div.right="1px"; div.bottom="1px"; div.top="1px"; div.backgroundColor=colours[4]; if (navigator.appName=="Microsoft Internet Explorer") div.filter="alpha(opacity=50)"; else div.opacity=0.5; document.body.appendChild(rats); bubb

=rats.style; } set_scroll(); set_width(); bubble(); }}

function bubble() { var c; if (Math.abs(x-ox)>1 || Math.abs(y-oy)>1) { ox=x; oy=y; for (c=0; c<bubbles; c++) if (!bubby

) { bubb
.left=(bubbx
=x)+"px"; bubb
.top=(bubby
=y-3)+"px"; bubb
.width="3px"; bubb
.height="3px" bubb
.visibility="visible"; bubbs
=3; break; } } for (c=0; c<bubbles; c++) if (bubby
) update_bubb(c); setTimeout("bubble()", 40); }

document.onmousedown=splash; document.onmouseup=function(){clearTimeout(sploosh);};

function splash() { ox=-1; oy=-1; sploosh=setTimeout('splash()', 100); }

function update_bubb(i) { if (bubby

) { bubby
-=bubbs
/2+i%2; bubbx
+=(i%5-2)/5; if (bubby
>sdown && bubbx
>sleft && bubbx
<sleft+swide+bubbs
) { if (Math.random()<bubbs
/shigh*2 && bubbs
++<8) { bubb
.width=bubbs
+"px"; bubb
.height=bubbs
+"px"; } bubb
.top=bubby
+"px"; bubb
.left=bubbx
+"px"; } else { bubb
.visibility="hidden"; bubby
=0; return; } } }

document.onmousemove=mouse; function mouse(e) { if (e) { y=e.pageY; x=e.pageX; } else { set_scroll(); y=event.y+sdown; x=event.x+sleft; } }

window.onresize=set_width; function set_width() { var sw_min=999999; var sh_min=999999; if (document.documentElement && document.documentElement.clientWidth) { if (document.documentElement.clientWidth>0) sw_min=document.documentElement.clientWidth; if (document.documentElement.clientHeight>0) sh_min=document.documentElement.clientHeight; } if (typeof(self.innerWidth)=='number' && self.innerWidth) { if (self.innerWidth>0 && self.innerWidth<sw_min) sw_min=self.innerWidth; if (self.innerHeight>0 && self.innerHeight<sh_min) sh_min=self.innerHeight; } if (document.body.clientWidth) { if (document.body.clientWidth>0 && document.body.clientWidth<sw_min) sw_min=document.body.clientWidth; if (document.body.clientHeight>0 && document.body.clientHeight<sh_min) sh_min=document.body.clientHeight; } if (sw_min==999999 || sh_min==999999) { sw_min=800; sh_min=600; } swide=sw_min; shigh=sh_min; }

window.onscroll=set_scroll; function set_scroll() { if (typeof(self.pageYOffset)=='number') { sdown=self.pageYOffset; sleft=self.pageXOffset; } else if (document.body && (document.body.scrollTop || document.body.scrollLeft)) { sdown=document.body.scrollTop; sleft=document.body.scrollLeft; } else if (document.documentElement && (document.documentElement.scrollTop || document.documentElement.scrollLeft)) { sleft=document.documentElement.scrollLeft; sdown=document.documentElement.scrollTop; } else { sdown=0; sleft=0; } }

function createDiv(height, width) { var div=document.createElement("div"); div.style.position="absolute"; div.style.height=height; div.style.width=width; div.style.overflow="hidden"; div.style.backgroundColor="transparent"; return (div); } // ]]> </script>

mar 30 2020 ∞
mar 30 2020 +