
YAHOO.namespace("ea.sp.community.postcard");dwr.engine.setErrorHandler(function(message,ex){throw ex;});YAHOO.ea.sp.community.postcard.PostcardFlaggingApplication=function(flagService)
{this.flagService=flagService;var spanlinks=YAHOO.util.Dom.getElementsByClassName('link-button');var spanlink=spanlinks[0];YAHOO.util.Event.addListener(spanlink,"click",this.bindFirst(this.flagPostcard,spanlink.id));}
YAHOO.ea.sp.community.postcard.PostcardFlaggingApplication.prototype={flagPostcard:function(postcardId)
{this.flagService.flagPostcardRemotely(postcardId,this.bind(this.postcardFlagged));},postcardFlagged:function()
{alert('This postcard has been flagged.');}};YAHOO.lang.augment(YAHOO.ea.sp.community.postcard.PostcardFlaggingApplication,YAHOO.ea.sp.Bindable);YAHOO.lang.augment(YAHOO.ea.sp.community.postcard.PostcardFlaggingApplication,YAHOO.ea.sp.EventProvider);YAHOO.util.Event.onDOMReady(function(){var flaggingApp=new YAHOO.ea.sp.community.postcard.PostcardFlaggingApplication(window.flagService);});