var xmlHttp;
function changeFontSize(inc)
{
  var p = document.getElementsByTagName('p');
  for(n=0; n<p.length; n++) {
    if(p[n].style.fontSize) {
       //var size = parseInt(p[n].style.fontSize.replace("px", ""));
	   var size = 12;
    } else {
       var size = 12;
    }
    p[n].style.fontSize = size+inc + 'px';
   }
   
   xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request");
		return;
	}
	var url="changeFontSize.php";
	url = url+"?size="+size;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function setFontSize(newSize)
{
  var p = document.getElementsByTagName('p');
  for(n=0; n<p.length; n++) {
   
    p[n].style.fontSize = newSize + 'px';
   }
   
}



function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
	{
	// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
	// Internet Explorer
	try
	{
		xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch (e)
	{
		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	}
	return xmlHttp;
}



