var xmlHttpBulliedFB;function getBulliedFB(d,b,c){xmlHttpBulliedFB=getXMLHTTP();if(xmlHttpBulliedFB==null){alert("Browser does not support HTTP Request");return}var a="/ajax/get_bulliedfeedback.php";a=a+"?name_id="+d;a=a+"&name="+b;a=a+"&l="+c;a=a+"&r="+Math.random();xmlHttpBulliedFB.onreadystatechange=stateChangedBulliedFB;xmlHttpBulliedFB.open("GET",a,true);xmlHttpBulliedFB.send(null)}function stateChangedBulliedFB(){if(xmlHttpBulliedFB.readyState==4||xmlHttpBulliedFB.readyState=="complete"){rtSplit=xmlHttpBulliedFB.responseText.split("#++#");if(window.execScript){window.execScript(rtSplit[0])}else{window.eval(rtSplit[0])}document.getElementById("bulliedfb_content").innerHTML=rtSplit[1]}}var xmlHttpBulliedFB2;var bid;var vt;function voteBulliedFB(d,c,b){xmlHttpBulliedFB2=getXMLHTTP();if(xmlHttpBulliedFB2==null){alert("Browser does not support HTTP Request");return}var a="/ajax/get_bulliedfeedback.php";a=a+"?name_id="+d;a=a+"&b_id="+c;a=a+"&vote="+b;a=a+"&r="+Math.random();bid=c;vt=b;xmlHttpBulliedFB2.onreadystatechange=stateChangedBulliedFB2;xmlHttpBulliedFB2.open("GET",a,true);xmlHttpBulliedFB2.send(null)}function stateChangedBulliedFB2(){if((xmlHttpBulliedFB2.readyState==4||xmlHttpBulliedFB2.readyState=="complete")&&xmlHttpBulliedFB2.responseText=="OK"){if(vt=="yes"){eval("votey"+bid+" = votey"+bid+" +  1;")}else{if(vt=="no"){eval("voten"+bid+" = voten"+bid+" +  1;")}}var yvotes=0;var nvotes=0;eval("yvotes = votey"+bid+";");eval("nvotes = voten"+bid+";");if((yvotes+nvotes)==0){document.getElementById("helpful"+bid).innerHTML=""}else{document.getElementById("helpful"+bid).innerHTML="("+yvotes+" out of "+(yvotes+nvotes)+" people found this helpful)"}}else{if((xmlHttpBulliedFB2.readyState==4||xmlHttpBulliedFB2.readyState=="complete")&&xmlHttpBulliedFB2.responseText=="NOK"){document.getElementById("helpful"+bid).innerHTML="(you can only vote once)"}}};