function LightBox (container, id, imgHolder) {

	this.HTMLContainer = YAHOO.util.Dom.get(container);

	this.HTMLElement = YAHOO.util.Dom.get(id);

	this.HTMLImageHolder = YAHOO.util.Dom.get(imgHolder);

	YAHOO.util.Event.addListener(this.HTMLContainer, 'click', this.hide, this, true);

	if (document.all) this.selects = document.getElementsByTagName('select');

}



LightBox.prototype.show = function () {

	//YAHOO.util.Dom.get('flash_placeholder').style.visibility = 'hidden';

	if (document.all) this.hideSelectBoxes();

	this.HTMLContainer.style.display = 'block';

	this.HTMLElement.style.display = 'block';

	var attributes = {

		opacity: { to: .9 }

	}

	anim = new YAHOO.util.Motion(this.HTMLElement, attributes,.3, YAHOO.util.Easing.easeOut);

	anim.lb = this;

	anim.onComplete.subscribe(this.finishShow);

	anim.animate();

}



LightBox.prototype.hide = function () {

	var attributes = {

		opacity: { to: 0 }

	}

	this.HTMLImageHolder.style.display = 'none';

	anim = new YAHOO.util.Motion(this.HTMLElement, attributes,.3, YAHOO.util.Easing.easeOut);

	anim.lb = this;

	anim.onComplete.subscribe(this.finishHide);

	anim.animate();

}



LightBox.prototype.finishShow = function () {

	this.lb.HTMLImageHolder.style.display = 'inline';

}



LightBox.prototype.finishHide = function () {

	if (document.all) this.lb.showSelectBoxes();

	//YAHOO.util.Dom.get('flash_placeholder').style.visibility = 'visible';

	this.lb.HTMLContainer.style.display = 'none';

}



LightBox.prototype.hideSelectBoxes = function () {

	for (var i = 0; i < this.selects.length; i++) {

		this.selects[i].style.visibility = 'hidden';

	}

}

LightBox.prototype.showSelectBoxes = function () {

	for (var i = 0; i < this.selects.length; i++) {

		this.selects[i].style.visibility = 'visible';

	}

}

LightBox.prototype.loadImage = function (img) {

	this.HTMLImageHolder.src = img;	

	return false;

}
