var deg2rad = Math.PI * 2 / 360; //var roto_is_ie=typeof(cfg.globe.filters)!="undefined"; var roto_is_ie=(navigator.appName=="Microsoft Internet Explorer"); //inicjuje potrzebne wartosci dla IE i rotacji function set_rotable(obj,w,h){ obj.roto_width=w; obj.roto_top=obj.offsetTop; obj.roto_left=obj.offsetLeft; obj.roto_height=h; //alert(obj.roto_width+" "+obj.roto_top+" "+obj.roto_left+" "+obj.roto_height+" "); } function roto(obj,deg){ // deg=deg%360; if( roto_is_ie ){ rad = deg * deg2rad; costheta = Math.cos(rad); sintheta = Math.sin(rad); obj.filters.item(0).M11 = costheta; obj.filters.item(0).M12 = -sintheta; obj.filters.item(0).M21 = sintheta; obj.filters.item(0).M22 = costheta; obj.style.pixelTop=obj.roto_top-((obj.offsetHeight-obj.roto_height)/2); obj.style.pixelLeft=obj.roto_left-((obj.offsetWidth-obj.roto_width)/2); //debug(obj.style.pixelTop+" "+obj.style.pixelLeft); } else { obj.style.Transform="rotate("+deg+"deg)"; obj.style.MozTransform="rotate("+deg+"deg)"; obj.style.WebkitTransform="rotate("+deg+"deg)"; obj.style.OTransform="rotate("+deg+"deg)"; //@@@not work } }