I need to use a JavaScript patch in my Google Sites, but the problem is I don't understand how to place them and use it as Google Gadget.
<!DOCTYPE <strong class="highlight">html</strong> PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<<strong class="highlight">html</strong> xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script language="javascript" type="text/javascript">
var timerid = 0;
var <strong class="highlight">images</strong> = new Array( "image1.jpg",
"image2.jpg",
"image3.jpg");
var countimages = 0;
function startTime()
{
if(timerid)
{
timerid = 0;
}
var tDate = new Date();
if(countimages == <strong class="highlight">images</strong>.length)
{
countimages = 0;
}
if(tDate.getSeconds() % 5 == 0)
{
document.getElementById("img1").src = <strong class="highlight">images</strong>[countimages];
}
countimages++;
timerid = setTimeout("startTime()", 1000);
}
</script>
</head>
<body onload="startTime();">
<img id="img1" src="image3.jpg" />
</body>
</html>
I'm hoping for specific instructions using the JavaScript code I provided since I've found general Google Sites embedding instructions unfathomable. However with specific instructions I will be able to figure out how to use scripts in Google Sites in the future as well.