function settextsize() {

// Searches for existance of cookie
var starter = document.cookie.indexOf("TEXTSIZE=");
var ender = document.cookie.indexOf("ENDTEXTSIZE");
var size = document.cookie.substring(starter+9,ender);

/*if the cookie wasn't found (text sizing never having been done before), 
output the bog-standard stylesheet html tag  */
if (starter < 0) {
	//alert('no cookie');
	document.getElementById('fontChanger').href='/css/styles.css';
}
/*Otherwise, if the cookie IS found, load the correct size.*/
else {
	//alert('/css/styles' +size+ '.css');
	document.getElementById('fontChanger').href='/css/styles' +size+ '.css';
}
}

function textsizer(the_size){
	
	//if there is no size specified, set small cookie
	if(the_size==""){
	var the_cookie ="TEXTSIZE=ENDTEXTSIZE; path=/";
	document.cookie = the_cookie;
	document.getElementById('fontChanger').href='/css/styles.css';
	}
	
	if (the_size=="med"){
		//set medium cookie
		var the_cookie ="TEXTSIZE=medENDTEXTSIZE; path=/";
		document.cookie = the_cookie;
		document.getElementById('fontChanger').href='/css/stylesmed.css';
	}
	
	if (the_size=="lrg"){
		//set large cookie
		var the_cookie ="TEXTSIZE=lrgENDTEXTSIZE; path=/";
		document.cookie = the_cookie;
		document.getElementById('fontChanger').href='/css/styleslrg.css';
	}
}