/*
HTTP Host: static.ak.fbcdn.net
Generated: March 19th 2010 6:52:44 PM PDT
Machine: 10.16.139.108
Locale: nu_ll
Path: js/c1c4ppyf4ogs88gw.pkg.js
*/

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

function ApplicationCanvasMegaphone(d,a,e,b){copy_properties(this,{content:$(d),applicationId:a,type:e});var c=$(b);c.listen('click',this.hide.bind(this));}copy_properties(ApplicationCanvasMegaphone.prototype,{hide:function(){var a={application_id:this.applicationId,type:this.type};new AsyncSignal('/ajax/apps/app_canvas_megaphone.php',a).send();animation(this.content).to('height',0).duration(500).blind().hide().go();return false;}});
function contact_dialog_async_with_form(a){var b=new AsyncRequest().setMethod('GET').setReadOnly(true).setData({app_id:a}).setURI('/ajax/apps/contact_developer.php');new Dialog().setAsync(b).show();}
function create_hidden_input(a,b){return $N('input',{name:a,id:a,value:b,type:'hidden'});}function getTableRowShownDisplayProperty(){if(ua.ie()<8){return 'inline';}else return 'table-row';}function showTableRow(){for(var b=0;b<arguments.length;b++){var a=ge(arguments[b]);if(a&&a.style)a.style.display=getTableRowShownDisplayProperty();}return false;}function getParentRow(a){a=ge(a);while(a.tagName&&a.tagName!="TR")a=a.parentNode;return a;}function abTest(a,b){AsyncRequest.pingURI('/ajax/abtest.php',{data:a,post_form_id:null},true);return !b;}function ac(a){new AsyncSignal('/ajax/ac.php',{meta:a}).send();return true;}function scribe_log(a,b){AsyncRequest.pingURI('/ajax/scribe_log.php',{category:a,message:b,post_form_id:null},true);}function textLimit(b,a){var c=ge(b);if(c.value.length>a){c.value=c.value.substring(0,a);if(arguments.length>2)$(arguments[2]).style.display='block';}}function textLimitStrict(h,d,e,a,f){var g=ge(h);if(g){var c=g.value.length;var b=c-d;if(b>0){if(b>25000){g.value=g.value.substring(0,d+25000);b=25000;}$(e).style.display='block';$(a).innerHTML=b;$(f).disabled=true;}else if(c==0){$(e).style.display='none';$(f).disabled=true;$(a).innerHTML=1;}else if($(a).innerHTML!=0){$(a).innerHTML=0;$(e).style.display='none';$(f).disabled=false;}}}function city_selector_onfound(a,b){a.value=b?b.i:-1;}function city_selector_onselect(a){if(window[a])window[a]();}onloadRegister(function(){var c=[38,38,40,40,37,39,37,39,66,65,13],b=0;function a(d){var e=d?d.keyCode:event.keyCode;if(b==-1){return;}else if(c[b]==e){++b;if(b==c.length){new AsyncRequest('/ajax/lensflare.php').setReadOnly(true).setMethod('GET').send();b=-1;}}else if(b)b=0;}addEventBase(document,'keydown',a);});
function adjustImage(c){var a=c.parentNode;while(CSS.getStyle(a,'display')!='block'&&a.parentNode)a=a.parentNode;var d=a.offsetWidth;if(c.offsetWidth>d)try{if(ua.ie()<8){var b=document.createElement('div');b.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+c.src.replace('"','%22')+'", sizingMethod="scale")';b.style.width=d+'px';b.style.height=Math.floor(((d/c.offsetWidth)*c.offsetHeight))+'px';if(c.parentNode.tagName=='A')b.style.cursor='pointer';c.parentNode.insertBefore(b,c);c.parentNode.removeChild(c);}else throw 1;}catch(e){c.style.width=d+'px';}CSS.removeClass(c,'img_loading');}function imageConstrainSize(e,b,c,d){var a=new Image();a.onload=function(){if(a.width>0&&a.height>0){var k=a.width;var h=a.height;if(k>b||h>c){var g=c/b;var f=h/k;if(f>g){k=k*(c/h);h=c;}else{h=h*(b/k);k=b;}}var j=ge(d);if(j){var i=document.createElement('img');i.src=e;i.width=k;i.height=h;j.parentNode.insertBefore(i,j);j.parentNode.removeChild(j);}}};a.src=e;}function image_has_loaded(a){if(a.naturalWidth!==undefined){return a.complete&&a.width!=0;}else if(a.height==20&&a.width==20&&a.complete){return false;}else if(a.complete===undefined&&ua.safari()<500){var b=new Image();b.src=a.src;return b.complete;}return a.complete;}function image_has_failed(a){if((a.complete==null&&a.width==20&&a.height==20)||(a.mimeType!=null&&a.complete&&a.mimeType=='')||(a.naturalHeight!=null&&a.complete&&a.naturalHeight==0))return true;}
function ComposerAttachment(){this._container=null;}copy_properties(ComposerAttachment,{newFromURL:function(c,b){if(!/(?:https?:\/\/)?\w+\.\w+/.test(c))return false;var a=new ComposerAttachment();a.url=c;new AsyncRequest().setURI('/ajax/inbox/ajax.php').setData({action:'attachment',url:c}).setHandler(a._asyncCallback.bind(a)).setErrorHandler(b).send();return a;},setupThumbnails:function(a,b){var c=new ImageSandbox();c.onfinish=function(){a=c.getImages();for(var d=a.length-1;d>=0;d--)if(a[d].width&&(a[d].height<50||a[d].width<50||a[d].height/a[d].width>3||a[d].width/a[d].height>3))a.splice(d,1);if(!a.length){CSS.removeClass(b,'loading');CSS.removeClass(b.parentNode,'has_image');var e=b;while(e.parentNode&&e.tagName.toLowerCase()!='form')e=e.parentNode;e=e.getElementsByTagName('input');for(var d=0;d<e.length;d++)if(e[d].name.indexOf('[params][images]')!=-1)e[d].parentNode.removeChild(e[d]);return;}for(var f=0;f<a.length-1;f++)for(var g=a.length-1;g>=f;g--)if(a[f].width*a[f].height<a[g].width*a[g].height){temp=a[f];a[f]=a[g];a[g]=temp;}var e=b;while(e.parentNode&&e.tagName.toLowerCase()!='form')e=e.parentNode;e=e.getElementsByTagName('input');for(var d=0;d<e.length;d++)if(e[d].name.indexOf('[params][images]')!=-1){e=e[d];break;}CSS.removeClass(b,'loading');new ThumbnailSelector(b,e,a);}.bind(this);c.loadImages(a);}});copy_properties(ComposerAttachment.prototype,{containerReady:function(d,e){this._container=d;var c=d.getElementsByTagName('input');var a=[''];for(var b=0;b<c.length;b++)if(c[b].type=='text'||c[b].type=='hidden')a.push('<input type="hidden" name="'+htmlspecialchars(c[b].name)+'" value="'+htmlspecialchars(c[b].value)+'" />');if(e){a.push('&nbsp;');d.innerHTML=a.join('');CSS.addClass(d,'share_attachment_loading');}else d.innerHTML+=a.join('');},_renderInputsRecursive:function(c,d){if(d===null)return '';var a=[];if(typeof(d)=='object'){for(var b in d)a.push(this._renderInputsRecursive(c+'['+b+']',d[b]));}else if(typeof(d)!='function')a.push('<input type="hidden" name="',c,'" value="',htmlspecialchars(d),'" />');return a.join('');},_asyncCallback:function(b){var a=b.getPayload().html;CSS.removeClass(this._container,'share_attachment_loading');set_inner_html(this._container,a);}});function ThumbnailSelector(f,d,c){var b=['<div class="thumbnail_stage"><h4>'+_tx("\u05d1\u05d7\u05e8 \u05ea\u05de\u05d5\u05e0\u05d4 \u05de\u05de\u05d5\u05d6\u05e2\u05e8\u05ea")+'</h4><div class="selector clearfix"><div class="arrows clearfix">','<span class="left"><a href="#" class="arrow disabled">&nbsp;</a></span>','<span class="right"><a href="#" class="arrow ',c.length>1?'enabled':'disabled','">&nbsp;</a></span>','</div><div class="counter"><span>1 of ',c.length,'</span></div></div>'];for(var e=0;e<c.length;e++)b.push('<div class="thumbnail',e==0?' thumbnail_selected':' thumbnail_unselected','">','<img class="img_loading" src="',c[e].src,'" onload="adjustImage(this);" />','</div>');b.push('<label style="white-space:nowrap"><input name="no_picture" type="checkbox" onclick="this.parentNode.parentNode.parentNode.thumbnail.use_thumbnail(this.checked)" />'+_tx("\u05dc\u05dc\u05d0 \u05ea\u05de\u05d5\u05e0\u05d4")+'</label></div>');f.innerHTML=b.join('');this.images=c;this.input=d;d.value=this.images[0].src;this.obj=f;this.obj.thumbnail=this;this.label=f.getElementsByTagName('span')[2];this.index=0;var a=f.getElementsByTagName('a');this.left=a[0];this.right=a[1];this.left.onclick=this.left_arrow_press.bind(this);this.right.onclick=this.right_arrow_press.bind(this);this.left.onselectstart=this.right.onselectstart=function(){return false;};this.left.onmousedown=this.right.onmousedown=this._onmousedown;this.left.onmouseout=this.right.onmouseout=this._onmouseout;}copy_properties(ThumbnailSelector.prototype,{use_thumbnail:function(a){if(!a){this.move_selection(0);CSS.removeClass(this.obj,'thumbnail_dont_use');}else{this.input.value='';CSS.addClass(this.obj,'thumbnail_dont_use');}},_onmousedown:function(){CSS.addClass(this,'active');return false;},_onmouseout:function(){CSS.removeClass(this,'active');},left_arrow_press:function(){CSS.addClass(this.left,'active');this.move_selection(-1);return false;},right_arrow_press:function(){CSS.removeClass(this.right,'active');this.move_selection(1);return false;},move_selection:function(f){var d=this.index+f;if(d>=0&&d<this.images.length){var b=this.obj.getElementsByTagName('div');var e=0;this.index=d;for(var c=0;c<b.length;c++){var a=b[c].className;if(!CSS.hasClass(b[c],'thumbnail '))continue;var g=e==d;if(a.indexOf(g?'_unselected':'_selected')!=-1)CSS.setClass(b[c],a.replace(/thumbnail_(?:un)?selected/,g?'thumbnail_selected':'thumbnail_unselected'));e++;}this.label.innerHTML=_tx("{selected} \u05de\u05ea\u05d5\u05da {total}",{selected:(d+1),total:e});CSS.setClass(this.left,this.left.className.replace(/[^ ]+abled/,d==0?'disabled':'enabled'));CSS.setClass(this.right,this.right.className.replace(/[^ ]+abled/,d==this.images.length-1?'disabled':'enabled'));this.input.value=this.images[d].src;}}});function ImageSandbox(){this.obj=document.createElement('div');this.obj.style.left=this.obj.style.top='-100px';this.obj.style.width=this.obj.style.height='1px';this.obj.style.overflow='hidden';this.images=0;this.done=0;DOM.getRootElement().appendChild(this.obj);}copy_properties(ImageSandbox.prototype,{loadImages:function(b){this.images=b.length;for(var a=0;a<b.length;a++)new ImageSandboxLoader(this,b[a]);},onImageLoaded:function(a){this.done++;this._stateChange();},onImageFailed:function(a){a.destroy();this.images--;this._stateChange();},getImages:function(){var c=new Array();var a=this.obj.getElementsByTagName('img');for(var b=0;b<a.length;b++)c.push(a[b]);return c;},_stateChange:function(){if(this.done==this.images)if(this.onfinish)this.onfinish();}});function ImageSandboxLoader(b,a){this._timeout=4000;this._start=new Date().getTime();this._sandbox=b;if(typeof a!='object')a={src:a};this._obj=document.createElement('img');this._obj.onload=function(){if(this._pollImage)this._pollImage(1);}.bind(this);this._obj.onerror=function(){if(this._pollImage)this._pollImage(2);}.bind(this);copy_properties(this._obj,a);this._sandbox.obj.appendChild(this._obj);if(this._pollImage!==null)this._pollImage();}copy_properties(ImageSandboxLoader.prototype,{_pollImage:function(a){if(a==1){this._pollImage=null;this._sandbox.onImageLoaded(this);}else if(a==2){this._pollImage=null;this._sandbox.onImageFailed(this);}else if(image_has_failed(this._obj)){this._pollImage(2);}else if(image_has_loaded(this._obj)){this._pollImage(1);}else if((this._start+this._timeout)<new Date().getTime()){this._pollImage(2);}else setTimeout(function(){if(this._pollImage)this._pollImage();}.bind(this),20);},destroy:function(){DOM.remove(this._obj);this._obj=null;}});
function fix_attachment_more_menu_alignment(d){var a=ge('attachment_buttons_list');var j=a.offsetWidth;if(d){var f=Vector2.getElementPosition(d).x;var b=Vector2.getElementPosition(a).x;var g=f-b;var c=d.offsetWidth;var i=j-g;if(i>=c&&i<126){var e=ge('wall_more_menu');var h=0;e.style.left='auto';e.style.right=h+'px';}}}function wall_video_thumb_adjust(a,b){if(ua.ie()>=6&&ua.ie()<7){a.style.marginTop=(-1*b.height-3)+'px';a.style.paddingTop=(b.height-19)+'px';}a.style.display='block';}function attachments(a){this.attachment_added=false;this.attachment_oid=null;this.attachment_app_id=null;this.is_share=false;this.attached_share=false;this.scrape_last_count=0;this.dialog=null;this.wall_attachments={};this.last_url_scraped=null;this.context=a;this.edit_container_id='attachment_edit_container_'+a;this.edit_loading_id='attachment_edit_loading_'+a;this.edit_id='attachment_edit_'+a;this.view_container_id='attachment_view_container_'+a;this.view_wrapper_id='attachment_view_wrapper_'+a;this.view_id='attachment_view_'+a;this.remove_id='attachment_remove_'+a;this.view_loading_id='attachment_view_loading_'+a;this.is_active=false;}attachments.prototype.show_edit_loading=function(){show(this.edit_loading_id);};attachments.prototype.hide_edit_loading=function(){hide(this.edit_loading_id);};attachments.prototype.show_attachment_edit=function(g,d,f,a){this.is_active=true;if(this.dialog)return;var e=(f==14);this.is_share=(f==100);var h='<div id="'+this.edit_container_id+'">'+'<div id="'+this.edit_loading_id+'">&nbsp;</div>'+'</div>';this.dialog=new Dialog().setImmediateRendering(true).setClassName('attachment_dialog').setTitle(g).setBody(h).setStackable(true).setButtons([Dialog.newButton('attach',_tx("\u05e6\u05e8\u05e3"),'',function(){if(this.is_share){this._share_attach();}else this._attach(e,a,true);this.dialog.hide();this.dialog=null;this.is_active=false;}.bind(this)),Dialog.newButton('cancel',_tx("\u05d1\u05d8\u05dc"),'inputaux',function(){this.dialog.hide();this.remove_attachment_view();this.dialog=null;this.is_active=false;}.bind(this))]).show();var b=ge(this.edit_container_id);var c=document.createElement('div');c.className='share_stage';CSS.addClass(c,'attachment_edit');c.id=this.edit_id;c.is_app=e;b.appendChild(c);set_inner_html(c,d);if(this.is_share){placeholderSetup('share_link');if(ua.ie()<7)$('share_link').focus();}return c;};attachments.prototype._show_attachment_view=function(c,d){var a=ge(this.view_container_id);var b=document.createElement('div');b.className='share_stage';CSS.addClass(b,'attachment_view');b.id=this.view_id;b.is_app=d;a.appendChild(b);set_inner_html(b,c);hide('attachment_buttons_list');var e=ge(this.view_wrapper_id);e.style.display='block';this.attachment_added=true;return b;};attachments.prototype.remove_attachment_view=function(){var c=ge(this.view_container_id);var a=ge(this.view_id);if(this.attachment_added&&a){this.removed=true;c.removeChild(a);hide(this.view_wrapper_id);if(ge('attachment_buttons_list'))show('attachment_buttons_list');var b=ge(this.remove_id);CSS.setClass(b,b.className.replace(' edit',''));}this.attachment_added=false;this.attachment_oid=null;this.attachment_app_id=null;this.is_share=false;this.attached_share=false;};attachments.prototype.get_all_form_elements=function(a){var f=[];if(a){var b=a.getElementsByTagName('input');for(var e=0;e<b.length;e++)f.push(b[e]);var c=a.getElementsByTagName('select');for(var e=0;e<c.length;e++)f.push(c[e]);var d=a.getElementsByTagName('textarea');for(var e=0;e<d.length;e++)f.push(d[e]);}return f;};attachments.prototype._add_attachment_input_data=function(b,a){if(!a)return false;var e=this.get_all_form_elements(a);if(a.is_app){b.attachment={app:{},type:14};for(var d=0;d<e.length;d++)if(!(e[d].type=="radio"||e[d].type=="checkbox")||e[d].checked)b.attachment.app[e[d].name]=e[d].value;}else{var c=false;for(var d=0;d<e.length;d++){if(e[d].name=='attachment[type]')c=true;if(e[d].name=='attachment[params][url]')if(!e[d].value||e[d].value=='http://')return false;b[e[d].name]=e[d].value;}if(!c)return false;}b.context=this.context;return true;};attachments.prototype._attach=function(f,b,e){var c={};if(e){var d=ge(this.edit_id);var a=this._add_attachment_input_data(c,d);if(!a)return;}if(b)for(var i in b)c[i]=b[i];var g=ge(this.view_loading_id);g.style.display='block';var j=this._show_attachment_view('',f);var h=function(k){var l=k.getPayload();if(!j.removed){hide(this.view_loading_id);set_inner_html(j,l.html);this.attachment_oid=l.oid;this.attachment_app_id=l.app_id;}}.bind(this);new AsyncRequest().setHandler(h).setURI('/ajax/attachments.php').setErrorHandler(this.remove_attachment_view).setTransportErrorHandler(this.remove_attachment_view).setData(c).send();};attachments.prototype.add_post_data=function(a){if(this.attachment_added)if(this.attached_share){this._add_attachment_input_data(a,ge(this.view_id));}else a.attachment={oid:this.attachment_oid,app_id:this.attachment_app_id};};attachments.prototype.prepare_wall_post=function(){var a=ge(this.view_id);if(a){var c=this.get_all_form_elements(a);for(var b=0;b<c.length;b++)c[b].disabled=true;}};attachments.prototype.show_full_attachment=function(a){if(typeof this.wall_attachments[a]!='string')return;hide('attachment_compact_'+a);hide('attached_item_info_'+a);hide('attachment_compact_td_'+a);attachment_div=ge('wall_attachment_'+a);set_inner_html(attachment_div,this.wall_attachments[a]);};attachments.prototype.fix_app_inputs_on_send=function(){var a=ge(this.view_id);if(!this.attachment_added||!a)return;if(!this.attached_share){new_inputs=[];new_inputs.push(create_hidden_input('attachment[oid]',this.attachment_oid));new_inputs.push(create_hidden_input('attachment[app_id]',this.attachment_app_id));if(a.is_app){new_inputs.push(create_hidden_input('attachment[type]',14));new_inputs.push(create_hidden_input('attachment[app][message_sent]',true));}for(var b=0,c=new_inputs.length;b<c;b++)a.appendChild(new_inputs[b]);}};attachments.prototype.share_attach_from_dialog=function(){this._share_attach();Dialog.getCurrent().hide();this.dialog=null;};attachments.prototype._share_attach=function(){var a=ge('share_link');var b=a.value;if(b&&b!='http://')this._share_submit_url(b);};attachments.prototype._share_submit_url=function(c){this._show_attachment_view(this.share_html_block,false);var d=ge(this.view_container_id);var b=d.childNodes[0].childNodes[0].childNodes[0];this._attach_link_url(b,c,true);var a=ge(this.remove_id);a.className+=' edit';this.attached_share=true;};attachments.prototype._attach_link_url=function(c,e,d){var b=function(f){this.remove_attachment_view();}.bind(this);var a=ComposerAttachment.newFromURL(e,b);a.containerReady(c,d);};attachments.prototype._is_fb_code_url=function(a){return a.search('fb:')==0;};attachments.prototype._auto_attach_link=function(event,b){if(this._is_fb_code_url(b)){var a={code:b,context:this.context};this._attach(true,a,false);}else this._share_submit_url(b);};attachments.prototype.register_url_detection=function(b){var a=new UrlDetector($(b));a.subscribe('urlDetected',this._auto_attach_link.bind(this));a.setSuppressDetectionCheck(function(){return this.attachment_added;}.bind(this));};
function FeedFormBase(){this._storyType=63;this._feedData=null;this._uri='/fbml/ajax/prompt_feed.php';this._buttonCallback=null;this._isNile=false;this._supportsUserMessage=false;this._userMessagePrompt='';this._userMessage={value:''};this._currentSize=0;this._connectLocation=0;this._postId=null;this._hasTargets=false;this._profileType=0;}FeedFormBase.SIZES={small:1,medium:2};FeedFormBase.AUTO_PUBLISH_OPTIONS={never:2,small:4,medium:5};FeedFormBase.PROFILE_TYPE={user:101,page:102,group:103};FeedFormBase.shouldShowLoadingToSelf=false;FeedFormBase.shouldShowLoadingToOthers=false;FeedFormBase.prototype.setStoryType=function(a){this._storyType=a;return this;};FeedFormBase.prototype.setProfileType=function(a){this._profileType=a;return this;};FeedFormBase.prototype.setForm=function(a){if(this._elements)return null;this._form=$(a);return this;};FeedFormBase.prototype.setElements=function(a){if(this._form)return null;this._elements=a;return this;};FeedFormBase.prototype.setFeedData=function(a){this._feedData=a;return this;};FeedFormBase.prototype.setAppId=function(a){this._appid=a;return this;};FeedFormBase.prototype.setConnectLocation=function(a){this._connectLocation=a;return this;};FeedFormBase.prototype.setUserMessagePrompt=function(a){this._userMessagePrompt=a;return this;};FeedFormBase.prototype.setUserMessage=function(a){if(a)if(typeof a=='string'){this._userMessage={value:a};}else this._userMessage=a;return this;};FeedFormBase.prototype.setURI=function(a){this._uri=a;return this;};FeedFormBase.prototype.setContinuation=function(a){this._continuation=a;return this;};FeedFormBase.prototype.setButtonCallback=function(a){this._buttonCallback=a;return this;};FeedFormBase.prototype._selectSize=function(a){var b=a.size;if(b!=this._currentSize){CSS.removeClass(this._selectedSize,'Tabset_selected');animation($('preview_'+this._currentSize)).to('opacity',0).hide().duration(150).go();animation($('preview_'+b)).duration(150).checkpoint().show().from('opacity',0).to('opacity',1).duration(150).go();this._selectedSize=a;this._currentSize=b;CSS.addClass(this._selectedSize,'Tabset_selected');}return false;};FeedFormBase.prototype.attachHandlers=function(a){if(!this._isNile)this._attachSizeHandlers(a);var b=$('preview_container').scry('a');b.forEach(function(c){c.listen('click',function(d){d.kill();});});if(this._supportsUserMessage)$('feedform_user_message').focus();return this;};FeedFormBase.prototype._attachSizeHandlers=function(b){var f=this._selectorOptions;var d=this._feedformFilter;for(var c=0;c<f.length;c++){var e=$(d+'_'+f[c].size);var a=$(d+'_'+f[c].size+'_anchor');var g=f[c].size;f[c].node=e;if(CSS.hasClass(e,'Tabset_selected')){this._selectedSize=f[c];this._currentSize=g;}addEventBase(a,'click',this._selectSize.bind(this,f[c]),g);}return true;};FeedFormBase.prototype._finish=function(){this._enableSubmitButtons();if(this._dialog)this._dialog.hide();if(this._continuation)this._continuation(this._postId,null,{user_message:this._userMessage.value});};FeedFormBase.prototype.shouldShowLoading=function(){return false;};FeedFormBase.prototype.showDialog=function(a){this._dialog=new Dialog().setContentWidth(580).setClassName('interaction_form').setAsync(a).setHandler(this.handleButton.bind(this)).onloadRegister(this.attachHandlers.bind(this));if(this.shouldShowLoading())this._dialog.show();return this;};FeedFormBase.prototype._confirm=function(b){if(this._isNile&&this._supportsUserMessage){user_message=$('feedform_user_message').value;this._userMessage.value=b.user_message=user_message;}var a=new AsyncRequest().setURI(this._uri).setData(b).setNectarActionData().setHandler(this.showConfirmed.bind(this));new Dialog().setAsync(a);};FeedFormBase.prototype.handleButton=function(a){if(this._buttonCallback)this._buttonCallback(a);if(a.name=="publish"){var b=this._dialog?this._dialog.getButtonElement(a.name):a;if(b)b.disabled=true;this.confirmFeed();return false;}else if(a.name=="cancel")this.cancelFeed();};FeedFormBase.prototype.cancelFeed=function(){this._finish();};FeedFormBase.prototype.attachProperties=function(a){copy_properties(this,a);if(this._continuationJS){this._continuation=new Function(this._continuationJS);delete this._continuationJS;}return this;};FeedFormBase.prototype._showBase=function(b){var a=new AsyncRequest().setURI(this._uri).setHandler(function(c){var d=c.getPayload().userData;this.attachProperties(d);if(d.no_dialog_shown)this._finish();return true;}.bind(this)).setNectarActionData().setErrorHandler(this._showApplicationError.bind(this)).setData(b);this.showDialog(a);return this;};FeedFormBase.prototype.showConfirmed=function(b){var a;if(this._profileType==FeedFormBase.PROFILE_TYPE.page){a=_tx("\u05d4\u05de\u05d5\u05d3\u05e2\u05d4 \u05e0\u05d9\u05e8\u05d0\u05d9\u05ea \u05db\u05e2\u05ea \u05e2\u05dc \u05e7\u05d9\u05e8 \u05d4\u05e2\u05de\u05d5\u05d3.");}else if(this._profileType==FeedFormBase.PROFILE_TYPE.group){a=_tx("\u05d4\u05ea\u05d2\u05d5\u05d1\u05d4 \u05de\u05d5\u05e6\u05d2\u05ea \u05db\u05e2\u05ea \u05e2\u05dc \u05d4\u05e7\u05d9\u05e8 \u05e9\u05dc \u05d4\u05e7\u05d1\u05d5\u05e6\u05d4.");}else if(this._hasTargets){a=_tx("\u05d4\u05de\u05d5\u05d3\u05e2\u05d4 \u05db\u05e2\u05ea \u05e0\u05d9\u05ea\u05e0\u05ea \u05dc\u05e6\u05e4\u05d9\u05d9\u05d4 \u05e2\u05dc \u05e7\u05d9\u05e8 \u05d7\u05d1\u05e8\u05da.");}else a=_tx("\u05d4\u05e4\u05e8\u05e1\u05d5\u05dd \u05e2\u05db\u05e9\u05d9\u05d5 \u05d6\u05de\u05d9\u05df \u05d1\u05e7\u05d9\u05e8 \u05e9\u05dc\u05da \u05d5\u05d1\u05d3\u05e3 \u05d4\u05d1\u05d9\u05ea \u05e9\u05dc \u05d7\u05d1\u05e8\u05d9\u05da.");this.showConfirmedWithMessage(a,b);};FeedFormBase.prototype.showConfirmedWithMessage=function(c,e){this.attachProperties(e.payload.userData);var b='<div class="interim_status">'+c+'</div>';var f=_tx("\u05d4\u05d5\u05d3\u05e2\u05ea\u05da \u05e4\u05d5\u05e8\u05e1\u05de\u05d4");if(this._dialog){this._dialog.setBody(b);this._dialog.setTitle(f);this._dialog.setButtons(Dialog.OK);this._dialog.setButtonsMessage('');}else{$('dialog_body').innerHTML=b;var d=ge('publish');if(d!=null)DOM.remove(d);var a=ge('cancel');if(a!=null)a.value=_tx("\u05d1\u05d5\u05e6\u05e2");}setTimeout(this._finish.bind(this),2500);return false;};FeedFormBase.prototype._enableSubmitButtons=function(){var b=['send','publish'];for(var c=0;c<b.length;c++){var a=ge(b[c]);if(a){a.disabled=false;break;}}};FeedFormBase.prototype._showApplicationError=function(b){this._enableSubmitButtons();var d=b.getPayload().userData;var c=function(f){var e=(f&&d&&d.errorMessage)?d.errorMessage:null;var g=d&&d.errorTitle?d.errorTitle:_tx("\u05d0\u05d9\u05e8\u05e2\u05d4 \u05e9\u05d2\u05d9\u05d0\u05d4 \u05d1\u05d9\u05d9\u05e9\u05d5\u05dd. \u05d0\u05e0\u05d0 \u05e0\u05e1\u05d4 \u05e9\u05d5\u05d1 \u05de\u05d0\u05d5\u05d7\u05e8 \u05d9\u05d5\u05ea\u05e8.");(new ErrorDialog()).showError(g,e);};var a=b.getError();if(a==kError_Platform_ApplicationResponseInvalid){if(d.showDebug){c(true);}else if(this._continuation){this._continuation();}else c(false);}else c(true);return false;};function FeedForm(){this.parent.construct(this);}FeedForm.extend('FeedFormBase');FeedForm.attachSubmitHandler=function(b,a,c){b.onsubmit='';b.listen('submit',function(e,d,f,event){FeedForm.shouldShowLoadingToSelf=f;new FeedForm().setForm(e).setAppId(d).show();return false;}.curry(b,a,c));};FeedForm.prototype._setPublishButtonText=function(a){this.publish_button.value=a;};FeedForm.prototype._setCancelButtonText=function(a){this.cancel_button.value=a;};FeedForm.prototype.shouldShowLoading=function(){return FeedForm.shouldShowLoadingToSelf;};FeedForm.prototype.show=function(){var b={};if(this._form){b={callback:this._form.getAttribute('action'),elements:serialize_form(this._form)};}else if(this._elements)b.elements=this._elements;var a={app_id:this._appid,feedform_type:this._storyType,feed_info:this._feedData,user_message_prompt:this._userMessagePrompt,user_message:this._userMessage.value,preview:true,feed_target_type:'self_feed',extern:this._connectLocation};copy_properties(a,b);return this._showBase(a);};FeedForm.prototype.cancelFeed=function(){this._finish();};FeedForm.prototype.confirmFeed=function(){var a={feed_info:this._feedData,feedform_type:this._storyType,preview:false,feed_target_type:'self_feed',app_id:this._appid,size:FeedFormBase.SIZES[this._currentSize],extern:this._connectLocation};this._confirm(a);};function MultiFeedForm(){this.parent.construct(this);this._hasTargets=true;}MultiFeedForm.extend('FeedFormBase');MultiFeedForm.prototype.setPrefillId=function(a){if(a>0){this._prefillId=a;}else this._prefillId=null;return this;};MultiFeedForm.prototype.removeRecipient=function(a){this._toIds=this._toIds.filter(function(b){return b!=a;});if(this._toIds.length==0){this._finish();}else DOM.remove('sp'+a);return false;};MultiFeedForm.prototype.confirmFeed=function(){var a={feed_info:this._feedData,feedform_type:this._storyType,to_ids:this._toIds,preview:false,feed_target_type:'multi_feed',app_id:this._appid,size:FeedFormBase.SIZES[this._currentSize],extern:this._connectLocation};this._confirm(a);};MultiFeedForm.prototype.shouldShowLoading=function(){return FeedFormBase.shouldShowLoadingToOthers;};MultiFeedForm.prototype.show=function(){var c=[];if(this._prefillId){c.push(this._prefillId);}else{var d=this._form.getElementsByTagName('input');for(var b=0;b<d.length;b++)if(d[b].getAttribute('fb_protected')=='true'&&(CSS.hasClass(d[b],'fb_token_hidden_input')||d[b].name=='ids[]'||d[b].name=='friend_selector_id')&&(d[b].type!='checkbox'||d[b].checked))c.push(d[b].value);}this._toIds=c;var a={app_id:this._appid,to_ids:this._toIds,callback:this._form.action,preview:true,form_id:this._form.id,prefill:(this.prefillId>0),elements:serialize_form(this._form),user_message_prompt:this._userMessagePrompt,user_message:this._userMessage.value,feed_target_type:'multi_feed',extern:this._connectLocation};return this._showBase(a);};MultiFeedForm.prototype.attachHandlers=function(a){for(var b=0;b<this._toIds.length;b++){var c=ge('spl_'+this._toIds[b]);if(c)c.onclick=this.removeRecipient.bind(this,this._toIds[b]);}this.parent.attachHandlers(a);return this;};function TargetFeedForm(){this.parent.construct(this);}TargetFeedForm.extend('MultiFeedForm');TargetFeedForm.prototype.confirmFeed=function(){var a={feed_info:this._feedData,feedform_type:this._storyType,to_ids:this._toIds,preview:false,feed_target_type:'target_feed',app_id:this._appid,size:FeedFormBase.SIZES[this._currentSize],extern:this._connectLocation};this._confirm(a);};TargetFeedForm.prototype.setTarget=function(a){this._toIds=[a];return this;};TargetFeedForm.prototype.show=function(){var a={app_id:this._appid,to_ids:this._toIds,feed_info:this._feedData,preview:true,prefill:(this.prefillId>0),user_message_prompt:this._userMessagePrompt,user_message:this._userMessage.value,feed_target_type:'target_feed',extern:this._connectLocation};return this._showBase(a);};
var FBML=(function(){var zb={};function za(zr,zt,zs){var zq=document.createElement('INPUT');zq.name=zr.getAttribute('idname');zq.type='hidden';zq.setAttribute('fb_protected','true');zq.typeahead=this;if(zr.form)zr.form.appendChild(zq);this._idInput=zq;return this.parent.construct(this,zr,zt,zs);}za.extend('typeaheadpro');za.prototype.updateID=function(zq){if(zq.i){this._idInput.value=zq.i;}else if(zq.is){this._idInput.value=zq.is;}else this._idInput.value='';};za.prototype.destroy=function(){this._idInput.parentNode.removeChild(this._idInput);this._idInput.typeahead=null;this._idInput=null;this.parent.destroy();};za.prototype._onselect=function(zq){this.updateID(zq);this.parent._onselect(zq);};var a=new Object();function y(zq){if(window.console)window.console.log('Facebook FBML Mock AJAX ERROR: '+zq);return false;}function h(zq,zr,zt,zs){if(!zq['url'])return y("no input with id url in form");if(!zq['fb_sig_api_key'])return y("no input with id fb_api_key in form");if(zt)zt();g(zq,zr,zs);}function g(zq,zr,zs){new AsyncRequest().setURI('/fbml/ajax/attach.php').setData(zq).setMethod('POST').setHandler(function(zt){if(zs)zs();if(!zr.removed)set_inner_html(zr,zt.getPayload().html);}.bind(this)).send();}function i(zr){if(zr=='wall'){var zq=wallAttachments;}else if(zr=='message')var zq=inboxAttachments;if(zq){var zv=ge(zq.edit_id);var zt=zq.get_all_form_elements(zv);var zu=Object();for(var zs=0;zs<zt.length;zs++)if(!(zt[zs].type=="radio"||zt[zs].type=="checkbox")||zt[zs].checked)zu[zt[zs].name]=zt[zs].value;zu.context=zq.context;zu.action='edit';g(zu,zv);}}function l(zq,zt,zu,zv,zr,zs){this.requireLogin(zq,function(){return c(zu,zv,zr,zs);});return false;}function c(zx,zy,zq,zs){var zw=ge(zx);if(!zw)return y("target "+zx+" not found");var zr=zw.getAttribute("fbcontext");var zv=FBML.Contexts[zr];if(!zq)return y("You must either specify a clickrewriteform (an id) or use the clickrewrite attribute inside a form");var zt=typeof this.PROFILE_OWNER_ID=='undefined'?0:this.PROFILE_OWNER_ID;var zu=serialize_form(zq);zu.fb_mockajax_context=zv;zu.fb_mockajax_context_hash=zr;zu.fb_mockajax_url=zy;zu.fb_target_id=zt;zu.fb_mockajax_rewrite_id=zx;new AsyncRequest().setURI('/fbml/mock_ajax_proxy.php').setMethod("POST").setFBMLForm().setData(zu).setHandler(function(zza){var zz=zza.getPayload();if(zz.ok){set_inner_html(zw,zz.html);}else return y(zz.error_message);FBML.mockAjaxResponse=zz;return zz.ok;}.bind(this)).setErrorHandler(function(zz){return y("Failed to successfully retrieve data from Facebook when making mock AJAX call to rewrite id "+zx);}.bind(this)).send();if(zs)DOM.setContent(zw,HTML(zs));return false;}function r(zq){return q(zq,"");}function s(zv){var zt=null;if(zt=ge(zv)){var zs=zt.parentNode.innerHTML;zt.id='dialog_invoked_'+zt.id;var zq=parseInt(zt.getAttribute('fb_dialog_width'));var zu=zt.cloneNode(true);DOM.setContent(zt,'');var zr=new Dialog();if(zq)zr.setContentWidth(zq);zr.setImmediateRendering(true).setStackable(true).setBody(zs).setFullBleed(true).show();zb[zt.id]={elem:zu,dialog:zr};}return false;}function u(zv){var zr=null;var zq='dialog_invoked_'+zv;for(dialog_id in zb)if(zr=ge(dialog_id)){var zt=zr.id.replace('dialog_invoked_','');var zs=null;if(zs=ge(zt))zs.id='dialog_closed_'+zt;var zu=zr.parentNode;DOM.setContent(zu,'');zu.appendChild(zb[dialog_id].elem);zb[dialog_id].elem.id=zt;}if(zb[zq].dialog)zb[zq].dialog.hide();}function o(zq){return q(zq,"none");}function t(zr){var zq=ge(zr);if(!zq){return y("Could not find target "+zr);}else{zq.style.display=(zq.style.display=="none")?'':'none';return false;}}function q(zs,zq){var zr=ge(zs);if(!zr){return y("Could not find target "+zs);}else{zr.style.display=zq;return false;}}function n(zq){return p(zq,'');}function m(zq){return p(zq,'disabled');}function p(zs,zq){var zr=ge(zs);if(!zr){return y("Could not find target "+zs);}else{zr.disabled=zq;return false;}}function z(zq,zr){new AsyncRequest().setURI('/ajax/api/tos.php').setData({app_id:zq,grant_perm:1,profile_id:typeof PROFILE_OWNER_ID=='undefined'?0:PROFILE_OWNER_ID,api_key:$('api_key').value,auth_token:$('auth_token').value,connect:this.connectParams}).setHandler(bind(this,function(zt){if(zt.getPayload()){var zu=zt.getPayload();if(zr){var zs=ge(zr);f(zs,zu);if(this.loginContinuation)this.loginContinuation=this.loginContinuation.bind(zs);}if(this.sendParams)if(this.loginContinuation)this.loginContinuation=this.loginContinuation.bind(null,zu);}this.loginDialog&&this.loginDialog.hide();this.loginContinuation&&this.loginContinuation();this.loginCancellation=this.loginContinuation=this.loginDialog=null;})).send();}function k(){this.loginCancellation&&this.loginCancellation();this.loginDialog&&this.loginDialog.hide();this.loginContinuation=this.loginCancellation=this.loginDialog=null;}function f(zr,zq){var zs;for(zs=zr.childNodes.length-1;zs>=0;zs--)if(zr.childNodes[zs].name&&zr.childNodes[zs].name.indexOf('fb_sig')==0)zr.removeChild(zr.childNodes[zs]);for(keyVar in zq)DOM.appendContent(zr,$N('input',{name:keyVar,value:zq[keyVar],type:'hidden'}));}function e(zr,zq){this.grantedPerms=true;if(zr)DOM.appendContent(zr,$N('input',{name:'fb_perms_approved',value:'1',type:'hidden'}));Dialog.getCurrent()._submitForm('POST','/fbml/ajax/permissions.php',zq);return false;}function d(zr,zq){if(window.ApiExtendedPermissions&&window.ApiExtendedPermissions.closeHandler)window.ApiExtendedPermissions.closeHandler();if(this.grantedPerms)zr();if(zq)zq.submit();}function zc(zq,zv,zu,zt){var zr=new AsyncRequest().setURI('/fbml/ajax/permissions.php').setData({app_id:zq,perms:zv});this.grantedPerms=false;var zs=new Dialog().setAsync(zr).setHandler(e.bind(this,zt)).setCloseHandler(d.bind(this,zu,zt)).show();}function zd(zq,zu,zs){var zr=new AsyncRequest().setURI('/fbml/ajax/permissions.php').setData({app_id:zq,perms_string:zu});this.grantedPerms=false;var zv=this;var zt=new Dialog().setAsync(zr).setHandler(e.bind(this,null)).setCloseHandler(function(){d.call(zv,bagofholding,null);if(zv.grantedPerms&&this.getUserData())zs(this.getUserData().profile_id);}).show();}function zm(zs,zq,zr,zt){b(function(){FB.Connect.showPermissionDialog(zs,zq,zr,zt);});}function zk(zq){b(function(){FB.Connect.showBookmarkDialog(zq);});}function w(zq,zr){b(function(){FB.Connect.createApplication(zq,zr);});}function zn(zw,zs,zq,zv,zx,zu,zt,zr){b(function(){FB.Connect.streamPublish(zw,zs,zq,zv,zx,zu,zt,zr);});}function b(zq){Arbiter.subscribe('PLATFORM_HAS_SESSION_DATA',function(event,zr){FB.init({apiKey:zr.api_key,xdChannelUrl:"/xd_receiver_v0.4.php"});FB.ensureInit(function(){FB.Facebook.apiClient.set_session(zr.session);zq();});});}function zl(zq,zw,zx,zr,zv,zs,zz,zy){var zt={template_id:zw,template_data:zx,body_general:zr};var zu;if(zv&&(!hasArrayNature(zv)||zv.length>0)){if(hasArrayNature(zv))zv=zv[0];zu=new TargetFeedForm().setTarget(zv);}else zu=new FeedForm();zu.setContinuation(zs).setFeedData(zt).setAppId(zq).setUserMessagePrompt(zz).setUserMessage(zy).show();}function v(){if(this.loginDialog)this.loginDialog.close();}function zi(zq,zs,zr,zt,zw,zv){if(this.loginDialog)return;var zu=zt?zt.id:'';this.sendParams=zw;this.connectParams=zv?zv:false;this.loginDialog=new Dialog().setStackable(true).setClassName('api_confirmation');this.loginContinuation=zs;this.loginCancellation=zr;new AsyncRequest().setURI('/ajax/api/tos.php').setData({login_form_id:zu,app_id:zq,profile_id:typeof PROFILE_OWNER_ID=='undefined'?0:PROFILE_OWNER_ID,next:document.location.href}).setReadOnly(true).setHandler(bind(this,function(zx,zz){var zy=zz.getPayload();if(zy){if(zy.redirect){goURI(zy.uri);}else this.loginDialog.setTitle(zy.title).setBody(zy.content).show();}else{zx();this.loginCancellation=null;this.loginContinuation=null;this.loginDialog=null;}},zs)).send();}function zj(zzc,zq,zzd,zx,zzb,zy,zza){var zz='';if(!zzb){if(zy)zzc.onSubmit=fsth.captured_event;zz=$('message').value;}if(zza){var zv=[];zv.push(zza);}else{var zw=zzc.getElementsByTagName('input');var zv=[];var zt=[];for(var zu=0;zu<zw.length;zu++)if(zw[zu].getAttribute('fb_protected')=='true'&&(zw[zu].name=='ids[]'||zw[zu].name=='friend_selector_id')&&(zw[zu].type!='checkbox'||zw[zu].checked)){zv.push(zw[zu].value);}else if(zw[zu].getAttribute('fb_protected')=='true'&&zw[zu].name=='emails[]')zt.push(zw[zu].value);}var zs={app_id:zq,to_ids:zv,to_emails:zt,request_type:zzd,invite:zx,content:zzc.getAttribute('content'),preview:zzb,is_multi:zy,form_id:zzc.id,prefill:(zza>0),message:zz,donot_send:ge('donotsend')?$('donotsend').checked:false};var zr=new AsyncRequest().setURI('/fbml/ajax/prompt_send.php').setData(zs);if(zzb){new Dialog().setClassName('req_dialog').setAsync(zr).setStackable(true).show();}else{zr.setHandler(function(zze){zzc.submit();});new Dialog().setAsync(zr);}return false;}function j(zq){if(Dialog.getCurrent()){Dialog.getCurrent().hide();return;}generic_dialog.get_dialog(zq).fade_out(100);}function zf(zr){var zt=$('sp'+zr);var zs=zt.parentNode;zs.removeChild(zt);for(var zq=0;zq<zs.childNodes.length;zq++)if(zs.childNodes[zq].nodeName=='SPAN')return false;generic_dialog.get_dialog(zs).fade_out(100);return false;}function zh(zr,zu,zt){var zs=zu.getElementsByTagName('input');for(var zq=0;zq<zs.length;zq++)if(((zs[zq].name=='emails[]')||(zs[zq].name=='ids[]'))&&(zs[zq].value==zr)){delNode=zs[zq].parentNode.parentNode.parentNode.parentNode.parentNode.token;if(delNode)delNode.remove(false);}zf(zr);return false;}function zg(zu,zt,zs){if(zs){if(fs.selected_ids[zu]){fs.unselect(zu);fs.force_reset();}else{zh(zu,zt,zs);return false;}}else{var zr=zt.getElementsByTagName('input');for(var zq=0;zq<zr.length;zq++)if(zr[zq].getAttribute('fb_protected')=='true'&&zr[zq].value==zu)if(zr[zq].name=='ids[]'){if(zr[zq].type=='checkbox'){if(zr[zq].checked)zr[zq].click();}else zr[zq].parentNode.parentNode.parentNode.parentNode.parentNode.token.remove(true);}else if(zr[zq].name=='friend_selector_id'){zr[zq].typeahead.select_suggestion(false);zr[zq].typeahead.set_value('');zr[zq].value='';}}zf(zu);return false;}var zo=function(zq){var zt=zq.getElementsByTagName('a');for(var zs=0;zs<zt.length;zs++)if(!zt[zs].getAttribute('flash'))addEventBase(zt[zs],'click',Event.kill);var zr=zq.getElementsByTagName('form');for(var zs=0;zs<zr.length;zs++)zr[zs].onsubmit=function(){return false;};};var x=function(zq,zr){for(styleName in zr)zq.style[styleName]=zr[styleName];};var ze=function(zq,zr){var zs=fbjs_sandbox.getSandbox(zq);if(zs)zs.setBridgeHash(zr);};var zp=function(zq,event){if(zq.onsubmit)try{if(!zq.onsubmit(event))return;}catch(e){if(e.message=="Object doesn't support this action"){if(!zq.onsubmit())return;}else throw e;}zq.submit();};return {friendSelector:za,Contexts:a,attachCurlFromObject:h,attachFromPreview:i,clickRewriteAjax:l,clickToShow:r,clickToShowDialog:s,clickToHide:o,clickToEnable:n,clickToDisable:m,clickToToggle:t,closeDialogInvoked:u,createApplication:w,sendRequest:zj,removeTokenizerRecipient:zh,removeReqRecipient:zg,cancelDialog:j,addHiddenInputs:f,fbmlLogin:z,cancelLogin:k,requireLogin:zi,closeLoginDialog:v,showFeedDialog:zl,streamPublish:zn,promptPermission:zc,promptPermissionPro:zd,showPermissionDialog:zm,showBookmarkDialog:zk,stripLinks:zo,enforceStyle:x,registerFBJSBridge:ze,submitForm:zp};})();
function PlatformCanvasController(b,e,g,f,c,d,a,h){this.sessionKey=e;this.appName=c;this.appId=b;this.callback=d;this.api_key=a;this.isFirstPage=false;this.isIFrame=false;this._movingPage=false;this.sessionRefresh=(g*900);if(this.appId&&this.sessionKey&&this.sessionRefresh)setTimeout(this.refreshAppSession.bind(this),this.sessionRefresh);PlatformCanvasController.singleton=this;Arbiter.inform('PLATFORM_HAS_SESSION_DATA',{api_key:a,session:{session_key:e,uid:h,expires:g,secret:f}},Arbiter.BEHAVIOR_PERSISTENT);}PlatformCanvasController.AUTO_REFRESH=30000;PlatformCanvasController.prototype.setUpIFrame=function(a){PageTransitions.registerHandler(this.handleChange.bind(this));this.isIFrame=true;this.isStatic=a;};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 a=FB.IFrameUtil.CanvasUtilServer.loginResponse;FBML.requireLogin(this.appId,a.bind(null,true),a.bind(null,false),null,true,true);};PlatformCanvasController.prototype.closeLogin=function(){FBML.closeLoginDialog();};PlatformCanvasController.prototype.showFeedDialog=function(c,d,a,b,f,e){FBML.showFeedDialog(this.appId,c,d,a,b,FB.IFrameUtil.CanvasUtilServer.loginResponse.bind(null),f,e);};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(b){var a=b.getPayload();if(a.session_end>0)setTimeout(this.refreshAppSession.bind(this),this.sessionRefresh);}.bind(this)).send();};PlatformCanvasController.prototype.refreshUrl=function(c){var a=c.href;if(a.startsWith(this.callback)){var b=new URI(a.substring(this.callback.length));this.changeUrlSuffix(b,true);}return false;};PlatformCanvasController.refreshUrl=function(a){if(PlatformCanvasController.singleton)PlatformCanvasController.singleton.refreshUrl(a);};PlatformCanvasController.prototype.changeUrlSuffix=function(d,b){this.currentUri=URI.getRequestURI().getUnqualifiedURI();var c=new URI(this.getAppPrefix()+d);this.stripFbParams(c);var a=b&&PlatformCanvasController.storesIFrameHistory(this.isStatic);if(this.currentUri.toString()!=c.toString()){this.currentUri=c;this.refreshAd();PageTransitions.go(c.toString(),a);}};PlatformCanvasController.prototype.getAppPrefix=function(){return "/"+this.appName+"/";};PlatformCanvasController.prototype.convertFromApps=function(c){var a=this.getAppPrefix();var b=c.getUnqualifiedURI().toString().substring(a.length);return new URI(this.callback+b);};PlatformCanvasController.prototype.convertToApps=function(b){var a=b.toString().substring(this.callback.length);return new URI(this.getAppPrefix()+a);};PlatformCanvasController.prototype.stripFbParams=function(d){var c=d.getQueryData();var b={};for(var a in c)if((!a.startsWith("fb_")||a.startsWith("fb_force_mode"))&&!a.startsWith("_fb")&&!a.startsWith("quickling_apps"))b[a]=c[a];d.setQueryData(b);};PlatformCanvasController.prototype.refreshAd=function(){if(this.isFirstPage){this.isFirstPage=false;}else ads_refresh(this.appName,'/canvas.php');};PlatformCanvasController.prototype.handleChange=function(b){if(!b.getPath().startsWith("/"+this.appName)||this._movingPage)return false;var a=b.getUnqualifiedURI();this.stripFbParams(a);if(this.currentUri.toString()!=a.toString()){FB.IFrameUtil.CanvasUtilServer.loadNewUrl(this.convertFromApps(b).toString());this.currentUri=a;}PageTransitions.transitionComplete();return true;};PlatformCanvasController.prototype.goURI=function(b){this._movingPage=true;var a=new URI(b);a.addQueryData({_fb_q:true});PageTransitions.go(a);};PlatformCanvasController.storesIFrameHistory=function(a){if(ua.ie()){return true;}else if(ua.firefox()){if(a){return true;}else return false;}else if(ua.safari()){return false;}else return false;};var smartIframes=[];function smartSizingFrameAdded(){window.onresize=_resizeSmartFrames;smartIframes=[];var a=document.getElementsByTagName('iframe');for(var c=0;c<a.length;c++){var b=a[c];if(CSS.hasClass(b,'smart_sizing_iframe')){CSS.removeClass(b,'canvas_iframe_util');smartIframes.push(b);b.style.width=b.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 b=windowHeight();for(var c=0;c<smartIframes.length;c++){var a=smartIframes[c];var d=b-elementY(a)-61;a.style.height=d/(smartIframes.length-c)+'px';}}
var details_shown=false;function toggle_stored_cc(a){if(a.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 a=ge('cc_id');if(a)a.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 a=ge('toggle_stored_credit_card_details_link');if(!details_shown){show('stored_credit_card_details');a.innerHTML=_tx("\u05d4\u05e1\u05ea\u05e8 \u05e4\u05e8\u05d8\u05d9\u05dd");details_shown=true;}else{hide('stored_credit_card_details');a.innerHTML=_tx("\u05d4\u05e8\u05d0\u05d4 \u05e4\u05e8\u05d8\u05d9\u05dd");details_shown=false;}}function show_csc_info(b){var c=_tx("\u05e8\u05db\u05d9\u05d1 \u05d4\u05d0\u05d1\u05d8\u05d7\u05d4 \u05d4\u05e7\u05e8\u05d5\u05d9 Card Security Code (CSC) \u05de\u05ea\u05d9\u05d9\u05d7\u05e1 \u05dc\u05db\u05e8\u05d8\u05d9\u05e1\u05d9 \u05d7\u05d9\u05d5\u05d1 \u05d5\u05d6\u05d9\u05db\u05d5\u05d9 \u05d5\u05de\u05e7\u05e9\u05d4 \u05e2\u05dc \u05d6\u05d9\u05d5\u05e4\u05d9\u05dd. \u05dc\u05d4\u05dc\u05df \u05ea\u05d9\u05d0\u05d5\u05e8 \u05d2\u05e8\u05e4\u05d9 \u05e9\u05dc \u05de\u05d9\u05e7\u05d5\u05dd \u05d4\u05e8\u05db\u05d9\u05d1 \u05d1\u05db\u05e8\u05d8\u05d9\u05e1 \u05e9\u05dc\u05da. ");var d='float: left;';var g='text-align: center; margin: 5px 0;';var a='';a+='<div style="'+d+'">';a+='<img src="/images/cvv2_types/amex_csc.gif" alt="" />';a+='<p style="'+g+'">'+_tx("\u05d0\u05de\u05e8\u05d9\u05e7\u05df \u05d0\u05e7\u05e1\u05e4\u05e8\u05e1")+'</p>';a+='</div>';var f='';f+='<div style="margin-right: 8px;'+d+'">';f+='<img src="/images/cvv2_types/backofcard.gif" alt="" />';f+='<p style="'+g+'">'+_tx("\u05d5\u05d9\u05d6\u05d4,\u05de\u05d0\u05e1\u05d8\u05e8\u05e7\u05d0\u05e8\u05d3,JCB")+'</p>';f+='</div>';var e='';e+='<div class="clearfix">';e+='<p>'+c+'</p>';if(b==null){e+=f;e+=a;}else if(b==65){e+=a;}else e+=f;e+='</div>';new Dialog().setClassName('csc_type').setTitle(_tx("\u05de\u05d4\u05d5 \u05e7\u05d5\u05d3 \u05d0\u05d1\u05d8\u05d7\u05d4 \u05e9\u05dc \u05db\u05e8\u05d8\u05d9\u05e1 \u05d0\u05e9\u05e8\u05d0\u05d9?")).setBody(e).setButtons([Dialog.OK]).show();}function show_csc_validation_info(){var a='';a+='<div class="clearfix">';a+='<div style="float: left">';a+='<p style="text-align: left; margin: 5px 0;">';a+=_tx("\u05e2\u05dc \u05de\u05e0\u05ea \u05dc\u05d4\u05d0\u05d1\u05e7 \u05d1\u05d4\u05d5\u05e0\u05d0\u05d5\u05ea \u05db\u05e8\u05d8\u05d9\u05e1\u05d9 \u05d0\u05e9\u05e8\u05d0\u05d9, \u05d4\u05ea\u05d7\u05dc\u05e0\u05d5 \u05dc\u05d0\u05db\u05d5\u05e3 \u05d1\u05d3\u05d9\u05e7\u05ea \u05ea\u05e7\u05e4\u05d5\u05ea \u05e7\u05d5\u05d3 CSC \u05d1\u05ea\u05e9\u05dc\u05d5\u05de\u05d9 \u05db\u05e8\u05d8\u05d9\u05e1 \u05d0\u05e9\u05e8\u05d0\u05d9. \u05e2\u05d1\u05d5\u05e8 \u05de\u05e1\u05e4\u05e8\u05d9 \u05d0\u05e9\u05e8\u05d0\u05d9 \u05e9\u05e9\u05de\u05e8\u05e0\u05d5 \u05d1\u05e2\u05d1\u05e8, \u05d4\u05de\u05e9\u05de\u05e2\u05d5\u05ea \u05d4\u05d9\u05d0 \u05e9\u05d4\u05de\u05e1\u05e4\u05e8\u05d9\u05dd \u05d9\u05e6\u05d8\u05e8\u05db\u05d5 \u05dc\u05e2\u05d1\u05d5\u05e8 \u05d1\u05d3\u05d9\u05e7\u05ea CSC \u05e4\u05e2\u05dd \u05d0\u05d7\u05ea \u05db\u05d3\u05d9 \u05dc\u05d0\u05e4\u05e9\u05e8 \u05e9\u05d9\u05de\u05d5\u05e9 \u05e2\u05ea\u05d9\u05d3\u05d9. \u05dc\u05d0 \u05ea\u05e9\u05dc\u05d7 \u05d0\u05dc\u05d9\u05da \u05d4\u05d5\u05d3\u05e2\u05d4 \u05e0\u05d5\u05e1\u05e4\u05ea \u05de\u05e8\u05d2\u05e2 \u05e9\u05d4\u05db\u05e8\u05d8\u05d9\u05e1 \u05e0\u05de\u05e6\u05d0 \u05db\u05ea\u05e7\u05e3. ");a+='</p>';a+='</div>';a+='</div>';new Dialog().setClassName('validation').setTitle(_tx("\u05dc\u05de\u05d4 \u05e6\u05e8\u05d9\u05da \u05d0\u05d9\u05de\u05d5\u05ea CSC?")).setBody(a).setButtons([Dialog.OK]).show();}function get_selected_cc_type(a,b){if(b){cc_type=get_form_select_value(get_dialog_pro_elem(a));}else cc_type=get_form_select_value(ge(a));return cc_type;}function validate_csc(a,d){if(d){var c=get_dialog_pro_elem('cc_cvv2');}else var c=ge('cc_cvv2');var b=get_selected_cc_type(a,d);if(b==65){if(c.value.length!=4){c.style.border="1px solid red;";}else c.style.border="";}else if(c.value.length!=3){c.style.border="1px solid red;";}else c.style.border="";}function get_dialog_pro_elem(c){var b=document.getElementsByName(c);var d;var e=null;for(d=0;d<b.length;d++){var a=b[d];if(DOM.contains('pop_content',a))e=a;}return e;}

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