/*------------------------------------------------------------
	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 tgs = new Array('body','td','th');
var szs = new Array('70%','80%','90%','100%','110%','120%','130%','140%','150%','160%','170%','180%','190%','200%');
var startSz = 3;

function pl()
{
	var t = getCookie('__startSz');
	if (t) startSz = parseInt(t);
	ts('body',0);
	document.getElementById('sizecontrols').style.display = "inline";
	document.getElementById('query').style.display = "inline";
			<!--// Hide script

	// CHECK IF COOKIES ARE ENABLED 
	
	var exp = new Date(); 
 	exp.setTime(exp.getTime() + 1800000); 
 
	// first write a test cookie 
 
 	setCookie("cookies", "cookies", exp, false, false, false); 
 	if (document.cookie.indexOf('cookies') == -1) { 
 		//alert('Your browser does not appear have cookies enabled. Please note that certain accessibility features such as style switching and font resizing on this site require cookies. These features will not be available unless you enable cookies.'); 
 	} 
	else {
		//If cookies, then display the controls, else they won't work...
		//alert('Cookies are enabled.'); 
		document.getElementById('styleswitch').style.display = "inline";
	}
 
 	// now delete the test cookie 

	exp = new Date(); 
  	exp.setTime(exp.getTime() - 1800000); 
  	setCookie("cookies", "cookies", exp, false, false, false); 

	function setCookie(name, value, expires, path, domain, secure) { 
		var curCookie = name + "=" + escape(value) + 
		((expires) ? "; expires=" + expires.toGMTString() : "") + 
		((path) ? "; path=" + path : "") + 
		((domain) ? "; domain=" + domain : "") + 
		((secure) ? "; secure" : ""); 
		document.cookie = curCookie; 
} 		
		
	//-->
}

function ts(trgt,inc)
{
	var d = document,cEl = null,sz,i,j,cTags;
	
	sz = startSz;
	sz += inc;
	if (sz < 0) sz = 0;
	if (sz > 12) sz = 13;
	startSz = sz;
	setCookie('__startSz',sz);
	
	if (!(cEl = d.getElementById(trgt)))
		cEl = d.getElementsByTagName(trgt)[0];

	cEl.style.fontSize = szs[sz];

	for (i = 0 ; i < tgs.length ; i++)
	{
		cTags = cEl.getElementsByTagName(tgs[i]);
		
		for (j = 0 ; j < cTags.length ; j++)
			cTags[j].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=/;domain=trace.wisc.edu;expires=" + expiry.toGMTString();
}

/*Clear default form value */

function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 
