Function.prototype.method = function (name, func) {
	this.prototype[name] = func;
	return this;
};

function testComp() {
	if(!document.getElementById) return false;
	arrHTML = document.getElementsByTagName("HTML");
	if(!arrHTML[0].nodeName) return false;
	return true;
}

function findParent(obj, tagName) {
	while (obj.nodeName != tagName) {
		obj = obj.parentNode;
	}
	return obj;
}

function openImage(id, width, height) {
	width = width+25;
	height = height+70;
	if(window.open('/custom/imagePopup.php?id='+id, 'image__'+id, 'width='+width+', height='+height+',scrollbars=1,resizable=0')) {
		return false;
	}
	return true;
}