// JavaScript Document
Element.extend({
	/*
	Property: show
		Sets the display/visibility of the Element.

	Arguments:
		disp - string; default = ''.
		both - boolean; change the visibility too.

	Example:
		>$('myElement').show('block', true) //the visibility of myElement is now = 'visible' and display = block
	*/

	show: function(disp, both){
		this.style.display = $type(disp) == 'string' ? disp : '';
		if(both)
			this.style.visibility = 'visible';
		return this;
	},

/*
	Property: hide
		Sets the display/visibility of the Element.

	Arguments:
		both - boolean; change the visibility too.

	Example:
		>$('myElement').show(true) //the visibility of myElement is now = 'hidden' and display = none
	*/
	hide: function(both){
		this.style.display = 'none';
		if(both)
			this.style.visibility = 'hidden';
		return this;
	}
});

