//adding click method to HTMLElement with Mozilla
function AddClickMethod()
{
	try
	{
		// create span element so that HTMLElement is accessible
		document.createElement('span');
		
		HTMLElement.prototype.click = function () {
			if (typeof this.onclick == 'function')
			this.onclick({type: 'click'});
		};
	}
	catch (e) {
	alert('click method for HTMLElement couldn\'t be added')
	}
	try
	{
	// create a element so that HTMLAnchorElement is accessible
	document.createElement('a');
	HTMLElement.prototype.click = function () {
		if (typeof this.onclick == 'function') {
		if (this.onclick({type: 'click'}) && this.href) 
			window.open(this.href, this.target ? this.target : '_self');
		}
		else if (this.href)
		window.open(this.href, this.target ? this.target : '_self');
	};
	}
	catch (e) {
	alert('click method for HTMLAnchorElement couldn\'t be added')
	}
}