function eMagAPI(A){this._swfId=A;this._listeners={}}eMagAPI.prototype._swfId;eMagAPI.prototype._listeners;eMagAPI.prototype._swfObj=function(){return(swfobject.getObjectById(this._swfId))};eMagAPI.prototype.ready=function(){return((this._swfObj()!=null)?true:false)};eMagAPI.prototype.addEventListener=function(A,B){if(typeof this._listeners[A]=="undefined"){this._listeners[A]=[]}this._listeners[A].push(B)};eMagAPI.prototype.removeEventListener=function(C,D){if(typeof this._listeners[C]!="undefined"){for(var B=0,A;A=this._listeners[C][B];B++){if(A==D){break}}this._listeners[C].splice(B,1)}};eMagAPI.prototype.dispatchEvent=function(C){if(typeof this._listeners[C.type]!="undefined"&&this._listeners[C.type].length){C.target=this;for(var B=0,A;A=this._listeners[C.type][B];B++){A(C)}return true}return false};eMagAPI.prototype.getTitle=function(){if(this.ready()){return(this._swfObj().getTitle())}};eMagAPI.prototype.getEmagId=function(){if(this.ready()){return(this._swfObj().getEmagId())}};eMagAPI.prototype.getVersionId=function(){if(this.ready()){return(this._swfObj().getVersionId())}};eMagAPI.prototype.goToPage=function(A){if(this.ready()){this._swfObj().goToPage(A)}};eMagAPI.prototype.goToChapter=function(A){if(this.ready()){return(this._swfObj().goToChapter(A))}};eMagAPI.prototype.getPageCount=function(){if(this.ready()){return(this._swfObj().getPageCount())}};eMagAPI.prototype.overridePageFuncs=function(A,B){if(this.ready()){this._swfObj().overridePageFuncs(A,B)}};eMagAPI.prototype.getChapters=function(){if(this.ready()){return(this._swfObj().getChapters())}};eMagAPI.prototype.setChapters=function(A){if(this.ready()){return(this._swfObj().setChapters(A))}};eMagAPI.prototype.getPageText=function(A){if(this.ready()){return(this._swfObj().getPageText(A))}};eMagAPI.prototype.getPageDimensions=function(A){if(this.ready()){return(this._swfObj().getPageDimensions(A))}};eMagAPI.prototype.getPageData=function(A){if(this.ready()){return(this._swfObj().getPageData(A))}};eMagAPI.prototype.setPageData=function(B,A){if(this.ready()){return(this._swfObj().setPageData(B,A))}};eMagAPI.prototype.getLanguageTexts=function(){if(this.ready()){return(this._swfObj().getLanguageTexts())}};eMagAPI.prototype.setLanguageTexts=function(A){if(this.ready()){return(this._swfObj().setLanguageTexts(A))}};eMagAPI.prototype.addSendToFriendQuery=function(A){if(this.ready()){this._swfObj().addSendToFriendQuery(A)}};eMagAPI.prototype.openMedia=function(B,A,C){if(this.ready()){return(this._swfObj().openMedia(B,A,C))}};eMagAPI.prototype.showMessage=function(C,D,B,A){if(this.ready()){this._swfObj().showMessage(C,D,B,A)}};eMagAPI.prototype.closeMessage=function(){if(this.ready()){this._swfObj().closeMessage()}};eMagAPI.prototype.setBackgroundColor=function(C,B,A){if(this.ready()){this._swfObj().setBackgroundColor(C,B,A)}};eMagAPI.prototype.setBackgroundImage=function(D,C,F,A,E,B){if(this.ready()){this._swfObj().setBackgroundImage(D,C,F,A,E,B)}};eMagAPI.prototype.getMenu=function(A){if(this.ready()){return(this._swfObj().getMenu(A))}};eMagAPI.prototype.setMenu=function(A,B){if(this.ready()){return(this._swfObj().setMenu(A,B))}};eMagAPI.prototype.executeMenuFunc=function(B,A){if(this.ready()){this._swfObj().executeMenuFunc(B,A)}};eMagAPI.prototype.overrideMenuFuncs=function(B,A){if(this.ready()){this._swfObj().overrideMenuFuncs(B,A)}};eMagAPI.prototype.addLMObj=function(B,A){if(this.ready()){return(this._swfObj().addLMObj(B,A))}};eMagAPI.prototype.updateLMObj=function(B,A){if(this.ready()){return(this._swfObj().updateLMObj(B,A))}};eMagAPI.prototype.deleteLMObj=function(A){if(this.ready()){return(this._swfObj().deleteLMObj(A))}};eMagAPI.prototype.executeLMObjEvents=function(A){if(this.ready()){this._swfObj().executeLMObjEvents(A)}};eMagAPI.prototype.getLMObjById=function(A){if(this.ready()){return(this._swfObj().getLMObjById(A))}};eMagAPI.prototype.getPageLMObjs=function(A){if(this.ready()){return(this._swfObj().getPageLMObjs(A))}};eMagAPI.prototype.overrideLMObjFuncs=function(C,B,D,E,A){if(this.ready()){this._swfObj().overrideLMObjFuncs(C,B,D,E,A)}};eMagAPI.prototype.freezeEmag=function(){if(this.ready()){return(this._swfObj().freezeEmag())}};eMagAPI.prototype.unFreezeEmag=function(){if(this.ready()){return(this._swfObj().unFreezeEmag())}};eMagAPI.prototype.killEmag=function(){if(this.ready()){this._swfObj().killEmag()}};eMagAPI.prototype.loadPolicyFile=function(A){if(this.ready()){this._swfObj().loadPolicyFile(A)}};eMagAPI.prototype.sendData=function(B,C,A){if(this.ready()){return(this._swfObj().sendData(B,C,A))}};eMagAPI.prototype.loadData=function(A){if(this.ready()){return(this._swfObj().loadData(A))}};eMagAPI.prototype.sendAndLoadData=function(B,C,A){if(this.ready()){return(this._swfObj().sendAndLoadData(B,C,A))}};eMagAPI.prototype.getQueryString=function(A){return(swfobject.getQueryParamValue(A))};eMagAPI.prototype.queryStringToObj=function(A){if(this.ready()){return(this._swfObj().queryStringToObj(A))}};eMagAPI.prototype.xmlToObj=function(A){if(this.ready()){return(this._swfObj().xmlToObj(A))}};eMagAPI.prototype.serializeObj=function(A,B){if(this.ready()){return(this._swfObj().serializeObj(A,B))}};eMagAPI.prototype.deserializeObj=function(A){if(this.ready()){return(this._swfObj().deserializeObj(A))}};eMagAPI.prototype.encodeMD5=function(A){if(this.ready()){return(this._swfObj().encodeMD5(A))}};eMagAPI.prototype.encodeSHA1=function(A){if(this.ready()){return(this._swfObj().encodeSHA1(A))}};eMagAPI.prototype.encodeBase64=function(A){if(this.ready()){return(this._swfObj().encodeBase64(A))}};eMagAPI.prototype.decodeBase64=function(A){if(this.ready()){return(this._swfObj().decodeBase64(A))}};eMagAPI.prototype.encryptRC4=function(A,B){if(this.ready()){return(this._swfObj().encryptRC4(A,B))}};eMagAPI.prototype.decryptRC4=function(A,B){if(this.ready()){return(this._swfObj().decryptRC4(A,B))}};eMagAPI.prototype.compressLZW=function(A){if(this.ready()){return(this._swfObj().compressLZW(A))}};eMagAPI.prototype.decompressLZW=function(A){if(this.ready()){return(this._swfObj().decompressLZW(A))}};eMagAPI.prototype.saveFlashCookie=function(B,A){if(this.ready()){return(this._swfObj().saveFlashCookie(B,A))}};eMagAPI.prototype.loadFlashCookie=function(A){if(this.ready()){return(this._swfObj().loadFlashCookie(A))}};