var ival = null;
var currX = null;
var endX = null;
var startX = null;
var timeOut = 170;
var step = 1;

function initCloud(){
	var main = document.getElementById('cld');
	startX = parseInt('-' + main.width);
	endX = parseInt(document.body.clientWidth + main.width);
	if(currX === null){currX = startX};
	ival = window.setTimeout("moveCloud()", timeOut, "JavaScript");
}

function moveCloud(){
	var main = document.getElementById('cld');
  currX = parseInt(currX + step);
	if(currX < endX){
		main.style.left = currX + 'px';
		ival = window.setTimeout("moveCloud()", timeOut, "JavaScript");
	}
	else{
		currX = null;
		initCloud();
	}
}
