//<![CDATA[

  // --------------------------------------------------------------------------

  /*document.writeln('<script type="text/javascript" src="'+page.baseHref+'/js/swfobject.js"></script>');*/

  // --------------------------------------------------------------------------

  function printPage() {
    if (window.print) {
      window.print();
    } else {
      alert(page.noPrintMessage);
    }
  }

  // --------------------------------------------------------------------------

  function ZoomediaMenu() {
    this.ptr = null;
    this.timer = null;
    this.delay = 1000;

    this.init = function(id) {
      if (!document.getElementById) {
        return;
      }

      var div = document.getElementById(id);

      if (div) {
        this.build(div);
      }
    };

    this.setTimeOut = function(id) {
      this.timer = window.setTimeout("ZoomediaMenu.mouseOut('"+id+"');", this.delay);
    };

    this.mouseOver = function(id) {
      var element = document.getElementById(id);

      if (!element) {
        return;
      }

      if (this.ptr && this.timer) {
        window.clearTimeout(this.timer);
        this.timer = null;
        this.mouseOut(this.ptr);
      }

      element.className += ' over';

      //anchor tag
      element.childNodes[0].className += ' hover';

      this.ptr = id;
    };

    this.mouseOut = function(id) {
      var element = document.getElementById(id);

      if (!element) {
        return;
      }

      //li element
      element.className = element.className.replace(' over', '');

      //anchor tag
      element.childNodes[0].className = element.childNodes[0].className.replace(' hover', '');
    };

    this.build = function(ele) {
      var ul;

      for(var i=0; i < ele.childNodes.length; ++i) {
        if (ele.childNodes[i].nodeName.toLowerCase() == 'ul') {
          ul = ele.childNodes[i];
          break;
        }
      }

      if (!ul) {
        return;
      }

      for(i=0; i < ul.childNodes.length; ++i) {
        if (ul.childNodes[i].nodeName.toLowerCase() != 'li') {
          continue;
        }

        ul.childNodes[i].onmouseover = function() {
          ZoomediaMenu.mouseOver(this.getAttribute('id'));
        };

        ul.childNodes[i].onmouseout = function() {
          ZoomediaMenu.setTimeOut(this.getAttribute('id'));
        };
      }
    };

  }//ZoomediaMenu

  // --------------------------------------------------------------------------

  var ZoomediaMenu = new ZoomediaMenu();

  // --------------------------------------------------------------------------

  function ZoomediaGlossary() {
    this.show = function(d, event) {
      for(i=0; i<gloss_defs.length; i++){
        var e = gloss_defs[i];
        var aId = "gloss_"+e;
        var dId = "def_"+e;
        if(document.getElementById(dId)) {
          if((e == d) && (document.getElementById(dId).style.display != "block") ) {
              var dd = document.getElementById(dId);
              document.getElementById(aId).style.zIndex = "500";
              dd.style.display = "block";
            if(event.layerY) {
              //dd.style.top = event.pageY+'px';
              //dd.style.left = event.pageX+'px';
            } else {
              offset = document.body.scrollTop ? document.body.scrollTop : document.documentElement.scrollTop;
              if(!offset) offset = 0; // stupid ie5/mac
              //dd.style.top = (offset + event.clientY)+'px';
              //dd.style.left = event.clientX+'px';
            }
          } else {
            this.hide(e);
          }
        }
      }
    };

    this.hide = function(d) {
      var aId = "gloss_"+d;
      var dId = "def_"+d;

      document.getElementById(aId).style.zIndex = 1;
      document.getElementById(dId).style.display = "none";
    };

  }//ZoomediaGlossary

  // --------------------------------------------------------------------------

  var ZoomediaGlossary = new ZoomediaGlossary();

  // --------------------------------------------------------------------------

function toggle(id) {
	
	if (document.getElementById(id).style.display == "none") {
		document.getElementById(id).style.display = "block";	
	} else {
		document.getElementById(id).style.display = "none";
	}
	
}


//]]>



