

	function Point(x,y){
		this.x				= x
		this.y				= y

		this.add			= function(p){
								return new Point(this.x + p.x, this.y + p.y)
								}
			
		this.minus			= function(p){
								return new Point(this.x - p.x, this.y - p.y)
								}
								
		this.multiply		= function(x, y){
								if(y == undefined){
									y = x
									}
								return new Point(this.x * x, this.y * y)
								}
							
		this.round			= function(){
								return new Point(Math.round(this.x), Math.round(this.y))
								}
							
		this.length			= function(p){
								if(p == undefined){
									p = new Point(0, 0)
									}
								return Math.sqrt(Math.pow(this.x - p.x, 2) + Math.pow(this.y - p.y, 2))
								}
			
		this.toString		= function(){
								return [this.x, this.y]
								}
		}

	function Rectangle(w, h, x, y, domElement){
		
		this.width			= w
		this.height			= h
		this.x				= x
		this.y				= y

		this.left			= x
		this.right			= x + w
		this.top			= y
		this.bottom			= y + h
		
		this.element		= domElement
		
		this.center			= new Point(x + (this.width / 2), y + (this.height / 2))
		
		this.multiply		= function(v){
								var w	= this.width * v
								var h	= this.height * v
								var x	= this.x * v
								var y	= this.y * v
								
								return new Rectangle(w, h, x, y, this.domElement)
								}
		
		}

	function Area(t, r, b, l){
		
		this.left	= l
		this.right	= r
		this.top	= t
		this.bottom	= b

		this.x		= l
		this.y		= t
		this.width	= r - l
		this.height	= b - t

		this.center	= new Point(l + ((r - l) / 2), t + ((b - t) / 2) )
		}
