this._addClass(this.containerNode, "dojoToaster" + capitalize(messageType || this.defaultType)); 
dojo.addClass(this.containerNode, "dojoToaster" + capitalize(messageType || this.defaultType)); 
		setContent: function(/*String*/message, /*String*/messageType, /*int?*/duration){			// summary			//		sets and displays the given message and show duration			// message:			//		the message			// messageType:			//		type of message; possible values in messageTypes enumeration ("message", "warning", "error", "fatal")			// duration:			//		duration in milliseconds to display message before removing it. Widget has default value.			duration = duration||this.duration;			// sync animations so there are no ghosted fades and such			if(this.slideAnim){				if(this.slideAnim.status() != "playing"){					this.slideAnim.stop();				}				if(this.slideAnim.status() == "playing" || (this.fadeAnim && this.fadeAnim.status() == "playing")){					setTimeout(dojo.hitch(this, function(){						this.setContent(message, messageType);					}), 50);					return;				}			}			var capitalize = function(word){				return word.substring(0,1).toUpperCase() + word.substring(1);			};			// determine type of content and apply appropriately			for(var type in this.messageTypes){				this._removeClass(this.containerNode, "dojoToaster" + capitalize(this.messageTypes[type]));			}			dojo.style(this.containerNode, "opacity", 1);			if(message && this.isVisible){				message = this.contentNode.innerHTML + this.separator + message;			}			this.contentNode.innerHTML = message;			this._addClass(this.containerNode, "dojoToaster" + capitalize(messageType || this.defaultType));			// now do funky animation of widget appearing from			// bottom right of page and up			this.show();			var nodeSize = dojo.marginBox(this.containerNode);						if(this.isVisible){				this._placeClip();			}else{				var style = this.containerNode.style;				var pd = this.positionDirection;				// sets up initial position of container node and slide-out direction				if(pd.indexOf("-up") >= 0){					style.left=0+"px";					style.top=nodeSize.h + 10 + "px";				}else if(pd.indexOf("-left") >= 0){					style.left=nodeSize.w + 10 +"px";					style.top=0+"px";				}else if(pd.indexOf("-right") >= 0){					style.left = 0 - nodeSize.w - 10 + "px";					style.top = 0+"px";				}else if(pd.indexOf("-down") >= 0){					style.left = 0+"px";					style.top = 0 - nodeSize.h - 10 + "px";				}else{					throw new Error(this.id + ".positionDirection is an invalid value: " + pd);				}				this.slideAnim = dojo.fx.slideTo({					node: this.containerNode,					top: 0, left: 0,					duration: 450});				dojo.connect(this.slideAnim, "onEnd", this, function(nodes, anim){						//we build the fadeAnim here so we dont have to duplicate it later						// can't do a fadeHide because we're fading the						// inner node rather than the clipping node						this.fadeAnim = dojo.fadeOut({							node: this.containerNode,							duration: 1000});						dojo.connect(this.fadeAnim, "onEnd", this, function(evt){								this.isVisible = false;								this.hide();							});						//if duration == 0 we keep the message displayed until clicked						//TODO: fix so that if a duration > 0 is displayed when a duration==0 is appended to it, the fadeOut is canceled						if(duration>0){							setTimeout(dojo.hitch(this, function(evt){								// we must hide the iframe in order to fade								// TODO: figure out how to fade with a BackgroundIframe								if(this.bgIframe){									this.bgIframe.hide();								}								this.fadeAnim.play();							}), duration);						}else{							dojo.connect(								this,								'onSelect',								this,								function(evt){									this.fadeAnim.play();								});						}						this.isVisible = true;					});				this.slideAnim.play();			}		},
5168	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5168/7b49dad9602098107ef1b59f0c357b692dc84219/Toaster.js/clean/widget/Toaster.js