about summary refs log tree commit diff
path: root/web/javascript/tabbed_pages.js
diff options
context:
space:
mode:
authorroot2012-05-08 18:39:56 -0500
committerroot2012-05-08 18:39:56 -0500
commitea46f42ee640928b92947bfb204c41a482d80937 (patch)
tree9b27a4eb852d12539b543c3efee9d2a47ef470f3 /web/javascript/tabbed_pages.js
parent056b5253fc3857b0444382aa39944f6344dc1ceb (diff)
downloadgenenetwork2-ea46f42ee640928b92947bfb204c41a482d80937.tar.gz
Add all the source codes into the github.
Diffstat (limited to 'web/javascript/tabbed_pages.js')
-rwxr-xr-xweb/javascript/tabbed_pages.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/web/javascript/tabbed_pages.js b/web/javascript/tabbed_pages.js
new file mode 100755
index 00000000..a0a600f8
--- /dev/null
+++ b/web/javascript/tabbed_pages.js
@@ -0,0 +1,32 @@
+/* ================================================================ 

+This copyright notice must be untouched at all times.

+

+The original version of this script and the associated (x)html

+is available at http://www.stunicholls.com/various/tabbed_pages.html

+Copyright (c) 2005-2007 Stu Nicholls. All rights reserved.

+This script and the associated (x)html may be modified in any 

+way to fit your requirements.

+=================================================================== */

+

+

+onload = function() {

+	var e, i = 0;

+	var ee = document.getElementById('gallery');

+	if(ee==null){

+		return;

+	}

+	while (e = document.getElementById('gallery').getElementsByTagName ('DIV') [i++]) {

+		if (e.className == 'on' || e.className == 'off') {

+		e.onclick = function () {

+			var getEls = document.getElementsByTagName('DIV');

+				for (var z=0; z<getEls.length; z++) {

+				getEls[z].className=getEls[z].className.replace('show', 'hide');

+				getEls[z].className=getEls[z].className.replace('on', 'off');

+				}

+			this.className = 'on';

+			var max = this.getAttribute('title');

+			document.getElementById(max).className = "show";

+			}

+		}

+	}

+}
\ No newline at end of file