
function CheckContact()
{
	//a = document.forms["InschrijfForm"];
	a = document.forms[0];


	if(
		checkString(a.organisation,"Organisatie")&&
		checkString(a.jobtitle,"Functie")&&
		checkString(a.name,"Naam")&&
		checkString(a.initials,"Voorletters")&&
		checkBoxChecked(a.gender,"Man/Vrouw")&&
		checkString(a.street,"Straat")&&
		checkString(a.number,"Huisnummer")&&
		checkZipCode(a.zipcode,"Postcode")&&
		checkString(a.city,"Plaats")&&
		checkPhone(a.phone,"Telefoon")&&
		checkEmail(a.email,"E-mail")&&
		checkBoxChecked(a.sortemail,"E-mail is Priv&eacute; of Zakelijk")&&
		checkString(a.factstreet,"Factuur Straat")&&
		checkString(a.factnumber,"Factuur Huisnummer")&&
		checkZipCode(a.factzipcode,"Factuur Postcode")&&
		checkString(a.factcity,"Factuur Plaats")
	){return true;}
	else{return false;}
}

function SendForm()
{

 if(CheckContact())
 {
 	document.forms[0].action = "CheckForm.asp";
	//document.forms[0].submit();
 }
 else{return false;}
}

function SendMail()
{

	document.forms[0].action = "SubmitScript.asp";

	return true;
}

function checkDBZipStandard(theField,s,n,tarField)
{
	if(tarField.selectedIndex == 2)	{return checkZipCodeBelgium(theField,s)}
	if(tarField.selectedIndex == 1)	{return checkZipCode(theField,s,n)}
	else{return false}
}

function fourDigits(sValue)
{
	if(sValue.length == 4)
	{
		bBool = true
		for(i=0;i < sValue.length;i++)
		{
			if(isDigit(sValue.charAt(i)) == false)
			{
					bBool = false;
					break;
			}
		}
	}
	else
	{
		bBool = false;
	}
	return bBool
}

function init()
{
	frm = document.forms[0];
}
