function bmvGenre(b,a,c){if(c!==false){this.create(b,a,c)}}bmvGenre.inherit(top.bmHTMLView);bmvGenre.prototype.radioButton=null;bmvGenre.prototype.genreId=0;bmvGenre.prototype.firstSongs=null;bmvGenre.prototype.flagPlayFirstSongs=true;bmvGenre.prototype.imageButtonUp=null;bmvGenre.prototype.imageButtonDown=null;bmvGenre.prototype.filterSongs="";bmvGenre.prototype.radioClickFlag=false;bmvGenre.prototype.radioPlayFlag=false;bmvGenre.prototype.downButton=false;bmvGenre.prototype.loadCommunitySongs=false;bmvGenre.prototype.clickRadioButton=false;bmvGenre.prototype.popularWeekControl=null;bmvGenre.prototype.popularWeekContainer=null;bmvGenre.prototype.asUsualListenControl=null;bmvGenre.prototype.asUsualListenContainer=null;bmvGenre.prototype.radioControl=null;bmvGenre.prototype.create=function(b,a,d){this.type="bmvGenre";this.className="bmvGenre";top.bmHTMLView.prototype.create.call(this,b,a,d);var c=this;c.load=function(e){c.popularWeekControl=c.document.getElementById("popularWeek");c.popularWeekContainer=c.document.getElementById("popularByWeekContainer");c.asUsualListenControl=c.document.getElementById("asUsualListen");c.asUsualListenContainer=c.document.getElementById("asUsualListenContainer");if(c.popularWeekControl!=null){b.attachEvent(c.popularWeekControl,"click",c.onPopularWeekControlClick)}if(c.asUsualListenControl!=null){b.attachEvent(c.asUsualListenControl,"click",c.onAsUsualListenControlClick)}c.radioControl=new bmRadio();b.attachEvent(c.document,"unload",c.unLoadCurrentDocumentHandler)};c.unLoadCurrentDocumentHandler=function(e){c.radioControl.release()};c.onClickButtonRadio=function(g){var e=b.player.readyState==b.player.PLAYER_PAUSE;var f=((b.playlist.filter||0).genreId||0);if(f==c.genreId){if(e){b.player.play()}else{b.player.pause()}}else{b.player.playContent(0,"playlist","new",11,{genreId:c.genreId})}c.clickRadioButton=true};c.changeStatePlayer=function(f){var e=((b.playlist.filter||0).genreId||0);switch(f){case b.player.PLAYER_PLAY:if(e==c.genreId){c.downRadioButton()}else{c.upRadioButton()}break;case b.player.PLAYER_PAUSE:if(e==c.genreId){c.upRadioButton()}break}};c.downRadioButton=function(){c.radioButton.src=c.imageButtonDown.src};c.upRadioButton=function(){c.radioButton.src=c.imageButtonUp.src};c.getUsualSongs=function(e){c.popularWeekContainer.style.display="none";c.asUsualContainer.style.display="block";c.popularWeekControl.className="pseudolink";c.asUsualControl.className=""};c.showWeekStatistic=function(){var f=c.document.getElementById("lastSongsStatisticContainer");var e=c.document.getElementById("usualSongsStatisticContainer");e.style.display="none";f.style.display="block"};c.showGeneralStatistic=function(){var f=c.document.getElementById("usualSongsStatisticContainer");var e=c.document.getElementById("lastSongsStatisticContainer");e.style.display="none";f.style.display="block"};c.getPopularSongsByWeek=function(e){c.asUsualControl.className="pseudolink";c.asUsualContainer.style.display="none";c.popularWeekControl.className="";c.popularWeekContainer.style.display="block"};c.playUsualSong=function(e){var f=b.getOriginalEventElement(e);var g=f.id.substr(6);b.player.playContent(g,"audio","new")}};var application=top.application;application.bmvGenre=new bmvGenre(application,application,{name:"bmvGenre",window:self});
