


function validate() {

var theMessage = "Uzupe³nij wymagane pola: \n-----------------------------------\n";
var noErrors = theMessage

// validate an e-mail address
if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.form1.add_oemail.value)){
theMessage = theMessage + "\n --> niepoprawny adres email osoby kontaktowej!";
}

// validate an e-mail address
if (document.form1.add_spam.value==8){
piotr=1;
} else {theMessage = theMessage + "\n --> niepoprawny wynik dzia³ania w kontroli antyspamowej";}

// Make sure a single checkbox is checked
var boxCheck = false;
if (document.form1.confirm.checked) {
boxCheck = true; }
if (!boxCheck) {
theMessage = theMessage + "\n --> musisz zaakceptowaĉ regulamin!";
}

// If no errors, submit the form
if (theMessage == noErrors) {
return true;

} else {

// If errors were found, show alert message
alert(theMessage);
return false;
}
}



<!-- Original:  Ronnie T. Moore -->
<!-- Web Site:  The JavaScript Source -->

<!-- Dynamic 'fix' by: Nannette Thacker -->
<!-- Web Site: http://www.shiningstar.net -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else 
countfield.value = maxlimit - field.value.length;
}
// End -->

<!-- Begin

function validate() {

var theMessage = "Uzupe³nij wymagane pola: \n-----------------------------------\n";
var noErrors = theMessage

// validate an e-mail address
if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.form1.add_oemail.value)){
theMessage = theMessage + "\n --> niepoprawny adres email osoby kontaktowej!";
}


// validate an e-mail address
if (document.form1.add_spam.value==8){
piotr=1;
} else {theMessage = theMessage + "\n --> niepoprawny wynik dzia³ania w kontroli antyspamowej";}

// Make sure a single checkbox is checked
var boxCheck = false;
if (document.form1.confirm.checked) {
boxCheck = true; }
if (!boxCheck) {
theMessage = theMessage + "\n --> musisz zaakceptowaĉ regulamin!";
}

// If no errors, submit the form
if (theMessage == noErrors) {
return true;

} else {

// If errors were found, show alert message
alert(theMessage);
return false;
}
}




function validatesm() {

var theMessage = "Musisz zaakceptowaĉ regulamin!\n";
var noErrors = theMessage


// Make sure a single checkbox is checked
var boxCheck = false;
if (document.form1sm.confirm.checked) {
boxCheck = true; }
if (!boxCheck) {
theMessage = theMessage + "\n ";
}

// If no errors, submit the form
if (theMessage == noErrors) {
return true;

} else {

// If errors were found, show alert message
alert(theMessage);
return false;
}
}


