﻿function DomUtils() {}
DomUtils.setOpacity = function (node,val) {
	if (node.filters) {
		try {
			node.filters["alpha"].opacity = val*100;
		} catch (e) { }
	} else if (node.style.opacity) {
		node.style.opacity = val;
	}
};
DomUtils.getX = function (node) {
	return parseInt(node.style.left);
};
DomUtils.getY = function (node) {
	return parseInt(node.style.top);
};
DomUtils.getWidth = function (node) {
	return parseInt(node.style.width);
};
DomUtils.getHeight = function (node) {
	return parseInt(node.style.height);
};
DomUtils.setX = function (node,x) {
	node.style.left = x + "px";
};
DomUtils.setY = function (node,y) {
	node.style.top = y + "px";
};
DomUtils.setWidth = function (node,width) {
	node.style.width = width + "px";
};
DomUtils.setHeight = function (node,height) {
	node.style.height = height + "px";
};
function Evt(evt) {
	this._evt 	 = evt ? evt : window.event;
	this._source = this._evt.target ? 
				   this._evt.target : this._evt.srcElement;
	this._x = this._evt.pageX ? this._evt.pageX : this._evt.clientX;
	this._y = this._evt.pageY ? this._evt.pageY : this._evt.clientY;
}
Evt.prototype.getX = function () {
	return this._x;
};
Evt.prototype.getY = function () {
	return this._y;
};


