/**
**	This function validates the form to make sure they are not using a back door.
**	To avoid reading the source, this script will be included.
**
**	Harm.
**/
function form_validator1(action) {
	var theform;
	var hiho = 'by_me';

	if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
		theform = document.pxs_form_001;
	}
	else {
		theform = document.forms['pxs_form_001'];
	}

	theform.pxs_submitted.value = hiho;

	theform.action = action;

	theform.submit();
	return true;
}

function form_validator2(action) {
	var theform;
	var hiho = 'by_me';

	if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
		theform = document.pxs_form_002;
	}
	else {
		theform = document.forms['pxs_form_002'];
	}

	if (theform.frm_searchstring.value.length<4 && theform.frm_searchstring.value!='') {
		alert('If you want to search for a phrase or word, please use 4 or more characters.'+'\n'+'Otherwise leave this field blank.');
		return false;
	}

	theform.pxs_submitted.value = hiho;

	theform.action = action;

	theform.submit();
	return true;
}

function form_validator3(action) {
	var theform;
	var hiho = 'by_me';

	if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
		theform = document.pxs_form_003;
	}
	else {
		theform = document.forms['pxs_form_003'];
	}

/*
*	Van wie?
*/
	if (theform.frm_name.value.length<1 || theform.frm_name.value=='') {
		alert('Uw naam graag.');
		inform('frm_name');
		return false;
	}
	var re = /^[a-z0-9\._-]+@[a-z0-9\._-]+\.[a-z]{2,4}$/i;
	var str= theform.frm_email.value;
	if (!re.test(str)) {
		alert("Om SPAM mail tegen te gaan hebben wij voor de correcte verzending uw email adres nodig.\n\nHet opgegeven e-mail adres kan niet bestaan.\nProbeer alstublieft opnieuw.\n\nThe given e-mail address cannot exist.\nPlease try again.");
		inform('frm_email');
		return (false);
	}

/*
*	Aan wie?
*/
	if (theform.frm_name2.value.length<1 || theform.frm_name2.value=='') {
		alert('De naam van uw vriend(in) graag.');
		inform('frm_name2');
		return false;
	}
	var re = /^[a-z0-9\._-]+@[a-z0-9\._-]+\.[a-z]{2,4}$/i;
	var str= theform.frm_email2.value;
	if (!re.test(str)) {
		alert("Het opgegeven e-mail adres van uw vriend(in) kan niet bestaan.\nProbeer alstublieft opnieuw.\n\nThe given e-mail address cannot exist.\nPlease try again.");
		inform('frm_email2');
		return (false);
	}

	theform.pxs_submitted.value = hiho;

	theform.action = action;

	theform.submit();
	return true;
}
function inform(elem) {
	document.getElementById(elem).style.background = '#FFCC00';
	document.getElementById(elem).focus();
	document.getElementById(elem).select();
}