/*******************************************************************************
 mext.js
 Extentions for the Mootools library (mext = Moo Extentions)
*******************************************************************************/

Element.extend({
/*
	JEA ~~~~~~~~~~~~~~~~~~~~
	Property: setDisplay 
		Sets the display of the Element to "block" or "none".

	Arguments:
		mode - Accepts numbers 0 or 1.

	Example:
		>$('myElement').setDisplay(0) //Turn display of myElement off (to none)
	*/
	setDisplay: function(mode){
		if (mode == 0){
			if(this.style.display != "none") 
			{
				this.style.display = "none";
				//this.style.visibility = "hidden";
			}
		} else {
			if(this.style.display != "block")
			{
				this.style.display = "block";
			}
		}
		return this;
	},
    
    removeProperty: function(property){
    	this.removeAttribute(property);
    	return this;
    },
	
	empty: function(){
		this.setHTML("");
		return this;
	}
    
});