var x,n=0,rotINT
function rotateDIV() {
	x=document.getElementById("rotate3D")
	clearInterval(rotINT)
	rotINT=setInterval("startRotate()",10)
}
function startRotate() {
	n=n+1
	x.style.transform="rotateX(" + n + "deg)"
	x.style.webkitTransform="rotateX(" + n + "deg)"
	x.style.OTransform="rotateX(" + n + "deg)"
	x.style.MozTransform="rotateX(" + n + "deg)"
	if (n==180 || n==360) {
		clearInterval(rotINT)
		if (n==360){n=0}
	}
}
var myVar = setInterval(function(){ rotateDIV() }, 5000);

