// JavaScript Document

window.onerror = HandleError

function HandleError(message, url, line)
{	return true;
}

//var tagi = new Array("P", "A", "TD", "DIV", "SPAN");		// tablica znaczników które moga miec class="bodyTXT"
//var tagi = new Array("P", "A", "TD", "DIV", "SPAN", "UL", "LI", "TABLE", "TR", "TBODY");
var tagi = new Array("P", "A", "TD", "DIV", "SPAN", "TABLE");
var tag;


function setFontSize(inc, KLASA)
{	
    //alert(inc);

if (!document.getElementById)	return false;

	for(i=0 ; i<tagi.length ; i++)
	{	tag = document.getElementsByTagName(tagi[i])
	    
	    //window.alert('1. ' + tagi[i]);
	    
		for(j=0 ; j<tag.length ; j++)
		{	if (tag[j].className == KLASA)
//		{	if (tag[j].className == "bodyTXT")
			{
        	    //window.alert('2. ' + tag[j].className);
			
			    n = parseInt(tag[j].style.fontSize) * 1 + inc;
				if (isNaN(n))	n = 12 + inc;
				if (n < 10)		n = 10;
				if (n > 14)		n = 14;
				tag[j].style.fontSize = n +"px";
        	    //window.alert('3. ' + tag[j].style.fontSize);
			}
		}
	}
}


/*
function setFontSize(inc, id)
{
    alert(inc + id);
    if (!document.getElementById){alert("!!!");	return false;}
    var obj = document.getElementById(id);
    alert(obj.tagName);
    n = parseInt(obj.style.fontSize) * 1 + inc;
    alert(n);
	if (isNaN(n))	n = 10 + inc;
	if (n < 10)		n = 10;
	if (n > 14)		n = 14;
	alert(n);
	obj.style.fontSize = n +"px";
	alert(obj.style.fontSize);
}
*/