/*
HTTP Host: static.ak.fbcdn.net
Generated: March 21st 2010 10:27:30 AM PDT
Machine: 10.16.140.101
Locale: nu_ll
Path: js/3sw970ovbcw0k4w8.pkg.js
*/

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

function ConnectPicWidgetWizard(a){this.parent.construct(this,a);}ConnectPicWidgetWizard.extend('ConnectWidgetWizard');ConnectPicWidgetWizard.prototype.setPicSize=function(a){this.pic_size=a;this.refresh();};ConnectPicWidgetWizard.prototype.getPicSize=function(){return this.pic_size;};function ConnectWidgetWizardPage(a){this.parent.construct(this,a);}ConnectWidgetWizardPage.extend('ConnectWidgetWizard');ConnectWidgetWizardPage.prototype.showWizard=function(){this.refresh();};function ConnectLoginButtonWizard(a){this.parent.construct(this,a);this.wizard=$('login_button');this.sizeselector=$('select_button_size');this.button_size=this.sizeselector.options[this.sizeselector.selectedIndex].value;this.showSelector(this.sizeselector,this.setButtonSize.bind(this));this.custom_text=$('custom_text');Event.listen(this.custom_text,'click',function(d){this.custom_button.checked=true;this.updateButtonText();}.bind(this));Event.listen(this.custom_text,'keyup',function(d){this.updateButtonText();}.bind(this));this.button_text_radio=document.getElementsByName('button_text');for(var b=0;b<this.button_text_radio.length;b++){var c=this.button_text_radio[b];if(c.checked){this.button_text=c.value;}else if(c.value=='Custom')this.custom_button=c;Event.listen(c,'click',function(d){this.updateButtonText();}.bind(this));}this.onlogin_input=$('button_onlogin');this.onlogin_str=this.onlogin_input.value;Event.listen(this.onlogin_input,'change',function(d){this.setOnlogin(this.onlogin_input.value);}.bind(this));}ConnectLoginButtonWizard.extend('ConnectWidgetWizard');ConnectLoginButtonWizard.prototype.getTextareaDom=function(){if(!this.textarea)this.textarea=$('login_button_code');return this.textarea;};ConnectLoginButtonWizard.prototype.getConnectScript=function(){return '';};ConnectLoginButtonWizard.prototype.getConnectInit=function(){return '';};ConnectLoginButtonWizard.prototype.getWidgetMarkup=function(){var a=this.getOnlogin()?' onlogin="'+this.getOnlogin()+'"':'';return '<fb:login-button v="2" size="'+this.getButtonSize()+'"'+a+'>'+this.getButtonText()+'</fb:login-button>';};ConnectLoginButtonWizard.prototype.updateButtonText=function(b){if(!b){for(var a=0;a<this.button_text_radio.length;a++){b=this.button_text_radio[a];if(b.checked)break;}if(b.value=='Custom'){this.button_text=htmlspecialchars(this.custom_text.value);}else this.button_text=b.value;this.refresh();}};ConnectLoginButtonWizard.prototype.getButtonText=function(){return this.getButtonSize()=='icon'?'':this.button_text;};ConnectLoginButtonWizard.prototype.setButtonSize=function(a){this.button_size=a;this.refresh();};ConnectLoginButtonWizard.prototype.getButtonSize=function(){return this.button_size;};ConnectLoginButtonWizard.prototype.setOnlogin=function(a){if(this.onlogin_str!=a){this.onlogin_str=a;this.refresh();}};ConnectLoginButtonWizard.prototype.getOnlogin=function(){return this.onlogin_str;};function ConnectProfilePicWizard(a){this.parent.construct(this,a);this.wizard=$('profile_pic');this.sizeselector=$('select_profile_pic_size');this.pic_size=this.sizeselector.options[this.sizeselector.selectedIndex].value;this.showSelector(this.sizeselector,this.setPicSize.bind(this));this.uid='';this.uid_input=$('profile_pic_uid');Event.listen(this.uid_input,'change',function(b){this.setUid(this.uid_input.value);}.bind(this));}ConnectProfilePicWizard.extend('ConnectPicWidgetWizard');ConnectProfilePicWizard.prototype.getTextareaDom=function(){if(!this.textarea)this.textarea=$('profile_pic_code');return this.textarea;};ConnectProfilePicWizard.prototype.getConnectScript=function(){return '';};ConnectProfilePicWizard.prototype.getConnectInit=function(){return '';};ConnectProfilePicWizard.prototype.getWidgetMarkup=function(){return '<fb:profile-pic uid="'+this.getUid()+'" size="'+this.getPicSize()+'" facebook-logo="true'+'"></fb:profile-pic>';};ConnectProfilePicWizard.prototype.setUid=function(a){if(this.uid!=a){this.uid=a;this.refresh();}};ConnectProfilePicWizard.prototype.getUid=function(){if(!this.uid)return 'loggedinuser';return this.uid;};function ConnectNameWizard(a){this.parent.construct(this,a);this.wizard=$('user_name');this.use_you_checkbox=$('use_you');this.use_you=this.use_you_checkbox.checked;Event.listen(this.use_you_checkbox,'change',function(b){this.updateUseYou();}.bind(this));this.name_link_checkbox=$('name_link');this.name_link=this.name_link_checkbox.checked;Event.listen(this.name_link_checkbox,'change',function(b){this.updateNameLink();}.bind(this));this.uid_input=$('name_uid');this.uid=this.uid_input.value;Event.listen(this.uid_input,'change',function(b){this.setUid(this.uid_input.value);}.bind(this));}ConnectNameWizard.extend('ConnectWidgetWizard');ConnectNameWizard.prototype.getTextareaDom=function(){if(!this.textarea)this.textarea=$('user_name_code');return this.textarea;};ConnectNameWizard.prototype.getConnectScript=function(){return '';};ConnectNameWizard.prototype.getConnectInit=function(){return '';};ConnectNameWizard.prototype.getWidgetMarkup=function(){return '<fb:name uid="'+this.getUid()+'" useyou="'+this.getUseYou()+'" linked="'+this.getNameLink()+'"></fb:name>';};ConnectNameWizard.prototype.updateNameLink=function(){if(this.name_link!=this.name_link_checkbox.checked){this.name_link=this.name_link_checkbox.checked;this.refresh();}};ConnectNameWizard.prototype.getNameLink=function(){return this.name_link;};ConnectNameWizard.prototype.updateUseYou=function(){if(this.use_you!=this.use_you_checkbox.checked){this.use_you=this.use_you_checkbox.checked;this.refresh();}};ConnectNameWizard.prototype.getUseYou=function(){return this.use_you;};ConnectNameWizard.prototype.setUid=function(a){if(this.uid!=a){this.uid=a;this.refresh();}};ConnectNameWizard.prototype.getUid=function(){if(!this.uid)return 'loggedinuser';return this.uid;};function ConnectFriendsWizard(a){this.parent.construct(this,a);this.wizard=$('friends');this.sizeselector=$('select_friends_size');this.pic_size=this.sizeselector.options[this.sizeselector.selectedIndex].value;this.showSelector(this.sizeselector,this.setPicSize.bind(this));this.nfselector=$('select_num_friends');this.num_friends=this.nfselector.options[this.nfselector.selectedIndex].value;this.showSelector(this.nfselector,this.setNumFriends.bind(this));}ConnectFriendsWizard.extend('ConnectPicWidgetWizard');ConnectFriendsWizard.prototype.getTextareaDom=function(){if(!this.textarea)this.textarea=$('friends_code');return this.textarea;};ConnectFriendsWizard.prototype.getConnectScript=function(){return '';};ConnectFriendsWizard.prototype.getConnectInit=function(){var a='<div id="profile_pics"></div>\r\n'+'<script type="text/javascript">\r\n'+'var widget_div = document.getElementById("profile_pics");\r\n';return a;};ConnectFriendsWizard.prototype.getConnectEnd=function(){return '</script>';};ConnectFriendsWizard.prototype.getWidgetScript=function(){var a=this.getNumFriends();var c=this.getPicSize();var b='FB.ensureInit(function () {\r\n'+'  FB.Facebook.get_sessionState().waitUntilReady(function() {\r\n'+'  FB.Facebook.apiClient.friends_get(null, function(result) {\r\n'+'    var markup = "";\r\n'+'    var num_friends = result ? Math.min('+a+', result.length) : 0;\r\n'+'    if (num_friends > 0) {\r\n'+'      for (var i=0; i<num_friends; i++) {\r\n'+'        markup += \r\n'+'          \'<fb:profile-pic size="'+c+'" uid="\'+result[i]+\'"'+' facebook-logo="true"></fb:profile-pic>\';\r\n'+'      }\r\n'+'    }\r\n'+'    widget_div.innerHTML = markup;\r\n'+'    FB.XFBML.Host.parseDomElement(widget_div);\r\n'+'  });\r\n'+'  });\r\n'+'});\r\n';return b;};ConnectFriendsWizard.prototype.setNumFriends=function(a){this.num_friends=a;this.refresh();};ConnectFriendsWizard.prototype.getNumFriends=function(){return this.num_friends;};function ConnectSocialMarkupWizard(a){this.parent.construct(this,a);this.wizard=DOM.find(this.controller.getWizard(),'div.connect_social_markup_wizard');this.script_text=$('body_script_tag');this.login_button_wizard=new ConnectLoginButtonWizard(a);this.profile_pic_wizard=new ConnectProfilePicWizard(a);this.name_wizard=new ConnectNameWizard(a);this.friends_wizard=new ConnectFriendsWizard(a);this.script_text.value=this.parent.getConnectScript()+this.parent.getConnectInit();}ConnectSocialMarkupWizard.extend('ConnectWidgetWizardPage');ConnectSocialMarkupWizard.prototype.refresh=function(){this.login_button_wizard.refresh();this.profile_pic_wizard.refresh();this.name_wizard.refresh();this.friends_wizard.refresh();this.parent.refresh();};ConnectSocialMarkupWizard.prototype.getPreviewDom=function(){return null;};function ConnectStreamPublishWizard(a){this.parent.construct(this,a);this.wizard=DOM.find(this.controller.getWizard(),'div.connect_streampublish_wizard');this.script_text=$('stream_script_tag');this.script_text.value=this.parent.getConnectScript()+this.parent.getConnectInit();this.initStringProperty('title_text','title_text');this.initStringProperty('image_href','image_link');this.initStringProperty('body_text','body_text');this.initStringProperty('image_src','image_src');this.initStringProperty('al_text','action_link_text');this.initStringProperty('al_href','action_link_url');}ConnectStreamPublishWizard.extend('ConnectWidgetWizardPage');ConnectStreamPublishWizard.prototype.getTextareaDom=function(){if(!this.textarea)this.textarea=$('stream_publish_code');return this.textarea;};ConnectStreamPublishWizard.prototype.getConnectScript=function(){return '';};ConnectStreamPublishWizard.prototype.getConnectInit=function(){var a='<script type="text/javascript">\r\n';return a;};ConnectStreamPublishWizard.prototype.getConnectEnd=function(){return '</script>\r\n';};ConnectStreamPublishWizard.prototype.getWidgetMarkup=function(){var a='<input type="button" onclick="callPublish(\'\','+this.getAttachment()+','+this.getActionLink()+');'+'return false;" value="Preview Dialog" />';return a;};ConnectStreamPublishWizard.prototype.getDeferredWidgetScript=function(){var a='function callPublish(msg, attachment, action_link) {\r\n'+'  FB.ensureInit(function () {\r\n'+'    FB.Connect.streamPublish(\'\', attachment, action_link);\r\n'+'  });\r\n'+'}';return a;};ConnectStreamPublishWizard.prototype.getAttachment=function(){if(!this.title_text||!this.image_href)return 'null';var a='{\'name\':\''+this.title_text+'\',\'href\':\''+this.image_href+'\'';if(this.body_text)a+=',\'description\':\''+this.body_text+'\'';if(this.image_src)a+=',\'media\':[{\'type\':\'image\',\'src\':\''+this.image_src+'\',\'href\':\''+this.image_href+'\'}]';a+='}';return a;};ConnectStreamPublishWizard.prototype.getActionLink=function(){if(!this.al_text||!this.al_href)return 'null';var a='[{\'text\':\''+this.al_text+'\',\'href\':\''+this.al_href+'\'}]';return a;};function ConnectCommentsWizard(a){this.parent.construct(this,a);this.wizard=DOM.find(this.controller.getWizard(),'div.connect_comments_wizard');this.comments_box_wizard=new ConnectCommentsBoxWizard(a);}ConnectCommentsWizard.extend('ConnectWidgetWizardPage');ConnectCommentsWizard.prototype.refresh=function(){this.comments_box_wizard.refresh();this.parent.refresh();};function ConnectCommentsBoxWizard(a){this.parent.construct(this,a);this.wizard=$('comments_box');}ConnectCommentsBoxWizard.extend('ConnectWidgetWizard');ConnectCommentsBoxWizard.prototype.getTextareaDom=function(){if(!this.textarea)this.textarea=$('comments_box_code');return this.textarea;};ConnectCommentsBoxWizard.prototype.getWidgetMarkup=function(){return '<fb:comments> </fb:comments>';};function ConnectFanWizard(a){this.parent.construct(this,a);this.wizard=DOM.find(this.controller.getWizard(),'div.connect_fan_wizard');this.fan_box_wizard=new ConnectFanBoxWizard(a);}ConnectFanWizard.extend('ConnectWidgetWizardPage');ConnectFanWizard.prototype.refresh=function(){this.fan_box_wizard.refresh();this.parent.refresh();};function ConnectLiveStreamWidgetWizard(a){this.parent.construct(this,a);this.wizard=DOM.find(this.controller.getWizard(),'div.connect_livestream_wizard');}ConnectLiveStreamWidgetWizard.extend('ConnectWidgetWizardPage');ConnectLiveStreamWidgetWizard.prototype.getTextareaDom=function(){if(!this.textarea)this.textarea=$('livestream_code');return this.textarea;};ConnectLiveStreamWidgetWizard.prototype.getWidgetMarkup=function(){var a=this.getAppId();return '<fb:live-stream event_app_id="'+a+'" xid="YOUR_EVENT_XID" width="300" height="500">'+'</fb:live-stream>';};function ConnectShareWizard(a){this.parent.construct(this,a);this.wizard=DOM.find(this.controller.getWizard(),'div.connect_share_wizard');this.share_button_wizard=new ConnectShareButtonWizard(a);this.script_text=$('share_script_tag');this.script_text.value=this.parent.getConnectScript()+this.parent.getConnectInit();}ConnectShareWizard.extend('ConnectWidgetWizardPage');ConnectShareWizard.prototype.refresh=function(){this.share_button_wizard.refresh();this.parent.refresh();};function ConnectShareButtonWizard(a){this.parent.construct(this,a);this.wizard=$('share_button');this.typeselector=$('select_share_type');this.share_type=this.typeselector.options[this.typeselector.selectedIndex].value;this.showSelector(this.typeselector,this.setShareType.bind(this));this.share_link='';this.share_link_input=$('share_link');Event.listen(this.share_link_input,'change',function(b){this.setShareLink(this.share_link_input.value);}.bind(this));}ConnectShareButtonWizard.extend('ConnectWidgetWizard');ConnectShareButtonWizard.prototype.getTextareaDom=function(){if(!this.textarea)this.textarea=$('share_button_code');return this.textarea;};ConnectShareButtonWizard.prototype.getConnectScript=function(){return '';};ConnectShareButtonWizard.prototype.getConnectInit=function(){return '';};ConnectShareButtonWizard.prototype.getWidgetMarkup=function(){return '<fb:share-button class="url'+'" href="'+this.getShareLink()+'" type="'+this.getShareType()+'"></fb:share-button>';};ConnectShareButtonWizard.prototype.setShareLink=function(a){if(this.share_link!=a){this.share_link=a;this.refresh();}};ConnectShareButtonWizard.prototype.getShareLink=function(){if(!this.share_link){var a=this.getAppData();var b=this.getAppId();if(!a[b]||!a[b].connect_url)return 'http://www.facebook.com';return a[b].connect_url;}return this.share_link;};ConnectShareButtonWizard.prototype.setShareType=function(a){this.share_type=a;this.refresh();};ConnectShareButtonWizard.prototype.getShareType=function(){return this.share_type;};
var devsiteInfo={};var ajax_uri='test_console_ajax.php';function callApplicationChange(d){var c=(d===undefined)?'api':d;var b=ge('app_id');var a=b.options[b.selectedIndex].value;URI().addQueryData({app_id:a}).go();}function callMethod(){var b=ge('app_id');var a=b.options[b.selectedIndex].value;var h=ge('method');var i=h.options[h.selectedIndex].value;var g=devsiteInfo.api_method_info[i];var m=$('session_key').value;var d=$('callback').value;var e=ge('format');e=e.options[e.selectedIndex].value;var j={format:e,method:i,app_id:a};var n=ge('without_session');if(!n||n.checked!=true)j.session_key=m;for(var f=0;f<g.length;f++){var c=$('val_'+f).value;j[g[f]]=c;}if(e!='php')j.callback=d;var k=ge('profiler');if(k){var l=k.options[k.selectedIndex].value;if(l>0)j.profiler=l;}new AsyncRequest().setURI(ajax_uri).setData(j).setHandler(function(o){callMethodResponse(i,g,o.getPayload());}).setErrorHandler(function(p){if(p.getError()){var q=ge('warn_user');var o='<div id="error">'+'<h2><span id="status_title">'+p.getErrorSummary()+'</span></h2><p>'+p.getErrorDescription()+'</p></div>';q.innerHTML=o;CSS.setClass(q,'show_warning');}else window.location.reload();if(p.getPayload())callMethodResponse(i,g,p.getPayload());}).send();}function callMethodResponse(e,c,h){var f=ge('php_request_code');var i=ge('trace');var b=ge('format');b=b.options[b.selectedIndex].value;var d=JSON.parse(h);var a=document.createElement('div');var g=document.createElement('pre');g.appendChild(document.createTextNode(d.response.replace(/\n/g,"\u000A\u000D")));g.setAttribute('class','pre');a.appendChild(g);a.setAttribute('class',b);i.replaceChild(a,i.firstChild);f.replaceChild(document.createTextNode(d.php_request_code.replace(/\n/g,"\u000A\u000D")),f.firstChild);}function callMethodChange(){var c=ge('method');var d=c.options[c.selectedIndex].value;var b=devsiteInfo.api_method_info[d];if(d.indexOf('fql.')==0){var f=ge('val_fql');if(f){var e=ge('val_0');e.setAttribute('id','val_orig_0');f.setAttribute('id','val_0');hide(e);show(f);}}else{var e=ge('val_orig_0');if(e){var f=ge('val_0');e.setAttribute('id','val_0');f.setAttribute('id','val_fql');hide(f);show(e);}}for(var a=0;a<devsiteInfo.max_method_args;a++)if(b[a]){$('label_'+a).innerHTML=b[a];$('val_'+a).value='';show('arg_'+a);}else hide('arg_'+a);$('documentation').href='http://wiki.developers.facebook.com/index.php/'+d;}function callResponseChange(){var b=ge('format');var c=b.options[b.selectedIndex].value;var a=ge('callback');if(c=='php'){a.disabled=true;}else a.disabled=false;}

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