//Zmiana wielkości fontów AAA
function setFontSize(fSize)
{
	document.cookie="fontSize="+fSize;
// 3 nastepne linie ustawiają klase dla podkreslenia
	document.getElementById('f12').className = "f10";
	document.getElementById('f14').className = "f14";
	document.getElementById('f16').className = "f16";
//ustawia linie dla pokreślenia
	if( fSize == '12'){
		document.getElementById('f'+fSize).className = "f10 underline";
	}
	else{
		document.getElementById('f'+fSize).className = "f"+fSize+" underline";
	}
//zmienia wielkość liter w div'ie o identyfikatorze aTxt
	document.getElementById("aTxt").style.fontSize = fSize + "px";
// zmienia interlinie w związku z wielkością fontu.
	if( fSize == '12'){
		document.getElementById("aTxt").style.lineHeight = fSize + 6 + "px";
	}
	else if( fSize == '14'){
		document.getElementById("aTxt").style.lineHeight = fSize + 7 + "px";
	}
	else if( fSize == '16'){
		document.getElementById("aTxt").style.lineHeight = fSize + 8 + "px";
	}		
}



/*-----------------------------------------------------------
    Toggles element's display value
    Input: any number of element id's
    Output: none 
    ---------------------------------------------------------*/
function toggleDisp() {
    for (var i=0;i<arguments.length;i++){
        var d = $(arguments[i]);
        if (d.style.display == 'none')
            d.style.display = 'block';
        else
            d.style.display = 'none';
    }
}
/*-----------------------------------------------------------
    Toggles tabs - Closes any open tabs, and then opens current tab
    Input:     1.The number of the current tab
                    2.The number of tabs
                    3.(optional)The number of the tab to leave open
                    4.(optional)Pass in true or false whether or not to animate the open/close of the tabs
    Output: none 
    ---------------------------------------------------------*/
function toggleTab(num,numelems,opennum) {
    if ($('tabContent'+num).style.display == 'none'){
        for (var i=1;i<=numelems;i++){
            if ((opennum == null) || (opennum != i)){
                var temph = 'tabHeader'+i;
                var h = $(temph);
                if (!h){
                    var h = $('tabHeaderActive');
                    h.id = temph;
                }
                var tempc = 'tabContent'+i;
                var c = $(tempc);
                if(c.style.display != 'none'){
                 
                        toggleDisp(tempc);
                }
            }
        }
        var h = $('tabHeader'+num);
        if (h)
            h.id = 'tabHeaderActive';
        h.blur();
        var c = $('tabContent'+num);       
            toggleDisp('tabContent'+num);
        
    }
}


function toggleTab1(num,numelems,opennum) {
    if ($('tabContent_'+num).style.display == 'none'){
        for (var i=1;i<=numelems;i++){
            if ((opennum == null) || (opennum != i)){
                var temph = 'tabHeader_'+i;
                var h = $(temph);
                if (!h){
                    var h = $('tabHeaderActive1');
                    h.id = temph;
                }
                var tempc = 'tabContent_'+i;
                var c = $(tempc);
                if(c.style.display != 'none'){
                 
                        toggleDisp(tempc);
                }
            }
        }
        var h = $('tabHeader_'+num);
        if (h)
            h.id = 'tabHeaderActive1';
        h.blur();
        var c = $('tabContent_'+num);       
            toggleDisp('tabContent_'+num);
        
    }
}

function toggleTab2(num,numelems,opennum) {
    if ($('tabContent__'+num).style.display == 'none'){
        for (var i=1;i<=numelems;i++){
            if ((opennum == null) || (opennum != i)){
                var temph = 'tabHeader__'+i;
                var h = $(temph);
                if (!h){
                    var h = $('tabHeaderActive2');
                    h.id = temph;
                }
                var tempc = 'tabContent__'+i;
                var c = $(tempc);
                if(c.style.display != 'none'){
                 
                        toggleDisp(tempc);
                }
            }
        }
        var h = $('tabHeader__'+num);
        if (h)
            h.id = 'tabHeaderActive2';
        h.blur();
        var c = $('tabContent__'+num);       
            toggleDisp('tabContent__'+num);
        
    }
}

function toggleTab3(num,numelems,opennum) {
    if ($('tabContent___'+num).style.display == 'none'){
        for (var i=1;i<=numelems;i++){
            if ((opennum == null) || (opennum != i)){
                var temph = 'tabHeader___'+i;
                var h = $(temph);
                if (!h){
                    var h = $('tabHeaderActive3');
                    h.id = temph;
                }
                var tempc = 'tabContent___'+i;
                var c = $(tempc);
                if(c.style.display != 'none'){
                 
                        toggleDisp(tempc);
                }
            }
        }
        var h = $('tabHeader___'+num);
        if (h)
            h.id = 'tabHeaderActive3';
        h.blur();
        var c = $('tabContent___'+num);       
            toggleDisp('tabContent___'+num);
        
    }
}
