time = 100;
step = 0.2;



opac_u = 1.0;

function opacity_u() {
	document.getElementById("contents").style.opacity = opac_u;
	opac_u = roundNumber(opac_u - step, 2);
	if (opac_u > -0.1) {
		window.setTimeout("opacity_u()", time);
	} else {
		document.getElementById("contents").style.opacity = 0;
		opac_u = 1.0;
		return true;
	}
}


opac_d = 0.0;

function opacity_d() {
	document.getElementById("contents").style.opacity = opac_d;
	opac_d = roundNumber(opac_d + step, 2);
	if (opac_d < 1.1) {
		window.setTimeout("opacity_d()", time);
	} else {
		document.getElementById("contents").style.opacity = 1;
		opac_d = 0.0;
		return true;
	}
}

function roundNumber(num, dec) {
	var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
	return result;
}

function sideChangeList(to) {
	window.location.href = "?side=list.php";
}
