	// Универсальный HTMLElement (СПАСИБО ТЕБЕ ЗАРАЗА ЭКСПЛОРЕР)
var HTMLElements = {
	prototype: function(name, fn) 	{
		if ((!document.all) || (window.opera)) {
			HTMLElement.prototype[name]=fn;
		} else {
			var _createElement = document.createElement;
			document.createElement = function(tag) {
				var _elem = _createElement(tag);
				_elem[name] = fn;
				return _elem;
			}

			var _getElementById = document.getElementById;
			document.getElementById = function(id) {
				var _elem = _getElementById(id);
				if (_elem) {
					_elem[name] = fn;
					return _elem;
				}
			}

			var _getElementsByTagName = document.getElementsByTagName;
			document.getElementsByTagName = function(tag) {
				var _arr = _getElementsByTagName(tag);
				for(var _elem=0;_elem<_arr.length;_elem++)
					_arr[_elem][name] = fn;
				return _arr;
			}
		}
	}
};


		// Определение координаты элемента по горизонтали
function obX(ob) {
	return ob.offsetParent ?
		ob.offsetLeft + obX(ob.offsetParent) :
		ob.offsetLeft;
}

	// Определение координаты элемента по вертикали
function obY(ob) {
	return ob.offsetParent ?
		ob.offsetTop + obY(ob.offsetParent) :
		ob.offsetTop;
}

	// Определяем коррдинаты X
HTMLElements.prototype('X', function (test) {	return obX(this);
});
	// Определяем коррдинаты Y
HTMLElements.prototype('Y', function () {	return obY(this);
});









	// Устанавливаем коррдинаты X в не зависимости от его абслютного родителя
HTMLElements.prototype('setX', function (X) {
	if (this.offsetParent)
		X = X - this.offsetParent.X();

	this.style.left = X;
});
	// Устанавливаем коррдинаты Y в не зависимости от его абслютного родителя
HTMLElements.prototype('setY', function (Y) {
	if (this.offsetParent)
		Y = Y - this.offsetParent.Y();

	this.style.top = Y;
});










	// Возврашаем содержимое объекта без тегов
HTMLElements.prototype('NotTag', function () {
	html = this.innerHTML;
	strInputCode = html.replace(
		/&(lt|gt);/g,
		function (strMatch, p1){return (p1 == 'lt')? '<' : '>';}
	);
	return strInputCode.replace(/<\/?[^>]+(>|$)/g, '');
});


	// Определяем прозрачность элемента от 0 до 1
HTMLElements.prototype('getOpacity', function () {
	if (PAGE.IsIE()) {
		r = /opacity=([^)]*)/;
		val = r.test((1 && this.currentStyle ? this.currentStyle.filter : this.style.filter) || "") ?
			(parseFloat(RegExp.$1) / 100) + "" :
			1 ? 1 : "";
	} else {
		if (this.style.opacity)
			val = this.style.opacity;
		else
			val = 1;
	}

	return val;
});

	// Устанавливаем прозрачность от 0 до 1
HTMLElements.prototype('opacity', function (o) {
	if (PAGE.IsIE()) {
		if (o == 1)
			this.style.filter = '';
		else
			this.style.filter = 'Alpha(opacity='+(o*100)+')';

	} else {
		this.style.opacity = o;
	}
});




	// Запускаем эффекты
HTMLElements.prototype('effect', function (css, time, fn) {
	var eff = new Effect();
	if (fn)
		eff.final = fn;

	eff.start(this, css, time);
});



cssList = {	'z-index':'zIndex'};


HTMLElements.prototype('css', function (css) {
	for (var n in css)
	{		if (cssList[n])
			cssN = cssList[n];
		else
			cssN = n;

		this.style[cssN] = css[n];
	}
});












function test() {	var ob = document.getElementById('test6');
	return ob.X();};



