function menuhover(stan,nazwa,link){

  var belka=document.getElementById(nazwa);
 //window.status = link;
  if(stan=="over"){
   belka.style.backgroundImage="url('res/m2.png')";
   belka.style.color="#f9fcc7";
   belka.style.fontWeight="bold";
  }
  if(stan=="out"){
   belka.style.backgroundImage="none";
      belka.style.color="";
         belka.style.fontWeight="";
  }
}

function menuhover1(stan,nazwa){

  var belka=document.getElementById(nazwa);
 //window.status = link;
  if(stan=="over"){
  
   belka.style.border="2px solid #abdc7d";
 
  }
  if(stan=="out"){
 belka.style.border="2px solid silver";
  }
}
function menuhover2(stan,nazwa,naz){

  var belka=document.getElementById(nazwa);
 //window.status = link;
  if(stan=="over"){
  
   belka.style.border="2px solid #abdc7d";
    belka.src="res/nagl/"+naz+"a.png";
  }
  if(stan=="out"){
 belka.style.border="2px solid silver";
 belka.src="res/nagl/"+naz+"b.png";
  }
}


function sprawdzform(formularz)
{
  for (i = 0; i < formularz.length; i++)
  { 
   var pole = formularz.elements[i];
   if ((pole.type == "text" || pole.type == "textarea") && pole.value == "")
    {
      alert("Proszę wypełnić wszystkie pola!");      return false;    }  }  return true;
}

function checkSelect(lista)
{
 var l=document.getElementById(lista);
 if (l.value==0)
  {
  alert("Proszę wybrać element z listy!"); 
  return false;
  }
  
 return true;
}


function tab2(hide,show,tab,i,t1,t2){

  var divhide=document.getElementById(hide);
  var divshow=document.getElementById(show);
  var divtab=document.getElementById(tab);
   var divt1=document.getElementById(t1);
   var divt2=document.getElementById(t2);
  
  
  divhide.style.display="none";
  divshow.style.display="block";
  
  if (i=="1")
  {
   divtab.style.backgroundImage="url('res/tabh1a.png')";
   divt1.style.backgroundImage="url('res/tab1a.png')";
   divt2.style.backgroundImage="url('res/tab2p.png')";
  }
  else
  {
   divtab.style.backgroundImage="url('res/tabh2a.png')";   
   divt1.style.backgroundImage="url('res/tab1p.png')";
   divt2.style.backgroundImage="url('res/tab2a.png')";  
   }
}


function sprglos (formularz) {
	//alert('aa');
var radio=false;
  for (i = 0; i < formularz.length; i++)
  {
   var pole = formularz.elements[i];
    if ((pole.type == "text") && (pole.value == ""))
    {
      alert("Muszą być wypełnione wszystkie pola!");
     return false;
   }
   if ((pole.type=='radio')&&(pole.checked==true))
		radio=true;
  }
  if (radio==true)
	return true;
  alert("Muszą być wypełnione wszystkie pola!");
 return false;
}


