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

Fp.Api={C2Aid:{BROWSE:"257",DIAL:"513",SAVE_LANDMARK:"2306",NAVIGATE_TO:"2310",WALK_TO:"2311",SEND:"2312",ADD_TO_ROUTE:"2307",NEXT_POI:"10001",PREV_POI:"10002",PREV_VIEW:"10000",MAILTO:"FP_MAILTO"},fireC2A:function(d){if(!d||!d.hook){return;}var c="search://C2A?C2Aid="+d.hook+"&Version=1.0",a=this.C2Aid,b=false;switch(d.hook){case a.DIAL:if(d.args||(Fp.POI.contact&&Fp.POI.contact.phone)){c+="&"+d.hook+"="+encodeURIComponent(d.args||Fp.POI.contact.phone);b=true;}break;case a.BROWSE:if(d.args||(Fp.POI.contact&&Fp.POI.contact.website)){c+="&"+d.hook+"="+encodeURIComponent(d.args||Fp.POI.contact.website);b=true;}break;case a.MAILTO:if(d.args||(Fp.POI.contact&&Fp.POI.contact.email)){c="mailto:"+encodeURIComponent(d.args||Fp.POI.contact.email);b=true;}break;case a.WALK_TO:case a.NAVIGATE_TO:case a.SAVE_LANDMARK:case a.SEND:case a.ADD_TO_ROUTE:if(d.args||Fp.POI){c+="&2305="+this._createLandMarkParam(d.args||Fp.POI);b=true;}break;case a.NEXT_POI:case a.PREV_POI:case a.PREV_VIEW:b=true;break;}if(b){document.location=c;}},_createLandMarkParam:function(b){if(b){var a="Landmark(lat="+b.latitude+"&long="+b.longitude+"&name="+(Fp.POI.name||"")+")";return a;}},Native:{openPlace:function(a){Fp.openDetailContainer(a);},historyBack:function(){if(Fp.Pages){Fp.Pages.back();}},showLoader:function(){if(Fp.Popup){Fp.Popup.showLoader();}}}};