	window.onload = function()
	{
		var object,
			id;

		if (typeof(OnInitForm) == "function")
			OnInitForm();

		if ((object = getElementByName("result")) != null)
			window.location.hash = "#result";
		else
		{
			if (typeof(SetFocusToFirst) == "function")
			{
				if ((id = SetFocusToFirst()) != "")
				{
					if ((object = getElementByID(id)) != null)
					{
						if (object.type == "text")
							object.select();
						try
						{
							object.focus();
						}
						catch (e)
						{
							document.body.focus();
						}
					}
				}
			}
		}
	}
	var sVRoot = "",//<!--
		firstElement = null;

	document.onkeypress =
	function (e)
	{
		// netscape compatibility
		var event = (typeof(e) == "undefined" ? window.event : e),
			retVal;

		if (event.keyCode == 13 && typeof(OnEnter) == "function")
			retVal = OnEnter(event);
		else if (typeof(OnDocumentKeyPress) == "function")
			retVal = OnDocumentKeyPress(event);
		else
			retVal = true;

		return retVal;
	}
	//-->

	function Validate_ID011003(action)
	{
		if (!EmptyValidator("ID011003", "Verplicht veld"))
			return false;
		return true;
	}

	function Validate_ID011005(action)
	{
		if (!EmptyValidator("ID011005", "Verplicht veld"))
			return false;
		if (!EMailValidator("ID011005", "Incorrect"))
			return false;
		return true;
	}

	function Validate_ID011010(action)
	{
		if (!EmptyValidator("ID011010", "Verplicht veld"))
			return false;
		return true;
	}

	function ValidateAll(targetID, submitAction)
	{
		var valid = true;

		if (typeof(submitAction) == "undefined")
			return valid;

		switch (targetID)
		{
			case "1":
				valid = Validate_ID011003() && valid;
				valid = Validate_ID011005() && valid;
				valid = Validate_ID011010() && valid;
				break;

		}
		return valid;
	}

	function ClearAllMessages()
	{
		ClearMessage("ID011003");
		ClearMessage("ID011005");
		ClearMessage("ID011010");
	}

	function ID(alias)
	{
		switch (alias)
		{
			case "id": return "ID011001";
			case "company": return "ID011002";
			case "fullname": return "ID011003";
			case "gender": return "ID011004";
			case "email": return "ID011005";
			case "address": return "ID011006";
			case "postalcode": return "ID011007";
			case "city": return "ID011008";
			case "homephone": return "ID011009";
			case "businessphone": return "ID011010";
			case "processed": return "ID011011";
			case "addresstype": return "ID011012";
			case "category": return "ID011013";
			case "lineofbusiness": return "ID011014";
			case "lastname": return "ID011015";
			case "firstname": return "ID011016";
			case "remark": return "ID011017";
			case "activity": return "ID011018";
			case "workflowinstanceid": return "ID011019";
			case "completed": return "ID011020";
			case "existingcontact": return "ID011021";
			case "existingperson": return "ID011022";
			case "activitydate": return "ID011023";
			case "socontactid": return "ID011024";
			case "sopersonid": return "ID011025";
			case "sotitle": return "ID011026";
			case "usdate1": return "ID011027";
			case "ustext1": return "ID011028";
			case "ustext2": return "ID011029";
		}
	}
	//<!--
	function ShowContent(ContentName)
	{
		document.getElementById(ContentName).style.display = "block";
	}

	function HideContent(ContentName)
	{
		document.getElementById(ContentName).style.display = "none";
	}
	//-->//<!--
	function SetFocusToFirst()
	{
		return ID("company");
	}

	function Send()
	{
		Submit(1, "send");
	}

	function Success()
	{
		window.open(sVRoot + "/Default.aspx", "_top", "", true);
	}

	function Failure()
	{
		window.open(sVRoot + "/Default.aspx", "_top", "", true);
	}
	//--> 