﻿function setcookie( name, value, expiry, path ) {
  if(expiry) {
    var now = new Date();
    now.setTime( now.getTime() + Math.round(86400000*expiry) );
    expiry = now.toGMTString();
  }
  expiry = expiry ? '; expires=' + expiry : '';
  path = path ?'; path=' + path:'';
  document.cookie = name + '=' + escape(value) + expiry + path;
}

function getcookie( name ) {
  var cookie = document.cookie;
  if( cookie.indexOf( name + '=' ) < 0 ) { return ''; }
  var start = cookie.indexOf( name + '=' ) + name.length + 1;
  var finish = cookie.substring( start, cookie.length );
  finish = ( finish.indexOf( ';' ) < 0 ) ? cookie.length : start + finish.indexOf( ';' );
  return unescape( cookie.substring( start, finish ) );
}

function changeFontSize() {
	var state = getcookie('fontsize');
	if (state == '') {
		setcookie('fontsize','big');
	} else {
		if (state == 'big') {
			setcookie('fontsize','small');
		} else {
			setcookie('fontsize','big');
		}
	}
	window.location.reload();
}

var state = getcookie('fontsize');

if (state == 'big') {
	document.write('<link rel="stylesheet" type="text/css" href="/Files/System/big.css">');
}



