function Coord(x,y){this.type= COORD_TYPE
this.x=(x?x:0);this.y=(y?y:0);this.set= setCoord;this.add= coordAdd
this.getCopy= new Function("return new Coord(this.x, this.y);");return this}
function setCoord(){if(arguments.length==1){this.x= arguments[0].x;this.y= arguments[0].y}else{if(arguments.length==2){this.x= arguments[0];this.y= arguments[1]}}}
function coordAdd(){if(arguments.length==1){if(arguments[0].type==SIZE_TYPE){this.x += (arguments[0].width);this.y += (arguments[0].height)}else{if(arguments[0].type==COORD_TYPE){this.x += (arguments[0].x);this.y += (arguments[0].y)}}}else{if(arguments.length==2){if(!(isNaN(arguments[0]) || isNaN(arguments[1])) ){this.x += (arguments[0]);this.y += (arguments[1])}}}
return this}