function addComment()
{$('errMsg').innerHTML='';$('errMsg').style.display='none';var qr='onPost='+$('comment_post_ID').value+'&fromName='+$('author').value+'&fromMail='+$('email').value+'&comment='+$('comment').value;var u=new Ajax.Request('addComment.php',{method:"post",asynchronous:true,postBody:qr,onSuccess:act,onFailure:noact});}
function act(t)
{var sof=t.responseText.substring(0,1);if(sof==1)
{$("comments").innerHTML+=t.responseText;$("addComment").parentNode.removeChild($("addComment"));$('msgS').innerHTML='<label style="color:red;font-weight:bold;">Comment Added Successfully.</label>';$('msgS').style.display='';}
else
{$('errMsg').innerHTML=t.responseText;$('errMsg').style.display='';}}
function noact()
{$('errMsg').innerHTML='An error occured while submitting your comment. Please reload the page and try again;';$('errMsg').style.display='';}
