// image.js

//---------------------------------------------------------
function Image(o)
	{
	if (o.parent == undefined) o.parent = document.getElementsByTagName("body")[0];
	
	this.elem = document.createElement("img");
	if (o.id != undefined) this.elem.id = o.id;
	this.elem.obj = this;
	
	var s = this.elem.style;
	if (o.top != undefined) s.position = "absolute";
	if (o.top != undefined) s.top = o.top;
	if (o.left != undefined) s.left = o.left;
	if (o.height != undefined) s.height = o.height;
	if (o.width != undefined) s.width = o.width;
	if (o.border != undefined) s.border = o.border;
	if (o.imgPath != undefined) this.elem.src = o.imgPath;
	if (o.onmousedown != undefined) this.elem.onmousedown = o.onmousedown;
	if (o.opacity != undefined) s.opacity = o.opacity

	o.parent.appendChild(this.elem);
	}
//---------------------------------------------------------
Image.prototype.SetOpacity = function(opacity)
	{
	this.elem.s.opacity = opacity;	
	}

