function getLatestPosts(postCount, titleLength)
{
	document.getElementById('workingStatus').style.display = "block";
	
	url = "http://www.homesinboston.com/blog/wp_latest/wpLatestPosts.php?method=def";
	what = "getLatestPostsProcess(req.responseXML);";
	
	DoCallback('postCount=' + postCount + '&titleLength=' + titleLength);
}

function getLatestPostsProcess(responseXML)
{	
	if (responseXML.getElementsByTagName('true')[0].firstChild.data == 1)
	{
		document.getElementById('workingStatus').style.display = "none";
		var html = '';
		var totalPosts = responseXML.getElementsByTagName('totalPosts')[0].firstChild.data;
		
		for (var i = 0; i < totalPosts; i++)
		{
			var postDate = responseXML.getElementsByTagName('postDate')[i].firstChild.data;
			var title = responseXML.getElementsByTagName('title')[i].firstChild.data;
			var postURL = responseXML.getElementsByTagName('postURL')[i].firstChild.data;
			html += '<div class="postRow"><span class="postDate">' + postDate + '</span><span class="postTitle"><a href="' + postURL + '" title="' + title + '">' + title + '</a></span></div>';
		}
		
		document.getElementById('postBox').innerHTML = html;
	}
}