EventManager.Add(window, "load", function () {
	if(!Input.UseBrowserControls) ObjectManager.Load("css/controls.css");
	Input.Initialize();
	EventManager.Add(Innect.$("Form"), "submit", function (e) {
		return Input.Validate(Innect.$("Form"), function () {
			var area = Input.Select.Options.Selected("Area");
			var subject = Input.Text.Value("Subject");
			var firstName = Input.Text.Value("FirstName");
			var lastName = Input.Text.Value("LastName");
			var organization = Input.Text.Value("Organization");
			var email = Input.Text.Value("Email");
			var phone = Input.Text.Value("Phone");
			var message = Input.MultilineText.Value("Message");
			Ajax.AsyncRequest("POST", "cmd/send.asp", Ajax.ToQuery("Area", area, "Subject", subject, "FirstName", firstName, "LastName", lastName, "Organization", organization, "Email", email, "Phone", phone, "Message", message), {
				Failure: function (error) {
					alert("Your e-mail was not sent due to an unexpected error:\n\n" + error);
				},
				Success: function (Obj) {
					alert("Your e-mail was sent successfully. Thank you.");
					Innect.$("Form").reset();
				}
			});
		}, e);
	});
});