// JavaScript Document

// This function is used to toggle in the reply comment field
// moved from doorpostAjax.js
function aj_addCommentField( divName, qid ,pid ){
	var cDivName = ""+divName+"Div";
	
	// if the comment div is not populated, fill it in. Otherwise, empty it out.
	if ( $(cDivName).innerHTML == ""){
		$(cDivName).show();
		var str = "<textarea name=\""+divName+"Form\" id=\""+divName+"Form\" rows=\"5\" cols=\"50\" maxlength=\"400\"></textarea><br />";	
			str = str+"<a href=\"javascript://\" class=\"commonLinkFormat\" onclick=\"aj_PostTopicComment("+qid+",'"+divName+"', "+pid+")\"><img src=\"http://doorpost.vo.llnwd.net/o33/webimages/postreply.jpg\" border=\"0\" alt=\"post comment\"></a>";
		$(cDivName).innerHTML = str;
	} else {
		$(cDivName).hide();
		$(cDivName).innerHTML = "";
	}
}