/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  February 9th 2010 7:54:12 PM PST                             */
/*      Machine:  10.16.139.110                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/devsite/test_console.js h:5czb3n7v                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/devsite/test_console.js                                   */

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

var ajax_uri='test_console_ajax.php';function callApplicationChange(_L0){var url=(_L0===undefined)?'api':_L0;var _L2=ge('app_id');var _L3=_L2.options[_L2.selectedIndex].value;goURI('/tools.php?'+url+'&app_id='+_L3);}function callMethod(){var _L0=ge('version');var _L1=_L0.options[_L0.selectedIndex].value;var _L2=ge('app_id');var _L3=_L2.options[_L2.selectedIndex].value;var _L4=ge('method');var _L5=_L4.options[_L4.selectedIndex].value;var _L6=api_method_info[_L1][_L5];var _L7=$('session_key').value;var _L8=$('callback').value;var _L9=ge('format');_L9=_L9.options[_L9.selectedIndex].value;var _La={format:_L9,method:_L5,app_id:_L3,v:_L1};var _Lb=ge('without_session');if(!_Lb||_Lb.checked!=true)_La['session_key']=_L7;for(var ii=0;ii<_L6.length;ii++){var arg=$('val_'+ii).value;_La[_L6[ii]]=arg;}if(_L9!='php')_La['callback']=_L8;var _Le=ge('profiler');if(_Le){var _Lf=_Le.options[_Le.selectedIndex].value;if(_Lf>0)_La['profiler']=_Lf;}new AsyncRequest().setURI(ajax_uri).setData(_La).setHandler(function(_L10){callMethodResponse(_L5,_L6,_L10.getPayload());}).setErrorHandler(function(_L10){if(_L10.getError()){var _L11=ge('warn_user');var html='<div id="error">'+'<h2><span id="status_title">'+_L10.getErrorSummary()+'</span></h2><p>'+_L10.getErrorDescription()+'</p></div>';_L11.innerHTML=html;CSS.setClass(_L11,'show_warning');}else window.location.reload();if(_L10.getPayload())callMethodResponse(_L5,_L6,_L10.getPayload());}).send();}function callMethodResponse(_L0,_L1,_L2){var _L3=ge('php_request_code');var _L4=ge('trace');var _L5=ge('format');_L5=_L5.options[_L5.selectedIndex].value;var _L6=JSON.parse(_L2);var div=document.createElement('div');var pre=document.createElement('pre');pre.appendChild(document.createTextNode(_L6["response"].replace(/\n/g,"\u000A\u000D")));pre.setAttribute('class','pre');div.appendChild(pre);div.setAttribute('class',_L5);_L4.replaceChild(div,_L4.firstChild);_L3.replaceChild(document.createTextNode(_L6["php_request_code"].replace(/\n/g,"\u000A\u000D")),_L3.firstChild);}function callMethodChange(){var _L0=ge('version');var _L1=_L0.options[_L0.selectedIndex].value;var _L2=ge('method');var _L3=_L2.options[_L2.selectedIndex].value;var _L4=api_method_info[_L1][_L3];if(_L3.indexOf('fql.')==0){var _L5=ge('val_fql');if(_L5){var _L6=ge('val_0');_L6.setAttribute('id','val_orig_0');_L5.setAttribute('id','val_0');hide(_L6);show(_L5);}}else{var _L6=ge('val_orig_0');if(_L6){var _L5=ge('val_0');_L6.setAttribute('id','val_0');_L5.setAttribute('id','val_fql');hide(_L5);show(_L6);}}for(i=0;i<max_method_args;i++)if(_L4[i]){$('label_'+i).innerHTML=_L4[i];$('val_'+i).value='';show('arg_'+i);}else hide('arg_'+i);$('documentation').href='http://wiki.developers.facebook.com/index.php/'+_L3;}function callVersionChange(){var _L0=ge('version');var _L1=_L0.options[_L0.selectedIndex].value;var _L2=ge('user_id');_L2.value=user_ids[_L1];var _L3=ge('method');var _L4=api_method_info[_L1];if(_L1!=php_client_supported_version){hide('response_format');var _L5=ge('format');_L5.selectedIndex=0;}else show('response_format');_L3.options.length=method_counts[_L1];var _L6=0;var i=0;for(var _L8 in _L4){_L3.options[i].text=_L8;_L3.options[i].value=_L8;if(default_methods[_L1]==_L8)_L6=i;++i;}_L3.selectedIndex=_L6;callMethodChange();}function callResponseChange(){var _L0=ge('format');var _L1=_L0.options[_L0.selectedIndex].value;var _L2=ge('callback');if(_L1=='php'){_L2.disabled=true;}else _L2.disabled=false;}

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