<script>
function turnImg(imgEl, Alpha) {
var xs = function (x, y, alpha) {
return "<div style = \"overflow: hidden; position: absolute; width: 1px; height: 1px; left: " + (Math.cos(alpha / 180 * Math.Pi) * imgEl.width) + "; top: " + (Math.sin(alpha / 180 * Math.Pi) * imgEl.height) + "\"><img src = \"" + imgEl.src + "\" width = \"" + imgEl.width + "\" height = \"" + imgEl.height + "\" style = \"position: absolute; left: -" + x + "; top: -" + y + "\""
};
var res = "";
for (var i = 1; i <= imgEl.width; i++) {
for (var j = 0; j <= imgEl.height; j++) {
res += xs(i, j, Alpha)
}
}
return res;
}
</script>
<div id = "2nd">
<img src = "http://gosha-timofeevsky1999.narod.ru/Da.jpg" onclick = "document.getElementById('Player').innerHTML = turnImg(this, 90)"/>
<div id = "Player"></div>
</div>
Почему она не работает?