var bar=null;var eventPath="";var current=null;var curPath="";var path="";var text=null;var timeObserver=null;var blockId=null;HelperStick=function (){this.killed=false;this.visible=false;this.node=document.createElement("DIV");this.node.id="helper";this.message="default";setNodeStyle(this.node.style,{background:"transparent url('"+CAMPS_IMAGES+"/mocup/helper_stick.gif') no-repeat",position:"absolute",width:"140px",height:"44px",display:"none",cursor:"pointer"});};HelperStick.prototype={init:function (_c0,top){window.document.body.appendChild(this.node);},setPosition:function (_c2,top){this.node.style.left=(_c2)+"px";this.node.style.top=Number(top-36)+"px";},setMessage:function (mes){this.node.innerHTML="<span  style=\"display: block; width:135px; margin-left: 5px; height: 14px; margin-top: 5px; text-align: center; font: bold 13px Tahoma; color: #646464; overflow: hidden;\" >"+mes+"</span>";this.message=mes;},show:function (){this.visible=true;this.node.style.display="";},hide:function (){this.visible=false;this.node.style.display="none";}};window.onload=function (){bar=$("starsBar");if(bar){bar.observe("mousemove",onMove);bar.observe("click",onClick);bar.observe("mouseout",onOut);text=$("text");curPath=bar.src;path=bar.src.substring(0,bar.src.length-18);helperStick=new HelperStick();helperStick.init();}};function onMove(_c5){if(helperStick.killed){helperStick.killed=false;}if(helperStick.visible){helperStick.hide();}current=Math.round((Event.pointerX(_c5)-Position.cumulativeOffset(bar)[0]+5)/18);if(current>0){if(eventPath!=(path+"stars_golden_"+current+".gif")){timeObserver=null;timeObserver=new PeriodicalExecuter(toShow,1);}helperStick.setPosition(Position.cumulativeOffset(bar)[0]+(current-1)*18,Position.cumulativeOffset(bar)[1]);bar.src=path+"stars_golden_"+current+".gif";eventPath=bar.src;}}function toShow(pe){if(!helperStick.visible){var mes="";switch(current){case 1:mes=goldStar1;break;case 2:mes=goldStar2;break;case 3:mes=goldStar3;break;case 4:mes=goldStar4;break;case 5:mes=goldStar5;break;}helperStick.setMessage(mes);if(!helperStick.killed){helperStick.show();}}pe.stop();}function onClick(_c8){$("starsBarRating").value=current;curPath=eventPath;}function onOut(_c9){if(helperStick.visible){helperStick.hide();}bar.src=curPath;helperStick.killed=true;eventPath="";}function setNodeStyle(_ca,_cb){if(_cb.nodeFloat){_ca.styleFloat=_cb.nodeFloat;_ca.cssFloat=_cb.nodeFloat;delete _cb.nodeFloat;}for(val in _cb){_ca[val]=_cb[val];}}