function verzenden()  {
	if(CheckForm(document.infoForm))
	{
		document.infoForm.submit();
	}
}

function isInput(veld) {
	if (veld == null || veld == "" || veld == veld.defaultValue) {
		return false;
	}
	return true;
}

function isChanged(field)
{
	if (field == "")
	{
		return false;
	}
	else
	{
		return true;
	}
}

function isEmail(f) {

    if (f.email.value.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
	{
        return true;
    }
	else
	{
		f.email.focus();
        return false;
    }
}

function isEmailToo(f) {

    if (f.value.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
	{
        return true;
    }
	else
	{
		f.focus();
        return false;
    }
}

function ClearArea(objTextArea) {
	if (objTextArea.value == 'Your text...')
	{
		objTextArea.value = '';
	}
	else
	{
	if (objTextArea.value == '')
		{
		objTextArea.value = 'Your text...';
		}
	}
}

function CheckForm() {
	msg = "";

	if (!isInput(contact.name.value)) { msg += "Please fill in your name\n";}
	if (!isInput(contact.email.value)) {
		 msg += "Please fill in your e-mail address\n";
	}
	else {
		 if (!isEmail(contact)) msg += "The format of the e-mail address is not valid\n";
	}
		
	if (msg == "") {
		document.forms.contact.submit(); 
	}
	else {
		alert(msg);
	}
}