plugins/gallery/gallery-bits.js
author Dan
Thu, 09 Aug 2007 12:31:24 -0400
changeset 9 ebd7003e73c6
parent 0 7caf561c50ee
child 10 b38afb86dcad
permissions -rw-r--r--
Snapr now works with Enano's HTML/gzip optimization switches (1.0 compatibility broken, need 1.0.1 now)

/*
 * Misc functions for Enano.Img Gallery.
 */

function gal_toggle(elem, img, img_open, img_close)
{
  if ( !img_close || !img_open )
  {
    img_close = scriptPath + '/plugins/gallery/toggle-closed.png';
    img_open  = scriptPath + '/plugins/gallery/toggle-open.png';
  }
  if ( elem.style.display == 'block' )
  {
    elem.style.display = 'none';
    img.src = img_close;
  }
  else
  {
    elem.style.display = 'block';
    img.src = img_open;
  }
}