Object.prototype.visible = function() {
	return this.style.display != 'none';
} // visible

Object.prototype.hide = function() {
	this.style.display = 'none';
} // hide

Object.prototype.show = function() {
	this.style.display = '';
} // show

Object.prototype.toggle = function() {
	this.visible() ? this.hide() : this.show();
} // toggle

$ = function(e) {
	if(typeof e === 'string')
		e = document.getElementById(e);
	return e;
} // $

addListener = function(e, ev, handler) {
	if(e.addEventListener)
		e.addEventListener(ev, handler, false);
	else if(e.attachEvent)
		e.attachEvent('on' + ev, handler);
} // addListener