Event.observe(window,"load", function() {
  //click to clear functionality
  $$('input.clear\_on\_click').each(function(element) {
    new ClearOnClick(element);
  });
});
var ClearOnClick = Class.create();
Object.extend(ClearOnClick.prototype, {
  initialize: function(element) {
    this.element = $(element);
    this.originalValue = $F(element);
    this.element.observe("blur", this.onBlur.bind(this));
    this.element.observe("focus", this.onFocus.bind(this));
    var form = this.element.up("form");
    if(form) $(form).observe("submit", this.onFocus.bind(this));
  },
  onFocus: function(event) {
    if($F(this.element) == this.originalValue) {
      this.element.value = "";
      this.element.removeClassName("clear\_on\_click");
    }
  },
  onBlur: function(event) {
    if($F(this.element).match(/^\s*$/)) {
      this.element.value = this.originalValue;
      this.element.addClassName("clear\_on\_click");
    }
  }
});

Event.observe(window,'load', function() {
	tables = $$('table.stripe');
	for(current=0; tables.length > current; current++) { 
		table = tables[current];
		var tbodies = table.getElementsByTagName("tbody");

		for (var h = 0; h < tbodies.length; h++) {
			// find all the <tr> elements... 
			var trs = tbodies[h].getElementsByTagName("tr");

 			// ... and iterate through them
			for (var i = 0; i < trs.length; i++) {	
				if((i % 2) == 0) { style = 'even'; } else { style = 'odd'; }
				Element.addClassName(trs[i],style);
			}
    }
	}
})

// JavaScript Document
Event.observe(window,'load', function() {
  if (document.all&&document.getElementById) {
    navRoot = document.getElementById("menu");
    for (i=0; i<navRoot.childNodes.length; i++) {
      node = navRoot.childNodes[i];
      if (node.nodeName=="LI") {
        node.onmouseover=function() {
          this.className+=" over";
        }
        node.onmouseout=function() {
          this.className=this.className.replace(" over", "");
        }
      }
    }
  }
})

Event.observe(window,'load', function() {
  setupZoom();
})