function pokaz_div(div,x,t)
{
	div_=document.getElementById(div);
 	if(x>0) { div_.style.visibility="visible";  }
 	else { div_.style.visibility="hidden" ;  }
}
function limit_short(text,max)
{
  if(text.value.length>max)
  {
   	text.value=text.value.substring(0,max);
  }
  else text.form.licznik_short.value=(max-text.value.length);
}
function limit(text,max)
{
  if(text.value.length>max)
  {
   	text.value=text.value.substring(0,max);
  }
  else text.form.licznik_opis.value=(max-text.value.length);
}
function limit_slowa(text,max)
{
  if(text.value.length>max)
  {
   	text.value=text.value.substring(0,max);
  }
  else text.form.licznik_slowa.value=(max-text.value.length);
}
function check(text)
{
  if(text.form.temat.value!='' && text.form.podpis_short.value!='' && text.form.podpis.value!='' && text.form.slowa_kluczowe.value!='')
  {
   	text.form.akcja.disabled=0;
  }
  else text.form.akcja.disabled=1;
}

function StarsHighlight(star){
	/*Gwiazdki
	star1=gwiazdka pusta
	star2 wypelniowna
	star3 wypelniona ale wieksza niz zaznaczona
	*/
	var star0=new Image();
  star0.src="gfx/koronka_szara.gif";
  var star1=new Image();
  star1.src="gfx/koronka.gif";
  var star2=new Image();
  star2.src="gfx/koronka.gif";
  var stars=new Array();
  stars[1]=document.getElementById("koronka1");
  stars[2]=document.getElementById("koronka2");
  stars[3]=document.getElementById("koronka3");
  stars[4]=document.getElementById("koronka4");
  stars[5]=document.getElementById("koronka5");
  for(i=5;i>=1;i--)
   {
			if(i<=star)
         {
				if(stars[i].src!=star1.src)
            {
               stars[i].src=star1.src;
            }
			}
         else
         {
				if(stars[i].src!=star0.src)
            {
               stars[i].src=star0.src;
            }
			}
	}
}

