var xmlHttp
var loadstatustext="<FONT style=BACKGROUND-COLOR: #990033 color=#ff0033><STRONG><FONT color=#123B69>&nbsp;Loading....</FONT></STRONG></FONT>";
function addComments(str,add,remove, comments)
{

if (str.length==0 && id.length==0)
{ 
return
}
xmlHttp=GetXmlHttpObject1()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="php/showComments.php"
id		=str
add		=add
remove	=remove
totNums	=add
comments = comments

//var rowNum=	parseInt(document.getElementById("rowNum").value);
//rowNum	=rowNum + parseInt(1);

var splType="splType"+id;
if(document.getElementById(splType).checked==true)
{
	add	=1;
}
else
{
	add=0;
}
//document.getElementById("rowNum").value=rowNum;
url=url+"?id="+id+"&add="+add+"&remove="+remove+"&comments="+comments
//alert(url);
url=url+"&stid="+Math.random()
xmlHttp.onreadystatechange=stateChanged1 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 

function stateChanged1() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{	
	var txtComments="txtComments"+id;
	/*for(i=1;i<=totNums;i++)
	{
		var txtAddRow="txtAddRow"+i
		document.getElementById(txtAddRow).innerHTML="";
	}*/
	//var txtAddRow="txtAddRow"+id
	document.getElementById(txtComments).innerHTML=xmlHttp.responseText
} 
} 

function GetXmlHttpObject1()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
} 
