
K028Emotikid=Class.create(KXXXGeneric,{initialize:function($super,kidId,sConf,kLang){$super(kidId,sConf,kLang);this.preloadTime=0;},startKidget:function(){this.loadDataFromServer();this.bindKidget();this.displayContent();this.displayDefaultTab();this.displayKidget();},loadDataFromServer:function(){},setSpecificContent:function(request){},bindKidget:function($super){$super();if((this.kidgetId==107)||(this.kidgetId==112)||(this.kidgetId==136)||this.kidgetId==137||this.kidgetId==138||this.kidgetId==139||this.kidgetId==158||this.kidgetId==159||this.kidgetId==162||this.kidgetId==163||this.kidgetId==167||this.kidgetId==173||this.kidgetId==174||this.kidgetId==175||this.kidgetId==179||this.kidgetId==180||this.kidgetId==188||this.kidgetId==189||this.kidgetId==191||this.kidgetId==192||this.kidgetId==193||this.kidgetId==198||this.kidgetId==199||this.kidgetId==202||this.kidgetId==203||this.kidgetId==205||this.kidgetId==206){this.kidget.addBackTab("scarica",$$('#'+this.kidget.id+' .kdflaps_idle .kdflap_1')[0]);this.kidget.addBackTab("notifica",$$('#'+this.kidget.id+' .kdflaps_idle .kdflap_2')[0]);this.kidget.addBackTab("importa",$$('#'+this.kidget.id+' .kdflaps_idle .kdflap_3')[0]);if($$('#'+this.kidget.id+' .kdflaps_top_idle .kdflap_top_1').length>0){this.kidget.addBackTab("lingua",$$('#'+this.kidget.id+' .kdflaps_top_idle .kdflap_top_1')[0]);}
this.kidget.setDefaultTab("scarica");}else if(this.kidgetId==185||this.kidgetId==195||this.kidgetId==196||this.kidgetId==218){this.kidget.addBackTab("info_editoriali",$$('#'+this.kidget.id+' .kdflaps_idle .kdflap_1')[0]);this.kidget.addBackTab("notifica",$$('#'+this.kidget.id+' .kdflaps_idle .kdflap_2')[0]);this.kidget.addBackTab("importa",$$('#'+this.kidget.id+' .kdflaps_idle .kdflap_3')[0]);if($$('#'+this.kidget.id+' .kdflaps_top_idle .kdflap_top_1').length>0){this.kidget.addBackTab("lingua",$$('#'+this.kidget.id+' .kdflaps_top_idle .kdflap_top_1')[0]);}
this.kidget.setDefaultTab("info_editoriali");}else if(this.kidgetId==183){this.kidget.addBackTab("info_editoriali",$$('#'+this.kidget.id+' .kdflaps_idle .kdflap_1')[0]);this.kidget.addBackTab("scarica",$$('#'+this.kidget.id+' .kdflaps_idle .kdflap_2')[0]);this.kidget.addBackTab("notifica",$$('#'+this.kidget.id+' .kdflaps_idle .kdflap_3')[0]);this.kidget.addBackTab("importa",$$('#'+this.kidget.id+' .kdflaps_idle .kdflap_4')[0]);if($$('#'+this.kidget.id+' .kdflaps_top_idle .kdflap_top_1').length>0){this.kidget.addBackTab("lingua",$$('#'+this.kidget.id+' .kdflaps_top_idle .kdflap_top_1')[0]);}
this.kidget.setDefaultTab("info_editoriali");}else{this.kidget.addBackTab("notifica",$$('#'+this.kidget.id+' .kdflaps_idle .kdflap_1')[0]);this.kidget.addBackTab("importa",$$('#'+this.kidget.id+' .kdflaps_idle .kdflap_2')[0]);if($$('#'+this.kidget.id+' .kdflaps_top_idle .kdflap_top_1').length>0){this.kidget.addBackTab("lingua",$$('#'+this.kidget.id+' .kdflaps_top_idle .kdflap_top_1')[0]);}
this.kidget.setDefaultTab("notifica");}
if(this.kidgetId==121){this.pe=new PeriodicalExecuter(this.changeText.bind(this),3.5);}
if(this.kidgetId==218){tastoscarica_pdf=$$('#'+this.kidget.id+" .scarica_pdf")[0];Event.observe(tastoscarica_pdf,'click',this.scaricaPdfClicked.bindAsEventListener(this));}
cerca_rollover_on_specific_kidget(this.kidget.id);if((this.kidgetId==107)||(this.kidgetId==112)||(this.kidgetId==136)||(this.kidgetId==137)||this.kidgetId==138||this.kidgetId==139||this.kidgetId==158||this.kidgetId==159||this.kidgetId==162||this.kidgetId==163||this.kidgetId==167||this.kidgetId==173||this.kidgetId==174||this.kidgetId==175||this.kidgetId==179||this.kidgetId==180||this.kidgetId==183||this.kidgetId==188||this.kidgetId==189||this.kidgetId==191||this.kidgetId==192||this.kidgetId==193||this.kidgetId==198||this.kidgetId==199||this.kidgetId==202||this.kidgetId==203||this.kidgetId==205||this.kidgetId==206||this.kidgetId==218){tastoscarica=$$('#'+this.kidget.id+" .tastoscarica")[0];Event.observe(tastoscarica,'click',this.scaricaClicked.bindAsEventListener(this));}
if(this.kidgetId==136||this.kidgetId==137||this.kidgetId==138||this.kidgetId==139||this.kidgetId==158||this.kidgetId==159||this.kidgetId==162||this.kidgetId==163||this.kidgetId==167||this.kidgetId==173||this.kidgetId==174||this.kidgetId==175||this.kidgetId==179||this.kidgetId==180||this.kidgetId==183||this.kidgetId==188||this.kidgetId==189||this.kidgetId==191||this.kidgetId==192||this.kidgetId==193||this.kidgetId==198||this.kidgetId==199||this.kidgetId==202||this.kidgetId==203||this.kidgetId==205||this.kidgetId==206){tastoscaricagioca=$$('#'+this.kidget.id+" .gioca_scarica")[0];Event.observe(tastoscaricagioca,'click',this.scaricaClicked.bindAsEventListener(this));}
if(this.kidgetId==185||this.kidgetId==195||this.kidgetId==218){btn_fan=$$('#'+this.kidget.id+" .fan_btn")[0];if(this.kidget.userCanModifyKidget()&&!pageTabs.isNotification&&!pageTabs.isCard)
btn_fan.style.display="none";else
btn_fan.onclick=this.kidget.pasteThis.bindAsEventListener(this.kidget);}},changeText:function(){if($$('#'+this.kidget.id+' .text1')[0].select('img')[0].readAttribute('src')==this.imageLocale("/images/kidgets/emk/k028_emotikid/registrati_text1.png",true)){$$('#'+this.kidget.id+' .text1')[0].select('img')[0].writeAttribute('src',this.imageLocale("/images/kidgets/emk/k028_emotikid/registrati_text2.png",true));}else{$$('#'+this.kidget.id+' .text1')[0].select('img')[0].writeAttribute('src',this.imageLocale("/images/kidgets/emk/k028_emotikid/registrati_text1.png",true));}
attiva_rollover($$('#'+this.kidget.id+' .text1')[0].select('img')[0]);},getConfiguration:function(){return null;},displayContent:function(){},displayDownload:function(){if((this.kidgetId==107)||(this.kidgetId==112)||(this.kidgetId==136)||(this.kidgetId==137)||this.kidgetId==138||this.kidgetId==139||this.kidgetId==158||this.kidgetId==159||this.kidgetId==162||this.kidgetId==163||this.kidgetId==167||this.kidgetId==173||this.kidgetId==174||this.kidgetId==175||this.kidgetId==179||this.kidgetId==180||this.kidgetId==183||this.kidgetId==188||this.kidgetId==189||this.kidgetId==191||this.kidgetId==192||this.kidgetId==193||this.kidgetId==198||this.kidgetId==199||this.kidgetId==202||this.kidgetId==203||this.kidgetId==205||this.kidgetId==206||this.kidgetId==218){$$('#'+this.kidget.id+" .scarica .chiediamamma")[0].style.display="none";}
if(this.kidgetId==218)
$$('#'+this.kidget.id+" .chiediamammapdf")[0].style.display="none";},displayDefaultTab:function(){this.kidget.displayDefaultTab();},scaricaPdfClicked:function(){if(pageTabs.userCanDownloadMedia()){pdfURL=mpConfig.getDownloadMediaPath()+"/kidgets/emk/info_amnesty.pdf"
eventTracking.doTracking('Kidgets:'+this.kidgetId,'Download PDF button clicked!',pdfURL);window.open(pdfURL,"Download_completo","menubar=no,location=no,resizable=yes,scrollbars=yes,status=no");}else{$$('#'+this.kidget.id+" .chiediamammapdf")[0].style.display="";}},scaricaClicked:function(){if(pageTabs.userCanDownloadMedia()){if(this.kidgetId==107)
pdfURL=this.mediaLocale(mpConfig.getDownloadMediaPath()+"/paper-bat.pdf",true)
else if(this.kidgetId==112)
pdfURL=mpConfig.getDownloadMediaPath()+"/maschera-di-frankenstein.pdf"
else if(this.kidgetId==136)
pdfURL=mpConfig.getDownloadMediaPath()+"/kidgets/emk/zorro.pdf"
else if(this.kidgetId==137)
pdfURL=mpConfig.getDownloadMediaPath()+"/kidgets/emk/panda.pdf"
else if(this.kidgetId==138)
pdfURL=mpConfig.getDownloadMediaPath()+"/kidgets/emk/dinosauro.pdf"
else if(this.kidgetId==139)
pdfURL=this.mediaLocale(mpConfig.getDownloadMediaPath()+"/kidgets/emk/princess.pdf",true)
else if(this.kidgetId==158)
pdfURL=this.mediaLocale(mpConfig.getDownloadMediaPath()+"/kidgets/emk/papertoy_boy.pdf",true)
else if(this.kidgetId==159)
pdfURL=this.mediaLocale(mpConfig.getDownloadMediaPath()+"/kidgets/emk/papertoy_girl.pdf",true)
else if(this.kidgetId==162)
pdfURL=this.mediaLocale(mpConfig.getDownloadMediaPath()+"/kidgets/emk/papertoy_boy_extra.pdf",true)
else if(this.kidgetId==163)
pdfURL=this.mediaLocale(mpConfig.getDownloadMediaPath()+"/kidgets/emk/papertoy_girl_extra.pdf",true)
else if(this.kidgetId==167)
pdfURL=this.mediaLocale(mpConfig.getDownloadMediaPath()+"/kidgets/emk/il_pulcino_ballerino.pdf",true)
else if(this.kidgetId==173)
pdfURL=this.mediaLocale(mpConfig.getDownloadMediaPath()+"/kidgets/emk/lettore_notturno.pdf",true)
else if(this.kidgetId==174)
pdfURL=this.mediaLocale(mpConfig.getDownloadMediaPath()+"/kidgets/emk/lettore_pigro.pdf",true)
else if(this.kidgetId==175)
pdfURL=this.mediaLocale(mpConfig.getDownloadMediaPath()+"/kidgets/emk/lettore_vorace.pdf",true)
else if(this.kidgetId==179)
pdfURL=this.mediaLocale(mpConfig.getDownloadMediaPath()+"/kidgets/emk/papertoy_fiori.pdf",true)
else if(this.kidgetId==180)
pdfURL=this.mediaLocale(mpConfig.getDownloadMediaPath()+"/kidgets/emk/biglietto_mamma.pdf",true)
else if(this.kidgetId==183)
pdfURL=mpConfig.getDownloadMediaPath()+"/kidgets/emk/non_disturbare.pdf"
else if(this.kidgetId==188)
pdfURL=this.mediaLocale(mpConfig.getDownloadMediaPath()+"/kidgets/emk/fate.pdf",true)
else if(this.kidgetId==189)
pdfURL=this.mediaLocale(mpConfig.getDownloadMediaPath()+"/kidgets/emk/robot.pdf",true)
else if(this.kidgetId==191)
pdfURL=mpConfig.getDownloadMediaPath()+"/kidgets/emk/ape.pdf"
else if(this.kidgetId==192)
pdfURL=mpConfig.getDownloadMediaPath()+"/kidgets/emk/balena.pdf"
else if(this.kidgetId==193)
pdfURL=mpConfig.getDownloadMediaPath()+"/kidgets/emk/lumaca.pdf"
else if(this.kidgetId==198)
pdfURL=mpConfig.getDownloadMediaPath()+"/kidgets/emk/mybike.pdf"
else if(this.kidgetId==199)
pdfURL=this.mediaLocale(mpConfig.getDownloadMediaPath()+"/kidgets/emk/diploma.pdf",true)
else if(this.kidgetId==202)
pdfURL=this.mediaLocale(mpConfig.getDownloadMediaPath()+"/kidgets/emk/occhiali_star.pdf",true)
else if(this.kidgetId==203)
pdfURL=this.mediaLocale(mpConfig.getDownloadMediaPath()+"/kidgets/emk/annuario.pdf",true)
else if(this.kidgetId==205)
pdfURL=this.mediaLocale(mpConfig.getDownloadMediaPath()+"/kidgets/emk/aereo.pdf",true)
else if(this.kidgetId==206)
pdfURL=this.mediaLocale(mpConfig.getDownloadMediaPath()+"/kidgets/emk/ufo.pdf",true)
else if(this.kidgetId==218)
pdfURL=mpConfig.getDownloadMediaPath()+"/kidgets/emk/amnesty.pdf"
eventTracking.doTracking('Kidgets:'+this.kidgetId,'Download PDF button clicked!',pdfURL);window.open(pdfURL,"Download_completo","menubar=no,location=no,resizable=yes,scrollbars=yes,status=no");}else{$$('#'+this.kidget.id+" .scarica .chiediamamma")[0].style.display="";if(this.kidgetId==136||this.kidgetId==137||this.kidgetId==138||this.kidgetId==139||this.kidgetId==158||this.kidgetId==159||this.kidgetId==162||this.kidgetId==163||this.kidgetId==167||this.kidgetId==173||this.kidgetId==174||this.kidgetId==175||this.kidgetId==179||this.kidgetId==180||this.kidgetId==183||this.kidgetId==188||this.kidgetId==189||this.kidgetId==191||this.kidgetId==192||this.kidgetId==193||this.kidgetId==198||this.kidgetId==199||this.kidgetId==202||this.kidgetId==203||this.kidgetId==205||this.kidgetId==206){$$('#'+this.kidget.id+" .scarica_fronte")[0].style.display="";this.pe2=new PeriodicalExecuter(this.changeImage.bind(this),15);}}},changeImage:function(){$$('#'+this.kidget.id+" .scarica_fronte")[0].style.display="none";this.pe2=null;},beforeTurnBack:function(){this.displayDownload();},beforeDelete:function(){},beforeBackOK:function(){},beforeBackCancel:function(){},afterTurnBack:function(){},afterRestore:function(){}})