textVersion = readCookie('textonly');
if (textVersion == 'true') {
	switchCSS('text');
}

function setText() {
	setCookie('textonly', 'true', 10000);
	switchCSS('text');
}
function setFull() {
	setCookie('textonly', 'false', 10000);
	switchCSS('full');
}
function switchCSS(a) {
	if (a == 'text') {
		var url = 'http://kansas.gov/css/text.css';
	} else {
		var url = 'http://kansas.gov/css/base.css';
	}
	oldLink = document.getElementById('visibleCSS');
	var theHead = document.getElementsByTagName('head')[0];
	theHead.removeChild(oldLink);
	var theLink = document.createElement('link');
	theLink.setAttribute('rel', 'stylesheet');
	theLink.setAttribute('type', 'text/css');
	theLink.setAttribute('media', 'screen,projection');
	theLink.setAttribute('href', url);
	theLink.setAttribute('id', 'visibleCSS');
	theHead.appendChild(theLink);
}