var lvl =new Array(); var index=0; var next_lvl=0; reqType=0; // this function sets the parentid field for the reply form // when posted back the php code will attach the reply to the proper // parent record function setReplyId(replyid) { document.replyform.replyid.value=replyid; document.location.href="#commentsform"; document.replyform.screenname.focus(); } // this function should flag a comment // sned data to /core/xmlrpc.php // need to build function // parameters to xmlrpc: /core/xmlrpc.php?req=flagComment&id=1234 // you will need to create a function in /core/xmlrpc.php called flagComment(commentid) and fill in the function flagComment(commentid) { now =new Date(); getXmlDocument('req=flagComment&id='+commentid); flagspan=document.getElementById('flag'+commentid); if(flagspan) { flagspan.innerHTML='Reported'; flagspan.className="flagged"; } //alert('Comment flagged'); } function textCounter( field, countfield, maxlimit ) { if(maxlimit==undefined || maxlimit<=0) return; if ( field.value.length > maxlimit ) { field.value = field.value.substring( 0, maxlimit ); alert( 'Textarea value can only be '+maxlimit+' characters in length.' ); return false; } else { countfield.value = maxlimit - field.value.length; } }