function isEmailAddress (string) {
  var addressPattern = 
    /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
  return addressPattern.test(string);
}



function ckeckform(form){
	
if(form.company.value.length==0 || form.company.value=="***Proszę wpisać nazwe firmy."){
form.company.value = "***Proszę wpisać nazwe firmy.";
form.company.focus();
return  false;
}

if(form.firstname_name.value.length==0 || form.firstname_name.value=="***Proszę wpisać Imię i Nazwisko."){
form.firstname_name.value = "***Proszę wpisać Imię i Nazwisko.";
form.firstname_name.focus();
return  false;
}

if(form.email.value.length==0 || form.email.value=="***Proszę wpisać email."){
form.email.value = "***Proszę wpisać email.";
form.email.focus();
return  false;}

if (!isEmailAddress(form.email.value)) {
form.email.value = "***Proszę wpisać poprawny email.";
form.email.focus();
return  false;}

return true;

}