var votio_linkroot = 'http://www.xhike.com'; 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 = votio_linkroot+"/images/design/votio/star1.gif"; else usei = votio_linkroot+"/images/design/votio/star0.gif"; i.setAttribute("src", usei); i.setAttribute("onmouseover", null); i.setAttribute("onmouseout", null); i.style.cursor = 'default'; } } } function votio_disable(id,message) { for(z=1;z<=5;z++) { i = document.getElementById("star_" + id + "_" + z); i.setAttribute("onmouseover", null); i.setAttribute("onmouseout", null); i.setAttribute("onclick", null); i.style.cursor = 'default'; } var textmsg = document.createTextNode(message); var votediv = document.getElementById('votediv_' + id); votediv.removeChild(votediv.firstChild); votediv.appendChild(textmsg); } function votio_vote(component,id,index) { var url = votio_linkroot+"/index.php?action=votio&componentName=" +component+ "&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 = votio_linkroot+"/images/design/votio/starvs.gif"; else usei = votio_linkroot+"/images/design/votio/starv.gif"; i.setAttribute("src", usei); } switch (index) { case (1): document.getElementById("votetitle").innerHTML = "1 punt"; break case (2): document.getElementById("votetitle").innerHTML = "2 punten"; break case (3): document.getElementById("votetitle").innerHTML = "3 punten"; break case (4): document.getElementById("votetitle").innerHTML = "4 punten"; break case (5): document.getElementById("votetitle").innerHTML = "5 punten"; break default: document.getElementById("votetitle").innerHTML = "Klik om te stemmen"; break } } function votio_unhover(id,index,rating) { var i; for(z=1;z<=5;z++) { i = document.getElementById(id + "_" + z); if(z <= rating) usei = votio_linkroot+"/images/design/votio/star1.gif"; else usei = votio_linkroot+"/images/design/votio/starv.gif"; i.setAttribute("src", usei); } document.getElementById("votetitle").innerHTML = "Klik om te stemmen"; }