var Lightbox = { 
     box : null, 
     content : null, 
      
     initialize : function() { 
		  this.box = $(document.createElement('div'));
          this.box.addClassName('lightbox'); 
          this._hide = this.hide.bindAsEventListener(this); 
          this.box.hide(); 
          document.body.appendChild(this.box); 
     }, 
      
     show : function(target) {
		// Scroll page to the top
		scroll(0,0);
		
		// A bug in IE places form.select elements at the top of the Z-order.
		// This turns their display off while the lightbox it open.
		for (var a = 0; a<document.forms.length; a++) {
			var formName = document.forms[a].id;
			if (formName) {
				for (var b = 0; b<document.getElementById(formName).elements.length; b++) {
					if (document.getElementById(formName).elements[b].type=="select-one") {
						document.getElementById(formName).elements[b].style.display = 'none';
					}
				}
			}
		}
          this.box.setStyle({ 
               width: Window.getPageWidth() + 'px', 
               height: Window.getPageHeight() + 'px' 
          }); 
		  
          this.content = target; 
          this.content.setStyle({ 
               left: Window.getClientWidth()/2 - this.content.getWidth()/2 + 'px', 
               top: Window.getClientHeight()/2 - this.content.getHeight()/2 + 'px' 
          }); 
          this.content.show(); 
          this.box.show(); 
          this.box.observe('click', this._hide); 
     }, 
      
     hide : function() {
     
  		// A bug in IE places form.select elements at the top of the Z-order.
		// This turns their display back on when the lightbox closes.

		// Loop through each form
		for (var a = 0; a<document.forms.length; a++) {
			var formName = document.forms[a].id;
			if (formName) {
				// Loop though each for element lookging for select elements
				for (var b = 0; b<document.getElementById(formName).elements.length; b++) {
					if (document.getElementById(formName).elements[b].type=="select-one") {
						document.getElementById(formName).elements[b].style.display = 'inline';
					}
				}
			}
		}
		  if (Nav) {
			Nav.setSelected(Nav.navItems[0]);
          }
          this.content.hide(); 
          this.box.hide(); 
     } 
}