turned = false
turning = false
maxv = 0
deg = 0
function turn() {
	footerdiv.style.top = footerdiv.offsetTop + 'px'
	footerdiv.style.position = 'absolute'
	document.body.style.overflow = 'hidden'
	if (turning) return false
	if (!turned)
		deg = 0
	else
		deg = 180
	maxv = deg + 180
	turning = true
	rotate()
}

function rotate() {
	if (deg < maxv) {
		deg += 5
		setRotate(deg)
		setTimeout("rotate()", 50)
	}
	else {
		turning = false
		turned = !turned
		footerdiv.style.position = 'static'
		document.body.style.overflow = 'auto'
	}
}

function setRotate(deg) {
	leftcdiv.style.MozTransform = 'rotate('+deg+'deg)'
	leftcdiv.style.webkitTransform = 'rotate('+deg+'deg)'
}
