function addComment(form, div)
{
	var gid = document.getElementById(form).gid.value;
	var cid = document.getElementById(form).cid.value;
	var name = document.getElementById(form).name.value;
	var comment = document.getElementById(form).comment.value;

	var xmlHttp;

	document.getElementById(div).innerHTML="<img src='img/ajax.gif' alt='Loading' height='16' width='16' />";

	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
				document.getElementById(div).innerHTML="Your browser does not support AJAX!";
				return false;
			}
		}
	}
	
	/*xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			document.getElementById(div).innerHTML=xmlHttp.responseText;
			if(xmlHttp.responseText.charAt(21) == 'G')
			{
				retrieveComments('retrieveComments', gid, 1);
			}
		}
    }
 
	xmlHttp.open("GET","comment.php?gid="+gid+"&cid="+cid+"&name="+name+"&comment="+comment+"&formID="+form+"&divID="+div,true)
	xmlHttp.send(null);*/

	var url = "comment.php";
	var params = "gid="+gid+"&cid="+cid+"&name="+name+"&comment="+comment+"&formID="+form+"&divID="+div;
	xmlHttp.open("POST", url, true);

	//Send the proper header information along with the request
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-length", params.length);
	xmlHttp.setRequestHeader("Connection", "close");

	xmlHttp.onreadystatechange = function() 
	{
		if(xmlHttp.readyState == 4)
		{
			document.getElementById(div).innerHTML=xmlHttp.responseText;
			if(xmlHttp.responseText.charAt(21) == 'G')
			{
				retrieveComments('retrieveComments', gid, 1);
			}
		}
	}
	
	xmlHttp.send(params);
}