// JavaScript Document
<!--
function check(){
var tt1=document.all.txt1.value;
var tt2=document.all.txt2.value;
var tt4=document.all.txt4.value;
var tt5=document.all.txt5.value;
var tt6=document.all.txt6.value;
var tt7=document.all.txt7.value;
var tt8=document.all.txt8.value;
var tt9=document.all.txt9.value;
//alert(""+tt1+"");
if (tt1==""||tt2==""||tt5==""||tt6==""||tt8==""||tt9==""){
	alert("Items marked by '*' must be filled in!");
	return false; }
if (tt4!=""){
	if (isNaN(tt4)){
	alert("Postcode must be number!");
	return false;}
	}
if (tt7!=""){
	if (isTel(tt7)){};
	else
	{return false;}
	}
if (isTel(tt6)){
	return isEmail(tt8); }
else
	{return false; }
}

function isEmail (theStr) {
 var atIndex = theStr.indexOf('@');
 var dotIndex = theStr.indexOf('.', atIndex);
 var flag = true;
 theSub = theStr.substring(0, dotIndex+1)

 if ((atIndex < 1)||(atIndex != theStr.lastIndexOf('@'))||(dotIndex < atIndex + 2)||(theStr.length <= theSub.length)) 
 { alert("Please leave a valid E-mail address!");
  return(false); }
 else 
 { return(true); }
}
function isTel(s)
{
 var patrn=/^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/;
 if (!patrn.exec(s)) {
 alert("Please input a valid phonenumber or faxnumber!");
 return false;}
 return true
}
//-->