/*FONT-SIZING*/
function initPage () {
	var fMin = document.getElementById("font-min");	
	var fMax = document.getElementById("font-max");	
	
	fMin.onclick = function (){				
		resizeFont("content",12,-1,8);	
		
		return false;
	}
	fMax.onclick = function (){		
		resizeFont("content",12,1,16);		
		
		return false;
	}
}

function resizeFont(elementID, normal,step, limit){
	var x = document.getElementById(elementID);
	
	if(!x.style.fontSize) {		
		var s = normal;
		x.style.fontSize =  s +"px";				
	}	
		
	if(x.style.fontSize.indexOf("px") > -1)
	{
		var s = parseInt(x.style.fontSize.replace("px",""));
		if(s!=limit) {
			s += step;
		}	 
		x.style.fontSize =  s +"px";
	}				
	
}

function openWindow(_path, _name, _percent)
{
	var w = 800;
	var h = 600;

	if (window.screen)
	{

		w = window.screen.availWidth * (_percent / 100);
		h = window.screen.availHeight * (_percent / 100);
	}

	window.open(_path, _name, 'resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width='+w+',height='+h);
}

if (window.addEventListener)
	window.addEventListener("load", initPage, false);
else if (window.attachEvent)
	window.attachEvent("onload", initPage);



