//
// <form action="" method="post" onSubmit="return checkMail(this);">
function showM(ob) { 
   document.getElementById(ob).style.visibility='visible';
}
function hideM(ob) {
   document.getElementById(ob).style.visibility='hidden';
}

function checkMail(formx)
{
  if (formx.mail.value == "") {
    alert ("nieprawidłowy adres e-mail");
    return false;   
  }
  if ((formx.mail.value.indexOf ('@',0) == -1 || formx.mail.value.indexOf ('.',0) == -1) && 
       formx.mail.value.indexOf != "")
  {
    alert ("nieprawidłowy adres e-mail");
    return false;
  }
  return true;  
}

function checkName(formx)
{
  if (formx.imie.value == "") {
    alert ("wpisz imię");
    return false;   
  }
  return true;
}

function checkText(formx)
{
  if (formx.text.value == "") {
    alert ("wpisz treść wiadomości");
    return false;   
  }
  return true;
}

function checkAll(formx){
   var name = checkName(formx);
   var mail = checkMail(formx);
   var text = checkText(formx);
   if ((name == true) && (mail == true) && (text == true)) {
      return true; 
   }   
return false;
}



