

function emptyFunction(evt) {
	evt = evt || window.event;
	if (evt) {
		Event.stop(evt);
	}
	return false;
}

function blockUI() {
	var _events = ['click', 'mousedown', 'mouseover'];
	jQuery('input, a, select, img, form').each(function () {
		if (this.tagName == 'A') {
			this.setAttribute('href', 'javascript: void(0)');
		}
		if (this.tagName == 'SELECT') {
			this.disabled=true;
		}
		
		if (this.tagName == 'INPUT') {
			this.onkeydown = emptyFunction;
			this.onkeyup = emptyFunction;
			this.onkeypress = emptyFunction;
		}
		
		for(var i=0; i<_events.length; i++) {
			jQuery(this).unbind(_events[i]);
		}
		Event.stopObserving(this);
		this.onclick = emptyFunction;
		this.onmousedown = emptyFunction;
		this.onmouseover = emptyFunction;
		this.onmouseout = emptyFunction;
		this.onchange = emptyFunction;
		this.onfocus = emptyFunction;
		this.onselect = emptyFunction;
		this.onsubmit = emptyFunction;
	});
}