function textSize(direction,cVal)
{	
	//NOTE: DON'T FORGET TO SET THIS NUMBER TO THE CURRENT BODY FONT PERCENTAGE SIZE
	var defaultSize=80;
	var fSize=0;
	var cStat=1;
	
	if(cVal)
	{
		fSize=cVal;
		if(cVal==defaultSize)
		{
			cStat=-1;
		}

	}
	else {
		if(direction==0)
		{
			if(!getCookie("textSize"))
			{
				return;
			}
			else
			{
				fSize=defaultSize;
				cStat=-1;
			}
		}
		else
		{
			var currentSize=parseInt(document.body.style.fontSize);
			fSize=(currentSize > 1 || currentSize < 1 ? currentSize : defaultSize)+direction;
			
		}
		refresh();
	}
	setCookie(cStat,"textSize",fSize);	
	document.body.style.fontSize=fSize+"%";
	return fSize-defaultSize;
}

function refresh()
{
	var w=(window.location)+"";
	var symbol="#";
	symbol=(w.indexOf("#") > -1 ? "#" : w.indexOf("?") > -1 ? "?" : "");
	w=(symbol !="" ? w.substring(0,w.indexOf(symbol)) : w);
	location.replace(w);
}

function checkTextCookie()
{
	var c=getCookie("textSize");
	if(!c) return;
	return textSize(false,c);
}

function writeTextSizer()
{
/* check for text size cookie */ 
	var tSize=checkTextCookie();
	var thisSize=(tSize ? 100+tSize : 100)+"%";

//writes text up and down options but not visible with js turned off
	var t=' Text Size <span class="tGreen">'+thisSize+'</span> '+
			'<a href="javascript: textSize(10)" '+
			'title="u u u - make text larger">[ &#x21e7; ]</a>'+	
			//'[ <img src="/images2/textup.gif" alt="Make text size bigger" /> ]</a>'+
			'<a href="javascript: textSize(-10)" '+
			'title="d d d - make text smaller">[ &#x21e9; ]</a>'+
			//'[ <img src="/images2/textdown.gif" alt="Make text size smaller" /> ]</a>  '+
			'<a href="javascript: textSize(0)" '+
			'title="Reset text to original size - n n n">[ 100% ]</a> ';
	var tag=document.getElementById ? 
		document.getElementById("textsizer") : document.all["textsizer"];	
	tag.innerHTML=t;		
}
writeTextSizer();