function topicAddWindowOpen() {
	new Effect.SlideDown('topicAddForm', {direction: 'top', duration: .3});
	$('topicWindowLink').style.display = 'none';
}
function topicAddWindowClose() {
	new Effect.SlideUp('topicAddForm', {direction: 'top', duration: .2});
	$('topicWindowLink').style.display = '';
	clearTopicForm();
}

function clearTopicForm() {
	$('topicTitle').value = '';
	$('topicDesc').value  = '';
}	

function submitTopic() {
	var topicTitle   = $('topicTitle').value;
	var topicDesc    = $('topicDesc').value;
	var fID = $('fID').value;
	if ( (topicTitle == '') || (topicDesc == '') ) {
		var error = 1;
		var message = 'You must enter a title and message for this topic. Thanks!';
	} else {
		x_addNewTopic(topicTitle,topicDesc,fID,returnAddNewTopic);
	}
}

function returnAddNewTopic(string) {
	$('topicDisplay').innerHTML = string;
	topicAddWindowClose();
}