var timeout			= 40;
var repeat			= 5000;
var blockWidth		= 131;
var posRight		= 0;
var blockStartWidth	= 0;

function ship()
{	var windowWidth	= document.body.offsetWidth;
	var objBlock	= document.getElementById("ship").style;
	
	if (posRight < windowWidth)
	{
		if (posRight == 0)
		{
			objBlock.width = ++blockStartWidth + "px"; 
			if (blockStartWidth == blockWidth)
			{
				posRight = 1;
			}
		}
		else
		{
			objBlock.right = ++posRight + "px"; 
		}
		setTimeout("ship();", timeout);
	}
	else
	{
		posRight		= 0;
		blockStartWidth	= 0;
		setTimeout("ship();", 5000);
		objBlock.width = objBlock.right = "0px";
	}
}