"); comment = comment.replace(/\r\n/g, "
"); comment = comment.replace(/\n\n/g, "
"); comment = comment.replace(/\n/g, "
"); comment = "
"+comment+"
"; var dateObj = new Date(); if(r == 0){ c = document.createElement('div'); //c = document.createElement(lstcommentid.tagName); c.id = "newcomment"; if(sortflag == 'DESC'){ lstcommentid.parentNode.insertBefore(c,lstcommentid); window.location="#newcomment"; }else{ if(lstcommentid.parentNode.lastChild == lstcommentid){ lstcommentid.parentNode.appendChild(c); }else{ lstcommentid.parentNode.insertBefore(c,lstcommentid.nextSibling); } } }else{ c = document.createElement('div'); c.id = "newcomment"; rpPel.appendChild(c); } c.innerHTML = ""+author+" Submit on "+dateObj.toLocaleString()+":
"+comment+"new comment is submiting, please wait a comment...
]*>([\s\S]*)<\/p>[\s\S]*?<\/body>/i); if(typeof(error) != 'undefined' && error != null && error != ''){ alert(error[1]); }else{ alert('Failed to add your comment.'); } } } } req.open('POST', commentformel.action, true); req.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); req.setRequestHeader("Content-length", p.length); req.setRequestHeader("Connection", "close"); req.send(p); return false; } function wptctextreplace(element,text){ if(!text) return false; element.innerHTML = text; var commentid = text.match(/<(\w+).*?id\s*=\s*("|')(comment-\d+?)\2[^>]*>[\s\S]*<\/\1>/i); if(typeof(commentid) != 'undefined' && commentid != null){ var commentid = commentid[3]; var childelement = $s(commentid); var n=1; while(childelement.parentNode != element){ childelement = childelement.parentNode; n= n+1; if(n>10) break; } if(n<11){ if(typeof(childelement.className) != 'undefined' && lstcommentid.className.match(/\balt\b/i)){ childelement.className = childelement.className.replace(/\balt\b/i,''); } element.parentNode.insertBefore(childelement,element); element.parentNode.removeChild(element); if($s('comment_reply_ID').value == 0) lstcommentid = childelement; if(typeof(AjaxEditComments) != 'undefined' && typeof(AjaxEditComments.init) == 'function') AjaxEditComments.init(); } }else{ lstcommentid = element; } return true; } function stpm(aname,array){ for (var i=0; i < array.length; i++){ var c = array[i].split("="); c[0] = unescape(decodeURI(c[0])); c[0] = c[0].replace(/^\s+|\s+$/g,""); if (aname == c[0]){ c[1] = unescape(decodeURI(c[1])); c[1] = c[1].replace(/^\s+|\s+$/g,""); return c[1]; } } return null; }