
	var UMG = UMG ? UMG : function() {
		var public = {
			
		};
		var private = {
			
		};
	return public;
	}();
		
	/* WINDOW ONLOAD */
	Event.observe(window, 'load', function() {
		
		/* UMG.FONTSIZE */
		UMG.ToolPageFontSize = function() {
			var private = {
				prefsLoaded:false,
				defaultFontSize:76,
				currentFontSize:76
			};
			var public = {
			testVar:'test',
			revertStyles: function() {
				private.currentFontSize = private.defaultFontSize;
				public.changeFontSize(0);
			},
			
			changeFontSize: function(sizeDifference) {
				private.currentFontSize = parseInt(private.currentFontSize) + parseInt(sizeDifference * 5);
			
			    if (private.currentFontSize > 110) {
			        private.currentFontSize = 110;
			    } else if (private.currentFontSize < 60) {
			        private.currentFontSize = 60;
			    }
			    public.setFontSize(private.currentFontSize);
			},
			
			setFontSize: function(fontSize) {
				document.body.style.fontSize = fontSize + '%';
			},
			
			createCookie: function(name, value, days) {
				if (days) {
			        var date = new Date();
			        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
			        var expires = "; expires=" + date.toGMTString();
			    } else
			        expires = "";
			    document.cookie = name + "=" + value + expires + "; path=/";
			},
			
			readCookie: function(name) {
				var nameEQ = name + "=";
			    var ca = document.cookie.split(';');
			    for (var i = 0; i < ca.length; i++) {
			        var c = ca[i];
			        while (c.charAt(0) == ' ')
			            c = c.substring(1, c.length);
			        if (c.indexOf(nameEQ) == 0)
			            return c.substring(nameEQ.length, c.length);
			    }
			    return null;
			},
			
			setUserOptions: function() {
				if (!private.prefsLoaded) {
			        cookie = public.readCookie("fontSize");
			        private.currentFontSize = cookie ? cookie : private.defaultFontSize;
			        public.setFontSize(private.currentFontSize);
			        private.prefsLoaded = true;
			    }
			}
		}
		
		return public;
		}();
			
	  	UMG.ToolPageFontSize.setUserOptions();
	  	/* UMG.FONTSIZE */
	  	
	});
	/* WINDOW ONLOAD */