function commentAdded(a,d,b){if(hideOnSubmit==0){new Effect.Fade($("commentbody"));$("comment").disabled=true;$("submit").disabled=true}else{$("submit").disabled=false;$("comment").disabled=false}if($("error")){Element.remove("error")}$("cCount").innerHTML=parseInt($("cCount").innerHTML)+1;if($("cCount").innerHTML=="NaN"){$("cCount").innerHTML="1"}new Effect.Highlight("cCount");if((d=="simple")||(parseInt($("cCount").innerHTML)<b)){new Effect.Appear($("commentlist").lastChild);Element.hide("nocommentyet");Behaviour.apply()}else{var c=Math.round(((parseInt($("cCount").innerHTML)+1)/b)+0.5);loadPagedComments(a,c)}}function failure(a){$("submit").disabled=false;$("comment").disabled=false;Element.show("error");$("error").innerHTML="<p>"+a.responseText+"</p>";new Effect.Highlight("error",{queue:"end"})}function loading(){$("submit").disabled=true;$("comment").disabled=true;Element.show("loading")}function complete(d,a,c,b){Element.hide("loading");Element.show("commentform");$("submit").disabled=true;$("comment").disabled=true;if(d.status==200){commentAdded(a,c,b)}else{failure(d)}};