var starGo="",voteType="";function voteRound(a){if(a==Math.round(a)){a=String(a)+".0"}return a}function popitup(a){var b=window.open(a,"name","height=200,width=150");if(window.focus){b.focus()}return false}function voteX(a){return(document.getElementById(a))}function voteXS(a){return(document.getElementById(a).style)}function agent(a){return(Math.max(navigator.userAgent.toLowerCase().indexOf(a),0))}function absPos(c){var b={x:c.offsetLeft,y:c.offsetTop};if(c.offsetParent){var a=absPos(c.offsetParent);b.x+=a.x;b.y+=a.y}return(b)}function xy(b,a){return(a?(agent("msie")?(agent("msie 5")?event.clientY+document.body.scrollTop:event.clientY+document.documentElement.scrollTop):b.pageY):(agent("msie")?(agent("msie 5")?event.clientX+document.body.scrollLeft:event.clientX+document.documentElement.scrollLeft):b.pageX))}function voteUpdate(g,c,b,h){var j=voteX("score"+String(h).replace("#","")+b).value;voteX("vote"+String(h).replace("#","")+b).onmousedown=function(){alert("You have already voted for this bar on this visit")};voteX("vote"+String(h).replace("#","")+b).onmousemove=function(){};starGo="";voteX("vote"+String(h).replace("#","")+"Curr"+b).className="change";voteX("vote"+String(h).replace("#","")+"Curr"+b).style.width=Math.round(j*140/5)+"px";var f=Number(voteX("scoreorginal"+String(h).replace("#","")+b).value);var a=Number(voteX("scoretotal"+String(h).replace("#","")+b).value);var d=Number(Number(a)+Number(1));var i=Math.round((Number(f*a)+Number(j))*10/d)/10;voteX("votescore"+String(h).replace("#","")+b).innerHTML=voteRound(j);voteX("voteformated"+String(h).replace("#","")+b).innerHTML="Your vote "+voteRound(j)+"/5 - Average "+voteRound(i)+"/5 ("+d+" votes)";req=GetXmlHttpObject(voteResponse,false);if(!req){voteX("formvote"+String(h).replace("#","")+b).submit()}else{req.open("GET","/ajax/getvote.php?vote_type="+String(h).replace("#","")+"&vote_id="+b+"&vote="+j,true);req.send(null)}if(String(h).indexOf("#")==-1){h=h+"#"}obj=voteX("vote"+h+b);if(obj!=undefined){obj.onmousedown=function(){alert("You have already voted for this bar on this visit")};obj.onmousemove=function(){};obj=voteX("vote"+h+"Curr"+b);if(obj!=undefined){obj.className="change";obj.style.width=Math.round(j*140/5)+"px"}}document.onmousemove=function(){}}function diggUpdate(b,c,a){old_value=Number(voteX("digg"+b+c+"Value").value);new_value=old_value+Number(a);if(new_value>0){new_value="+"+new_value}if(old_value>0){old_value="+"+old_value}new_value+=" Cheers";voteX("digg"+b+c+"String").innerHTML=new_value;voteX("digg"+b+c+"Plus").src="/Images/barReviewPlusInactive.gif";voteX("digg"+b+c+"Plus").onclick=function(){alert("You have already voted on this comment")};voteXS("digg"+b+c+"Plus").cursor="auto";voteX("digg"+b+c+"Minus").src="/Images/barReviewMinusInactive.gif";voteX("digg"+b+c+"Minus").onclick=function(){alert("You have already voted on this comment")};voteXS("digg"+b+c+"Minus").cursor="auto";voteRequest(b,c,a)}function voteRequest(b,c,a){req=GetXmlHttpObject(voteResponse,false);if(!req){voteX("formvote"+b+c).submit()}else{req.open("GET","/ajax/getvote.php?vote_type="+b+"&vote_id="+c+"&vote="+a,true);req.send(null)}}function voteResponse(){if((req.readyState==4)&&(req.status==200)){}}function voteRevert(c,b){var a=Number(voteX("scoreorginal"+String(b).replace("#","")+c).value);voteXS("vote"+b+"Curr"+c).width=Math.round((a/5)*140)+"px";voteX("votescore"+String(b).replace("#","")+c).innerHTML=voteRound(a);voteX("vote"+b+"Curr"+c).className="curr";document.onmousemove=function(){}}function voteCurr(b,c,d,a){voteX("vote"+a+"Curr"+d).className="change";if(!starGo){starGo=1;voteType=a;document.onmousemove=function(j){var h=voteType;var i=absPos(voteX("vote"+h+d));var g=xy(j)-i.x,f=xy(j,1)-i.y;if(g<1||g>141||f<0||f>25){starGo="";voteRevert(d,h)}else{voteXS("vote"+h+"Curr"+d).width=g+"px";voteX("votescore"+String(h).replace("#","")+d).innerHTML=voteRound(Math.round(g/140*50)/10);voteX("score"+String(h).replace("#","")+d).value=Math.round(g/140*50)/10}}}};