


function moveCloud(){
	setInterval('cloud1()',95);
	setInterval('cloud2()',105);
	setInterval('cloud3()',70);
	setInterval('cloud4()',110);

	
}


function cloud1(){
	var width=f_clientWidth();
	var left=$('cloud_no1').offsetLeft-1;
	
	if(left < -104)
		left=width;
	
	$('cloud_no1').style.left=left+'px';
}


function cloud2(){
	var width=f_clientWidth();
	var left=$('cloud_no2').offsetLeft-1;
	
	if(left < -75)
		left=width;
	
	$('cloud_no2').style.left=left+'px';
}


function cloud3(){
	var width=f_clientWidth();
	var left=$('cloud_no3').offsetLeft-1;
	
	if(left < -62)
		left=width;
	
	$('cloud_no3').style.left=left+'px';
}


function cloud4(){
	var width=f_clientWidth();
	var left=$('cloud_no4').offsetLeft-1;
	
	if(left < -104)
		left=width;
	
	$('cloud_no4').style.left=left+'px';
}

function f_clientWidth() {
	return f_filterResults (
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
	);
}


function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}

