function rotateRight(id){
alert(id);
var p = document.getElementById(id);
alert(p)
rotate(p);
}
function rotateLeft(id){
var p = document.getElementById(id);
rotate2(p);
}
var isIE = (document.uniqueID)?1:0;
var i=1;
function rotate(image){
//获得当前对象的父节点
var object = image.parentNode;
if(isIE){
image.style.filter="progid:dXImagetransform.Microsoft.basicImage(rotation="+i+")";
i++;
if(i>4) {i=1};
}
else{
try{
//创建画布
var canvas = document.createElement('canvas');
//判断画布的环境是否为2D环境
if(canvas.getContext("2d")) {
//替换当前img为画布对象
object.replaceChild(canvas,image);
//指定画布的绘