var tId;

window.onload = function(){
		var Objs = document.getElementsByClassName('Distinction');
		if ( Objs.length > 0 ) {
				ColorDistinction();
		}
}

function sprawdzFormularz(t,tekst)
{
    if (t.value==tekst) t.value='';
    t.onblur=function(){
        if (t.value=='') t.value=tekst;
    }
}


function ColorDistinction() {
		var Objs = document.getElementsByClassName('Distinction');
		if ( Objs.length > 0 ) {
				for(var it=0;it<(Objs.length);it++) {
						//alert(Objs[it].getAttribute("class"));
						if ( Objs[it].getAttribute("class") == "Distinction Red" ) Objs[it].setAttribute("class", "Distinction White");
						else Objs[it].setAttribute("class", "Distinction Red");
				}
				tId = setTimeout("ColorDistinction()", 1000);
		}
}

function ResizeFont( size )
{
			var resize = document.getElementsByClassName("resizeFont");
			
			//alert(resize);
			
			if ( resize.length > 0 )
			{
					for( var r=0; r < (resize.length); r++ )
					{							
							resize[r].style.fontSize = size+"px";
							var tags = resize[r].getElementsByTagName("*");
							if ( tags.length > 0 )
							{
									 for ( var t = 0; t < tags.length; t++ )
													tags[t].style.fontSize = size + "px";
							}
					}
					
			}
}

function close() {
    document.getElementById('popup').style.display = 'none';
}
