Author: pgoetz
Date: Sat May 8 20:01:58 2010
New Revision: 942455
URL: http://svn.apache.org/viewvc?rev=942455&view=rev
Log:
script for Google site search
Added:
incubator/chemistry/website/resources/space.js
Added: incubator/chemistry/website/resources/space.js
URL:
http://svn.apache.org/viewvc/incubator/chemistry/website/resources/space.js?rev=942455&view=auto
==============================================================================
--- incubator/chemistry/website/resources/space.js (added)
+++ incubator/chemistry/website/resources/space.js Sat May 8 20:01:58 2010
@@ -0,0 +1,36 @@
+
+var hide = null;
+var show = null;
+var children = null;
+
+function init() {
+ /* Search form initialization */
+ var form = document.forms['search'];
+ if (form != null) {
+ form.elements['domains'].value = location.hostname;
+ form.elements['sitesearch'].value = location.hostname;
+ }
+ /* Children initialization */
+ hide = document.getElementById('hide');
+ show = document.getElementById('show');
+ children = document.all != null ?
+ document.all['children'] :
+ document.getElementById('children');
+ if (children != null) {
+ children.style.display = 'none';
+ show.style.display = 'inline';
+ hide.style.display = 'none';
+ }
+}
+
+function showChildren() {
+ children.style.display = 'block';
+ show.style.display = 'none';
+ hide.style.display = 'inline';
+}
+
+function hideChildren() {
+ children.style.display = 'none';
+ show.style.display = 'inline';
+ hide.style.display = 'none';
+}