// Bubbles Javascript // copyright 23rd February 2006, by Stephen Chapman // permission to use this Javascript on your web page is granted // provided that all of the code in this script (including these // comments) is used without any alteration // you can change the number of bubbles if you like var num_bubbles =5; var bubbles = ["http://www.kahoks.org/renfro/heart9.gif"]; // window size tests function findLivePageWidth() {return window.innerWidth != null? window.innerWidth: document.body != null? document.body.clientWidth:700;}function findLivePageHeight() {return window.innerHeight != null? window.innerHeight: document.body != null? document.body.clientHeight:500;} function posX() {return typeof window.pageXOffset != 'undefined' ? window.pageXOffset:document.documentElement.scrollLeft? document.documentElement.scrollLeft:document.body.scrollLeft? document.body.scrollLeft:0;} function posY() {return typeof window.pageYOffset != 'undefined' ? window.pageYOffset:document.documentElement.scrollTop? document.documentElement.scrollTop: document.body.scrollTop?document.body.scrollTop:0;} // make bubbles var speed = 50;var movw = new Array();var move = new Array();var stepw = new Array();var posw = new Array();var posh = new Array();var dir = new Array();var winWidth;var winHeight; function setSize() {winWidth = findLivePageWidth()-50;winHeight = findLivePageHeight()-50;} function startBubbles() {setSize(); var content = ''; for (var i = 0; i < num_bubbles; i++){move[i] = 0;movw[i] = 11+ Math.random()*4;posw[i] = Math.random()*(winWidth-35)+12;posh[i] = Math.random()*winHeight;stepw[i] = 0.02 + Math.random()/10;dir[i] = (Math.random()>0.5)?1:-1;content += '