var styleswitcher = function () {
	var a = [];
	function get (b) {
		for (var i = 0, c; c = a [i]; i++) {
			if (b ? c.getAttribute ("rel").indexOf ("alt") == -1 : !c.disabled) {
				return c.getAttribute ("title");
			}
		}
		return null;
	}
	function set (b) {
		for (var i = 0, c; c = a [i]; i++) {
			c.disabled = true;
			if (c.getAttribute ("title") == b) {
				c.disabled = false;
			}
		}
	}
	function cookie (b) {
		if (b) {
			var date = new Date;
			date.setTime (date.getTime () + 31536000000);
			document.cookie = "kikkoman_text_size=" + escape (b) + "; expires=" + date.toGMTString () + "; path=/";
		} else {
			return new RegExp ("; kikkoman_text_size=([^;]*)").test (document.cookie.replace (/^/, "; ")) ? unescape (RegExp.$1) : null;
		}
	}
	function load (b) {
		var c = window.onload;
		window.onload = function () {
			if (typeof c == "function") {
				c ();
			}
			b ();
		};
	}
	function unload (b) {
		var c = window.onunload;
		window.onunload = function () {
			if (typeof c == "function") {
				c ();
			}
			b ();
		};
	}
	for (var i = 0, b; b = document.getElementsByTagName ("link")[i]; i++) {
		if (b.getAttribute ("rel").indexOf ("style") != -1 && b.getAttribute ("title")) {
			a.push (b);
		}
	}
	load (function () {
		set (cookie () || get (true));
	});
	unload (function () {
		cookie (get ());
	});
	set (cookie () || get (true));
	return {
		get: get,
		set: set
	};
} ();