
 var xmlHttp
 var divID = null;
function showReplies(myId)
{ 
divID = myId
document.getElementById('tree'+divID).innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src='/graphics/layout/icons/ajax-loader.gif' alt='' /> Loading Posts";	
document.getElementById('tree'+divID).style.display = 'block';
xmlHttp=GetXmlHttpObject();
//alert(xmlHttp);

if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 

var url="/landlord/forum/showrepliesAK.fhtml";
url = url+'?PostId='+divID;
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function stateChanged() 
{
	//document.write(xmlHttp.readyState);
	if (xmlHttp.readyState==4)
	{
	document.getElementById('tree'+divID).style.display = 'block';
	document.getElementById('tree'+divID).innerHTML=xmlHttp.responseText;
	document.getElementById(divID+'eclink').alt = "Close this view";
	document.getElementById(divID+'eclink').src = "/graphics/forum/tree_collapse.gif";
	document.getElementById(divID+'econclicklink').href = "javascript:collapseTree('"+divID+"');";
	document.getElementById(divID).style.borderTop = "2px solid #999999";
	document.getElementById(divID).style.borderBottom = "2px solid #999999";
	document.getElementById(divID).style.backgroundColor = "#F0F0F0";
	}
}




  function collapseTree(divID) {
    //hide children
	var childrenList = document.getElementById('tree'+divID);
	childrenList.style.display = 'none';
document.getElementById(divID+'eclink').src = "/graphics/forum/tree_expand.gif";
document.getElementById(divID+'eclink').alt = "Show Replies to this Topic";
document.getElementById(divID+'econclicklink').href = "javascript:showReplies('"+divID+"');";

	//post container becomes invisible again
	document.getElementById(divID).style.borderTop = "0";
	document.getElementById(divID).style.borderBottom = "0";
	document.getElementById(divID).style.backgroundColor = "#FFFFFF";

	return void 0;
  }

