
var direction=1;

function svetLayer(id)
	{
		this.name = dom?document.getElementById(id):ie?document.all[id]:ns?document.layers[id]:null;
		if (this.name !== null)
			{
				this.css    = (dom||ie)?this.name.style:this.name;
				this.x      = dom?this.css.pixelLeft:ie?parseInt(this.css.left):this.css.left;
				this.y      = dom?this.css.pixelTop:ie?parseInt(this.css.top):this.css.top;
				this.moveTo = moveTo;
				return this;
			}
		else alert('Your layer: '+ id + ' . does not exist');
	}


function moveTo(x,y)
	{
		if(dom||ie)
			{
				this.x=x;
				this.y=y;
				this.css.left=x;
				this.css.top=y;
				this.css.width= currwidth;
				if(direction==1){ currwidth = currwidth + 14; }
				else { currwidth = currwidth - 28; }
				this.css.height=  currheight;				
				if(direction==1){ currheight = currheight + 6;	}
				else { currheight = currheight - 12; }		
			}
		else this.css.moveTo(x,y);
	}