var currentAuthor = '';

function blogOver(author)
{
	if (author != currentAuthor)
	{
		document.getElementById(author).style.backgroundColor = '#f8f8f8';
		document.getElementById(author).style.marginLeft = '15px';
	}
}

function blogOut(author)
{
	if (author != currentAuthor)
	{
		document.getElementById(author).style.backgroundColor = '#ffffff';
		document.getElementById(author).style.marginLeft = '5px';
	}
}

function blogIn()
{
	document.getElementById(currentAuthor).style.backgroundColor = '#eeeeee';
	document.getElementById(currentAuthor).style.marginLeft = '15px';
}

function callback(response)
{
	document.getElementById('rightblogholder').innerHTML=response.responseText;
}

function blogClick(data, author)
{
	var tempAuthor = currentAuthor;
	currentAuthor = author;

	if (tempAuthor != '') {
		document.getElementById(tempAuthor).className = 'blogauthorholder';
		blogOut(tempAuthor);
	}
	document.getElementById(currentAuthor).className = 'blogauthorholder blogauthorholdercurrent';
	blogIn();

	doHttp("blogs.php?xml=1&"+data, callback);
}
