function postComment()
{
	var comment = document.getElementById('comment_area').value;
	var profile_id = document.getElementById('profile_id').value;
	if(comment != "post your comments here..." && comment.length)
	{
		document.getElementById('comment').innerHTML = "Saving...";
		httpobj = new newObject();
		httpobj.onreadystatechange=function()
		{
			if(httpobj.readyState==4)
			{
				var respose = httpobj.responseText;
				document.getElementById('newcomment').innerHTML = respose;
				document.getElementById('s1').style.display = 'table-row';
				document.getElementById('m1').style.display = 'table-row';
				var comment = document.getElementById('comment_area').value = 'post your comments here...';
				document.getElementById('comment').innerHTML = "post comment";
			}
		}
		httpobj.open("GET","/community/ajax_post_comment.php?c="+comment+"&pid="+profile_id,true);
		httpobj.send(null);
	}
}
function delcomment(user_id)
{
	document.getElementById('ajx_comment').innerHTML = "please wait..";
	httpobj = new newObject();
	httpobj.onreadystatechange=function()
	{
		if(httpobj.readyState==4)
		{
			var respose = httpobj.responseText;
			document.getElementById('s1').style.display = 'none';
			document.getElementById('m1').style.display = 'none';
			document.getElementById('ajx_comment').innerHTML = "Delete"
		}
	}
	httpobj.open("GET","/community/ajax_del_comment.php?user_id="+user_id,true);
	httpobj.send(null);
}
function newObject()
{
	var xmlhttp;
	if (window.XMLHttpRequest)
	{
		xmlhttp=new XMLHttpRequest();
		return xmlhttp;
	}
	else if (window.ActiveXObject)
	{
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		return xmlhttp;
	}
	else
	{
		alert("Your browser does not support XMLHTTP!");
	}
}
function hideit()
{
	document.getElementById('comment_area').value = "";
}
function showit()
{
	var val = document.getElementById('comment_area').value;
	if(val == '')
		document.getElementById('comment_area').value = 'post your comments here...';
}
