var theSheetSize = "StyleSheet";
function checkForCookie() {
	theSheetSize = GetCookie("UserTextSize");
	if(theSheetSize) {
		writeStyleSheet(theSheetSize);
	}else {
		SetCookieNam("UserTextSize", "StyleSheet");
		writeStyleSheet("StyleSheet");
	}
}
function checkForPrint() {
	if(hasIndexOf(document.URL, "?")) {
		var QS = document.URL.substring(document.URL.indexOf("?") + 1);
		if(hasIndexOf(QS, "print=")) {
			writeStyleSheet("print");
		}
	}
}
function writeStyleSheet(theSheetSize) {
	var styleSheetToWrite = "<style type=\"text/css\">@import url(css/" + theSheetSize +".css);</style>";
	document.write(styleSheetToWrite);
	document.close();
}

var printOnClick = function() {
	var URL = location.href + "?print=true";
	window.open(URL, null, "height=600, width=800, location=1, menubar=1, resizable=1, scrollbars=1, status=1, titlebar=1, toolbar=1");
	return false;
}
function activatePrint() {
	var printButton = grabElement("printPageLink");
	if(!printButton) {return}
	printButton.id += "_first";
	var printButton2 = grabElement("printPageLink");
	printButton.href="";
	printButton.onclick = printOnClick;
	if(!printButton2) {return}
	printButton2.href="";
	printButton2.onclick = printOnClick;
}
//Run this function when the window is done loading
windowObject.addLoadFunction(
	activatePrint
	);






