var posx=0,posy=0,block=false,loading=false,vote="";document.onmousemove=function(A){if(/msie/i.test(navigator.userAgent)){posx=event.clientX+document.body.scrollLeft;posy=event.clientY+document.body.scrollTop}else{posx=A.pageX;posy=A.pageY}};var Loopzy={swfClicked:false,start:function(){(new Image).src="/style/img/view/stars/star1.png";(new Image).src="/style/img/view/loader.gif";(new Image).src="/style/img/view/loading.png";vote=document.getElementById("vote").innerHTML;score=score==-1?0:Math.round(score);fillStars();Loopzy.ajax.incview(0)},ajax:{incview:function(A){if(A<5){Loopzy.ajax.send("/public/ajax.php?do=2&id="+id,function(){if(Loopzy.ajax.http.readyState==4){if(Loopzy.ajax.http.responseText==0){setTimeout("Loopzy.ajax.incview("+(A+1)+")",4000)}}})}},http:function(){try{return new XMLHttpRequest()}catch(A){try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(A){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(A){return false}}}}(),send:function(B,C){var A=Loopzy.ajax;if(A.http){if(A.http.readyState==4||A.http.readyState==0){A.http.onreadystatechange=C;A.http.open("GET",B,true);A.http.send(null)}}}},swfClick:function(){try{if(!this.swfClicked){this.swfClicked=true;var B=new SWFObject("/files/"+file,"flash-object","100%","400","6","#FFFFFF");B.write("swf");document.getElementById("swf").style.background="url('/style/img/view/loading.png') #FFFFFF no-repeat center";document.getElementById("swf").style.cursor="default";if(/firefox/i.test(navigator.userAgent)||/applewebkit/i.test(navigator.userAgent)||/msie 7/i.test(navigator.userAgent)){Loopzy.flash.loading("flash-object","loading-bar")}}}catch(A){this.swfClicked=false}},flash:{object:null,control:null,swf:null,swfCode:"",loading:function(B,D){var A=document.getElementById(D),E=A.childNodes[0],B=document.getElementById(B);Loopzy.flash.object=B;Loopzy.flash.control=document.getElementById("flash-control");E.style.width="0%";Loopzy.fade.into(A);B.style.width="0";B.StopPlay();var C=function(){var F=B.PercentLoaded();E.style.width=F+"%";E.innerHTML="&nbsp;"+F+"%";if(F!=100){setTimeout(C,20)}else{B.Rewind();B.Play();A.style.display="none";B.style.width="100%";Loopzy.flash.control.innerHTML='| <span onclick="Loopzy.flash.stop();">stop</span>';Loopzy.flash.control.style.display="inline";Loopzy.flash.swf=document.getElementById("swf")}};C()},stop:function(){Loopzy.flash.swfCode=Loopzy.flash.swf.innerHTML;Loopzy.flash.swf.innerHTML="";Loopzy.flash.control.innerHTML='| <span onclick="Loopzy.flash.play();">play</span>';Loopzy.flash.swf.style.cursor="pointer";Loopzy.flash.swf.style.background="url('/style/img/view/click.png') #FFFFFF no-repeat center";Loopzy.helpers.addEvent(Loopzy.flash.swf,"click",Loopzy.flash.play)},play:function(){Loopzy.flash.swf.innerHTML=Loopzy.flash.swfCode;Loopzy.flash.control.innerHTML='| <span onclick="Loopzy.flash.stop();">stop</span>';Loopzy.flash.swf.style.cursor="default";Loopzy.helpers.removeEvent(Loopzy.flash.swf,"click",Loopzy.flash.play)}},dist:{show:function(){var A=document.getElementById("votedist");A.style.left=(posx+14)+"px";A.style.top=(posy+14)+"px";A.style.display="block"},hide:function(){var A=document.getElementById("votedist");A.style.display="none"}},fade:{ie:/msie/i.test(navigator.userAgent),into:function(B){var C,A=0,D=B;D.style.display="block";C=function(E){if(A!=1.1){if(this.ie){D.style.filter="alpha(opacity="+(A*100)+")"}else{D.style.opacity=A}A=Math.round((A+0.1)*10)/10;setTimeout(C,60)}};C()},out:function(B,C){var D,A=1,E=B;D=function(){if(A!=-0.1){if(this.ie){E.style.filter="alpha(opacity="+(A*100)+")"}else{E.style.opacity=A}A=Math.round((A-0.1)*10)/10;setTimeout(D,60)}else{E.style.display="none";E.innerHTML=C;Loopzy.fade.into(E)}};D()}},helpers:{addEvent:function(B,D,C,A){if(D==="domload"){this.addDOMLoadEvent(C)}else{if(/msie/i.test(navigator.userAgent)){B.attachEvent("on"+D,C)}else{B.addEventListener(D,C,A?true:false)}}},removeEvent:function(B,D,C,A){if(/msie/i.test(navigator.userAgent)){B.detachEvent("on"+D,C)}else{B.removeEventListener(D,C,A?true:false)}},addDOMLoadEvent:(function(){var load_events=[],load_timer,script,done,exec,old_onload,init=function(){done=true;clearInterval(load_timer);while(exec=load_events.shift()){exec()}if(script){script.onreadystatechange=""}};return function(func){if(done){return func()}if(!load_events[0]){if(document.addEventListener){document.addEventListener("DOMContentLoaded",init,false);
/*@cc_on @*/
/*@if (@_win32 || @_win64)
           document.write("<script id=__ie_onload defer src=//0><\/scr"+"ipt>");
           script = document.getElementById("__ie_onload");
           script.onreadystatechange = function() {
               if (this.readyState == "complete")
                   init(); // call the onload handler
           };
       /*@end @*/
}if(/WebKit/i.test(navigator.userAgent)){load_timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){init()}},10)}old_onload=window.onload;window.onload=function(){init();if(old_onload){old_onload()}}}load_events.push(func)}})()}};function fillStars(){for(var A=1;A<=score;A++){document.getElementById("star"+A).src="/style/img/view/stars/star1.png"}for(var A=score+1;A<=5;A++){document.getElementById("star"+A).src="/style/img/view/stars/star0.png"}}function xvote(C,A,B){if(block){return }xajax_vote(C,A);startLoading(B)}function starOver(A){if(block||loading){return }var C="";if(A==0){document.getElementById("star0").src="/style/img/view/stars/zero1.png"}else{for(var B=1;B<=A;B++){document.getElementById("star"+B).src="/style/img/view/stars/star1.png"}}for(var B=A+1;B<=5;B++){document.getElementById("star"+B).src="/style/img/view/stars/star0.png"}switch(A){case 0:C="This is SHIT!!!";break;case 1:C="Poor";break;case 2:C="Not bad";break;case 3:C="Good";break;case 4:C="Excellent";break;case 5:C="Perfect!";break}document.getElementById("vote").innerHTML=C}function starOut(){if(block||loading){return }document.getElementById("star0").src="/style/img/view/stars/zero0.png";for(i=1;i<=5;i++){document.getElementById("star"+i).src="/style/img/view/stars/star0.png"}document.getElementById("vote").innerHTML=vote;fillStars()}function startLoading(A){loading=true;document.getElementById(A).innerHTML='<img src="/style/img/view/loader.gif" />'}function stopLoading(B,A,C){block=A!=0?true:false;loading=false;setTimeout(showVotes,5000);document.getElementById("vote").innerHTML=B;if(A==1){loadNewScore(C)}if(A==2){fillStars();document.getElementById("vote").onmouseover=null}}function loadNewScore(A){Loopzy.fade.out(document.getElementById("score"),A+"<span>/5</span>")}function showVotes(){if(vote=="&nbsp;"){vote="1 vote"}else{vote="<span>"+(parseInt(/<span>(.*)<\/span>/i.exec(vote)[1])+1)+"</span> votes"}Loopzy.fade.out(document.getElementById("vote"),vote)}var css_browser_selector=function(){var A=navigator.userAgent.toLowerCase(),C=function(D){return A.indexOf(D)!=-1},B=document.getElementsByTagName("html")[0];B.className=(!(/opera|webtv/i.test(A))&&/msie (\d)/.test(A))?("ie ie"+RegExp.$1):C("gecko/")?"gecko":C("opera/9")?"opera opera9":/opera (\d)/.test(A)?"opera opera"+RegExp.$1:C("konqueror")?"konqueror":C("applewebkit/")?"webkit safari":C("mozilla/")?"gecko":""}();Loopzy.helpers.addEvent(window,"domload",function(){Loopzy.start()});