function createXMLHttpRequest(){var a=null;try{a=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP")}catch(e){alert("Your browser does not support the XMLHttpRequest Object!")}return a}var xhrcommentsreports=createXMLHttpRequest();var xhrcommentsreportsundo=createXMLHttpRequest();function commentsreports(a,b,c){if(confirm("Are you sure that you want to report this review as spam?")){xhrcommentsreports.open('get',c+'reviewspam.php?action=spam&commentid='+a+'&user='+b);xhrcommentsreports.onreadystatechange=handleResponseCommentsReports;xhrcommentsreports.send(null);var d=document.getElementById("commentsreportspan-"+a);d.innerHTML="<img src='"+c+"indicator.gif'/>"}}function handleResponseCommentsReports(){if(xhrcommentsreports.readyState==4){var a=xhrcommentsreports.responseText.split('|');if(a[0].replace(/^\s+|\s+$/g,'')=='done'){if(a[1].replace(/^\s+|\s+$/g,'')!=''){Effect.Fade("commenttext-"+a[1].replace(/^\s+|\s+$/g,''),{duration:1.2});Effect.Fade("ratinggiven-"+a[1].replace(/^\s+|\s+$/g,''),{duration:1.2});Effect.Fade("reviewuseful-"+a[1].replace(/^\s+|\s+$/g,''),{duration:1.2});Effect.Fade("reviewcomments-"+a[1].replace(/^\s+|\s+$/g,''),{duration:1.2});new Effect.Appear("undoreport-"+a[1].replace(/^\s+|\s+$/g,''),{duration:1.2,queue:'end'});var b=document.getElementById("commentsreportspan-"+a[1].replace(/^\s+|\s+$/g,''));b.innerHTML="";Effect.Fade("commentsreportspan-"+a[1].replace(/^\s+|\s+$/g,''),{duration:2.0})}}}}function undoreport(a,b,c){if(confirm("Are you sure that you want to undo this spam report?")){xhrcommentsreportsundo.open('get',c+'reviewspam.php?action=notspam&commentid='+a+'&user='+b);xhrcommentsreportsundo.onreadystatechange=handleResponseCommentsReportsUndo;xhrcommentsreportsundo.send(null);var d=document.getElementById("commentsreportspan-"+a);d.innerHTML="<img src='"+c+"indicator.gif'/>"}}function handleResponseCommentsReportsUndo(){if(xhrcommentsreportsundo.readyState==4){var a=xhrcommentsreportsundo.responseText.split('|');if(a[0].replace(/^\s+|\s+$/g,'')=='done'){if(a[1].replace(/^\s+|\s+$/g,'')!=''){Effect.Appear("commenttext-"+a[1].replace(/^\s+|\s+$/g,''),{duration:1.2});Effect.Appear("ratinggiven-"+a[1].replace(/^\s+|\s+$/g,''),{duration:1.2});Effect.Appear("reviewuseful-"+a[1].replace(/^\s+|\s+$/g,''),{duration:1.2});Effect.Appear("reviewcomments-"+a[1].replace(/^\s+|\s+$/g,''),{duration:1.2});Effect.Fade("undoreport-"+a[1].replace(/^\s+|\s+$/g,''),{duration:0});Effect.Appear("commentsreportspan-"+a[1].replace(/^\s+|\s+$/g,''),{duration:2.0});var b=document.getElementById("commentsreportspan-"+a[1].replace(/^\s+|\s+$/g,''));b.innerHTML='<small><a href="javascript:commentsreports('+a[1].replace(/^\s+|\s+$/g,'')+', '+a[2].replace(/^\s+|\s+$/g,'')+', \''+a[3].replace(/^\s+|\s+$/g,'')+'\');">Report this Review as Spam</a></small>'}}}}