if (document.getElementById) { 

	ff = readCookie('fontFamily');
	if (ff=='') ff='Arial, Helvetica, sans-serif';


	fs = parseInt(readCookie('fontSize'));
	if (!fs>0) fs=12;

	var body_fs, h1_fs, h2_fs, h3_fs, h4_fs, h5_fs, h6_fs;
	
	setSizes();

	document.writeln('<style>');
	document.writeln('body{background:white}');
	document.writeln('#banner{background:white}');
	document.writeln('#centercontent{background:white}');
	document.writeln('#rightcontent{background:white}');
	document.writeln('body{font-size:'+body_fs+'px;}');
	document.writeln('body{font-family:'+ff+';}');
	document.writeln('h1{font-size:'+h1_fs+'px;}');
	document.writeln('h2{font-size:'+h2_fs+'px;}');
	document.writeln('h3{font-size:'+h3_fs+'px;}');
	document.writeln('h4{font-size:'+h4_fs+'px;}');
	document.writeln('h5{font-size:'+h5_fs+'px;}');
	document.writeln('h6{font-size:'+h6_fs+'px;}');
	document.writeln('input.textSizer{font-size:11px;color:#000;background:#ccc;border:solid 1px #000}');
	document.writeln('input.chfont{font-size:10px;color:#000}');
	document.writeln('.chfont{font-size:11px;color:#000;background:#fff}');
	document.writeln('select.chfont{font-size:10px;color:#000;background:#fff;border:solid 1px #000}');
	document.writeln('<\/style>');
	}

function init() {
	changeType();
	}
	
function setSizes() {
	body_fs = fs
	h1_fs = body_fs+6;
	h2_fs = body_fs+5;
	h3_fs = body_fs+4;
	h4_fs = body_fs+3;
	h5_fs = body_fs+2;
	h6_fs = body_fs+1;
	}

function changeType() {
	if (!document.getElementsByTagName) {return false;} 
	setStyleByTag('div','fontFamily',ff);
	setStyleByTag('div','fontSize',body_fs+'px');
	setStyleByTag('h1','fontSize',h1_fs+'px');
	setStyleByTag('h2','fontSize',h2_fs+'px');
	setStyleByTag('h3','fontSize',h3_fs+'px');
	setStyleByTag('h4','fontSize',h4_fs+'px');
	setStyleByTag('h5','fontSize',h5_fs+'px');
	setStyleByTag('h6','fontSize',h6_fs+'px');

	setCookie('fontSize',fs);
	setCookie('fontFamily',ff);
	}

function increaseSize() {
	fs+=1;
	setSizes();
	changeType();
	}

function decreaseSize() {
	if (body_fs>1) {
		fs-=1;
		setSizes();
		changeType();
		}
	}

function writeControls() {	
	if (document.getElementsByTagName) { 
		document.writeln('<form action="" name="targeter" class="chfont" onsubmit="return false;"><p class="snap_noshots">')
		document.writeln('<select class="chfont" onchange="if(this.selectedIndex>0) {ff=this.options[this.selectedIndex].value;changeType()}">')
		document.writeln('<option value="">Text Style<\/option>')
		document.writeln('<option value="Arial, Helvetica, sans-serif">Arial<\/option>')
		document.writeln('<option value="Verdana, Arial, Helvetica, sans-serif">Verdana<\/option>')
		document.writeln('<option value="Times New Roman, Times, serif">Times<\/option>')
		document.writeln('<option value="Georgia, Times Roman, serif">Georgia<\/option>')
		document.writeln('<option value="Book Antiqua, Palatino, serif">Antiqua<\/option>')
		document.writeln('<option value="Impact, Charcoal, sans-serif">Impact<\/option>')
		document.writeln('<option value="Courier New, Courier, monospace">Courier<\/option>')
		document.writeln('<option value="Comic Sans MS, Comic Sans MS, cursive">Cursive<\/option>')
		document.writeln('<option value="Tahoma, Geneva, sans-serif">Tahoma<\/option>')
		document.writeln('<option value="Lucida console, Monaco, monospace">Lucida<\/option>')
		document.writeln('<\/select><input type="button" id="textUp" class="textSizer" onclick="increaseSize()" value="A+" \/><input type="button" id="textDown" class="textSizer" onclick="decreaseSize()" value="A-" \/>')
		document.writeln('<br \/>')
		document.writeln('<label for="targetbox" class="chfont" title="open links in a new tab or window?"> <span class="textSizer">Links Open New Tab?<\/span><\/label>')
		document.writeln('<input type="checkbox" class="chfont" name="targetbox" id="targetbox" onclick="targetLinks(this.checked);" \/>')
		document.writeln('<\/p><\/form>')
		}
	}

function setCookie(cookieName,cookieValue) {
	var today = new Date();
	var expire = new Date();
	expire.setTime(today.getTime() + 3600000*24*3000);
	document.cookie = cookieName+"="+escape(cookieValue) + ";expires="+expire.toGMTString();
	}
	
function readCookie(cookieName) {
	var theCookie=""+document.cookie;
	var ind=theCookie.indexOf(cookieName);
	if (ind==-1 || cookieName=="") return ""; 
	var ind1=theCookie.indexOf(';',ind);
	if (ind1==-1) ind1=theCookie.length; 
	return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
	}
function targetLinks(boNew) {
	if (boNew) 
		where = "_blank";
	else
		where = "_self";
	for (var i=0; i<=(document.links.length-1); i++) {
		document.links[i].target = where;
		}
	}

function setStyleByTag(e, p, v) {
	var elements = document.getElementsByTagName(e);
	for(var i = 0; i < elements.length; i++) {
		elements.item(i).style[p] = v;
		}
	}

function setStyleById(i, p, v) {
	var n = document.getElementById(i);
	n.style[p] = v;
}