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

Fp.Notification={TYPE_OFFLINE:1,ELEMENT_ID:"notification",TIMEOUT:4000,timer:null,visible:false,isVisible:function(){return this.visible;},getElement:function(){return Fp.byId(this.ELEMENT_ID);},display:function(a){switch(a){case this.TYPE_OFFLINE:default:this.show();break;}},show:function(){if(!Fp.Notification.isVisible()){Fp.Notification.getElement().className=this.ELEMENT_ID;Fp.Notification.visible=true;Fp.Notification.setupEvents();}},hide:function(){if(Fp.Notification.isVisible()){Fp.Notification.getElement().className=this.ELEMENT_ID+" hidden";Fp.Notification.visible=false;Fp.Notification.unloadEvents();}},setupEvents:function(){this.getElement().onmouseup=function(a){Fp.Notification.hide();a.stopPropagation();return false;};this.setAutomaticTimeout(this.TIMEOUT);},unloadEvents:function(){this.getElement().onmousedown=null;this.timer=null;},setAutomaticTimeout:function(a){if(this.timer===null){this.timer=setTimeout(Fp.Notification.hide,a);}}};