function randomInteger(low, high) {
	return low + Math.floor(Math.random() * (high - low));
}

function randomFloat(low, high) {
	return low + Math.random() * (high - low);
}

function generateCloud() {
	
	// Generate one single cloud
	var cloud = document.createElement('div');
	
	cloud.style.top = randomInteger(0, 150) + "px";
	cloud.style.left = randomInteger(-20, 100) + "%";
	cloud.style.opacity = randomFloat(0.1, 0.8);
	cloud.style.webkitTransform = "scale(" + (0.4+0.6*Math.random()) + ") rotate(" + randomInteger(-5, 5) + "deg)";
	
	cloud.appendChild(document.createTextNode(""));
	cloud.className = "cloud" + (Math.random() > 0.2 ? " below" : " above");
	
	return cloud;
}
