<!--
// global variable to track font size; initially set with default size
var curSize = 10;
// function to change font size for usability
function changeSize(inp) {
	// declare and set variables
	var defaultSize = 10;
	var maxSize = 12;
	var minSize = defaultSize;
	var today = new Date();
 	var expire = new Date();
 	var obj = document.getElementById("contentArea_default").style;
	var h2Obj = document.getElementsByTagName("h2");
	var needle = "pmaTextSize=";
	var imgPath = "/images/interface/icons/";
	// check if cookie is set
	if ((document.cookie) && (document.cookie.indexOf(needle)>=0)) {
		var cookieIndex = document.cookie.indexOf(needle) + needle.length;
		var temp = document.cookie.substring(parseInt(cookieIndex), parseInt(cookieIndex)+2);
		if (parseInt(temp)) {
			// set current size
			curSize = parseInt(temp);
			// set images based on current size
			if (curSize >= maxSize) {
				document.images["fontBig"].src = imgPath + "fontBig_off.gif";
			} else {
				document.images["fontBig"].src = imgPath + "fontBig_on.gif";
			}
			if (curSize <= minSize) {
				document.images["fontSmall"].src = imgPath + "fontSmall_off.gif";
			} else {
				document.images["fontSmall"].src = imgPath + "fontSmall_on.gif";
			}
		}
	}
	// check input variable
	if ((inp == 3) && (obj)) {
		// increase font size
		curSize += 1;
		// check if font size exceeded maximum size allowed
		if (curSize >= maxSize) {
			// set to maximum size
			curSize = maxSize;
			document.images["fontBig"].src = imgPath + "fontBig_off.gif";
			document.images["fontSmall"].src = imgPath + "fontSmall_on.gif";
		} else {
			document.images["fontBig"].src = imgPath + "fontBig_on.gif";
			document.images["fontSmall"].src = imgPath + "fontSmall_on.gif";
		}
	} else if ((inp == 1) && (obj)) {
		// decrease font size
		curSize -= 1;
		// check if font size surpassed minimum size allowed
		if (curSize <= minSize) {
			// reset to default font size
			curSize = minSize;
			document.images["fontBig"].src = imgPath + "fontBig_on.gif";
			document.images["fontSmall"].src = imgPath + "fontSmall_off.gif";
		} else {
			document.images["fontBig"].src = imgPath + "fontBig_on.gif";
			document.images["fontSmall"].src = imgPath + "fontSmall_on.gif";
		}
	} else if (inp == 2) {
		 // reset to default size
		curSize = defaultSize;
	}
	// set font size
	obj.fontSize = curSize + "px";
	// adjust h2 tag size
	for(var i=0; i<h2Obj.length; i++) {
		var cur = h2Obj[i];
		// h2s are always 1 px size larger than text size
		cur.style.fontSize = (curSize+1) + "px";
	}
	// check for cookie
	if (document.cookie.indexOf(needle) > 0) {
		// destroy all previous cookies
		expire.setTime(today.getTime() - 1);
	}
	// set cookie expiration for up to 1 year
	expire.setTime(today.getTime() + 3600000*24*365);
	// store current font size in a cookie	
	document.cookie = "pmaTextSize=" + curSize + ";expires=" + expire.toGMTString() + ";path=/";
}
//-->

