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('textsize').href='styles/text-small.css';
}
/*Otherwise, if the cookie IS found, load the correct size.*/
else {
	//alert('styles/text-' +size+ '.css');
	document.getElementById('textsize').href='styles/text-' +size+ '.css';
}
}

function textsizer(the_size){
	
	//if there is no size specified, set small cookie
	if(the_size=="small"){
	var the_cookie ="TEXTSIZE=smallENDTEXTSIZE; path=/";
	document.cookie = the_cookie;
	document.getElementById('textsize').href='styles/text-small.css';
	}
	
	if (the_size=="large"){
		//set medium cookie
		var the_cookie ="TEXTSIZE=largeENDTEXTSIZE; path=/";
		document.cookie = the_cookie;
		document.getElementById('textsize').href='styles/text-large.css';
	}
}
