function scrollBottom()
{
  if (document.body.scrollHeight) {
	  window.scrollTo(0, document.body.scrollHeight);
	}
	else if (screen.height) { // IE5
	  window.scrollTo(0, screen.height);
	}
}
function setCommentFocus()
{
	scrollBottom();
    if( window.FCKeditorAPI )
		FCKeditorAPI.GetInstance('comment').Focus();
}
function addQuote( postid, author )
{
	if( window.FCKeditorAPI )
	{
	  var editor = FCKeditorAPI.GetInstance('comment');
	  var post = document.getElementById('post'+postid);
		quote = '<blockquote style="background: #EFEFEF; padding: 5px; border: 1px dotted black;"><div style="color: white; width: 100%; background: #C1C1C1; font: bold 8pt Arial;">Quote from ' + author + ':</div>' + post.innerHTML + '</blockquote>';
		editor.InsertHtml(quote);
	}
	scrollBottom();
}
function checkAll()
{
	aChecks = document.getElementsByTagName('input');
	
	for( i = 0; i < aChecks.length; i++ )
	{
		if( aChecks[i].type == 'checkbox' )
			aChecks[i].checked = true;
	}
}
function uncheckAll()
{
	aChecks = document.getElementsByTagName('input');
	
	for( i = 0; i < aChecks.length; i++ )
	{
		if( aChecks[i].type == 'checkbox' )
			aChecks[i].checked = false;
	}
}
