/**
* (c) 2008 mOblu, inc.
* All rights are reserved. Copying or other reproduction of this program is prohibited.
*/
(function(){var _1=_1,_2=window.FlyFw={svcs:{},isFault:function(_3){return app.xmlrpc.fault(_3,false);},makeFault:function(_4,_5,_6){return new XMLRPCFault(_4,_5,_6);},postForm:function(_7,_8,_9){var _a=document.createElement("form");document.body.appendChild(_a);_a.method="post";_a.action=_7;var _b=document.createElement("input");_b.type="hidden";_b.name=_8;_b.value=_9;_a.appendChild(_b);_a.submit();},addCss:function(_c){var _d=document.getElementsByTagName("link");for(var i=_d.length;i>=0;i--){if(_d[i]&&_d[i].getAttribute("href")!=null&&_d[i].getAttribute("href").indexOf(_c)!=-1){return;}}var _f=document.createElement("link");_f.setAttribute("rel","stylesheet");_f.setAttribute("type","text/css");_f.setAttribute("href",_c);var _10=document.getElementsByTagName("head")[0];_10.appendChild(_f);},addScript:function(_11){var _12=document.getElementsByTagName("head")[0];var _13=document.createElement("script");_13.type="text/javascript";_13.src=_11;_12.appendChild(_13);},executeScript:function(_14){var _15=document.getElementsByTagName("head")[0];var _16=document.createElement("script");_16.type="text/javascript";_16.text=_14;_15.appendChild(_16);},setCookie:function(_17,_18,_19,_1a,_1b,_1c){var _1d=new Date();_1d.setTime(_1d.getTime());if(_19){_19=_19*1000*60*60*24;}var _1e=new Date(_1d.getTime()+(_19));document.cookie=_17+"="+escape(_18)+((_19)?";expires="+_1e.toGMTString():"")+((_1a)?";path="+_1a:"")+((_1b)?";domain="+_1b:"")+((_1c)?";secure":"");},getCookie:function(_1f){var _20=document.cookie.split(";");var _21="";var _22="";var _23="";var _24=false;for(i=0;i<_20.length;i++){_21=_20[i].split("=");_22=_21[0].replace(/^\s+|\s+$/g,"");if(_22==_1f){_24=true;if(_21.length>1){_23=unescape(_21[1].replace(/^\s+|\s+$/g,""));}return _23;break;}_21=null;_22="";}if(!_24){return null;}},deleteCookie:function(_25,_26,_27){if(_2.getCookie(_25)){document.cookie=_25+"="+((_26)?";path="+_26:"")+((_27)?";domain="+_27:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT";}},svc:function(_28,oCB,_2a){if(!_2.svcs[_28]){var _2b={};_2b.iface=_2.Config.get("Interface.Module."+_28);_2b._async=false;_2b._functor=null;_2b.setAsync=function(b,h){this._async=b;this._functor=(b?h:null);};_2b.setTimeout=function(t){this._timeout=t;};_2b.sModule=_28;_2b._timeout=5000;for(var i=0;i<_2b.iface.length;i++){_2b[_2b.iface[i]]=function(_30,_31){return function(){var arr=["SystemWs.wsCallModule",_31,_30];for(var i=0;i<arguments.length;i++){arr.push(arguments[i]);}if(_30=="render"){var _34=arr.splice(3,1)[0];_2.showLoadingIndicator();this._functor=new Functor(_2.Modules,_2.onRender,[this.sModule,_34,arr,this._functor]);}if(_30=="dialog"){webbler().startWait();this._functor=new Functor(_2.Modules,_2.onDialog,[this.sModule,arr,this._functor]);}var _35=app.xmlrpc.timeout;app.xmlrpc.timeout=this._timeout;var ret=app.xmlrpc.Call(BF_WS_URL,BF_KEY,"WebblerModule.CallService",arr,0,this._async,this._functor,"json","json");app.xmlrpc.timeout=_35;this._async=false;this._functor=null;return ret;};}(_2b.iface[i],_28);}_2.svcs[_28]=_2b;}_2.svcs[_28].setAsync(true,oCB);if(app.isInt(_2a)){_2.svcs[_28].setTimeout(_2a);}return _2.svcs[_28];},onRender:function(_37,_38,_39,oCB,_3b){_2.hideLoadingIndicator();if(_3b!==_1){if(!_2.isFault(_3b)){var _3c=_2.getCurrentModule();if(_3c&&app.isFunction(_3c.unload)){try{_3c.unload();}catch(E){}}_2.setCurrentModule(null);if(_3b.aInlineCss){for(var i=0;i<_3b.aInlineCss.length;i++){app.applyCSS(_3b.aInlineCss[i].sName,_3b.aInlineCss[i].sCss,_3b.aInlineCss[i].sMedia);}}_38.innerHTML=_3b.sHtml;for(var i=0;i<_3b.aSheets.length;i++){_2.addCss(_3b.aSheets[i]);}for(var i=0;i<_3b.aScripts.length;i++){_2.addScript(_3b.aScripts[i]);}for(var i=0;i<_3b.aExecs.length;i++){_2.executeScript(_3b.aExecs[i]);}_3b=_3b.utResult;}Functor.fire(oCB,[_3b]);}},onDialog:function(_3e,_3f,oCB,_41){webbler().endWait();if(_41!==_1){if(!_2.isFault(_41)){var _42=new _43(_41.sHtml);_42.construct(_41,oCB);}else{Functor.fire(oCB,[_41]);}}},showLoadingIndicator:function(){},hideLoadingIndicator:function(){},getCurrentModule:function(){return this.oModule;},setCurrentModule:function(_44){this.oModule=_44;}},_45=window.FlyFw.Config={get:function(_46){return FF_CONFIG[_46];},set:function(_47,_48){FF_CONFIG[_47]=_48;}},Ui=window.FlyFw.Ui={init:function(){},animateElProp:function(el,_4b,_4c,_4d,_4e,fps,_50,_51,_52,_53,_54){if(!_54){if(!el.__integer_style_animation_timers){el.__integer_style_animation_timers={};}clearTimeout(el.__integer_style_animation_timers[_4b]);_54=new Date().getTime();_2.Ui.setElProp(el,_4b,_4c,_50,_51);}else{var _55=_54+_4e;var _56=new Date().getTime()-_54;if(_56<_4e){var vt=((_4d-_4c)*(_56/_4e))+_4c;_2.Ui.setElProp(el,_4b,vt,_50,_51);}else{_2.Ui.setElProp(el,_4b,_4d,_50,_51);Functor.fire(_52);return;}}Functor.fire(_53);var fn=function(){_2.Ui.animateElProp(el,_4b,_4c,_4d,_4e,fps,_50,_51,_52,_53,_54);};el.__integer_style_animation_timers[_4b]=setTimeout(fn,1000/fps);},clearElAnim:function(el,_5a,val,_5c,_5d){if(!el.__integer_style_animation_timers){el.__integer_style_animation_timers={};}clearTimeout(el.__integer_style_animation_timers[_5a]);if(val!==_1){_2.Ui.setElProp(el,_5a,val,_5c,_5d);}},setElProp:function(el,_5f,val,_61,_62){switch(_5f){case "alpha":app.setAlpha(el,Math.floor(val));break;default:el.style[_5f]=_61+parseInt(val)+_62;}}},_43=window.FlyFw.Dialog=function(){},_63=_43.prototype;_63.construct=function(_64,oCB){this.aData=_64;this.oCB=oCB;if(dialogbase.prototype.construct.call(this)){this.applyElements();return true;}return false;};_63.fetchdialog=function(){return this.aData.sHtml;};_63.fire=function(){var cb=this.oCB;this.destroy();if(cb){var _67=[];for(var i=0;i<arguments.length;i++){_67.push(arguments[i]);}Functor.fire(cb,_67);}};_63.applyElements=function(){for(var i=0;i<this.aData.aSheets.length;i++){_2.addCss(this.aData.aSheets[i]);}for(var i=0;i<this.aData.aScripts.length;i++){_2.addScript(this.aData.aScripts[i]);}for(var i=0;i<this.aData.aExecs.length;i++){_2.executeScript(this.aData.aExecs[i]);}};}());