function zmiana(a){
  tablica = ['opis', 'szczegoly','polec','opinie','producent'];
  s = 'home/202/des/_gfx/';
    for(i=0; i<tablica.length; i++){
      if(tablica[i]==a){
        t = document.getElementById(a+'_txt');
        t.style.display = 'block';
        b = document.getElementById(a);
        c = s + a +'_on.gif';
        b.src = c;
      }else{
        t=document.getElementById(tablica[i]+'_txt');
        t.style.display = 'none';
        b = document.getElementById(tablica[i]);
        c = s + tablica[i] + '.gif';
        b.src = c;
      }
    };
}

function brak(b){
  target = document.getElementById(b);
  target.style.border = 'solid 1px red';
  target_txt = document.getElementById(b+'_txt');
  target_txt.style.color = 'red';

}

function brak2(b){
  target_txt = document.getElementById(b+'_txt');
  target_txt.style.color = 'red';

}

function sprawdzMail2(forma) {
  if(checkMail(forma.emailto.value)) sprawdzMail(forma);
  else alert("Podaj poprawny e-mail");
}

function sprawdzMail(forma) {
  if(checkMail(forma.emailfrom.value)) forma.submit();
  else alert("Podaj poprawny e-mail");
}

function checkMail(text) {
 regex=/\b(^(\S+)@(\S+)((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi;
 return text.match(regex);
}
