if ((navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 6) || navigator.appName != "Netscape")
{
var fontType = 'Arial';
//var fontSize = 12;
var styleRef = document.styleSheets[0];
var maxFontSize = 20;
var minFontSize = 8;

function defaultSize() {
	fontSize = 12;
	
	if (!styleRef) return;
	
	if (styleRef.rules) {
		styleRef.rules[0].style.fontSize = fontSize + 4 + 'px';
		styleRef.rules[1].style.fontSize = fontSize + 2 + 'px';
		styleRef.rules[2].style.fontSize = fontSize;
		styleRef.rules[3].style.fontSize = fontSize - 2 + 'px';
	} else if (styleRef.cssRules) {
		styleRef.cssRules[0].style.fontSize = fontSize + 4 + 'px';
		styleRef.cssRules[1].style.fontSize = fontSize + 2 + 'px';
		styleRef.cssRules[2].style.fontSize = fontSize + 'px';
		styleRef.cssRules[3].style.fontSize = fontSize - 2 + 'px';
	}
	
	refreshStyle(styleRef);
}

function setFontSize() {
		if (!styleRef) return;
	
	if (styleRef.rules) {
		styleRef.rules[2].style.fontSize = getCookieData('DynFontSize').toString() + 'px';
	} else {
		styleRef.cssRules[2].style.fontSize = getCookieData('DynFontSize').toString() + 'px';
	}

	refreshStyle(styleRef);
}

function setCookie(name, value) {
	document.cookie = name + "=" + escape(value);
}


function increaseFont() {
		if (!styleRef) return;
		
	setFontSize();
	fontSize = parseInt(getCookieData('DynFontSize')) + 1;
	
	//Quit out of the function if we don't allow the font size to get bigger
	if (fontSize > maxFontSize) {
		fontSize = maxFontSize;
		return;
	}
	
	setCookie('DynFontSize', fontSize)
	
	//Test for no stylesheet support first
	if (!styleRef) return;
	
	if (styleRef.rules) {
		styleRef.rules[0].style.fontSize = fontSize + 4 + 'px';
		styleRef.rules[1].style.fontSize = fontSize + 2 + 'px';
		styleRef.rules[2].style.fontSize = fontSize;
		styleRef.rules[3].style.fontSize = fontSize - 2 + 'px';
	} else if (styleRef.cssRules) {
		styleRef.cssRules[0].style.fontSize = fontSize + 4 + 'px';
		styleRef.cssRules[1].style.fontSize = fontSize + 2 + 'px';
		styleRef.cssRules[2].style.fontSize = fontSize + 'px';
		styleRef.cssRules[3].style.fontSize = fontSize - 2 + 'px';
	}
//	alert(fontSize);
	refreshStyle(styleRef);
}

function decreaseFont() {
		if (!styleRef) return;
		
	setFontSize();
	fontSize = parseInt(getCookieData('DynFontSize')) - 1;
	
	//Test for the minimum font size
	if (fontSize < minFontSize) {
		fontSize = minFontSize;
		return;
	}
	
	setCookie('DynFontSize', fontSize)

	
	//Test for no stylesheet support first
	if (!styleRef) return;
	
	if (styleRef.rules) {
		styleRef.rules[0].style.fontSize = fontSize + 4 + 'px';
		styleRef.rules[1].style.fontSize = fontSize + 2 + 'px';
		styleRef.rules[2].style.fontSize = fontSize;
		styleRef.rules[3].style.fontSize = fontSize - 2 + 'px';
	} else if (styleRef.cssRules) {
		styleRef.cssRules[0].style.fontSize = fontSize + 4 + 'px';
		styleRef.cssRules[1].style.fontSize = fontSize + 2 + 'px';
		styleRef.cssRules[2].style.fontSize = fontSize - 1 + 'px';
		styleRef.cssRules[3].style.fontSize = fontSize - 2 + 'px';
	}
//	alert(fontSize);
	refreshStyle(styleRef);
}

function changeFont() {
	if (fontType == 'Arial') {
		fontType = 'Times New Roman';
	} else if (fontType = 'Times New Roman') {
		fontType = 'Arial';
	}
	
	if (!styleRef) return;
	
	if (styleRef.rules) {
		styleRef.rules[0].style.fontFamily = fontType;
		styleRef.rules[1].style.fontFamily = fontType;
		styleRef.rules[2].style.fontFamily = fontType;
		styleRef.rules[3].style.fontFamily = fontType;
		
		return;
	} else if (styleRef.cssRules) {
		styleRef.cssRules[0].style.fontFamily = fontType;
		styleRef.cssRules[1].style.fontFamily = fontType;
		styleRef.cssRules[2].style.fontFamily = fontType;
		styleRef.cssRules[3].style.fontFamily = fontType;

		refreshStyle(styleRef);
		
		return;
	}
}

function refreshStyle(sheet) {
	sheet.disabled = true;
	sheet.disabled = false;
	}
}