function validate_form()
{

var fullField1 = document.forms.offer_made.name.value;
var fullField2 = document.forms.offer_made.email.value;
var fullField3 = document.forms.offer_made.offer.value;
var fullField4 = document.forms.offer_made.comment.value;

var badStuff=/[\<\>\[\]]/;
var badStuff2 = /http:/i;

var fix = "Please correct the following\nerrors in your submission\n\n";

	valid = true;

///// name //////////////////////////////////////

if (fullField1 == "")
        {
                fix = fix + "--\t Please give us your name.\n";
                valid = false;
        }

if (badStuff.test(fullField1) || badStuff2.test(fullField1))
        {
                fix = fix + "--\t < > [ ] or http: are not allowed in a name.\n";
                valid = false;
        }

///// email /////////////////////////////////////////////


if (fullField2 == "")
        {
                fix = fix + "--\t We do need your email to contact you.\n";
                valid = false;
        }

if (badStuff.test(fullField2)  || badStuff2.test(fullField2))
        {
                fix = fix + "--\t < > [ ] or http: are not allowed in an email address.\n";
                valid = false;
        }

///// offer ////////////////////////////////////////////

if (fullField3 == "")
        {
                fix = fix + "--\t Please tell us how much you are offering for this Domain.\n";
                valid = false;
        }

if (badStuff.test(fullField3)  || badStuff2.test(fullField3))
        {
                fix = fix + "--\t < > [ ] or http: are not allowed in an offer.\n";
                valid = false;
        }

///// comment //////////////////////////////////////////

if (badStuff.test(fullField4)  || badStuff2.test(fullField4))
        {
                fix = fix + "--\t < > [ ] or http: are not allowed in a comment.\n";
                valid = false;
        }

if ((document.forms.offer_made.comment.value.length) > 256)
        {
                fix = fix + "--\t Please keep comments to 256 characters or less.\n";
                valid = false;
        }

////////////////////// alert ///////////////////////////

if (valid == false)  {alert(fix); }

        return valid;
}

