/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  February 9th 2010 11:26:25 PM PST                            */
/*      Machine:  10.16.140.110                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/8rixrqbu87oco808.pkg.js h:6jy6musp                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/8rixrqbu87oco808.pkg.js                                   */

if (window.CavalryLogger) { CavalryLogger.start_js(["js\/8rixrqbu87oco808.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_HAS_API_KEY',_L5,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';}}
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("\uc138\ubd80 \ud56d\ubaa9 \uc228\uae30\uae30");details_shown=true;}else{hide('stored_credit_card_details');_L0.innerHTML=_tx("\uc790\uc138\ud788 \ubcf4\uae30");details_shown=false;}}function show_csc_info(_L0){var _L1=_tx("\uce74\ub4dc \ubcf4\uc548 \ucf54\ub4dc(CSC)\ub294 \uc9c1\ubd88 \uce74\ub4dc \ubc0f \uc2e0\uc6a9 \uce74\ub4dc\uc758 \ubcf4\uc548 \uae30\ub2a5\uc73c\ub85c \uc2e0\uc6a9 \uce74\ub4dc \uad00\ub828 \ubc94\uc8c4\ub97c \ub9c9\uae30 \uc704\ud55c \uc870\uce58\uc785\ub2c8\ub2e4. \ub2e4\uc74c \uadf8\ub9bc\uc5d0\ub294 \uc2e0\uc6a9 \uce74\ub4dc\uc5d0\uc11c CSC \ucf54\ub4dc\ub97c \ucc3e\uc744 \uc218 \uc788\ub294 \uc704\uce58\uac00 \ud45c\uc2dc\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4.");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, JCB")+'</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("What's a CSC?")).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("\uc2e0\uc6a9 \uce74\ub4dc \ubc94\uc8c4\ub97c \ub9c9\uae30 \uc704\ud574 Facebook\uc5d0\uc11c\ub294 \uc2e0\uc6a9 \uce74\ub4dc \uc9c0\ubd88 \uc2dc CSC \ucf54\ub4dc \uc778\uc99d\uc744 \uc758\ubb34\ud654\ud558\uae30 \uc2dc\uc791\ud588\uc2b5\ub2c8\ub2e4. \uc774\ubbf8 Facebook\uc5d0\uc11c \uc0ac\uc6a9\ud55c \uc774\ub825\uc774 \uc788\ub294 \uc2e0\uc6a9 \uce74\ub4dc\uc758 \uacbd\uc6b0 \ub2e4\uc2dc \uc0ac\uc6a9\ud560 \uacbd\uc6b0 CSC \uc778\uc99d\uc744 \uac70\uccd0\uc57c \ud569\ub2c8\ub2e4. \ud55c \ubc88 \uc778\uc99d\uc744 \uac70\uce5c \uce74\ub4dc\ub294 \ub098\uc911\uc5d0 \ub2e4\uc2dc \uc0ac\uc6a9\ud558\ub354\ub77c\ub3c4 \uc778\uc99d \uba54\uc2dc\uc9c0\uac00 \ub098\ud0c0\ub098\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.");_L0+='</p>';_L0+='</div>';_L0+='</div>';new Dialog().setClassName('validation').setTitle(_tx("\uc65c CSC \ud655\uc778\uc774 \ud544\uc694\ud55c\uac00\uc694?")).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\/8rixrqbu87oco808.pkg.js"]); }