function FontChanger (instance, pageElement, setDefaultSize, setMinSize, setMaxSize, setLargeSize) {
	
	this.instance = instance;
	this.elementName = pageElement;
	this.element = null;
	this.size = new Number();
	this.defaultSize = setDefaultSize;
	this.minSize = setMinSize;
	this.maxSize = setMaxSize;
	this.largeSize = setLargeSize;
	this.color = new String();
	this.weight = new String();
	this.decoration = new String();
	
	this.initialize = function () {
		if (this.element == null) {
			if (document.getElementsByTagName(this.elementName)) {
				this.element = document[this.elementName];
			} else if (document.getElementsByTagName(this.elementName)) {
				this.element = document.getElementsByTagName(this.elementName);
			} else if (document.getElementById(this.elementID)) {
				this.element = document.getElementById(this.elementID);
			}
			this.size = this.defaultSize;
			this.color = this.element.style.color;
			this.weight = this.element.style.weight;
			this.decoration = this.element.style.textDecoration;
		}
	}
	
	this.updateSize = function () {
		this.initialize();
		this.element.style.fontSize = this.size + "px";
		console.log("Size changed to " + this.size + "px");
	}
	
	this.increaseSize = function () {
		this.initialize();
		if (this.size < this.maxSize) {
			this.size += 1;
			this.updateSize();
		}
	}
	
	this.decreaseSize = function () {
		this.initialize();
		if (this.size > this.minSize) {
			this.size -= 1;
			this.updateSize();
		}
	}
	
	this.resetSize = function () {
		this.initialize();
		this.size = this.defaultSize;
		this.updateSize();
	}
	
	this.toggleSize = function () {
		this.initialize();
		if (this.size == this.defaultSize) {
			this.size = this.largeSize;
			this.updateSize();
		} else {
			this.size = this.defaultSize;
			this.updateSize();
		}
	}
	
}

