﻿// JScript File
var x = 760; //Starting Location - left
var y = 760; //Starting Location - top
var dest_x = -500;  //Ending Location - left
var dest_y = -500;  //Ending Location - top
var interval = 10; //Move 10px every initialization

function SMess()
    {
        setInterval('moveImage()',100);
    }

function moveImage() {
	//Keep on moving the image till the target is achieved
	if (document.getElementById("divscroller"))
	{
	if(x>dest_x) x = x - interval; 
	if(y>dest_y) y = y - interval;
	
	//Move the image to the new location
	//document.getElementById("ufo").style.top  = y+'px';
	document.getElementById("divscroller").style.left = x+'px';

	if ((x-interval > dest_x) && (y-interval > dest_y)) {
		//Keep on calling this function every 100 microsecond 
		//	till the target location is reached
		//window..setTimeout('moveImage()',100);
	}
	else
	    {
	    x=760;
	    y=760;
	    dest_x = -500;
	    dest_y = -500;
	    interval = 10;
	    //window.setTimeout('moveImage()',100);
	       }
	}
}

