function createTopic(forum, author, title, message) {
	if (typeof forum == "number" && typeof author == "number" && typeof title == "string" && typeof message == "string") {
		if (title.length > 0 && message.length > 0) {
			var url = "http://methodisthealth.or-live.com/vbtb/forums/com/topic.cfc?method=newTopic&type=" + forum + "&author=" + author + "&title=" + encodeURIComponent(title) + "&message=" + encodeURIComponent(message);
			new Ajax.Request(url, {
				onSuccess: function(transport) {
					window.location.reload();
				},
				onFailure: function(transport) {
					alert("There was a problem submitting your topic. Please try again.");
				}
			});
		}
		else alert("Please enter a title and a message when creating a topic.");
	}
}

function createReply(topic, author, message) {
	if (typeof topic == "number" && typeof author == "number" && typeof message == "string") {
		if (message.length > 0) {
			var url = "http://methodisthealth.or-live.com/vbtb/forums/com/reply.cfc?method=newReply&topic=" + topic + "&author=" + author + "&message=" + encodeURIComponent(message);
			new Ajax.Request(url, {
				onSuccess: function(transport) {
					window.location.reload();
				},
				onFailure: function(transport) {
					alert("There was a problem submitting your reply. Please try again.");
				}
			});
		}
	}
}
