Heading

Bubbled
Hearts on Page

Description


JavaScript “Animated Hearts on Page” ;[Animated Hearts]

Preview

Bubbled Hearts

Code

<html>

<head>

<title></title>

</head>

<body>

<script language=”javascript”
type=”text/javascript”>

var fifteenth = 14;

var sixteenth = 1;

var seventeenth = (document.layers)
? 1 : 0;

var eighteenth = (document.all)
? 1 : 0;

var nineteenth = (document.getElementById&&!document.all)
? 1 : 0;

var twentieth, first2,
second2;

var third2, fourth2, fifth2;

var sixth2, fifteenth3 = 930,
sixteenth3 = 1800;

if (seventeenth||nineteenth)

{

fifteenth3 =
self.innerWidth;

sixteenth3 =
self.innerHeight;

}

else if (eighteenth)

{

fifteenth3 =
document.body.clientWidth;

sixteenth3 =
document.body.clientHeight;

}

twentieth = new Array();

first2 = new Array();

second2 = new Array();

third2 = new Array();

fourth2 = new Array();

fifth2 = new Array();

seventeenth3 = 0;

for (sixth2 = 0; sixth2 <
fifteenth; ++ sixth2)

{

twentieth[sixth2] = 0;

first2[sixth2] =
Math.random()*(fifteenth3-47);

second2[sixth2] =
Math.random()*sixteenth3;

third2[sixth2] =
Math.random()*21;

fourth2[sixth2] = 0.03 +
Math.random()/10;

fifth2[sixth2] = 0.8 +
Math.random();

if (seventeenth)

{

if (sixth2 == 0)

{

document.write(“<layer
name=\”eighteenth3″+ sixth2 +”\” left=\”15\” top=\”15\”
visibility=\”show\”><font color=’#FE5F47′>♥</font></layer>”);

}

else

{

document.write(“<layer
name=\”eighteenth3″+ sixth2 +”\” left=\”15\” top=\”15\”
visibility=\”show\”><font color=’#FE5F47′>♥</font></layer>”);

}

}

else if (eighteenth||nineteenth)

{

if (sixth2 == 0)

{

document.write(“<div
id=\”eighteenth3″+ sixth2 +”\” style=\”POSITION: absolute; Z-INDEX: “+ sixth2
+”VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:1; \”><font
color=’#FE5F47′>♥</font> </div>”);

}

else

{

document.write(“<div
id=\”eighteenth3″+ sixth2 +”\” style=\”POSITION: absolute; Z-INDEX: “+ sixth2
+”VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:1; \”><font
color=’#FE5F47′>♥</font></div>”);

}

}

}

function nineteenth3()

{

for (sixth2 = 0; sixth2 <
fifteenth; ++ sixth2)

{

second2[sixth2] -=
fifth2[sixth2];

if (second2[sixth2] <
-53)

{

first2[sixth2] =
Math.random()*(fifteenth3-third2[sixth2]-32);

second2[sixth2] =
sixteenth3;

fourth2[sixth2] =
0.02 + Math.random()/10;

fifth2[sixth2] = 0.8
+ Math.random();

fifteenth3 =
self.innerWidth;

sixteenth3 =
self.innerHeight;

}

twentieth[sixth2] +=
fourth2[sixth2];

document.layers[“eighteenth3″+sixth2].top
= second2[sixth2]+pageYOffset;

document.layers[“eighteenth3″+sixth2].left
= first2[sixth2] + third2[sixth2]*Math.sin(twentieth[sixth2]);

}

setTimeout(“nineteenth3()”,
sixteenth);

}

function twentieth3()

{

for (sixth2 = 0; sixth2 <
fifteenth; ++ sixth2)

{

second2[sixth2] -=
fifth2[sixth2];

if (second2[sixth2] <
-51)

{

first2[sixth2] =
Math.random()*(fifteenth3-third2[sixth2]-29);

second2[sixth2] =
sixteenth3;

fourth2[sixth2] =
0.03 + Math.random()/10;

fifth2[sixth2] = 0.7
+ Math.random();

fifteenth3 =
nineteenth?window.innerWidth-5:document.body.clientWidth;

sixteenth3 =
nineteenth?window.innerHeight-5:document.body.clientHeight;

}

twentieth[sixth2] +=
fourth2[sixth2];

if (eighteenth)

{

document.all[“eighteenth3″+sixth2].style.pixelTop
= second2[sixth2]+document.body.scrollTop;

document.all[“eighteenth3″+sixth2].style.pixelLeft
= first2[sixth2] + third2[sixth2]*Math.sin(twentieth[sixth2]);

}

else if (nineteenth)

{

document.getElementById(“eighteenth3″+sixth2).style.top=second2[sixth2]+pageYOffset;


document.getElementById(“eighteenth3″+sixth2).style.left=first2[sixth2] +
third2[sixth2]*Math.sin(twentieth[sixth2]);

}

}

setTimeout(“twentieth3()”,
sixteenth);

}

if (seventeenth)

{

nineteenth3();

}

else if (eighteenth||nineteenth)

{

twentieth3();

}

</script>

</body>

</html>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s