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

this.getSessionID=function(){};var Fp={POI:null,initialized:false,langLoaded:false,isSplash:true,loadedState:{},openData:null,uuid:null,resultsCount:0,byId:function(a){return document.getElementById(a)||(Fp.log&&Fp.log('could not find "'+a+'"'))||null;},init:function(){this.events={};window.onresize=this.onResize;Fp.addListener("onResize",Fp.toggleOrientation);this.toggleOrientation();this.lazyLoadScripts();},onResize:function(){if(Fp.events.onResize){var b=Fp.events.onResize.length,a;for(a=0;a<b;a++){Fp.events.onResize[a]();}}},addListener:function(a,c,b){if(!this.events[a]){this.events[a]=[];}this.events[a].push(function(){c.call(b||this);});},openDetailContainer:function(b){for(var a in b){if(b.hasOwnProperty(a)&&typeof b[a]=="string"){b[a]=decodeURIComponent(b[a]);}}this.openData=b;this.uuid=b.uuid||null;this.resultsCount=b.resultsCount||1;if(Fp.initialized&&Fp.langLoaded){Fp.Popup.showLoader();this.getPlace();}else{Fp.Lang.init(function(){Fp.getPlace();Fp.langLoaded=true;});}},clearLogWindow:function(){Fp.byId("log").innerHTML="";},logWindow:function(b){var a=Fp.byId("log");a.innerHTML=a.innerHTML+"<br />"+b;},getPlace:function(){if(Fp.openData&&Fp.openData.online&&Fp.openData.isPlace&&Fp.openData.placeId){setTimeout(function(){var a=new Fp.Ajax.Request({url:Fp.Settings.restURL+Fp.openData.placeId+"?filter=agc",exresp:Fp.Ajax.ExResponse.JSON,method:"GET",timeout:5,lang:Fp.Lang.language,onSuccess:function(b,c){Fp.POI=Fp.Utils.createPOI({searchResult:Fp.openData,PNSSresult:c});Fp.setPage();},onFailure:function(){Fp.POI=Fp.Utils.createPOI({searchResult:Fp.openData});Fp.setPage();Fp.Notification.display(Fp.Notification.TYPE_OFFLINE);},onTimeout:function(){Fp.POI=Fp.Utils.createPOI({searchResult:Fp.openData});Fp.setPage();Fp.Notification.display(Fp.Notification.TYPE_OFFLINE);}});a.send();},1);}else{Fp.POI=Fp.Utils.createPOI({searchResult:Fp.openData});Fp.setPage();}},setPage:function(){if(Fp.POI){Fp.ConnectMenu.init();Fp.Header.init();Fp.Incident.init();Fp.Popup.init();Fp.Ratings.init();Fp.Pages.open({name:Fp.Pages.PAGE.MAIN});Fp.PremiumContent.init();Fp.Gallery.init();Fp.Tracking.load();Fp.toggleOrientation();}},lazyLoadScripts:function(){Fp.loadScript({scriptName:"Fp.Settings"});Fp.loadScript({scriptName:"Fp.Utils"});Fp.loadScript({scriptName:"Fp.Marquee"});Fp.loadScript({scriptName:"Fp.Lang"});Fp.loadScript({scriptName:"Fp.Ajax"});Fp.loadScript({scriptName:"Fp.Pages"});Fp.loadScript({scriptName:"Fp.Premiumcontent"});Fp.loadScript({scriptName:"Fp.OwnerContent"});Fp.loadScript({scriptName:"Fp.Notification"});Fp.loadScript({scriptName:"Fp.Ratings"});Fp.loadScript({scriptName:"Fp.Connectmenu"});Fp.loadScript({scriptName:"Fp.Header"});Fp.loadScript({scriptName:"Fp.Tracking"});Fp.loadScript({scriptName:"Fp.Incident"});Fp.loadScript({scriptName:"Fp.Gallery"});Fp.loadScript({scriptName:"Fp.Popup",callback:function(){Fp.initialized=true;Fp.addListener("onResize",function(){var b=Fp.Marquee.addStringEllipsis(Fp.byId("header-name")),a=Fp.Marquee.addStringEllipsis(Fp.byId("header-address")),c=Fp.byId("header");c.className=c.className.replace("truncated","");if(b||a){c.className+=" truncated";}Fp.Marquee.addStringEllipsis(Fp.byId("ratepage-address"));});}});},loadScript:function(b){if(b&&b.scriptName&&!Fp.loadedState[b.scriptName]){var a=document.createElement("script");a.setAttribute("src",(b.path?b.path:"js/")+b.scriptName+".js");a.setAttribute("type","text/javascript");document.getElementsByTagName("head")[0].appendChild(a);a.onload=function(){Fp.loadedState[b.scriptName]=true;if(b.callback){b.callback();}};}else{if(b.callback&&b.forceCallback){b.callback();}}},isPortrait:function(){return(window.innerHeight>=window.innerWidth);},toggleOrientation:function(){var c=Fp.isPortrait(),d=Fp.byId("page"),a=Fp.byId("ajax-loader"),b=((c)?"content-portrait":"content-landscape")+((Fp.Lang&&Fp.Lang.isRTL)?" rtl":"")+((Fp.POI&&(Fp.POI.ownerContent||Fp.POI.premiumContent))?" with-premium-content":"")+((Fp.resultsCount<=1)?" oneResult":"");if(Fp.Pages&&Fp.Pages.iframeOpen){b+=" frame";}if(!c&&window.innerWidth>570){b=b+" vasco";}d.className=b;if(a){a.className=c?"ajax-loader-portrait":"";}}};Fp.init();