// Text resize function
// This Javascript is written by Peter Velichkov (http://blog.creonfx.com)
// and is distributed under the following license : http://creativecommons.org/licenses/by-sa/3.0/
// Use and modify all you want just keep this comment. Thanks

var incdec=0;
var headID=document.getElementsByTagName("head")[0];
var cssNode=document.createElement("style");
cssNode.type='text/css';cssNode.id="resizingText";
function createCookie(a,b,c){if(c){var d=new Date();
d.setTime(d.getTime()+(c*24*60*60*1000));var e="; expires="+d.toGMTString()}else var e="";
document.cookie=a+"="+b+e+"; path=/"}
function readCookie(a){var b=a+"=";var d=document.cookie.split(';');
for(var i=0;i<d.length;i++){var c=d[i];
while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(b)==0)return c.substring(b.length,c.length)}return null}
function eraseCookie(a){createCookie(a,"",-1)}

function loadCss(x){try{var a='		div#content, div#sidebar-beta {font-size:'+(0.95+(0.2*x))+'em; line-height: 1.3em;}		';
if(cssNode.styleSheet){cssNode.styleSheet.cssText=a}else{var b=document.createTextNode(a);cssNode.appendChild(b)}
if(!document.getElementById("resizingText"))headID.appendChild(cssNode)}catch(err){}}function increaseFontSize(){
	if(incdec<2){incdec++;loadCss(incdec);createCookie('textsize',incdec,1)}}
	function decreaseFontSize(){if(incdec>0){incdec--;loadCss(incdec);createCookie('textsize',incdec,1)}}var x=readCookie('textsize');if(x&&x!=0){x=parseInt(x);incdec=x;loadCss(x)};