//Copyright © [Year(s)] Nokia Corporation and/or its subsidiary(-ies).

Fp.Header={init:function(){this.fillHeader(Fp.POI);this.setupEvents();},setupEvents:function(){var b=Fp.byId("prevPoi"),a=Fp.byId("nextPoi");if(Fp.resultsCount<=1){b.style.visibility="hidden";a.style.visibility="hidden";return;}new Fp.Utils.addTapEvent({element:b,onEvent:function(){Fp.Api.fireC2A({hook:Fp.Api.C2Aid.PREV_POI});},BGposition:"0 0"});new Fp.Utils.addTapEvent({element:a,onEvent:function(){Fp.Api.fireC2A({hook:Fp.Api.C2Aid.NEXT_POI});},BGposition:"-45px 0"});},fillHeader:function(c){var f="";if(c){Fp.byId("header-name").innerHTML=Fp.byId("header-name").title="";var a=Fp.Utils.formatName(c),b=c.address?Fp.Utils.formatAddress(c.address,c.isPlace):"",d=Fp.resultsCount<2?Fp.byId("header"):Fp.byId("header-text");Fp.Marquee.addAnimatedString({element:Fp.byId("header-name"),clickelement:d,text:a});Fp.Marquee.addAnimatedString({element:Fp.byId("header-address"),clickelement:d,text:b});if(c.distance){var e=Fp.byId("header-distance");e.innerHTML="";e.innerHTML=Fp.Utils.formatDistance(c.distance);}}}};