plugins/gallery/gallery-bits.js
changeset 0 7caf561c50ee
child 10 b38afb86dcad
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/gallery/gallery-bits.js	Wed Jul 25 16:36:26 2007 -0400
@@ -0,0 +1,24 @@
+/*
+ * 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;
+  }
+}
+
+