var xPos1 = 800;
var yPos1 = 100; 
var step1 = 1;
var delay1 = 60; 
var height1 = 0;
var Hoffset1 = 0;
var Woffset1 = 0;
var yon1 = 0;
var xon1 = 0;
var pause1 = true;
var interval1;
img2.style.top = yPos1;
function changePos1() 
{
	width1 = document.body.clientWidth;
	height1 = document.body.clientHeight;
	Hoffset1 = img2.offsetHeight;
	Woffset1 = img2.offsetWidth;
	img2.style.left = xPos1 + document.body.scrollLeft;
	img2.style.top = yPos1 + document.body.scrollTop;
	if (yon1) 
		{yPos1 = yPos1 + step1;}
	else 
		{yPos1 = yPos1 - step1;}
	if (yPos1 < 0) 
		{yon1 = 1;yPos1 = 0;}
	if (yPos1 >= (height1 - Hoffset1)) 
		{yon1 = 0;yPos1 = (height1 - Hoffset1);}
	if (xon1) 
		{xPos1 = xPos1 + step1;}
	else 
		{xPos1 = xPos1 - step1;}
	if (xPos1 < 0) 
		{xon1 = 1;xPos1 = 0;}
	if (xPos1 >= (width1 - Woffset1)) 
		{xon1 = 0;xPos1 = (width1 - Woffset1);   }
	}
	
	function start1()
	 {
	 	img2.visibility = "visible";
		interval1 = setInterval('changePos1()', delay);
	}
	function pause_resume1() 
	{
		if(pause1) 
		{
			clearInterval(interval1);
			pause1 = false;}
		else 
		{
			interval1 = setInterval('changePos1()',delay);
			pause1 = true; 
			}
		}
	start1();