function RatingMode(servuri,sessionId,revScoreA,userScoreA,avgScoreA,whatIs,imgPath){this.uri=servuri;this.sessId=sessionId;this.revScore=revScoreA;this.userScore=userScoreA;this.avgScore=avgScoreA;this.whatIs=whatIs;this.imgPath=imgPath;this.ajax=null;this.ajaxresponse=function(){if(this.responseStatus[0]==200||this.responseStatus[1]=="OK"){var responseArray=this.response.split("|");if(responseArray.length==3){if(responseArray[1]=="reload"){window.location.replace(window.location.href);}if(responseArray[1]=="alert"){alert(responseArray[2]);}}}else{if(this.controller.nocall)this.controller.nocall.call();}};this.send=function(mode){var reqFile=this.uri+"/ajaxservlet;jsessionid="+this.sessId;this.ajax=new sack(reqFile);this.ajax.setVar("mode",mode);this.ajax.setVar("proc_class","nfm.core.entity.ajax.AJAXSetDisplayMode");this.ajax.method="POST";this.ajax.onCompletion=this.ajaxresponse;this.ajax.controller=this;this.ajax.runAJAX();};this.revScoreClick=function(evt){var source=et_findEventSource(evt,true);thisObj=source.controller;thisObj.send(1);};this.userScoreClick=function(evt){var source=et_findEventSource(evt,true);thisObj=source.controller;thisObj.send(2);};this.avgScoreClick=function(evt){var source=et_findEventSource(evt,true);thisObj=source.controller;thisObj.send(3);};this.whatAreClick=function(evt){var source=et_findEventSource(evt,true);thisObj=source.controller;var news=new BoxBuilder('dynaRow',thisObj.imgPath,thisObj.uri);news.buildDisplayMode();};this.initialize=function(){if(!document.getElementById(this.revScore)||!document.getElementById(this.userScore)||!document.getElementById(this.whatIs)){var thisObj=this;window.setTimeout(function(){thisObj.initialize()},100);}else{et_setupLink(this.revScore,this,this.revScoreClick);et_setupLink(this.userScore,this,this.userScoreClick);et_setupLink(this.avgScore,this,this.avgScoreClick);et_setupLink(this.whatIs,this,this.whatAreClick);}};this.initialize();}