/* FILE ARCHIVED ON 23:14:08 Jun 30, 2007 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 11:15:50 Dec 15, 2013. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ function AjaxComment(form) { var url = '/wp_content/themes/k2/comments_ajax.html'; if (!$('commentlist')) { new Insertion.Before('pinglist', '

    '); }; new Ajax.Updater( { success: 'commentlist', failure: 'error' }, url, { asynchronous: true, evalScripts: true, insertion: Insertion.Bottom, onLoading: function() { $('commentload').show(); $('error').update(''); $('error').setStyle( { visibility: 'hidden' } ); Form.disable('commentform'); }, onComplete: function(request) { if (request.status == 200) { if ($('leavecomment')) { $('leavecomment').remove(); } new Effect.Appear($('commentlist').lastChild, { duration: 1.0, afterFinish: function() { new Effect.ScrollTo($('commentlist').lastChild); } } ); $('comments').innerHTML = parseInt($('comments').innerHTML) + 1; Field.clear('comment'); Form.disable('commentform'); setTimeout('Form.enable("commentform")',15000); } Element.hide('commentload'); }, onFailure: function() { $('error').show(); $('error').setStyle( { visibility: 'visible' } ); Form.enable('commentform'); }, parameters: Form.serialize(form) } ); } function initComment() { if ( document.getElementById('commentform') ) { $('commentform').onsubmit = function() { AjaxComment(this); return false; }; new Insertion.After('comment', ''); new Insertion.After('submit',''); $('commentload').hide(); $('error').hide(); } } //Event.observe(window, 'load', initComment, false); FastInit.addOnLoad(initComment);