Me alegra que te sirva. Una acotación: donde dije cada 30 segundos, quise decir cada 30 milisegundos.
Y una mejor manera de identificar a Explorer es usando window.ActiveXObject:
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Girar Objetos</title>
<style>*{margin:0}</style>
<script>
function rotate(angle){
if (angle >= 0) {
var rotation = Math.PI * angle / 180;
} else {
var rotation = Math.PI * (360+angle) / 180;
}
var costheta = Math.cos(rotation);
var sintheta = Math.sin(rotation);
if(!window.ActiveXObject){
this.style.position='relative';
var width = Math.abs(costheta*this.offsetWidth) + Math.abs(sintheta*this.offsetHeight);
var height = Math.abs(costheta*this.offsetHeight) + Math.abs(sintheta*this.offsetWidth);
this.style.left=-(this.offsetWidth-width)/2+'px';
this.style.top=-(this.offsetHeight-height)/2+'px';
this.style.webkitTransform ='rotate('+angle+'deg)';
this.style.MozTransform='rotate('+angle+'deg)';
this.style.OTransform='rotate('+angle+'deg)';
this.style.rotation=angle+'deg';
}else{
this.style.filter="progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand')";
this.filters.item(0).M11 = costheta;
this.filters.item(0).M12 = -sintheta;
this.filters.item(0).M21 = sintheta;
this.filters.item(0).M22 = costheta;
}
}
onload=function(){
rotate.call(document.getElementById('im'),50);
}
</script>
</head>
<body>
<img src="Dr__House___Illustrator_Vector_by_juliocfg.jpg" width="400" height="316" />
<br />
<img id="im" src="Dr__House___Illustrator_Vector_by_juliocfg.jpg" width="400" height="316" />
</body>
</html>
Aquí hay un ejemplo funcionando:
http://www.disegnocentell.com.ar/notas2.php?id=255