function atuty (itemId, newState) 
{
	if(itemId && newState)
	{
		var itemObj = grab(itemId);
		if(itemObj)
		{
			itemObj.style.display = newState;
		}
	}
}

function flip(tooltipId)
{
	if (tooltipId) {
		
		var tooltipObj = grab(tooltipId);
		
		if(tooltipObj){
			
			var tooltipDisplayStyle = tooltipObj.style.display;
			
			if(tooltipDisplayStyle == 'block')
			{
				tooltipObj.style.display = 'none';
			} else 
			{
				tooltipObj.style.display = 'block';
			}			
		}
	}
}

function zmienTlo(id, klasa) 
{
	document.getElementById(id).className=klasa;
}

function MM_preloadImages() 
{ 
	var d=document; 
	if(d.images)
	{ 
		if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
		for(i=0;i<a.length; i++)
			if (a[i].indexOf("#")!=0)
			{ 
				d.MM_p[j]=new Image;
				d.MM_p[j++].src=a[i];
			}
	}
}

var grab;
if (document.getElementById)
{
    grab = function(o) { return document.getElementById(o); }
}
else if (document.all)
{
    grab = function(o) { return document.all[o]; }
}
else
{
    grab = function() { return { style:{} }; }
}

function clearDefault( field )
{
    if( field.defaultValue == field.value ) field.value = "";
}

//Specify spectrum of different font sizes:
//var szs = new Array( 'xx-small','x-small','small','medium','large','x-large','xx-large' );
var szs = new Array( '9px','10px','11px','12px','14px','16px','18px' );
var startSz = 2;

function ts( trgt,inc ) {
	if (!document.getElementById) return
	var d = document,cEl = null,sz = startSz,i,j,cTags;
	
	sz += inc;
	if ( sz < 0 ) sz = 0;
	if ( sz > 6 ) sz = 6;
	startSz = sz;
		
	grab('tekst').style.fontSize = szs[ sz ];
}
function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}