function setCookie(name, value, expires) {	
	document.cookie = name + "=" + escape(value) + "; path=/" + ((expires == null) ? "" : "; expires=" + expires.toGMTString());
}

function getCookie (name) { 
	var dc = document.cookie;
	var cname = name + "="; 
	
	if ( dc.length > 0 ) {
		begin = dc.indexOf(cname);
		if ( begin != -1 ) { 
			begin += cname.length;
			end = dc.indexOf(' ', begin);
			if ( end == -1 ) {
				end = dc.length;
			}
			return unescape(dc.substring(begin, end));
		} 
	} 
	return null; 
}

function resizeFont(fontsize) {
	switch(fontsize) {
		case 'big':
			$('body').css('font-size', '14px');
			break;
		case 'bigger':
			$('body').css('font-size', '15px');
			break;
		default:
			$('body').css('font-size', '13px');
			break;
	}
	
	var exp = new Date();
	var numdays = 7;
	exp.setTime(exp.getTime() + (1000 * 60 * 60 * 24 * numdays));
	 
	setCookie('page_size',fontsize, exp);
}

function printContent() {
	window.print();
}

$(document).ready(function() {
	resizeFont(getCookie('page_size'));
});

function UnCryptMailto_so(s) {
						var n=0;
						var r="";
						for(var i=0; i < s.length; i++) {
							n=s.charCodeAt(i);
							if (n>=8364) {n = 128;}
							r += String.fromCharCode(n-(2));
						}
						return r;
					}
function linkTo_UnCryptMailto_so(s) {
						location.href = UnCryptMailto_so(s);
					}



