//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('sizecss').href='/css/front/bodysize.css';
	document.write('<link rel="stylesheet" type="text/css" href="/css/front/bodysize.css" id="sizecss" />');
}
/*Otherwise, if the cookie IS found, load the correct size.*/
else {
	//alert('/css/front/import' +size+ '.css');
	//document.getElementById('sizecss').href='/css/front/bodysize' +size+ '.css';
	document.write('<link rel="stylesheet" type="text/css" href="/css/front/bodysize'+size+'.css" id="sizecss" />');
}
//}

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('sizecss').href='/css/front/bodysize.css';
	window.location.reload( true );
	}
	
	if (the_size=="med"){
		//set medium cookie
		var the_cookie ="TEXTSIZE=medENDTEXTSIZE; path=/";
		document.cookie = the_cookie;
		//document.getElementById('sizecss').href='/css/front/bodysizemed.css';
		window.location.reload( true );
	}
	
	if (the_size=="lrg"){
		//set large cookie
		var the_cookie ="TEXTSIZE=lrgENDTEXTSIZE; path=/";
		document.cookie = the_cookie;
		//document.getElementById('sizecss').href='/css/front/bodysizelrg.css';
		window.location.reload( true );
	}
}

