function votio_getHTTPObject() { var xmlhttp; /*@cc_on @if (@_jscript_version >= 5) try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @else xmlhttp = false; @end @*/ if (!xmlhttp && typeof XMLHttpRequest != "undefined") { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp = false; } } return xmlhttp; } var votio_http = votio_getHTTPObject(); function votio_handleHttpResponse() { if(votio_http.readyState == 4) { var s = votio_http.responseText; var res = s.split(","); var id = res[0]; var index = res[1]; var message = res[2]; var textmsg = document.createTextNode(message); var votediv = document.getElementById('votediv_' + id); votediv.removeChild(votediv.firstChild); votediv.appendChild(textmsg); for(z=1;z<=5;z++) { i = document.getElementById("star_" + id + "_" + z); if(z<=index) usei = "http://www.witze-blogger.de/wp-content/plugins/votio/star1.gif"; else usei = "http://www.witze-blogger.de/wp-content/plugins/votio/star0.gif"; i.setAttribute("src", usei); i.setAttribute("onmouseover", null); i.setAttribute("onmouseout", null); } } } function votio_vote(id, index) { var url = "http://www.witze-blogger.de/wp-content/plugins/votio/votio.php?id=" + id + "&index=" + index; votio_http.open("GET", url, true); votio_http.onreadystatechange = votio_handleHttpResponse; votio_http.send(null); } function votio_hover(id, index) { var i; for(z=1;z<=5;z++) { i = document.getElementById(id + "_" + z); if(z<=index) usei = "http://www.witze-blogger.de/wp-content/plugins/votio/starvs.gif"; else usei = "http://www.witze-blogger.de/wp-content/plugins/votio/starv.gif"; i.setAttribute("src", usei); } } function votio_unhover(id, index) { var i; for(z=1;z<=5;z++) { i = document.getElementById(id + "_" + z); usei = "http://www.witze-blogger.de/wp-content/plugins/votio/starv.gif"; i.setAttribute("src", usei); } }