function rotateImage(direction) {
    var frm = document.getElementById('image_actions');
    frm.uaction.value = "rotate";
    frm.direction.value = direction;
    frm.submit();
}
function deleteImage() {
    var frm = document.getElementById('image_actions');
    frm.uaction.value = "delete";
    frm.submit();
}
function showEditTools(obj) {
    document.getElementById('edit_image').style.display = "block";
    obj.style.display = "none";
}

function showClock() {
    document.getElementById("clock").src="/img/hourglass.gif";
}
function hideClock() {
    document.getElementById("clock").src="/img/px.gif";
}

/* general function for alerting object properties */
function printProps(obj, objName) {
  var output = "" ;
  for (var prop in obj) {
    output += objName + "." + prop + " = " + obj[prop] + "<br/>\n" ;
  }
  return output ;
}

function DisplayPropertyNames(obj) {
    var names = "";
    for(var name in obj) names += name + "\n";
    alert(names);
}

