function GetSetStyle(object, top, left, width, height)
{
	var _object = object;
	var _top = top;
	var _left = left;
	var _width = width;
	var _height = height;

	this.SetTop = function(pixels){    pixels=Math.round(pixels); _object.style.top    = pixels + 'px'; _top    = pixels;}
	this.SetLeft = function(pixels){   pixels=Math.round(pixels); _object.style.left   = pixels + 'px'; _left   = pixels;}
	this.SetWidth = function(pixels){  pixels=Math.round(pixels); _object.style.width  = pixels + 'px'; _width  = pixels;}
	this.SetHeight = function(pixels){ pixels=Math.round(pixels); _object.style.height = pixels + 'px'; _height = pixels;}

	this.GetTop = function(){return _top * 1;}
	this.GetLeft = function(){return _left * 1;}
	this.GetWidth = function(){return _width * 1;}
	this.GetHeight = function(){return _height * 1;}
	this.GetObject = function(){return _object;}

	this.visible = false;
	this.Show = function(){_object.style.visibility = "visible"; this.visible=true;}
	this.Hide = function(){_object.style.visibility = "hidden"; this.visible=false;}
	
	this.DisplayShow = function(){_object.style.display = "block"; this.visible=true;}
	this.DisplayShow2 = function(){_object.style.display = "inline"; this.visible=true;}
	this.DisplayHide = function(){_object.style.display = "none"; this.visible=false;}

	this.SetInnerHtml = function(teksts){_object.innerHTML = teksts; this.html_changed_flag = true;}
	this.AddInnerHtml = function(teksts){_object.innerHTML = _object.innerHTML + teksts; this.html_changed_flag = true;}
	this.GetInnerHtml = function(){return _object.innerHTML;}
	
	this.GetChildNode = function(index){return _object.childNodes[index];}
	
	// atļauj sekot līdzi objekta konteksta izmaiņām
	this.html_changed_flag = false;


	//_object.onmousemove = MouseMove;
	//_object.onmouseover = "alert(8);";
}
/*
Object.prototype.inherit = function(superClass)
{
	
    var tmpClass = function() {};
    tmpClass.prototype = superClass.prototype;
    this.prototype = new tmpClass;
    var className = superClass.getClassName();
    this.prototype[className] = superClass;
	
}
Object.prototype.getClassName = function()
{
    //return this.toString().match(/function\s*(\w+)/)[1];
}
*/

// mantota klase ar vairākiem argumentiem
// http://www.webreference.com/programming/javascript/gr/column18/index.html
// http://dean.edwards.name/weblog/2006/03/base/
// http://www.ailis.de/~k/docs/jsoop/
function GetSetStyleXY(object, top, left, width, height)
{
	this.GetSetStyle(object, top, left, width, height);

	var _object = object;

	this.x = null;
	this.y = null;
	this.NeedShow = false;
	
	this.ImageWidth = 10;
	this.ImageHeight = 10;
	
	this.SetImageLink = function(link)
	{
		_object.src = link;
	}
};
//GetSetStyleXY.inherit(GetSetStyle);

function GetSetStyleMouseOver(object, top, left, width, height)
{
	this.GetSetStyle(object, top, left, width, height);

	MouseIsOver = false;
	this.IsMouseOver = function(){return MouseIsOver;}
	object.onmouseover = function(){MouseIsOver = true;};
	object.onmouseout = function(){MouseIsOver = false;};

	this.RefreshPosition = function()
	{
		this.SetLeft(tmp_x+12);
		this.SetTop(tmp_y+20);
	}
};
//GetSetStyleMouseOver.inherit(GetSetStyle);

