kryj = 0; id = 0; symbol='';
function menu(element) {
  i = 1; kryj = 1;
  ukryj1( element.length - 3 );
  document.getElementById(element).style.visibility = "visible";
  if( element.length >= symbol.length )
  {
  	symbol = element;
  }
}

function koniec() {
  clearTimeout(id);
  kryj=0; id = setTimeout(ukryj, 500);
}

function ukryj() {
  if (kryj==0) {
	if( symbol.length > 0 )
	{
		while( symbol.length > 1 )
		{
			document.getElementById( symbol ).style.visibility = "hidden";
			symbol = symbol.substr(0,symbol.length-3);
		}
	}
  }
}

function ukryj1(ile) {
	while( symbol.length > ile )
	{
		document.getElementById( symbol ).style.visibility = "hidden";
		symbol = symbol.substr(0,symbol.length-3);
		
	}
}

function uzupelnij( liczba, dl )
{
	var wynik = ""+liczba;
	while( wynik.length < dl )
		wynik = "0"+wynik;
	return wynik;
}

function druk(ident)
{
   window.open("drukuj.php?id="+ident,"Druk","toolbars=no,scrollbars=yes,width=550,height=600");
}

function drukA(ident)
{
   window.open("drukujA.php?id="+ident,"Druk","toolbars=no,scrollbars=yes,width=600,height=600");
}

function drukN(ident)
{
   window.open("drukujN.php?id="+ident,"Druk","toolbars=no,scrollbars=yes,width=550,height=600");
}
/////////////////////////////////////////////////////

function MM_openBrWindow(theURL,szer,wys,scr) { //v2.0
lewy=(screen.width-szer)/2;
gorny=(screen.height-wys)/2;	
features='left='+lewy+',top='+gorny+',width='+szer+',height='+wys+',innerheight='+wys+',innerwidth='+szer+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+scr+',resizable=no';
  okno=window.open(theURL,'winName',features);
  okno.moveTo(lewy,gorny);
  okno.resizeTo(szer,wys);
  window.okno.focus();
} 
/////////////////////////////////
function flash( swf, width, height){
	document.write('<object type="application/x-shockwave-flash"\n');
	document.write('  data="'+swf+'" width="'+width+'" height="'+height+'">\n');
	document.write('<param name="movie" value="'+swf+'" /><param name=wmode value=opaque>\n');
	document.write('</object>\n');
}
