function deblur(mylink) {
  if (document.all) {
    mylink.blur();
  }
}

function showhide (id) {
  element = document.getElementById(id); 
  if (element.className=="shown") {
    element.className="hidden";
  } 
  else {
    element.className="shown"; 
  }
}

function show (id) {
  document.getElementById(id).className="shown";
}

function hide (id) {
  document.getElementById(id).className="hidden";
}

function SwapImage(img, href, del_href) {
  document.getElementById('medium_image').src = img;
  document.getElementById('medium_image_link').href = href;
  document.getElementById('medium_image_delete_link').href = del_href;
  return true;
}

function resize_thumbnail_frame() {
  document.getElementById('thumbnail_menu').style.height = (window.innerHeight-140)+'px';
}

function menuinit (id) {
  document.getElementById(id).style.width = '10%';
  document.getElementById(id).style.overflow = 'hidden';
}

function menushrink (id) {
  oldwidth = document.getElementById(id).style.width;
  if (oldwidth == 'auto') { oldwidth = '10%' }
  document.getElementById(id).style.width = oldwidth;
  document.getElementById(id).style.overflow = 'hidden';
}

function menugrow (id) {
  document.getElementById(id).style.width = 'auto';
  document.getElementById(id).style.overflow = 'visible';
}
