
function startTopic() {
	$('topiclnk').hide();
	$('postform').show();
	
	window.scrollTo(0,99999);
	
	$('postsubject').focus();
	
	return false;
}

function startReply() {
	$('replylnk').hide();
	$('postform').show();
	
	window.scrollTo(0,99999);
	
	$('postreply').focus();
	return false;
}

function quote(id) {
	var quote = $('post'+id).innerHTML.replace(/<div class=\"quote\">/gi,"[quote]").replace(/<\/div>/gi,"[/quote]");
	var quoted = $('poster'+id).innerHTML;
	
	$('replylnk').hide();
	$('postform').show();
	$('postreply').value="Posted by "+quoted+":\n[quote]"+br2nl(quote)+"[/quote]";
	$('postreply').focus();
	return false;
}

function voteup(id) {	
	new Ajax.Updater('vote'+id, '/ajax/forum_vote.php', {method: 'post', postBody: 'id='+id+'&v=2'} );

	return false;
}
function votedown(id) {	
	new Ajax.Updater('vote'+id, '/ajax/forum_vote.php', {method: 'post', postBody: 'id='+id+'&v=1'} );

	return false;
}