function Rectangle(name, jpName, topX, topY, bottomX, bottomY) {
  //MEMBER MTHOD
  this.isValid = checkValue;
  this.getWidth  = width;
  this.getHeight = height;
  this.kill = clear;
  this.getTop = getTop;
  this.getLeft = getLeft;
  this.getBottom = getBottomY;
  this.getRight = getBottomX;
  this.getName = getName;

  //MEMBER DATA
  this.X = topX == null ? -1 : topX;
  this.Y = topY == null ? -1 : topY;
  this._X = bottomX == null ? -1 : bottomX;
  this._Y = bottomY == null ? -1 : bottomY;
  this.rectName = name;
  this.rectNameJp = jpName;
}
//Rectangle#isValid()
 function checkValue() {
	if(this.X == -1) {
		return false;
	}
	if(this.Y == -1) {
		return false;
	}
	if(this.width == -1) {
		return false;
	}
	if(this.height == -1) {
		return false;
	}
	return true;
 }
 function getTop() {
    return this.Y;
 }
 function getLeft() {
    return this.X;
 } 
 function getBottomX() {
    return this._X;
 }
 function getBottomY() {
    return this._Y;
 }
 function getName() {
	return this.rectName;
 }
//Rectangle#getWidth()
 function width() {
	if(this.isValid()) {
	    return this._X - this.X;
	}
	return -1;
 }
//Rectangle#getHeight()
 function height() {
	if(this.isValid()) {
	    return this._Y - this.Y;
	}
	return -1;
 }
//Rectangle#kill()
 function clear() {
  this.X = -1;
  this.Y = -1;
  this._X = -1;
  this._Y = -1;
 }
