﻿var img=null;
var delay = 30; 
var xPos = 20;
var yPos = 0;
var step = 1; 
var height = 0; 
var Hoffset = 0; 
var Woffset = 0; 
var yon = 0; 
var xon=0; 
var pause = true; 
var interval; 
function changePos() { 
	width = document.body.offsetWidth; 
	height = document.body.offsetHeight; 
	Hoffset = img.offsetHeight; 
	Woffset = img.offsetWidth; 
	img.style.left = xPos + document.body.scrollLeft + "px"; 
	img.style.top = yPos + document.body.scrollTop + "px"; 
	if (yon) { 
		yPos = yPos + step; 
	} 
	else { 
		yPos = yPos - step; 
	} 
	if (yPos < 0) { 
		yon = 1;
		yPos = 0;
	} 
	if (yPos >= (height - Hoffset)) { 
		yon = 0; 
		yPos = (height - Hoffset); 
	} 
	if (xon) { 
		xPos = xPos + step; 
	} 
	else { 
		xPos = xPos - step; 
	} 
	if (xPos < 0) { 
		xon = 1; 
		xPos = 0;
	} 
	if (xPos >= (width - Woffset)) { 
		xon = 0; 
		xPos = (width - Woffset); 
	} 
}
var img2=null;
var delay2 = 30; 
var xPos2 = 20;
var yPos2 = 0;
var step2 = 1; 
var height2 = 0; 
var Hoffset2 = 0; 
var Woffset2 = 0; 
var yon2 = 0; 
var xon2=0; 
var pause2 = true; 
var interval2; 
function changePos2() { 
	width = document.body.offsetWidth; 
	height2 = document.body.offsetHeight; 
	Hoffset2 = img2.offsetHeight; 
	Woffset2 = img2.offsetWidth; 
	img2.style.left = xPos2 + document.body.scrollLeft + "px"; 
	img2.style.top = yPos2 + document.body.scrollTop + "px"; 
	if (yon2) { 
		yPos2 = yPos2 + step2; 
	} 
	else { 
		yPos2 = yPos2 - step2; 
	} 
	if (yPos2 < 0) { 
		yon2 = 1;
		yPos2 = 0;
	} 
	if (yPos2 >= (height2 - Hoffset2)) { 
		yon2 = 0; 
		yPos2 = (height2 - Hoffset2); 
	} 
	if (xon2) { 
		xPos2 = xPos2 + step2; 
	} 
	else { 
		xPos2 = xPos2 - step2; 
	} 
	if (xPos2 < 0) { 
		xon2 = 1; 
		xPos2 = 0;
	} 
	if (xPos2 >= (width - Woffset2)) { 
		xon2 = 0; 
		xPos2 = (width - Woffset2); 
	} 
} 
function www_helpor_net() {
	img=document.getElementById("img");
	yPos=0;
	img.visibility = "visible";
	setInterval('changePos()', delay);

	img2=document.getElementById("img2");
	xPos2=500;
	yPos2=400;
	img2.visibility = "visible";
	setInterval('changePos2()', delay2);
} 
