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 rating = eval(res[1]); var message = res[2]; var textmsg = document.createTextNode(message); var votediv = document.getElementById('votediv_' + id); votediv.innerHTML = message; urchinTracker("/" ); for(z=1;z<=10;z++) { i = document.getElementById("votemark-" + z); i.setAttribute("onmouseover", null); i.setAttribute("onmouseout", null); i.setAttribute("onclick", null); } for(var i = 1; i < 11; i++) { document.getElementById("votemark-" + i).style.backgroundColor = "#ccc"; } for(var i = 1; i < rating + 1; i++) { document.getElementById("votemark-" + i).style.backgroundColor = "#92b625"; } for(var i = 1; i < 11 ; i++) { document.getElementById("votemark-" + i).setAttribute("onmouseover", null); document.getElementById("votemark-" + i).setAttribute("onmouseout", null); } } } function voteCast(index, id) { var url = "http://www.unmatchedthemes.com/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 voteHover(index) { for(var i = 1;i < index + 1; i++) { document.getElementById("votemark-" + i).style.backgroundColor = "#777"; //document.getElementById("vote-value").innerHTML = "
Give this site a: " + index + " out of 10
"; } } function voteNoHover(index) { for(var i = 1; i < index + 1; i++) { document.getElementById("votemark-" + i).style.backgroundColor = "#ccc"; //document.getElementById("vote-value").innerHTML = "Cast your vote for this entry!
"; } }