/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  February 10th 2010 12:14:48 AM PST                           */
/*      Machine:  10.16.139.105                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/95ljcslrmqkggck0.pkg.js h:5o0mtw3a                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/95ljcslrmqkggck0.pkg.js                                   */

if (window.CavalryLogger) { CavalryLogger.start_js(["js\/95ljcslrmqkggck0.pkg.js"]); }

function PlatformCanvasController(_L0,_L1,_L2,_L3,_L4,_L5){this.sessionKey=_L1;this.appName=_L3;this.appId=_L0;this.callback=_L4;this.api_key=_L5;this.isFirstPage=false;this.isIFrame=false;this._movingPage=false;this.sessionRefresh=(_L2*900);if(this.appId&&this.sessionKey&&this.sessionRefresh)setTimeout(this.refreshAppSession.bind(this),this.sessionRefresh);PlatformCanvasController.singleton=this;Arbiter.inform('PLATFORM_CANVAS_CONTROLLER_INIT',null,Arbiter.BEHAVIOR_PERSISTENT);}PlatformCanvasController.AUTO_REFRESH=30000;PlatformCanvasController.prototype.setUpIFrame=function(_L0){PageTransitions.registerHandler(this.handleChange.bind(this));this.isIFrame=true;this.isStatic=_L0;};PlatformCanvasController.prototype.autoRefreshAd=function(){if(this.isIFrame){this.isFirstPage=true;$('app'+this.appId+'_iframe_canvas').onload=this._clickRefresh.bind(this);}this._ignoreNext=true;this._loopRefresh();};PlatformCanvasController.prototype.requireLogin=function(){var _L0=FB.IFrameUtil.CanvasUtilServer.loginResponse;FBML.requireLogin(this.appId,_L0.bind(null,true),_L0.bind(null,false),null,true,true);};PlatformCanvasController.prototype.closeLogin=function(){FBML.closeLoginDialog();};PlatformCanvasController.prototype.showFeedDialog=function(_L0,_L1,_L2,_L3,_L4,_L5){FBML.showFeedDialog(this.appId,_L0,_L1,_L2,_L3,FB.IFrameUtil.CanvasUtilServer.loginResponse.bind(null),_L4,_L5);};PlatformCanvasController.prototype._loopRefresh=function(){if(this._ignoreNext){this._ignoreNext=false;}else this.refreshAd();this._loopRefresh.bind(this).defer(PlatformCanvasController.AUTO_REFRESH);};PlatformCanvasController.prototype._clickRefresh=function(){this.refreshAd();this._ignoreNext=true;};PlatformCanvasController.prototype.refreshAppSession=function(){new AsyncRequest().setURI('/ajax/session.php').setData({'app_id':this.appId,'session_key':this.sessionKey}).setReadOnly(true).setHandler(function(_L0){var _L1=_L0.getPayload();if(_L1['session_end']>0)setTimeout(this.refreshAppSession.bind(this),this.sessionRefresh);}.bind(this)).send();};PlatformCanvasController.prototype.refreshUrl=function(_L0){var _L1=_L0.href;if(_L1.startsWith(this.callback)){var _L2=new URI(_L1.substring(this.callback.length));this.changeUrlSuffix(_L2,true);}return false;};PlatformCanvasController.refreshUrl=function(_L0){if(PlatformCanvasController.singleton)PlatformCanvasController.singleton.refreshUrl(_L0);};PlatformCanvasController.prototype.changeUrlSuffix=function(_L0,_L1){this.currentUri=URI.getRequestURI().getUnqualifiedURI();var _L2=new URI(this.getAppPrefix()+_L0);this.stripFbParams(_L2);var _L3=_L1&&PlatformCanvasController.storesIFrameHistory(this.isStatic);if(this.currentUri.toString()!=_L2.toString()){this.currentUri=_L2;this.refreshAd();PageTransitions.go(_L2.toString(),_L3);}};PlatformCanvasController.prototype.getAppPrefix=function(){return "/"+this.appName+"/";};PlatformCanvasController.prototype.convertFromApps=function(uri){var _L1=this.getAppPrefix();var _L2=uri.getUnqualifiedURI().toString().substring(_L1.length);return new URI(this.callback+_L2);};PlatformCanvasController.prototype.convertToApps=function(uri){var _L1=uri.toString().substring(this.callback.length);return new URI(this.getAppPrefix()+_L1);};PlatformCanvasController.prototype.stripFbParams=function(uri){var _L1=uri.getQueryData();var _L2={};for(key in _L1)if((!key.startsWith("fb_")||key.startsWith("fb_force_mode"))&&!key.startsWith("_fb")&&!key.startsWith("quickling_apps"))_L2[key]=_L1[key];uri.setQueryData(_L2);};PlatformCanvasController.prototype.refreshAd=function(){if(this.isFirstPage){this.isFirstPage=false;}else ads_refresh(this.appName,'/canvas.php');};PlatformCanvasController.prototype.handleChange=function(uri){if(!uri.getPath().startsWith("/"+this.appName)||this._movingPage)return false;var _L1=uri.getUnqualifiedURI();this.stripFbParams(_L1);if(this.currentUri.toString()!=_L1.toString()){FB.IFrameUtil.CanvasUtilServer.loadNewUrl(this.convertFromApps(uri).toString());this.currentUri=_L1;}PageTransitions.transitionComplete();return true;};PlatformCanvasController.prototype.goURI=function(uri){this._movingPage=true;var _L1=new URI(uri);_L1.addQueryData({_fb_q:true});PageTransitions.go(_L1);};PlatformCanvasController.storesIFrameHistory=function(_L0){if(ua.ie()){return true;}else if(ua.firefox()){if(_L0){return true;}else return false;}else if(ua.safari()){return false;}else return false;};var smartIframes=[];function smartSizingFrameAdded(){window.onresize=_resizeSmartFrames;smartIframes=[];var _L0=document.getElementsByTagName('iframe');for(var i=0;i<_L0.length;i++){var _L2=_L0[i];if(_L2.className=='smart_sizing_iframe'){smartIframes.push(_L2);_L2.style.width=_L2.parentNode.scrollWidth-2+"px";}}_resizeSmartFrames();}if(window.innerHeight){var windowHeight=function(){return window.innerHeight;};}else if(document.documentElement&&document.documentElement.clientHeight){var windowHeight=function(){return document.documentElement.clientHeight;};}else var windowHeight=function(){return DOMScroll.getScrollRoot().clientHeight;};function _resizeSmartFrames(){var _L0=windowHeight();for(var i=0;i<smartIframes.length;i++){var _L2=smartIframes[i];var _L3=_L0-elementY(_L2)-61;_L2.style.height=_L3/(smartIframes.length-i)+'px';}}
function GamePlayTracker(_L0){copy_properties(this,{_app:_L0});}copy_properties(GamePlayTracker.prototype,{ping:function(){new AsyncRequest('/ajax/games/play_update.php').setMethod('POST').setData({app:this._app}).setErrorHandler(function(){}).setTransportErrorHandler(function(){}).send();}});
var details_shown=false;function toggle_stored_cc(obj){if(obj.checked==true){show('cvv2_div');hide_new_cc();}else{hide('cvv2_div');show_new_cc();}}function hide_cc_payment(){hide('card_payment');hide('cvv2_div');hide_new_cc();var _L0=ge('cc_id');if(_L0)_L0.checked=false;}function show_cc_payment(){show('card_payment');}function hide_new_cc(){hide('cc_input');hide('enter_new_card');}function show_new_cc(){show('cc_input');show('enter_new_card');if(details_shown)toggleStoredCreditCardDetails();}function toggleStoredCreditCardDetails(){var _L0=ge('toggle_stored_credit_card_details_link');if(!details_shown){show('stored_credit_card_details');_L0.innerHTML=_tx("masquer les d\u00e9tails");details_shown=true;}else{hide('stored_credit_card_details');_L0.innerHTML=_tx("afficher d\u00e9tails");details_shown=false;}}function show_csc_info(_L0){var _L1=_tx("Le pictograme de s\u00e9curit\u00e9 est une code de s\u00e9curit\u00e9 pour cartes de d\u00e9bit et de cr\u00e9dit qui aide \u00e0 lutter contre les fraudes \u00e0 la carte bancaire. Le graphique suivant vous montre o\u00f9 trouver le pictograme de s\u00e9curit\u00e9 sur votre carte bancaire.");var _L2='float: left;';var _L3='text-align: center; margin: 5px 0;';var _L4='';_L4+='<div style="'+_L2+'">';_L4+='<img src="/images/cvv2_types/amex_csc.gif" alt="" />';_L4+='<p style="'+_L3+'">'+_tx("American Express")+'</p>';_L4+='</div>';var _L5='';_L5+='<div style="margin-right: 8px;'+_L2+'">';_L5+='<img src="/images/cvv2_types/backofcard.gif" alt="" />';_L5+='<p style="'+_L3+'">'+_tx("Visa, Mastercard, JCP")+'</p>';_L5+='</div>';var _L6='';_L6+='<div class="clearfix">';_L6+='<p>'+_L1+'</p>';if(_L0==null){_L6+=_L5;_L6+=_L4;}else if(_L0==65){_L6+=_L4;}else _L6+=_L5;_L6+='</div>';new Dialog().setClassName('csc_type').setTitle(_tx("Qu\u2019est-ce que le code de s\u00e9curit\u00e9\u00a0?")).setBody(_L6).setButtons([Dialog.OK]).show();}function show_csc_validation_info(){var _L0='';_L0+='<div class="clearfix">';_L0+='<div style="float: left">';_L0+='<p style="text-align: left; margin: 5px 0;">';_L0+=_tx("Afin de lutter contre la fraude par carte bancaire, nous avons commenc\u00e9 \u00e0 appliquer la validation du cryptogramme visuel de s\u00e9curit\u00e9 lors des paiements par carte de cr\u00e9dit. Pour les cartes de cr\u00e9dit que nous avons stock\u00e9es auparavant, il faudra valider le cryptogramme pour des utilisations futures. Vous ne serez pas invit\u00e9 \u00e0 le refaire une fois la carte valid\u00e9e.");_L0+='</p>';_L0+='</div>';_L0+='</div>';new Dialog().setClassName('validation').setTitle(_tx("Pourquoi faut-il v\u00e9rifier le num\u00e9ro de s\u00e9curit\u00e9 de la carte de cr\u00e9dit\u00a0?")).setBody(_L0).setButtons([Dialog.OK]).show();}function get_selected_cc_type(_L0,_L1){if(_L1){cc_type=get_form_select_value(get_dialog_pro_elem(_L0));}else cc_type=get_form_select_value(ge(_L0));return cc_type;}function validate_csc(_L0,_L1){if(_L1){var _L2=get_dialog_pro_elem('cc_cvv2');}else var _L2=ge('cc_cvv2');var _L3=get_selected_cc_type(_L0,_L1);if(_L3==65){if(_L2.value.length!=4){_L2.style.border="1px solid red;";}else _L2.style.border="";}else if(_L2.value.length!=3){_L2.style.border="1px solid red;";}else _L2.style.border="";}function get_dialog_pro_elem(_L0){var _L1=document.getElementsByName(_L0);var i;var _L3=null;for(i=0;i<_L1.length;i++){var _L4=_L1[i];if(DOM.contains('pop_content',_L4))_L3=_L4;}return _L3;}

if (window.Bootloader) { Bootloader.done(["js\/95ljcslrmqkggck0.pkg.js"]); }