// 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 loadCss(x){
	try{
		var cssStr = '\
		#middlebox-content {font-size:' + (12+x) +'px;}\
		';
		if(cssNode.styleSheet){
			cssNode.styleSheet.cssText = cssStr; // for IE
		} else {
			var cssText = document.createTextNode(cssStr);
			cssNode.appendChild(cssText); // breaks ie
		}
		if(!document.getElementById("resizingText"))headID.appendChild(cssNode);
	}catch(err){ 
		// some debugging code
	}
}

function increaseFontSize() {
	if(incdec < 3){
		incdec++;
		loadCss(incdec);
	}
	return false;
}

function decreaseFontSize() {
	if(incdec > 0){
		incdec--;
		loadCss(incdec);
	}		
	return false;
}

