  var textSize = readTextSize();  
  if (textSize == null) textSize = "0";  
  if (textSize == "0")
    document.write('<link href="/ocs/scripts/css/master.css" rel="stylesheet" type="text/css" />\n');
  else if (textSize == "1")
	document.write('<link href="/ocs/scripts/css/masterLarger01.css" rel="stylesheet" type="text/css" />\n');
  else if (textSize == "2")
	document.write('<link href="/ocs/scripts/css/masterLarger02.css" rel="stylesheet" type="text/css" />\n');
  else if (textSize == "3")
	document.write('<link href="/ocs/scripts/css/masterLarger03.css" rel="stylesheet" type="text/css" />\n');
  
  function changeTextSize (type) {
    if (type == "up") {
	  if (textSize < 3) {
	    textSize++;
		setTextSize(textSize);
		window.location.reload();
	  } else {
	    alert ("The text size has reached the maximum.");
	  }
    } else if (type == "down") {
	  if (textSize > 0) {
	    textSize--;
		setTextSize(textSize);
		window.location.reload();
	  } else {
	    alert ("The text size has reached the minimum.");
	  }
	
	}
  }
  
  function setTextSize(value) {
	document.cookie = "textSize="+value+"; path=/";
  }
  
  function readTextSize() {
	var textSizeEQ = "textSize=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(textSizeEQ) == 0) return c.substring(textSizeEQ.length,c.length);
	}
	return null;
  }