function getHTTPObject() {

  var xmlhttp;
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {

    try {

      xmlhttp = new XMLHttpRequest();

    } catch (e) {

      xmlhttp = false;
    }
  }
  return xmlhttp;
}

var http1 = getHTTPObject();

/*var myValue;
function Get_Data(commentid,parentid)
{
	window.myValue = commentid;
	window.prid = parentid;
	url="show.php?comment="+commentid+"&parent="+parentid;
	http.open("GET",url, true);
	http.onreadystatechange = responsedata;
	http.send(null);
	return false;
}

function responsedata()
{
	if (http.readyState == 4)
	{
		if (http.status == 200)  // If the data was retrieved successfully
		{ 	
			results = http.responseText;
			document.getElementById('comment'+myValue+prid).innerHTML = results;
		}
	}
}
*/
function gethide(tableid)
{
	var id = tableid;
		if(document.getElementById(id).style.display=='block')
		{
			document.getElementById(id).style.display='none'
		}
		else{
			document.getElementById(id).style.display='block'	
		}
}

function getclose(id)
{
	url="http://butterbeehappy.com/comment_count.php?id="+id;
	http1.open("GET",url, true);
	http1.onreadystatechange = responseCount;
	http1.send(null);
	return false;
}

function responseCount()
{
	if (http1.readyState == 4)
	{
		if (http1.status == 200)  // If the data was retrieved successfully
		{ 	
			results = http1.responseText;
			alert(results);
			location.reload();
			return false;
		}
	}
}