/*------------------------------------------------------------
	Copyright 2003 - Taewook Kang.  All rights reserved.
	Coded by: Taewook Kang (txkang.REMOVETHIS@hotmail.com)
	Web Site: http://txkang.com
	
	Please retain this copyright notice in the script.
	License is granted to user to reuse this code on 
	their own website if, and only if, 
	this entire copyright notice is included.
--------------------------------------------------------------*/

var szs = new Array('xx-small','x-small','small','medium','large','x-large','xx-large');
var startSz = 2;

function pl()
{
	var t = getCookie('__startSz');
	if (t) startSz = parseInt(t);

	ts('body',0);
	
}

function ts(trgt,inc)
{
	var d = document,cEl = null,sz,i,j,cTags;
	
	sz = startSz;
	sz += inc;
	if (sz < 0) sz = 0;
	if (sz > 6) sz = 6;
	startSz = sz;
	setCookie('__startSz',sz);
	
	if (!(cEl = d.getElementById(trgt)))
		cEl = d.getElementsByTagName(trgt)[0];
	
	cEl.style.fontSize = szs[sz];

}

function getCookie(name) 
{
	var re = new RegExp(name + "=([^;]+)");
	var value = re.exec(document.cookie); 
	return (value != null) ? unescape(value[1]) : null;
}

var today = new Date();
var expiry = new Date(today.getTime() + 28 * 24 * 60 * 60 * 1000); // plus 28 days

function setCookie(name,value) 
{ 
	document.cookie=name + "=" + escape(value) + ";path=/;expires=" + expiry.toGMTString();
}