/*
HTTP Host: static.ak.connect.facebook.com
Generated: June 19th 2010 8:00:47 PM PDT
Machine: 10.27.29.120
Location: JIT Construction: v257604
Locale: fr_FR
*/

if (!window.FB) {FB = {};} if(!FB.dynData) { FB.dynData = {"site_vars":{"canvas_client_compute_content_size_method":1,"use_postMessage":0,"use_xdProxy":0,"use_ui_server":1,"monitor_usage_regex":"somethingtoputhere.com|huffingtonpost.com|lala.com","monitor_usage_rate":0.05,"enable_custom_href":1},"ui_server_dialogs":{"bookmark.add":1,"friends.add":1},"resources":{"base_url_format":"http:\/\/{0}.connect.facebook.com\/","base_cdn_url":"http:\/\/static.ak.fbcdn.net\/","api_channel":1276616156,"api_server":1276616156,"www_channel":1276615949,"xd_proxy":1276615647,"xd_comm_swf_url":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/z6D2S\/hash\/c729bxo3.swf","share_button":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/zAB5S\/hash\/4273uaqa.gif","login_img_dark_small_short":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/zF1W2\/hash\/a969rwcd.gif","login_img_dark_medium_short":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/zEF9L\/hash\/156b4b3s.gif","login_img_dark_medium_long":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/zBIU2\/hash\/85b5jlja.gif","login_img_dark_large_short":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/z1UX3\/hash\/a22m3ibb.gif","login_img_dark_large_long":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/z7SXD\/hash\/8mzymam2.gif","login_img_light_small_short":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/zDGBW\/hash\/8t35mjql.gif","login_img_light_medium_short":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/z38X1\/hash\/6ad3z8m6.gif","login_img_light_medium_long":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/zB6N8\/hash\/4li2k73z.gif","login_img_light_large_short":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/zA114\/hash\/7e3mp7ee.gif","login_img_light_large_long":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/z4Z4Q\/hash\/8rc0izvz.gif","login_img_white_small_short":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/z900E\/hash\/di0gkqrt.gif","login_img_white_medium_short":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/z10GM\/hash\/cdozw38w.gif","login_img_white_medium_long":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/zBT3E\/hash\/338d3m67.gif","login_img_white_large_short":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/zCOUP\/hash\/8yzn0wu3.gif","login_img_white_large_long":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/zC6AR\/hash\/5pwowlag.gif","logout_img_small":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/z2Y31\/hash\/cxrz4k7j.gif","logout_img_medium":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/zAD8D\/hash\/4lsqsd7l.gif","logout_img_large":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/zB36N\/hash\/4515xk7j.gif"}};} if (!FB.locale) {FB.locale = "fr_FR";} if (!FB.localeIsRTL) {FB.localeIsRTL = false;}


if(!window.FB)FB={};if(!FB.Monitor)FB.Monitor={wrapObject:function(a,b,f){if(typeof(a)!="object")return a;if(!FB.Monitor.loggingEnabled())return a;if(b=='FB.Debug'||b=='FB.HiddenContainer'||b=='FB.XdComm.Server'||b.indexOf('FBIntern')==0)return a;for(var d in a){var c=a[d];if(!a.hasOwnProperty(d)||typeof(c)!='function'||c.wrapped)continue;var e={containerName:b,functionName:d};a[d]=FB.Monitor._monitorWrapper(c,a,f,e);a[d].wrapped=true;}return a;},disableLogging:function(){FB.Monitor.loggingEnabledCache=false;},loggingEnabled:function(){if(FB.Monitor.loggingEnabledCache===null){var c=FB.dynData&&FB.dynData.site_vars&&FB.dynData.site_vars.monitor_usage_regex;if(!c){FB.Monitor.loggingEnabledCache=false;}else{var a=new RegExp(c);var b=FB.dynData.site_vars.monitor_usage_rate;FB.Monitor.loggingEnabledCache=a.test(document.domain)?(Math.random()/b)<1:false;}}return FB.Monitor.loggingEnabledCache;},externalCallback:function(a){if(typeof(a)!='function')return a;return function(){var d=FB.Monitor.internalCallStackDepth;FB.Monitor.internalCallStackDepth=0;var b=Array.prototype.slice.call(arguments);var c=a.apply(this,b);FB.Monitor.internalCallStackDepth=d;return c;};},_monitorWrapper:function(b,a,d,c){return function(){var e=Array.prototype.slice.call(arguments);context=d?this:(a||window);c=c||{containerName:'unknown',functionName:'unknown'};if(FB.Monitor.internalCallStackDepth==0)if(c.functionName.substr(0,1)!='_')FB.Monitor.logFunction(c,e);++FB.Monitor.internalCallStackDepth;var f=new Date();try{var returnValue=b.apply(context,e);}finally{var end=new Date();--FB.Monitor.internalCallStackDepth;var elapsed=end.getTime()-f.getTime();if(elapsed)FB.Monitor.logFunction(c,[],elapsed);}return returnValue;};},logFunction:function(f,c,d){var b=[];for(var e=0;e<c.length;e++){var a=c[e];b[e]=a?a.toString():a;}FB.Monitor.log("functions",f.containerName+"."+f.functionName,{elapsed:d});},logXFBML:function(c){var b={};for(var d=0;d<c.attributes.length;++d){var a=c.attributes[d];if(a.specified!==false&&a.nodeName&&a.nodeValue&&a.nodeName!="class")b[a.nodeName]=a.nodeValue.toString();}var e=c.nodeName.toLowerCase();FB.Monitor.log("tags",e,{args:b});},log:function(a,d,c){if(!FB.Monitor.loggingEnabled())return;var b={functions:101,tags:102};c.lid=b[a];c.name=d;FB.Monitor.loggingQueue.push(c);FB.Monitor.scheduleSend();},scheduleSend:function(){if(!FB.Monitor.pendingTimer)FB.Monitor.pendingTimer=setTimeout(FB.Monitor.send,FB.Monitor.timerInterval);},send:function(){FB.Monitor.pendingTimer=false;var a=FB.Monitor.loggingEnabled();FB.Monitor.loggingEnabledCache=false;try{if(FB.MonitorSender){while(FB.Monitor.loggingQueue.length>0)if(!FB.MonitorSender.send())break;}else FB.Monitor.timerInterval*=1.2;}finally{if(FB.Monitor.loggingQueue.length!==0)FB.Monitor.scheduleSend();FB.Monitor.loggingEnabledCache=a;}},timerInterval:6*1000,internalCallStackDepth:0,loggingQueue:[],pendingTimer:false,loggingEnabledCache:null};
if(!window.FB)FB={};FB.forEach=function(c,a,f){if(Object.prototype.toString.apply(c)==='[object Array]'){if(c.forEach){c.forEach(a);}else for(var b=0,e=c.length;b<e;b++)a(c[b],b,c);}else for(var d in c)if(f||c.hasOwnProperty(d))a(c[d],d,c);};FB.copy=function(c,b,a){FB.forEach(b,function(e,d){if(a||typeof c[d]==='undefined')c[d]=e;});};FB.copy(FB,{$:function(a){return document.getElementById(a);},TypeLoader:{NOTIFY:{},LOADED_MODULES:{},LOADED_CLASSES:{},resolve:function(f,e,a){for(var b=0,c=e.length;b<c;b++){var d=e[b];if(d==='')continue;if(typeof f[d]==='undefined')if(a){f[d]={};}else return false;f=f[d];}return f;},provide:function(c,b,a){FB.Monitor.wrapObject(b,c,false);var d=this.resolve(window,c.split('.'),true);if(a||!this.LOADED_MODULES[c]){FB.copy(d,b,true);if(b._onLoad)d._onLoad();}this.LOADED_MODULES[c]=true;},subclass:function(e,a,i){if(this.LOADED_CLASSES[e])return;if(a!=='FB.Class'&&!this.LOADED_CLASSES[a]){FB.Log.debug('"'+e+'" needs to wait for "'+a+'"');var j=FB.redo(arguments,this);this.NOTIFY[a]?this.NOTIFY[a].push(j):this.NOTIFY[a]=[j];return;}var b=this.resolve(window,a.split('.')),f=b.extend(i),g=this.NOTIFY[e],h=e.split('.'),d=this.resolve(window,h,true),c=h.pop();FB.Monitor.wrapObject(f.prototype,e,true);FB.Monitor.wrapObject(f,e,false);FB.copy(f,d);this.resolve(window,h)[c]=f;this.LOADED_CLASSES[e]=true;if(g){FB.forEach(g,function(k){k();});delete this.NOTIFY[e];}}},bind:function(){var a=Array.prototype.slice.call(arguments),c=a.shift(),b=a.shift();var d=function(){++FB.Monitor.internalCallStackDepth;var e=c.apply(b,a.concat(Array.prototype.slice.call(arguments)));--FB.Monitor.internalCallStackDepth;return e;};d._targets=[b,c];return d;},redo:function(a,c){var b=Array.prototype.slice.call(a);b.unshift(c);b.unshift(a.callee);return FB.bind.apply(FB,b);}});FB.provide=FB.bind(FB.TypeLoader.provide,FB.TypeLoader);FB.subclass=FB.bind(FB.TypeLoader.subclass,FB.TypeLoader);
FB.subclass('FB.Waitable','FB.Class',{init:function(){},onChange:function(){if(this.__changed)this.__changed(this);},waitUntilReady:function(a){if(this.get_isReady()){a(this.result);}else{var b=null;b=FB.bind(function(c){this.remove_changed(b);a(this.result);},this);this.add_changed(b);}},waitForValue:function(b,a){this.waitForCondition(FB.bind(function(c){if(this.get_isReady()&&this.result===b){a();return true;}return false;},this));},waitForCondition:function(a){if(!a(this)){var b=null;b=FB.bind(function(c){if(a(c))this.remove_changed(b);},this);this.add_changed(b);}},resetChange:function(){this.__changed=null;},result:null,add_changed:function(a){this.__changed=FB.Delegate.combine(this.__changed,a);},remove_changed:function(a){this.__changed=FB.Delegate.remove(this.__changed,a);},__changed:null});
FB.subclass('FB.SimpleWaitable','FB.Waitable',{init:function(){this._super();},get_isReady:function(){return this._isReady;},_setResult:function(a,c){var b=typeof(a);if(this._isReady&&!c&&this.result===a&&(b==='undefined'||b==='number'||b==='string'))return;this.result=a;this._isReady=(!c);this.onChange();},_isReady:false});
FB.provide('FBIntern.HostName',{IE:0,MOZILLA:1,SAFARI:2,OPERA:3,OTHER:4});
FB.subclass('FBIntern.HostInfo','FB.Class',{init:function(){var b=window.navigator.userAgent.toLowerCase();var a;var d=null;if((a=b.indexOf('opera'))>=0){this._hostName=FBIntern.HostName.OPERA;}else if((a=b.indexOf('msie'))>=0){this._hostName=FBIntern.HostName.IE;d=b.substr(a+5);}else if((a=b.indexOf('firefox'))>=0){this._hostName=FBIntern.HostName.MOZILLA;d=b.substr(a+8);}else if((a=b.indexOf('safari'))>=0){this._hostName=FBIntern.HostName.SAFARI;d=b.substr(a+7);}else if((a=b.indexOf('gecko'))>=0){this._hostName=FBIntern.HostName.MOZILLA;d=window.navigator.appVersion;}else this._hostName=FBIntern.HostName.OTHER;if(d){var c=parseFloat(d);this.majorVersion=parseInt(c);if((a=d.indexOf('.'))>=0)this.minorVersion=parseInt(d.substr(a+1));}},get_hostName:function(){return this._hostName;},majorVersion:0,minorVersion:0,_hostName:0});
FB.subclass('FBIntern.AppInfo','FB.Class',{init:function(){this._hostInfo=new FBIntern.HostInfo();},get_hostInfo:function(){return this._hostInfo;},_hostInfo:null});FB.provide('FBIntern.AppInfo',{_onLoad:function(){FBIntern.AppInfo._current=null;},get_singleton:function(){if(!FBIntern.AppInfo._current)FBIntern.AppInfo._current=new FBIntern.AppInfo();return FBIntern.AppInfo._current;}});
(function(){var b=false,a=/xyz/.test(function(){xyz;})?/\b_super\b/:/.*/;FB.Class=function(){};FB.Class.extend=function(e){var d=this.prototype;b=true;var f=new this();b=false;FB.forEach(e,function(h,g){f[g]=typeof h==="function"&&typeof d[g]==="function"&&a.test(h)?(function(j,i){return function(){var l=this._super;this._super=d[j];var k=i.apply(this,arguments);this._super=l;return k;};})(g,h):h;});var c=function(){if(!b){var g;if(this instanceof c){g=this;}else{b=true;g=new c();b=false;}if(g.init)g.init.apply(g,arguments);return g;}};c.prototype=f;c.constructor=c;c.extend=FB.Class.extend;return c;};})();
FB.provide('FB.Log',{level:-1,Level:{DEBUG:3,INFO:2,WARNING:1,ERROR:0},_helper:function(){var a=Array.prototype.slice.call(arguments),c=a.shift(),b=a.shift();if(this.level>=b&&window.console)(console[c]||console.log).apply(console,a);}});FB.provide('FB.Log',{debug:FB.bind(FB.Log._helper,FB.Log,'debug',FB.Log.Level.DEBUG),info:FB.bind(FB.Log._helper,FB.Log,'info',FB.Log.Level.INFO),warn:FB.bind(FB.Log._helper,FB.Log,'warn',FB.Log.Level.WARNING),error:FB.bind(FB.Log._helper,FB.Log,'error',FB.Log.Level.ERROR)},true);
if(!window.FB)FB={};if(!FB.Type){FB.Type={createNamespace:function(b){var d=window;var c=b.split('.');for(var a=0;a<c.length;a++){var f=c[a];var e=d[f];if(!e)d[f]=e={};d=e;}return d;},createEnum:function(e,c,d){if(this.getObj(e))return;var a=function(){};a.prototype=c;for(var b in c)a[b]=c[b];if(d)a.__flags=true;this.setObj(e,a);},createClass2:function(cls,baseType){if(baseType&&typeof(baseType)=="string")baseType=eval(baseType);cls.prototype.constructor=cls;this.extend(cls,FB.Type.Methods);cls.__baseType=baseType||Object;if(baseType)cls.__basePrototypePending=true;},setObj:function(fullName,value){var i=fullName.lastIndexOf('.');var objName;var scope=window;if(i>0){var ns=fullName.substring(0,i);this.createNamespace(ns);objName=fullName.substring(i+1);scope=eval(ns);}else objName=fullName;scope[objName]=value;},getObj:function(b){var d=window;var c=b.split('.');for(var a=0;a<c.length;a++){var e=c[a];d=d[e];if(!d)break;}return d;},createClass:function(a,b){if(this.getObj(a))return;if(arguments.length==1&&typeof(a)!="string"){return this._createClass(a);}else this.setObj(a,this._createClass(b));},_createClass:function(b){var a=b.ctor||function(){};if(b.static_ctor)this.addStaticInit(b.static_ctor);if(b.instance)a.prototype=b.instance;if(b['static'])this.extend(a,b['static']);this.createClass2(a,b.base);return a;},addStaticInit:function(a){if(!FB.Type._pendingInits)FB.Type._pendingInits=[];FB.Type._pendingInits[FB.Type._pendingInits.length]=a;window.setTimeout(FB.Type.runPendingInits,0);},runPendingInits:function(){if(FB.Type._pendingInits){var b=FB.Type._pendingInits;FB.Type._pendingInits=null;var a=b.length;for(var c=0;c<a;c++)b[c]();}},extend:function(a,c){for(var b in c)a[b]=c[b];return a;},getInstanceType:function(a){return a.constructor;}};FB.Type.Methods={setupBase:function(){if(this.__basePrototypePending){var a=this.__baseType;if(a.__basePrototypePending)a.setupBase();for(var b in a.prototype){var c=a.prototype[b];if(!this.prototype[b])this.prototype[b]=c;}delete this.__basePrototypePending;}},constructBase:function(b,a){if(this.__basePrototypePending)this.setupBase();if(!a){this.__baseType.apply(b);}else this.__baseType.apply(b,a);},callBase:function(c,d,a){var b=this.__baseType.prototype[d];if(!a){return b.apply(c);}else return b.apply(c,a);},get_baseType:function(){return this.__baseType||null;}};}
FB.Sys=function(){};FB.Sys.isUndefined=function(a){return (a===undefined);};FB.Sys.isNullOrUndefined=function(a){return (a===null)||(a===undefined);};FB.Sys.isNullOrEmpty=function(a){return !a||!a.length;};FB.Sys.parseBool=function(a){return (a.toLowerCase()=='true');};FB.Sys.trim=function(a){return a.replace(/^\s*|\s*$/g,'');};FB.Sys.compare=function(b,c,a){if(a){if(b)b=b.toUpperCase();if(c)c=c.toUpperCase();}b=b||'';c=c||'';if(b==c)return 0;if(b<c)return -1;return 1;};FB.Sys.quote=function(h){var e={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};var a,b,c,d,f=/["\\\x00-\x1f\x7f-\x9f]/g,g;return f.test(h)?'"'+h.replace(f,function(i){var j=e[i];if(j)return j;j=i.charCodeAt();return '\\u00'+Math.floor(j/16).toString(16)+(j%16).toString(16);})+'"':'"'+h+'"';};FB.Sys.startsWith=function(a,b){return a.substring(0,b.length)==b;};FB.Sys.format=function(a){if(!FB.Sys.format._formatRE)FB.Sys.format._formatRE=/(\{[^\}^\{]+\})/g;var b=arguments;return a.replace(FB.Sys.format._formatRE,function(e,d){var c=parseInt(d.substr(1));var f=b[c+1];if(FB.Sys.isNullOrUndefined(f))return '';return f.toString();});};FB.Sys.htmlDecode=function(a){htmlDecMap={'&amp;':'&','&lt;':'<','&gt;':'>','&quot;':'"'};htmlDecRE=/(&amp;|&lt;|&gt;|&quot;)/gi;a=a.replace(htmlDecRE,function(c,b){return htmlDecMap[b];});return a;};FB.Sys.htmlEncode=function(a){htmlEncMap={'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;'};htmlEncRE=/([&<>"])/g;if(htmlEncRE.test(a))a=a.replace(htmlEncRE,function(c,b){return htmlEncMap[b];});return a;};FB.Sys.endsWith=function(a,b){return a.length>=b.length&&a.substring(a.length-b.length)==b;};FB.Sys.contains=function(a,c){var b=FB.Sys.indexOf(a,c);return (b>=0);};FB.Sys.add=function(a,b){a[a.length]=b;};FB.Sys.remove=function(a,c){var b=FB.Sys.indexOf(a,c);if(b>=0){a.splice(b,1);return true;}return false;};FB.Sys.indexOf=function(a,c){var d=a.length;if(d)for(var b=0;b<d;b++)if(a[b]===c)return b;return -1;};FB.Sys.addRange=function(a,c){var d=c.length;for(var b=0;b<d;b++)a[a.length]=c[b];};FB.Sys.clear=function(a){if(a.length>0)a.splice(0,a.length);};FB.Sys.clearKeys=function(a){for(var b in a)delete a[b];};FB.Sys.containsKey=function(a,b){return a[b]!==undefined;};FB.Sys.getKeyCount=function(b){var a=0;for(var c in b)a++;return a;};FB.Sys.isAssignableFrom=function(a,b){while(a!=b)if(a.__baseType){a=a.__baseType;}else return false;return true;};FB.Sys.createException=function(c,d,b){var a=new Error(c);if(d)a.userData=d;if(b)a.innerException=b;return a;};FB.Type.createClass2(FB.Sys);
FB.provide('FB.Debug',{logLevel:0,assert:function(a,b){if(FB.Debug.logLevel>0&&!a){b='Assert failed: '+b;if(confirm(b+'\r\n\r\nBreak into debugger?'))FB.Debug._fail(b);}},writeLine:function(a){if(FB.Debug.logLevel>0)if(window.Debug&&window.Debug.writeln){window.Debug.writeln(a);}else if(window.console){if(window.console.debug){window.console.debug(a);}else if(window.console.log)window.console.log(a);}else if(window.opera&&window.opera.postError)window.opera.postError(a);},logLine:function(a,b){if(a<=FB.Debug.logLevel)FB.Debug.writeLine(b);},_fail:function(a){FB.Debug.writeLine(a);debugger;},_dumpCore:function Debug$_dumpCore(j,h,g,f,c){if(h===null){j.appendLine(f+g+': null');return;}switch(typeof(h)){case 'undefined':j.appendLine(f+g+': undefined');break;case 'number':case 'string':case 'boolean':j.appendLine(f+g+': '+h);break;default:if(h instanceof Date||h instanceof RegExp){j.appendLine(f+g+': '+h);break;}if(FB.Sys.contains(c,h)){j.appendLine(f+g+': ...');break;}c[c.length]=h;var i=f+'  ';if(h.tagName){j.appendLine(f+g+': <'+h.tagName+'>');var b=h.attributes;for(var e=0;e<b.length;e++){var a=b[e].nodeValue;if(a)FB.Debug._dumpCore(j,a,b[e].nodeName,i,c);}}else{j.appendLine(f+g+': ');for(var d in h){var k=h[d];if(!(k instanceof Function))FB.Debug._dumpCore(j,k,d,i,c);}}FB.Sys.remove(c,h);break;}},dump:function Debug$dump(b,a){if((!a||!a.length)&&(b!==null))a=typeof(b);if(!a||!a.length)return;var c=new FB.StringBuilder();FB.Debug._dumpCore(c,b,a,'',[]);FB.Debug.writeLine(c.toString());},fail:function Debug$fail(a){FB.Debug._fail(a);}});FB.FBDebug=FB.Debug;
FB.subclass('FBIntern.FbGlobals','FB.Class',{init:function(){}});FB.provide('FBIntern.FbGlobals',{get_fB_StaticResourceVersions:function(){return FB.dynData?FB.dynData.resources:{};}});
FB.subclass('FB.ArrayEnumerator','FB.Class',{init:function(a){this._array=a;this._index=-1;},get_current:function(){return this._array[this._index];},moveNext:function(){this._index++;return (this._index<this._array.length);},reset:function(){this._index=-1;}});
FB.subclass('FBIntern.Uri','FB.Class',{init:function(a){this._uriString=a;},get_uriString:function(){return this._uriString;},get_pathAndQuery:function(){var a=this._uriString.indexOf('://');if(a>=0){a=this._uriString.indexOf('/',a+3);if(a>=0)return this._uriString.substr(a);}return this._uriString;},get_schemeAndDomain:function(){var a=this._uriString.indexOf('http://');if(a)a=this._uriString.indexOf('https://');if(!a){var b=this._uriString.indexOf('/',8);if(b>=0){return this._uriString.substr(0,b);}else return this._uriString;}throw new Error('This object is not an absolute URI.');},get_queryParameters:function(){if(!this._queryParameters){this._queryParameters={};var d;var b=this._uriString.indexOf('?');if(b>-1){d=this._uriString.substr(b+1);b=d.indexOf('#');if(b>0)d=d.substring(0,b-1);var f=d.split('&');var a=new FB.ArrayEnumerator(f);while(a.moveNext()){var e=a.get_current();b=e.indexOf('=');if(b>0){var c=e.substr(0,b);var g=e.substr(b+1);this._queryParameters[c]=decodeURIComponent(g);}}}}return this._queryParameters;},get_domain:function(){var a=this.get_domainAndPath();var b=a.indexOf('/');if(b>=0)a=a.substring(0,b);return a;},get_domainAndPath:function(){var a=this._uriString;var b=a.indexOf('#');if(b>=0)a=a.substring(0,b);var d=a.indexOf('?');if(d>=0)a=a.substring(0,d);var c=a.indexOf('://');if(c>=0)a=a.substring(c+3);return a;},_queryParameters:null,_uriString:null});FB.provide('FBIntern.Uri',{create:function(a,c){var e;if(FBIntern.Uri.isAbsoluteUri(c)){e=c;}else if(c.charAt(0)==='/'){e=a.get_schemeAndDomain()+c;}else{var e=a.get_uriString();var b=e.indexOf('?');if(b>0)e=e.substr(0,b);var d=e.lastIndexOf('/');e=e.substr(0,d+1)+c;}return new FBIntern.Uri(e);},isAbsoluteUri:function(a){return a.indexOf('://')>0;},addQueryParameters:function(b,a){if(b.indexOf('?')>0){return b+'&'+a;}else return b+'?'+a;},createQueryString:function(d){var e='';var a=d;for(var b in a){var c={key:b,value:a[b]};e+=c.key+'='+encodeURIComponent((c.value))+'&';}if(e!==''&&e.charAt(e.length-1)==='&')e=e.substr(0,e.length-1);return e;},bothHaveSameDomain:function(e,f){var c=new FBIntern.Uri(e);var d=new FBIntern.Uri(f);var a=c.get_domain().toLowerCase();var b=d.get_domain().toLowerCase();return a==b;}});
FB._create_Point=function(b,c){var a={};a.x=b;a.y=c;return a;};
FB._create_Size=function(c,a){var b={};b.w=c;b.h=a;return b;};
FB.subclass('FBIntern.Utility','FB.Class',{init:function(){}});FB.provide('FBIntern.Utility',{getFacebookUrl:function(a){return FB.Sys.format(FBIntern.FbGlobals.get_fB_StaticResourceVersions().base_url_format,a);},getNonConnectFacebookUrl:function(c){var a=FBIntern.FbGlobals.get_fB_StaticResourceVersions().base_url_format;if(a.indexOf('connect.facebook.com')>=0){var b=(!a.indexOf('https'))?'https':'http';a=b+'://{0}.facebook.com/';return FB.Sys.format(a,c);}else return FBIntern.Utility.getFacebookUrl(c);},createFacebookUrl:function(e,c,d,a){var f;if(a){f=FBIntern.Utility.getFacebookUrl(e);}else f=FBIntern.Utility.getNonConnectFacebookUrl(e);f+=c;var b=FB.locale;if(!FB.Sys.containsKey(d,'locale')&&!FB.Sys.isNullOrEmpty(b))d.locale=b;return FBIntern.Uri.addQueryParameters(f,FBIntern.Uri.createQueryString(d));},isSecure:function(){return window.location.href.indexOf('https')===0;},id64BitEquals:function(a,b){var c='';var d='';if(typeof(a)==='number'){if(a>2147483647)FB.FBDebug.logLine(1,'This integer is great than 32 bit and can\'t be properly in comparison in JavaScript. It should be stored as string instead.');c=a.toString();}else c=a;if(typeof(b)==='number'){if(b>2147483647)FB.FBDebug.logLine(1,'This integer is great than 32 bit and can\'t be properly in comparison in JavaScript. It should be stored as string instead.');d=b.toString();}else d=b;return !FB.Sys.compare(c,d,false);},waitForLoaded:function(b,a){var c=null;c=function(d){FBIntern.Utility.removeEventListener(b,'load',c);a();};FBIntern.Utility.addEventListener(b,'load',c);},get_windowLocation:function(){var b=FB._create_Point(0,0);var a,c;if(window.screenLeft){a=window.screenLeft;c=window.screenTop;}else{a=window.screenX;c=window.screenY;}b.x=a;b.y=c;if(FB.Sys.isUndefined(b.x))b.x=0;if(FB.Sys.isUndefined(b.y))b.y=0;return b;},get_windowSize:function(){var a=FB._create_Size((window&&window.innerWidth)||(document&&document.documentElement&&document.documentElement.clientWidth)||(document&&document.body&&document.body.clientWidth)||0,(window&&window.innerHeight)||(document&&document.documentElement&&document.documentElement.clientHeight)||(document&&document.body&&document.body.clientHeight)||0);return a;},get_documentSize:function(){var c=FB._create_Size(document.body.scrollWidth,document.body.scrollHeight);if(c.w<=0||c.w>document.documentElement.scrollWidth)c.w=document.documentElement.scrollWidth;if(c.h<=0||c.h>document.documentElement.scrollHeight)c.h=document.documentElement.scrollHeight;if(window&&window.getComputedStyle){var a=window.getComputedStyle(document.body,null),b=parseInt(a.getPropertyValue('height'),10);if(b<c.h)c.h=b;}return c;},get_isInUserActionCallstack:function(){var a=FBIntern.Utility.get_currentEvent();if(!a){return false;}else{var c=['onclick','oncontextmenu','ondblclick','onfocus','onkeydown','onkeypress','onkeyup','onmousedown','onmousemove','onmouseout','onmouseover','onmouseup','click','ctextmenu','dblclick','focus','keydown','keypress','keyup','mousedown','mousemove','mouseout','mouseover','mouseup'];var b=a.type;return b&&FB.Sys.contains(c,b);}},get_currentEvent:function(){var b=window.event;if(!b&&FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.MOZILLA){var c=arguments.callee;var d=[];var a;while(true){FB.Sys.add(d,c);a=c.caller;if(!a)break;if(FB.Sys.indexOf(d,a)>=0){FB.FBDebug.logLine(1,'FB.Connect.get_isInUserActionCallstack(): we can\'t correctly make a detection because of recursion in call stack');return null;}c=a;}b=c.arguments.length==1&&c.arguments[0]&&c.arguments[0].type?c.arguments[0]:null;}return b;},addEventListener:function(a,c,b){if(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()!==FBIntern.HostName.IE){(a).addEventListener(c,b,false);}else{b._ieEventHandler=function(){b(window.event);};(a).attachEvent('on'+c,(b._ieEventHandler));}},removeEventListener:function(a,c,b){if(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()!==FBIntern.HostName.IE){(a).removeEventListener(c,b,false);}else (a).detachEvent('on'+c,(b._ieEventHandler));},createXMLHttpRequest:function(){if(!FB.XMLHttpRequest)if(!window.XMLHttpRequest){FB.XMLHttpRequest=function(){var c=['Msxml2.XMLHTTP','Microsoft.XMLHTTP'];for(var b=0;b<c.length;b++)try{var xmlHttp=new ActiveXObject(c[b]);return xmlHttp;}catch(a){}};}else FB.XMLHttpRequest=window.XMLHttpRequest;return new FB.XMLHttpRequest();},getIFrameDocument:function(f,d,a){var c=(window.self.frames)[f];var e=null;if(window.location.hostname===document.domain)try{e=c.document;}catch(b){FB.FBDebug.logLine(1,'Failed to get frameWindow.document, will try again later');}if(e){a(e);}else FBIntern.Utility.waitForLoaded(d,function(){a(c.document);});},isConnectSession:function(a){if(!a)throw new Error('session key is null');return a.substr(0,2)==='3.';},isStrInt:function(a){return parseInt(a).toString()===a;},createException:function(c,d,b){var a=new Error(c);if(d)a.userData=d;if(b)a.innerException=b;return a;},getSiteVar:function(c,a){var b=FB.dynData;if(b){var d=b.site_vars;if(FB.Sys.containsKey(d,c))return d[c];}return a;},setSiteVar:function(a,c){var b=FB.dynData.site_vars;b[a]=c;},paymentsLog:function(g,a){var e={step_id:g,api_key:a};var b=FBIntern.Utility.getFacebookUrl('www')+'/connect/waterfall_log.php';var d=FBIntern.Uri.addQueryParameters(b,FBIntern.Uri.createQueryString(e));var f=FB.$('FB_HiddenContainer');FB.FBDebug.assert(f,'Can\'t find the DOM element with id FB_HiddenContainer');var c=document.createElement('img');c.setAttribute('src',d);f.appendChild(c);}});
FB.subclass('FBIntern.Flash','FB.Class',{init:function(){}});FB.provide('FBIntern.Flash',{_onLoad:function(){FBIntern.Flash.xdComm=null;FBIntern.Flash.curMajor=0;FBIntern.Flash.curMinor=0;FBIntern.Flash.versionDetected=false;},hasRequireVersion:function(){return FBIntern.Flash._verifyMinimumVersion(9,0);},_verifyMinimumVersion:function(g,h){if(!FBIntern.Flash.versionDetected){var j=['0','0'];var f=FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.IE;var i=navigator.plugins;if(i&&i.length>0){if(i['Shockwave Flash 2.0']||i['Shockwave Flash']){var c;if(i['Shockwave Flash 2.0']){c=(i['Shockwave Flash 2.0'].description);}else c=(i['Shockwave Flash'].description);var b=c.split(' ');j=b[2].split('.');}}else if(f){var k=null;var a;try{a=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.7');k=a.GetVariable('$version');}catch(d){}if(!j)try{a=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');k='WIN 6,0,21,0';}catch(e){}if(!FB.Sys.isNullOrEmpty(k))j=k.split(' ')[1].split(',');}if(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.MOZILLA){FB.FBDebug.logLine(1,'Cannot use Flash on Firefox due to a possible bug in Flash');FBIntern.Flash.curMajor=0;FBIntern.Flash.curMinor=0;}else if(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.OPERA){FB.FBDebug.logLine(1,'Cannot use Flash on Opera due to a possible bug in Flash');FBIntern.Flash.curMajor=0;FBIntern.Flash.curMinor=0;}else if(FBIntern.Utility.isSecure()&&f){FB.FBDebug.logLine(1,'Currenty, Flash is not used on IE in SSL pages');FBIntern.Flash.curMajor=0;FBIntern.Flash.curMinor=0;}else{FBIntern.Flash.curMajor=parseInt(j[0]);FBIntern.Flash.curMinor=parseInt(j[1]);}FBIntern.Flash.versionDetected=true;}return FBIntern.Flash.curMajor>g||(FBIntern.Flash.curMajor===g&&FBIntern.Flash.curMinor>=h);},_createFlashObject:function(c,e){var b;if(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.IE){b=FB.Sys.format('<object width=\"1\" height=\"\"  id=\"{0}\" name=\"{1}\" type=\"application/x-shockwave-flash\" classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" ><param name=\"movie\" value=\"{2}\" /> <param name=\"quality\" value=\"high\" /> <param name=\"bgcolor\" value=\"#869ca7\" /> <param name=\"allowScriptAccess\" value=\"always\" /> </object>',c,c,e);}else b=FB.Sys.format('<embed width=\'1\' height=\'1\' type=\'application/x-shockwave-flash\' pluginspage=\'http://get.adobe.com/flashplayer\' allowscriptaccess=\'always\' name=\'{0}\' id=\'{1}\' bgcolor=\'#869ca7\' quality=\'high\'  src=\'{2}\' />',c,c,e);var a=document.createElement('div');FB.$('FB_HiddenContainer').appendChild(a);a.innerHTML=b;if(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.IE){var d=a.parentNode;while(d&&d.tagName!=='HTML'){if(d.tagName==='FORM'){window[c]=d[c];break;}d=d.parentNode;}return window[c];}else return document[c];},get_xdComm:function(){if(!FBIntern.Flash.xdComm&&FBIntern.Flash.hasRequireVersion()){FB.FBDebug.logLine(3,'Create Flash XdComm object');FBIntern.Flash.xdComm=new FB.SimpleWaitable();var a=null;var b=false;window.FB_OnFlashXdCommReady=function(){FB.FBDebug.logLine(3,'Flash XdComm ready');b=true;if(a)FBIntern.Flash.xdComm._setResult(a);};a=FBIntern.Flash._createFlashObject('flashXdComm',FBIntern.FbGlobals.get_fB_StaticResourceVersions().xd_comm_swf_url);if(a&&b)FBIntern.Flash.xdComm._setResult(a);}return FBIntern.Flash.xdComm;}});
FB.JSON=function FB_JSON(){};FB.JSON.deserialize=function(b,a){if(FB.Sys.isNullOrEmpty(b))return null;if(a){if(!FB.JSON._64bitIntRegex)FB.JSON._64bitIntRegex=new RegExp('([^\\\\]\"\:)([0-9]{11,20})(,|}|])','gm');b=b.replace(FB.JSON._64bitIntRegex,'$1"$2"$3');}return FB.JSON.parse(b);};if(window.JSON&&typeof JSON.parse==='function'){FB.JSON.parse=JSON.parse;}else FB.JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object')for(k in value)if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else delete value[k];}return reviver.call(holder,key,value);}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;cx.lastIndex=0;if(cx.test(text))text=text.replace(cx,function(a){return '\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);});if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}throw new SyntaxError('JSON.parse');};FB.JSON.serialize=function(a){if(FB.Sys.isNullOrUndefined(a))return '';var b=new FB.StringBuilder();FB.JSON._serializeCore(b,a);return b.toString();};FB.JSON._serializeCore=function(j,i){if(FB.Sys.isNullOrUndefined(i)){j.append('null');return;}var k=typeof(i);switch(k){case 'boolean':j.append(i.toString());return;case 'number':j.append((isFinite(i))?i.toString():'null');return;case 'string':j.append(FB.Sys.quote(i));return;case 'object':if(i instanceof Array){j.append('[');var c=i;var h=c.length;var f=true;for(var g=0;g<h;g++){if(typeof(c[g])=='function')continue;if(f){f=false;}else j.append(',');FB.JSON._serializeCore(j,c[g]);}j.append(']');}else if(i instanceof Date){var d=i;var l=Date.UTC(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate(),d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds());j.append('\"\\@');j.append(l.toString());j.append('@\"');}else if(i instanceof RegExp){j.append(i.toString());}else{j.append('{');var f=true;var a=i;for(var b in a){var e={key:b,value:a[b]};if(FB.Sys.startsWith(e.key,'$'))continue;if(typeof(e.value)=='function')continue;if(f){f=false;}else j.append(',');j.append('"'+e.key+'"');j.append(':');FB.JSON._serializeCore(j,e.value);}j.append('}');}return;default:j.append('null');return;}};
FB.subclass('FB.XFBML.Data.CacheManager','FB.Class',{init:function(){}});FB.provide('FB.XFBML.Data.CacheManager',{_onLoad:function(){FB.XFBML.Data.CacheManager._maxUsableAge=24*60*60*1000;FB.XFBML.Data.CacheManager._refreshInternal=10*60*1000;FB.XFBML.Data.CacheManager._initialized=new FB.SimpleWaitable();},clearAll:function(){if(FBIntern.Flash.get_xdComm())FBIntern.Flash.get_xdComm().waitUntilReady(function(a){(a).clearAllCache();});},_changeContext:function(a){if(FBIntern.Flash.hasRequireVersion()){FBIntern.Flash.get_xdComm().waitUntilReady(function(b){FB.FBDebug.logLine(3,'CacheManager.ChangeContext to '+a);(b).setCacheContext(a);FB.XFBML.Data.CacheManager._initialized._setResult(true);});}else FB.XFBML.Data.CacheManager._initialized._setResult(true);},_getValue:function(b){try{var flash=FBIntern.Flash.get_xdComm();if(flash&&flash.get_isReady()){var s=(flash.result).getCache(b);if(s){s=decodeURIComponent(s);if(FB.FBDebug.logLevel>4)FB.FBDebug.writeLine('CacheManager.GetValue returns '+s);return FB.JSON.deserialize(s);}}}catch(a){FB.FBDebug.logLine(1,'CacheManager.GetValue failed on key '+b+' exception='+a.toString());}return null;},_setValue:function(b,c){try{var flash=FBIntern.Flash.get_xdComm();if(flash&&flash.get_isReady()){var s=FB.JSON.serialize(c);if(FB.FBDebug.logLevel>4)FB.FBDebug.writeLine('CacheManager.SetValue key='+b+', value='+s);flash.result.setCache(b,encodeURIComponent(FB.JSON.serialize(c)));}}catch(a){FB.FBDebug.logLine(1,'CacheManager.SetValue failed on key '+b+' exception='+a.toString());}},get__initialized:function(){return FB.XFBML.Data.CacheManager._initialized;}});
FB._create__fqlCache=function(a){var b={};b.fields=a;b.rows={};return b;};
FB.subclass('FB.PendingResult','FB.SimpleWaitable',{init:function(){this._super();},exception:null,setPendingResult:function(c,b){var a=c;if(!b&&a&&!FB.Sys.isUndefined(a.error_code)){b=FBIntern.Utility.createException(a.error_msg,a);FB.FBDebug.logLine(1,'Facebook API error: '+a.error_msg);c=null;}this.exception=b;this._setResult(c);}});
FB.provide('FB.XdComm._packetType',{data:0,dataFragment:1,dataFragmentEnd:2,udpSingle:3,ack:4});
FB.Type.createClass('FB.StringBuilder',{ctor:function(a){if((a!==undefined)&&(a!==null)){this._parts=[a];}else this._parts=[];},instance:{get_isEmpty:function(){return (this._parts.length==0);},append:function(a){if((a!==undefined)&&(a!==null))FB.Sys.add(this._parts,a);},appendLine:function(a){this.append(a);this.append('\r\n');},clear:function(){this._parts.clear();},toString:function(){return this._parts.join('');}}});if(!window.Delegate)window.Delegate=FB.Delegate;
FB.subclass('FB.XdComm._fragDataHolder','FB.Class',{init:function(){this._segments={};this._totalSegments=-1;},_addSegment:function(c){if(c.t===FB.XdComm._packetType.dataFragmentEnd)this._totalSegments=c.fid+1;if(!c.fid)this._combinedPacket=c;this._segments[c.fid.toString()]=c.d;if(this._totalSegments!==-1&&this._totalSegments===FB.Sys.getKeyCount(this._segments)){var a=new FB.StringBuilder();for(var b=0;b<this._totalSegments;b++)a.append(this._segments[b.toString()]);this._combinedPacket.d=a.toString();this._combinedPacket.t=FB.XdComm._packetType.data;return this._combinedPacket;}else return null;},_combinedPacket:null});
FB._create__packet=function(){return {};};
FB.provide('FB.XdComm.PageRelation',{parent:1,child:2,self:3,opener:4,openee:5});
FB.subclass('FB.Delegate','FB.Class',{});FB.provide('FB.Delegate',{Null:function(){},_create:function(b){var a=function(){if(b.length==2){return b[1].apply(b[0],arguments);}else{var d=b.slice();for(var c=0;c<d.length;c+=2)d[c+1].apply(d[c],arguments);return null;}};a._targets=b;return a;},create:function(b,a){if(!b)return a;return FB.Delegate._create([b,a]);},combine:function(a,b){if(!a){if(!b._targets)return FB.Delegate.create(null,b);return b;}if(!b){if(!a._targets)return FB.Delegate.create(null,a);return a;}var c=a._targets?a._targets:[null,a];var d=b._targets?b._targets:[null,b];return FB.Delegate._create(c.concat(d));},remove:function(a,b){if(!a||(a===b))return null;if(!b)return a;var f=a._targets;var e=null;var d;if(b._targets){e=b._targets[0];d=b._targets[1];}else d=b;for(var c=0;c<f.length;c+=2)if((f[c]===e)&&(f[c+1]===d)){if(f.length==2)return null;f.splice(c,2);return FB.Delegate._create(f);}return a;}});if(!window.Delegate)window.Delegate=FB.Delegate;
if(!window.FB)FB={};if(!FB.Loader)FB.Loader={loaded:{},loading:{},loadedCss:{},loadedCallback:null,onScriptLoaded:function(b){var a=b.length;for(var c=0;c<a;c++){var d=b[c];FB.Loader.loaded[d]=true;}if(FB.Loader.loadedCallback)window.setTimeout(function(){FB.Loader.loadedCallback(b);},0);},loadCssComps:function(a){var b=FB.Loader.getStaticResourceUrl('connect.php/'+FB.locale+'/css/'+a.join('/'));if(!this.loadedCss[b]){var c=document.createElement('link');c.setAttribute('rel','stylesheet');c.setAttribute('type','text/css');c.setAttribute('href',b);document.getElementsByTagName('head')[0].appendChild(c);this.loadedCss[b]=true;}},getStaticResourceUrl:function(b){var a=FB.dynData.resources.base_url_format;var c=(a.indexOf('https')===0)?'ssl':'static.ak';return a.replace('{0}',c)+b;}};
if(!FB.Bootstrap){FB.Bootstrap={requireFeatures:function(e,c){if(FB.Bootstrap.isXdChannel)return;var i={features:e,callback:FB.Monitor.externalCallback(c),completed:false};if(FB.Bootstrap._checkRequest(i))return;FB.Bootstrap._featureReqQueue.push(i);FB.Loader.loadedCallback=FB.Delegate.combine(FB.Loader.loadedCallback,FB.Bootstrap._onCompLoaded);FB.Bootstrap._transformFeatureList(e);var h={};var a=[];var f;var b=e.length;var g=0;for(f=0;f<b;f++){var d=e[f];if(!(FB.Loader.loaded[d]))if(!(FB.Loader.loaded[d]||FB.Loader.loading[d])){h[d]=true;a[a.length]=d;}}a.sort();var j=FB.Loader.getStaticResourceUrl('connect.php/'+FB.locale+'/js/'+a.join('/'));FB.Bootstrap.addScript(j);},_requireFeatures:function(b,a){this.requireFeatures(b,FB.bind(a));},_checkRequest:function(d){if(!d.completed){var b=0;var e=d.features.length;var c=0;for(b=0;b<e;b++){var a=d.features[b];if(FB.Loader.loaded[a])c++;}if(c==e){d.completed=true;if(d.callback)d.callback(true);}}return d.completed;},_transformFeatureList:function(b){var c={Api:true,CanvasUtil:true,Connect:true,XFBML:true};var a=b.length;var g=false;var f={};for(var d=0;d<a;d++){f[b[d]]=true;if(c[b[d]])g=true;}if(g)for(var e in c)if(!f[e])b[b.length]=e;},ensureInit:function(a){if(!a)throw ("FB.ensureInit called without a valid callback");a=FB.Monitor.externalCallback(a);if(FB.Facebook&&FB.Facebook.get_initialized&&FB.Facebook.get_initialized().get_isReady()&&FB.Facebook.get_initialized().result)return a();FB.Bootstrap._requireFeatures(FB.Bootstrap.features,function(){FB.Facebook.get_initialized().waitForValue(true,a);});},init:function(a,c,b){FB.Bootstrap._requireFeatures(FB.Bootstrap.features,function(){if(FB.Facebook)FB.Facebook.init(a,c,b);});},addScript:function(f){var d;var e=document.getElementsByTagName('script');if(e){var a=e.length;for(var b=0;b<a;b++){d=e[b];if(d.src==f)return;}}d=document.createElement("script");d.type="text/javascript";d.src=f;var c=document.getElementsByTagName('HEAD')[0]||document.body;c.appendChild(d);},setLocale:function(b,a){window.FB.locale=b;window.FB.localeIsRTL=a;},_initializeXdChannel:function(){FB.Bootstrap.isXdChannel=window.location.search.indexOf(FB.Bootstrap.fbc_channel_token)>=0;},_detectDocumentNamespaces:function(){if(document.namespaces&&!document.namespaces.item['fb'])document.namespaces.add('fb');},createDefaultXdChannelUrl:function(){var a=location.protocol+'//'+location.hostname+location.pathname+location.search;if(location.search||location.search.length>0){a+='&';}else a+='?';a+='fbc_channel=1';return a;},_onCompLoaded:function(){var b=0;var a=FB.Bootstrap._featureReqQueue.length;for(b=0;b<a;b++)FB.Bootstrap._checkRequest(FB.Bootstrap._featureReqQueue[b]);},_onLoad:function(){this._initializeXdChannel();this._detectDocumentNamespaces();},features:["XFBML","CanvasUtil"],fbc_channel_token:'fbc_channel=1',_featureReqQueue:[]};FB.Monitor.wrapObject(FB.Bootstrap,'FB.Bootstrap');window.FB_RequireFeatures=FB.Bootstrap.requireFeatures;window.FB.init=FB.Bootstrap.init;window.FB.ensureInit=FB.Bootstrap.ensureInit;FB.Bootstrap._onLoad();}
FB.subclass('FB.Enum','FB.Class',{});FB.provide('FB.Enum',{toString:function(a,b){return b.toString();}});
FB.provide('FB.XdComm.PacketDataFormat',{JSON:0,rawText:1,OBJ:2});
FB.provide('FB.HiddenContainer',{_onLoad:function(){if(document.getElementById('FB_HiddenContainer')==null){var b;try{var isIE=window.navigator.userAgent.toLowerCase().indexOf('msie')>=0&&window.attachEvent;if((!isIE||document.readyState=='completed')&&document.body){b=document.createElement('div');b.id="FB_HiddenContainer";b.style.position="absolute";b.style.top="-10000px";b.style.width="0px";b.style.height="0px";document.body.appendChild(b);}}catch(a){b=null;}if(!b)document.write('<div id="FB_HiddenContainer" '+'style="position:absolute; top:-10000px; left:-10000px; width:0px; height:0px;" >'+'</div>');}},get:function(){return FB.$('FB_HiddenContainer');}});
FB.subclass('FB.XdComm._receiveChannel','FB.Class',{init:function(b,a){this._fragDataDict={};this._ackList=[];this._id=b;this._endPoint=a;},_onReceivedPacket:function(d){FB.FBDebug.logLine(3,'XdComm: Received packet');var b=null;if(d.t===FB.XdComm._packetType.dataFragment||d.t===FB.XdComm._packetType.dataFragmentEnd){var c=this._fragDataDict[d.id.toString()];if(!c){c=new FB.XdComm._fragDataHolder();this._fragDataDict[d.id.toString()]=c;}b=c._addSegment(d);if(b)delete this._fragDataDict[b.id.toString()];}else b=d;if(b){if(!b.id){this._endPoint=new FB.XdComm.EndPoint(b.sf,b.sr,b.sc);if(this._queuedPackets){var a=new FB.ArrayEnumerator(this._queuedPackets);while(a.moveNext()){var e=a.get_current();this._onFullDataReceived(e);}this._queuedPackets=null;}}if(this._endPoint){this._onFullDataReceived(b);}else if(!this._queuedPackets){this._queuedPackets=[];FB.Sys.add(this._queuedPackets,b);}}},_onFullDataReceived:function(c){var d=FB.XdComm.Server.singleton;d._onFullDataReceived(c,this._endPoint);FB.Sys.add(this._ackList,c.id);if(this._ackList.length>5){if(FB.FBDebug.logLevel>4)FB.FBDebug.writeLine('ReceiveChannel.Ack: '+this._ackList.toString());var b=FB._create__packet();b.t=FB.XdComm._packetType.ack;b.sid=d._id;b.sc=d.get_receiverUrl();b.sf=window.name;b.sr=FB.XdComm._sendChannel._getReverseRelation(this._endPoint.relation);var a=d._createPacketUrl(b,this._endPoint);a+=encodeURIComponent(FB.JSON.serialize(this._ackList));d._removeIframe(this._ackIframe);this._ackIframe=d._createHiddenIFrame(a);FB.Sys.clear(this._ackList);}},_queuedPackets:null,_endPoint:null,_ackIframe:null,_id:null});
FB.subclass('FB.XdComm.EndPoint','FB.Class',{init:function(b,c,a){this.frameName=(!b)?'':b;this.relation=c;this.channelUrl=a;this.UID=0;},isEqual:function(a){return a.frameName===this.frameName&&a.relation===this.relation&&a.UID===this.UID;},frameName:null,relation:0,channelUrl:null,UID:0,origin:null});
FB.subclass('FB.XdComm._sendChannel','FB.Class',{init:function(a){this._iframes={};this._endPoint=a;},_send:function(d,a){var l=FB.XdComm.Server.singleton;var k=FB.JSON.serialize(a);var b=k.length;var f=0;var j=false;var c=0;while(!j){var m=FB.XdComm._packetType.data;var g=FB._create__packet();g.id=this._sendIdCount;if(!this._sendIdCount&&!f){g.sc=l.get_receiverUrl();g.sf=window.name;g.sr=FB.XdComm._sendChannel._getReverseRelation(this._endPoint.relation);}if(!f)g.h=d;var h;if(!f&&b<=l._maxPacketDataLength){h=k;j=true;}else{g.fid=c++;var i=b-f;if(i>l._maxPacketDataLength){i=l._maxPacketDataLength;m=FB.XdComm._packetType.dataFragment;}else{m=FB.XdComm._packetType.dataFragmentEnd;j=true;}h=k.substr(f,i);f+=i;}g.sid=l._id;g.t=m;var e=l._createPacketUrl(g,this._endPoint);e+=encodeURIComponent(h);this._addIframe(e,g);}this._sendIdCount++;},_onAck:function(b){if(FB.FBDebug.logLevel>4)FB.FBDebug.writeLine('SendChannel.OnAck: '+b.toString());var c=new FB.ArrayEnumerator(b);while(c.moveNext()){var a=c.get_current();var f=a.toString();var g=this._iframes[f];var d=new FB.ArrayEnumerator(g);while(d.moveNext()){var e=d.get_current();FB.XdComm.Server.singleton._removeIframe(e);}delete this._iframes[f];}},_addIframe:function(b,e){var a=FB.XdComm.Server.singleton._createHiddenIFrame(b);var c=e.id.toString();var d=this._iframes[c];if(!d)this._iframes[c]=d=[];FB.Sys.add(d,a);},_sendIdCount:0,_endPoint:null});FB.provide('FB.XdComm._sendChannel',{_getReverseRelation:function(a){switch(a){case FB.XdComm.PageRelation.child:return FB.XdComm.PageRelation.parent;case FB.XdComm.PageRelation.parent:return FB.XdComm.PageRelation.child;case FB.XdComm.PageRelation.self:return FB.XdComm.PageRelation.self;case FB.XdComm.PageRelation.opener:return FB.XdComm.PageRelation.openee;default:throw new Error('Unknown relation');}}});
FB.subclass('FB.XdComm.Server','FB.Class',{init:function(){this._sendChannels=[];this._receiveChannels=[];this._handlers={};this._dataRequestQueues={};this._nativeXdState=-1;this._flashXdState=-1;this._nativeMsgsSendQueue={};this._nativeMsgsReceiveQueue={};this._id=Math.random().toString().substr(0,5);FB.FBDebug.logLine(2,'Init XdComm.Server with ID '+this._id+' for '+document.URL);switch(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()){case FBIntern.HostName.IE:this._maxPacketDataLength=1024;break;case FBIntern.HostName.MOZILLA:this._maxPacketDataLength=100000;break;case FBIntern.HostName.SAFARI:this._maxPacketDataLength=100000;break;case FBIntern.HostName.OPERA:this._maxPacketDataLength=190000;break;default:this._maxPacketDataLength=1024;break;}if(this.get__useNativeXd())FBIntern.Utility.addEventListener(window.self,'message',FB.bind(this._onMessageEvent,this));},get_receiverUrl:function(){return this._receiverUrl;},set_receiverUrl:function(b){if(!b){FB.FBDebug.logLine(0,'Cross Domain Channel cannot be null. We will use the current page as cross domain channel, but it would be inefficient');b=FB.Bootstrap.createDefaultXdChannelUrl();}var a=FBIntern.Uri.create(new FBIntern.Uri(document.URL),b);if(window.location.hostname!==document.domain)FB.FBDebug.logLine(2,'You appear to have changed the document.domain property.\nIf you run into problems with the Facebook Connect library, please refer to\n http://wiki.developers.facebook.com/index.php/How_To_Support_Subdomain_In_Connect for\nhelp.');this._receiverUrl=a.get_uriString();return b;},getUniqueOrigin:function(){if(!this._useXdProxy())return null;if(!this._uniqueOrigin){var a;if(this._receiverUrl){a=this._receiverUrl;}else a=window.location.protocol+'//'+document.domain;a+='/'+Math.random();this._uniqueOrigin=a;if(this.get__useFlashXd())FBIntern.Flash.get_xdComm().waitUntilReady(FB.bind(function(c){var b=c;window.FB_ReceiveFlashMessage=FB.bind(function(d){this._receiveFlashMessage(d);},this);b.postMessage_init('FB_ReceiveFlashMessage',a);},this));}return this._uniqueOrigin;},send:function(b,c,a){if(FB.FBDebug.logLevel>2){FB.FBDebug.writeLine('<<<<<<< '+document.URL);FB.FBDebug.writeLine('Server.send: handler='+c);FB.FBDebug.dump(a,'data');FB.FBDebug.dump(b,'endPoint');}if(this.get__useNativeXd()){this._postMessage(b,c,a);}else if(b.flashOrigin){this._sendWithFlash(b,c,a);}else this._sendWithIframe(b,c,a);},_sendWithIframe:function(c,e,b){var a=null;var d=new FB.ArrayEnumerator(this._sendChannels);while(d.moveNext()){var f=d.get_current();if(c.isEqual(f._endPoint))a=f;}if(!a){a=new FB.XdComm._sendChannel(c);FB.Sys.add(this._sendChannels,a);}a._send(e,b);},_sendWithFlash:function(b,c,a){var e=this._prepareMessagePacket(b,c,a);e.ackFlashOrigin=this.getUniqueOrigin();var d=(FB.XdComm.Server.postMessageHeader+FB.JSON.serialize(e));FBIntern.Flash.get_xdComm().waitUntilReady(FB.bind(function(f){this._retrySender(e.id.toString(),FB.bind(function(){f.postMessage_send(d,b.flashOrigin);},this));},this));},_postMessage:function(b,c,a){var f=this._prepareMessagePacket(b,c,a);var g;switch(b.relation){case FB.XdComm.PageRelation.child:g=window.frames[b.frameName];break;case FB.XdComm.PageRelation.opener:g=window.opener;break;case FB.XdComm.PageRelation.parent:g=window.parent;break;default:throw new Error('Can\'t send message to endpoint with type = '+FB.Enum.toString(FB.XdComm.PageRelation,b.relation));}var d=FB.XdComm.Server.postMessageHeader+FB.JSON.serialize(f);var e=(b.origin)?b.origin:'*';this._retrySender(f.id.toString(),FB.bind(function(){g.postMessage(d,e);},this));},_prepareMessagePacket:function(b,c,a){var d=FB._create__packet();d.sc=this.get_receiverUrl();d.sf=window.name;d.sr=FB.XdComm._sendChannel._getReverseRelation(b.relation);d.h=c;d.nd=a;d.df=FB.XdComm.PacketDataFormat.OBJ;d.id=this._nativeMsgId;d.sid=this._id;this._nativeMsgId++;return d;},_retrySender:function(b,a){var e=1;var d=-1;var c=FB.bind(function(){FB.FBDebug.logLine(2,'RetrySender '+e.toString()+'rd try');e++;if(e<100){a();}else{window.clearInterval(d);FB.FBDebug.logLine(0,'Message couldn\'t be delivered: id'+b);delete this._nativeMsgsSendQueue[b];}},this);c();d=window.setInterval(c,500);this._nativeMsgsSendQueue[b]=d;},_handleAckMessage:function(a){a=a.substr(FB.XdComm.Server.postMessageAckHeader.length);if(!a.indexOf(this._id)){var b=parseInt(a.substr(this._id.length));var c=this._nativeMsgsSendQueue[b.toString()];if(c){delete this._nativeMsgsSendQueue[b.toString()];window.clearInterval(c);}}else FB.FBDebug.logLine(0,'Ignore XdComm Ack message because send id does not match');},_onMessageEvent:function(b){var c=b.data;if(!c.indexOf(FB.XdComm.Server.postMessageHeader)){c=c.substr(FB.XdComm.Server.postMessageHeader.length);var e=FB.JSON.deserialize(c);var d=new FBIntern.Uri(b.origin);var h=new FBIntern.Uri(e.sc);var a=FB.XdComm.Server.postMessageAckHeader+e.sid+e.id.toString();((b.source)).postMessage(a,b.origin);var f=e.sid+e.id.toString();if(!this._nativeMsgsReceiveQueue[f]){this._nativeMsgsReceiveQueue[f]=true;var g=new FB.XdComm.EndPoint(e.sf,e.sr,e.sc);this._ensureReceiveChannel(e.sid,g);this._onFullDataReceived(e,g);}}else if(!c.indexOf(FB.XdComm.Server.postMessageAckHeader)){this._handleAckMessage(c);}else this._tryRecvXdProxy(c);},_receiveFlashMessage:function(a){a=decodeURIComponent(a);if(a.indexOf(FB.XdComm.Server.postMessageAckHeader)===0){this._handleAckMessage(a);}else if(a.indexOf(FB.XdComm.Server.postMessageHeader)===0){a=a.substr(FB.XdComm.Server.postMessageHeader.length);var b=FB.JSON.deserialize(a);var d=new FB.XdComm.EndPoint(b.sf,b.sr,b.sc);var c=b.sid+b.id.toString();if(this._nativeMsgsReceiveQueue[c])return;this._nativeMsgsReceiveQueue[c]=true;FBIntern.Flash.get_xdComm().waitUntilReady(FB.bind(function(g){var e=FB.XdComm.Server.postMessageAckHeader+c;var f=g;f.postMessage_send(e,b.ackFlashOrigin);},this));this._ensureReceiveChannel(b.sid,d);this._onFullDataReceived(b,d);}else if(!this._tryRecvXdProxy(a))FB.FBDebug.logLine(3,'Ignoring Flash XD message with unknown header.');},_tryRecvXdProxy:function(a){var b=a.indexOf('endXdProxy');if(b>0){this.onReceiverLoaded(a.substr(b+11));return true;}else return false;},createUdpUrl:function(c,a,b){return this._createUdpUrlWithFormat(c,a,b,FB.XdComm.PacketDataFormat.JSON);},createUdpUrlWithRawText:function(c,a,b){return this._createUdpUrlWithFormat(c,a,b,FB.XdComm.PacketDataFormat.rawText);},_createUdpUrlWithFormat:function(d,a,c,b){var e=FB._create__packet();e.t=FB.XdComm._packetType.udpSingle;e.h=d;e.sid=this._id;if(b!==FB.XdComm.PacketDataFormat.JSON)e.df=b;var g=this._createPacketUrl(e,c);var f=FB.JSON.serialize(a);if(f.length>this._maxPacketDataLength)throw new Error('data length is too long');g+=encodeURIComponent(f);return g;},_createXdProxyBase:function(a){var e=(FBIntern.FbGlobals.get_fB_StaticResourceVersions().base_cdn_url+'connect/xd_proxy.php?r='+FBIntern.FbGlobals.get_fB_StaticResourceVersions().xd_proxy+'#');var c={origin:this.getUniqueOrigin()};var b=(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.IE);c.transport=this.get__useNativeXd()?'postmessage':'flash';if(a.relation===FB.XdComm.PageRelation.child){FB.FBDebug.assert(a.frameName,'XdComm.Server._createXdProxyPacketUrl: end point '+'does not have child name name specified');c.relation='parent.frames['+a.frameName+']';}else if(a.relation===FB.XdComm.PageRelation.self){c.relation='parent';}else if(a.relation===FB.XdComm.PageRelation.parent){c.relation='parent.parent';}else if(a.relation===FB.XdComm.PageRelation.opener){c.relation='opener';if(b)c.transport='flash';}else throw new Error("Can't handle endPoint relation.");var d=(e+FBIntern.Uri.createQueryString(c)+'&endXdProxy&');return d;},_createXdProxyPacketUrl:function(b,a){return (this._createXdProxyBase(a)+encodeURIComponent(FB.JSON.serialize(b)));},unregisterDataHandler:function(a){FB.FBDebug.logLine(2,'Unregister data handler '+a);if(!FB.Sys.containsKey(this._handlers,a))throw new Error('Handler doesn\'t exist');delete this._handlers[a];},getUniqueHandlerName:function(c){if(!c)c='handler_';var b=0;var a=c+b.toString();while(FB.Sys.containsKey(this._handlers,a)){b++;a=c+b.toString();}return a;},registerDataHandler:function(e,d){FB.FBDebug.logLine(2,'Register data handler '+e);if(FB.Sys.containsKey(this._handlers,e))throw new Error('Handler already exists');this._handlers[e]=d;var h=this._dataRequestQueues[e];if(h){var b=new FB.ArrayEnumerator(h);while(b.moveNext()){var g=b.get_current();FB.FBDebug.logLine(2,'handle queued request');var a=null;var c=new FB.ArrayEnumerator(this._receiveChannels);while(c.moveNext()){var f=c.get_current();if(f._id===g.sid){a=f._endPoint;break;}}FB.FBDebug.assert(a,'can\'t find endpoint');d(this._getDataObject(g),a);}}},isDataHandlerRegistered:function(a){return this._handlers[a];},createNamedHiddenIFrame:function(c,g,a,f){var b=document.createElement('div');var d=FB.HiddenContainer.get();b=FB.HiddenContainer.get().appendChild(b);if(!this._iframeCreated&&FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.IE){b.innerHTML='<iframe src=\'javascript:false\' ></iframe>';this._iframeCreated=true;}if(!a)a='FB_SERVER_IFRAME';var e='<iframe name=\"'+c+'\" ';if(f)e+=f;e+=' src=\"'+g+'\" class=\"'+a+'\" scrolling=\"no\" frameborder=\"0\"></iframe>';b.innerHTML=e;return b.childNodes[0];},onReceiverLoaded:function(a){if(a)window.setTimeout(FB.bind(function(){this._onHashReceived(a);},this),0);},_createPacketUrl:function(b,a){if(this._useXdProxy()&&!/facebook\.com/.test(this._receiverUrl))return this._createXdProxyPacketUrl(b,a);var c=FB.JSON.serialize(b);c=encodeURIComponent(c);if(a.channelUrl.indexOf('http'))throw new Error('Invalid channel url '+a.channelUrl);var d=a.channelUrl+'#';if(FB.FBDebug.logLevel>4)d+='debug=1&';if(a.relation===FB.XdComm.PageRelation.child){FB.FBDebug.assert(a.frameName,'XdComm.Server.CreatePacketUrl: end point does not have child name name specified');d+='fname='+a.frameName+'&';}else if(a.relation===FB.XdComm.PageRelation.self){d+='fname=_parent&';}else if(a.relation===FB.XdComm.PageRelation.opener){d+='fname=_opener&';}else if(a.relation===FB.XdComm.PageRelation.openee)throw new Error('Can\'t handle endPoint '+FB.Enum.toString(FB.XdComm.PageRelation,a.relation));d+=c;return d;},_createHiddenIFrame:function(b){if(FB.FBDebug.logLevel>4)FB.FBDebug.writeLine('Create iframe '+b+' in '+document.URL);var a;a=document.createElement('iframe');a.className='FB_RECEIVER_DOM';if(!this._iframeCreated&&FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.IE){a.src='javascript:false';this._iframeCreated=true;}if(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.IE){a.src=b;a=FB.HiddenContainer.get().appendChild(a);}else{a=FB.HiddenContainer.get().appendChild(a);a.src=b;}return a;},_removeIframe:function(a){if(FB.FBDebug.logLevel>4)FB.FBDebug.writeLine('Remove iframe in '+document.URL);if(a){var b=a.parentNode;if(b)b.removeChild(a);}},_onHashReceived:function(g){if(FB.FBDebug.logLevel>3){FB.FBDebug.writeLine('>>>>>> '+document.URL);FB.FBDebug.writeLine('received hash '+g);}if(FB.Sys.startsWith(g,'guid=')){var b=decodeURIComponent(g);var f=b.indexOf('&');var e=b.substring(5,f);if(this.get_GUID()!==e)return;var o=b.substr(f);var r=o.indexOf('&session=');if(r==-1)return;var h=o.substr(r+9);if(h==='loggedout'){if(FB.Sys.containsKey(this._handlers,'fbLogout')){var j=this._handlers.fbLogout;j(h,null);}}else if(FB.Sys.containsKey(this._handlers,'fbLogin')){var i=this._handlers.fbLogin;i(h,null);}}else{var l=encodeURIComponent('}');var m=g.indexOf(l)+l.length;var n=decodeURIComponent(g.substring(0,m));var a=g.substr(m);var k=FB.JSON.deserialize(n);k.d=a;switch(k.t){case FB.XdComm._packetType.udpSingle:this._onFullDataReceived(k,new FB.XdComm.EndPoint(k.sf,k.sr,k.sc));break;case FB.XdComm._packetType.ack:var c=new FB.XdComm.EndPoint(k.sf,k.sr,k.sc);var d=new FB.ArrayEnumerator(this._sendChannels);while(d.moveNext()){var q=d.get_current();if(c.isEqual(q._endPoint))q._onAck(this._getDataObject(k));}break;default:var p=this._ensureReceiveChannel(k.sid,null);p._onReceivedPacket(k);break;}}},_ensureReceiveChannel:function(e,a){var d=null;var b=new FB.ArrayEnumerator(this._receiveChannels);while(b.moveNext()){var c=b.get_current();if(c._id===e){d=c;break;}}if(!d){d=new FB.XdComm._receiveChannel(e,a);FB.Sys.add(this._receiveChannels,d);}return d;},_onFullDataReceived:function(b,a){if(FB.FBDebug.logLevel>3){FB.FBDebug.dump(b,'received full packet');FB.FBDebug.dump(a,'sender');}if(FB.Sys.containsKey(this._handlers,b.h)){var c=this._handlers[b.h];c(this._getDataObject(b),a);}else{FB.FBDebug.logLine(2,'queue request to unknown handler {0} '+b.h);var d=this._dataRequestQueues[b.h];if(!d)this._dataRequestQueues[b.h]=d=[];FB.Sys.add(d,b);}},_getDataObject:function(b){var a=b.d;switch(b.df){case FB.XdComm.PacketDataFormat.rawText:return a;case FB.XdComm.PacketDataFormat.OBJ:return b.nd;case FB.XdComm.PacketDataFormat.JSON:default:return FB.JSON.deserialize(decodeURIComponent(a));}},get__useNativeXd:function(){if(!FBIntern.Utility.getSiteVar('use_postMessage')){this._nativeXdState=0;}else if(this._nativeXdState===-1)if((FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.IE&&FBIntern.AppInfo.get_singleton().get_hostInfo().majorVersion<8)){this._nativeXdState=0;}else this._nativeXdState=window.postMessage!=null?1:0;return this._nativeXdState===1;},_useXdProxy:function(){return (FBIntern.Utility.getSiteVar('use_xdProxy')&&!FB.Facebook.get_isInCanvas()&&(this.get__useNativeXd()||this.get__useFlashXd()));},get_GUID:function(){if(!this._guid)this._guid=Math.random().toString();return this._guid;},get__useFlashXd:function(){var a=(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.IE);if(this._flashXdState===-1)if((!this.get__useNativeXd()||a)&&FBIntern.Flash.hasRequireVersion()){this._flashXdState=1;}else this._flashXdState=0;return this._flashXdState===1;},_receiverUrl:null,_uniqueOrigin:null,_iframeCreated:false,_id:null,_maxPacketDataLength:0,_nativeMsgId:0,_guid:null});FB.provide('FB.XdComm.Server',{_onLoad:function(){FB.XdComm.Server.singleton=new FB.XdComm.Server();FB.XdComm.Server.postMessageHeader='FB_msg:';FB.XdComm.Server.postMessageAckHeader='FB_msg_ack:';},init:function(a){FB.XdComm.Server.singleton.set_receiverUrl(a);},registerSimpleHandler:function(b,a){if(!FB.XdComm.Server.singleton.isDataHandlerRegistered(b))FB.XdComm.Server.singleton.registerDataHandler(b,function(c,d){a(c);});}});
FB.subclass('FBIntern.Cookie','FB.Class',{init:function(){}});FB.provide('FBIntern.Cookie',{set:function(e,h,f,c,b){if(FB.Sys.isNullOrUndefined(h))h='';var a=e+'='+encodeURIComponent(h)+';';if(b){var g=new Date();var d=new Date(g.getTime()+3600000*24*b);a+='expires='+d.toUTCString()+';';}if(f)a+='path='+f+';';if(c)a+='domain='+c+';';document.cookie=a;},clear:function(b,c,a){FBIntern.Cookie.set(b,'',c,a,-10);},getValue:function(d){var e=d+'=';var b=document.cookie.split(';');for(var c=0;c<b.length;c++){var a=b[c];a=FB.Sys.trim(a);if(!a.indexOf(e)){a=decodeURIComponent(a.substr(e.length));return a;}}return null;}});
FB._create_XdHttpRequestResult=function(a,d,e,c){var b={};b.status=d;b.statusText=e;b.responseText=c;b.id=a;return b;};
FB.subclass('FB._xdHttpRequestClient','FB.Class',{init:function(b,a,c){if(!FBIntern.Flash.hasRequireVersion()){FB.XdComm.Server.singleton.createNamedHiddenIFrame(c,b,'FB_SERVER_IFRAME',null);this._serverEndPoint=new FB.XdComm.EndPoint(c,FB.XdComm.PageRelation.child,a);}else if(!window.FB_OnXdHttpResult){FB.FBDebug.logLine(2,'Set window.FB_OnXdHttpResult');window.FB_OnXdHttpResult=FB._xdHttpRequestClient._onFlashDataReceived;}},send:function(c,i,d,b,a){if(!FBIntern.Flash.hasRequireVersion()){var h=new FBIntern.Uri(i);var g=h.get_pathAndQuery();FB._xdHttpRequestClient._ensureListenerStarted();var e=FB._xdHttpRequestClient._idCount++;var f=[e,c,g,d,b];FB._xdHttpRequestClient._requestQueue[e.toString()]=a;FB.FBDebug.logLine(3,'XdHttpRequestClient: send request for '+i);FB.XdComm.Server.singleton.send(this._serverEndPoint,'http_server',f);}else FBIntern.Flash.get_xdComm().waitUntilReady(FB.bind(function(l){var j=l;FB.FBDebug.logLine(3,'XdHttpRequestClient: send flash request for '+i);var k=j.sendXdHttpRequest(c,i,d,b);FB._xdHttpRequestClient._requestQueue[k.toString()]=a;},this));},_serverEndPoint:null});FB.provide('FB._xdHttpRequestClient',{_onLoad:function(){FB._xdHttpRequestClient._requestQueue={};FB._xdHttpRequestClient._handlerRegistered=false;FB._xdHttpRequestClient._idCount=0;},_ensureListenerStarted:function(){if(!FB._xdHttpRequestClient._handlerRegistered){FB.XdComm.Server.singleton.registerDataHandler('http_client',FB._xdHttpRequestClient._onDataReceived);FB._xdHttpRequestClient._handlerRegistered=true;}},_onFlashDataReceived:function(a,b){b=decodeURIComponent(b);var c=FB._create_XdHttpRequestResult(a,200,'Success',b);window.setTimeout(function(){FB._xdHttpRequestClient._onDataReceived(c,null);},0);},_onDataReceived:function(b,d){FB.FBDebug.logLine(3,'XdHttpRequestClient: got result ');var c=b;var a=FB._xdHttpRequestClient._requestQueue[c.id];a(c);}});
FB._create_SessionRecord=function(e,g,b,d,a,f){var c={};c.session_key=e;c.uid=g;c.expires=b;c.secret=d;c.sig=f;c.base_domain=a;return c;};
FB.subclass('FB._xdJsonRequest','FB.Class',{init:function(e,b,d,c,a){this._method=b;this._url=d;this._requestBody=c;this._extraHeaders=a;this._xdHttpClient=e;},sendRequest:function(){this._xdHttpClient.send(this._method,this._url,this._requestBody,this._extraHeaders,FB.bind(function(d){if(d.status<400){var b=d.responseText;var c;try{c=FB.JSON.deserialize(b,true);}catch(a){var jsonException=FBIntern.Utility.createException('JSON exception during deserialization.',b,a);this.callback(null,a);return;}this.callback(c,null);}else{var a=new Error(FB.Sys.format('HTTP request failure status code=\'{0}\', text=\'{1}\'',d.status,d.statusText));this.callback(null,a);}},this));},callback:null,_method:null,_url:null,_requestBody:null,_extraHeaders:null,_xdHttpClient:null});
FB.provide('FB.ApiErrorCode',{unknown:1,service_not_available:2,max_requests_reached:4,remote_address_not_allowed:5,invalid_parameter:100,invalid_api_key:101,invalid_session_key:102,invalid_call_id:103,invalid_signature:104,permission_denied:200,internal_error:800,invalid_operation:801,quota_exceeded:802,object_already_exists:804,temporary_Database_failure:805});
FB.Type.createClass('FBIntern.Md5',{requires:[],ctor:function(){},static:{computeHashToString:function(zm){function o(zq,zp){return (zq<<zp)|(zq>>>(32-zp));}function b(zq,zt){var zr,zu,zs,zv,zp;zs=(zq&2147483648);zv=(zt&2147483648);zr=(zq&1073741824);zu=(zt&1073741824);zp=(zq&1073741823)+(zt&1073741823);if(zr&zu)return (zp^2147483648^zs^zv);if(zr|zu){if(zp&1073741824){return (zp^3221225472^zs^zv);}else return (zp^1073741824^zs^zv);}else return (zp^zs^zv);}function g(zp,zq,zr){return (zp&zq)|((~zp)&zr);}function i(zp,zq,zr){return (zp&zr)|(zq&(~zr));}function k(zp,zq,zr){return (zp^zq^zr);}function m(zp,zq,zr){return (zq^(zp|(~zr)));}function h(zp,zr,zs,zt,zv,zu,zq){zp=b(zp,b(b(g(zr,zs,zt),zv),zq));return b(o(zp,zu),zr);}function j(zp,zr,zs,zt,zv,zu,zq){zp=b(zp,b(b(i(zr,zs,zt),zv),zq));return b(o(zp,zu),zr);}function l(zp,zr,zs,zt,zv,zu,zq){zp=b(zp,b(b(k(zr,zs,zt),zv),zq));return b(o(zp,zu),zr);}function n(zp,zr,zs,zt,zv,zu,zq){zp=b(zp,b(b(m(zr,zs,zt),zv),zq));return b(o(zp,zu),zr);}function e(zx){var zw;var zr=zx.length;var zt=zr+8;var zu=(zt-(zt%64))/64;var zs=(zu+1)*16;var zv=Array(zs-1);var zq=0;var zp=0;while(zp<zr){zw=(zp-(zp%4))/4;zq=(zp%4)*8;zv[zw]=(zv[zw]|(zx.charCodeAt(zp)<<zq));zp++;}zw=(zp-(zp%4))/4;zq=(zp%4)*8;zv[zw]=zv[zw]|(128<<zq);zv[zs-2]=zr<<3;zv[zs-1]=zr>>>29;return zv;}function zg(zt){var zp="",zq="",zr,zs;for(zs=0;zs<=3;zs++){zr=(zt>>>(zs*8))&255;zq="0"+zr.toString(16);zp=zp+zq.substr(zq.length-2,2);}return zp;}function zf(zr){zr=zr.replace(/\r\n/g,"\n");var zs="";for(var zq=0;zq<zr.length;zq++){var zp=zr.charCodeAt(zq);if(zp<128){zs+=String.fromCharCode(zp);}else if((zp>127)&&(zp<2048)){zs+=String.fromCharCode((zp>>6)|192);zs+=String.fromCharCode((zp&63)|128);}else{zs+=String.fromCharCode((zp>>12)|224);zs+=String.fromCharCode(((zp>>6)&63)|128);zs+=String.fromCharCode((zp&63)|128);}}return zs;}var zo=Array();var zl,a,c,d,f,zh,zi,zj,zk;var p=7,q=12,r=17,s=22;var t=5,u=9,v=14,w=20;var x=4,y=11,z=16,za=23;var zb=6,zc=10,zd=15,ze=21;zm=zf(zm);zo=e(zm);zh=1732584193;zi=4023233417;zj=2562383102;zk=271733878;for(zl=0;zl<zo.length;zl+=16){a=zh;c=zi;d=zj;f=zk;zh=h(zh,zi,zj,zk,zo[zl+0],p,3614090360);zk=h(zk,zh,zi,zj,zo[zl+1],q,3905402710);zj=h(zj,zk,zh,zi,zo[zl+2],r,606105819);zi=h(zi,zj,zk,zh,zo[zl+3],s,3250441966);zh=h(zh,zi,zj,zk,zo[zl+4],p,4118548399);zk=h(zk,zh,zi,zj,zo[zl+5],q,1200080426);zj=h(zj,zk,zh,zi,zo[zl+6],r,2821735955);zi=h(zi,zj,zk,zh,zo[zl+7],s,4249261313);zh=h(zh,zi,zj,zk,zo[zl+8],p,1770035416);zk=h(zk,zh,zi,zj,zo[zl+9],q,2336552879);zj=h(zj,zk,zh,zi,zo[zl+10],r,4294925233);zi=h(zi,zj,zk,zh,zo[zl+11],s,2304563134);zh=h(zh,zi,zj,zk,zo[zl+12],p,1804603682);zk=h(zk,zh,zi,zj,zo[zl+13],q,4254626195);zj=h(zj,zk,zh,zi,zo[zl+14],r,2792965006);zi=h(zi,zj,zk,zh,zo[zl+15],s,1236535329);zh=j(zh,zi,zj,zk,zo[zl+1],t,4129170786);zk=j(zk,zh,zi,zj,zo[zl+6],u,3225465664);zj=j(zj,zk,zh,zi,zo[zl+11],v,643717713);zi=j(zi,zj,zk,zh,zo[zl+0],w,3921069994);zh=j(zh,zi,zj,zk,zo[zl+5],t,3593408605);zk=j(zk,zh,zi,zj,zo[zl+10],u,38016083);zj=j(zj,zk,zh,zi,zo[zl+15],v,3634488961);zi=j(zi,zj,zk,zh,zo[zl+4],w,3889429448);zh=j(zh,zi,zj,zk,zo[zl+9],t,568446438);zk=j(zk,zh,zi,zj,zo[zl+14],u,3275163606);zj=j(zj,zk,zh,zi,zo[zl+3],v,4107603335);zi=j(zi,zj,zk,zh,zo[zl+8],w,1163531501);zh=j(zh,zi,zj,zk,zo[zl+13],t,2850285829);zk=j(zk,zh,zi,zj,zo[zl+2],u,4243563512);zj=j(zj,zk,zh,zi,zo[zl+7],v,1735328473);zi=j(zi,zj,zk,zh,zo[zl+12],w,2368359562);zh=l(zh,zi,zj,zk,zo[zl+5],x,4294588738);zk=l(zk,zh,zi,zj,zo[zl+8],y,2272392833);zj=l(zj,zk,zh,zi,zo[zl+11],z,1839030562);zi=l(zi,zj,zk,zh,zo[zl+14],za,4259657740);zh=l(zh,zi,zj,zk,zo[zl+1],x,2763975236);zk=l(zk,zh,zi,zj,zo[zl+4],y,1272893353);zj=l(zj,zk,zh,zi,zo[zl+7],z,4139469664);zi=l(zi,zj,zk,zh,zo[zl+10],za,3200236656);zh=l(zh,zi,zj,zk,zo[zl+13],x,681279174);zk=l(zk,zh,zi,zj,zo[zl+0],y,3936430074);zj=l(zj,zk,zh,zi,zo[zl+3],z,3572445317);zi=l(zi,zj,zk,zh,zo[zl+6],za,76029189);zh=l(zh,zi,zj,zk,zo[zl+9],x,3654602809);zk=l(zk,zh,zi,zj,zo[zl+12],y,3873151461);zj=l(zj,zk,zh,zi,zo[zl+15],z,530742520);zi=l(zi,zj,zk,zh,zo[zl+2],za,3299628645);zh=n(zh,zi,zj,zk,zo[zl+0],zb,4096336452);zk=n(zk,zh,zi,zj,zo[zl+7],zc,1126891415);zj=n(zj,zk,zh,zi,zo[zl+14],zd,2878612391);zi=n(zi,zj,zk,zh,zo[zl+5],ze,4237533241);zh=n(zh,zi,zj,zk,zo[zl+12],zb,1700485571);zk=n(zk,zh,zi,zj,zo[zl+3],zc,2399980690);zj=n(zj,zk,zh,zi,zo[zl+10],zd,4293915773);zi=n(zi,zj,zk,zh,zo[zl+1],ze,2240044497);zh=n(zh,zi,zj,zk,zo[zl+8],zb,1873313359);zk=n(zk,zh,zi,zj,zo[zl+15],zc,4264355552);zj=n(zj,zk,zh,zi,zo[zl+6],zd,2734768916);zi=n(zi,zj,zk,zh,zo[zl+13],ze,1309151649);zh=n(zh,zi,zj,zk,zo[zl+4],zb,4149444226);zk=n(zk,zh,zi,zj,zo[zl+11],zc,3174756917);zj=n(zj,zk,zh,zi,zo[zl+2],zd,718787259);zi=n(zi,zj,zk,zh,zo[zl+9],ze,3951481745);zh=b(zh,a);zi=b(zi,c);zj=b(zj,d);zk=b(zk,f);}var zn=zg(zh)+zg(zi)+zg(zj)+zg(zk);return zn.toLowerCase();}}});
FB.subclass('FB.Facebook','FB.Class',{init:function(){}});FB.provide('FB.Facebook',{_onLoad:function(){FB.Facebook.apiKey=null;FB.Facebook.apiClient=null;FB.Facebook.appSecret=null;FB.Facebook.version='1.0';FB.Facebook.__initCalled=null;FB.Facebook.appSettings={};FB.Facebook.isInConnect=0;FB.Facebook.locale='en_US';FB.Facebook._initialized=null;FB.Facebook._baseDomain=null;FB.Facebook._isBaseDomainInitialized=false;FB.Facebook._isInCanvas=-1;FB.Facebook._isInitialNoSession=false;FB.Facebook._isInitialSessionSwitch=true;FB.Facebook._publicSessionData=new FB.SimpleWaitable();},init:function(a,c,b){if(typeof(a)==='object'&&!c&&!b){b=arguments[0];a=null;c=null;}if(FB.Facebook.apiClient){FB.FBDebug.writeLine('Error: Facebook.init() has already been called.');}else{if(a){FB.Facebook.apiKey=a;}else if(b)FB.Facebook.apiKey=b.apiKey;if(!FB.Facebook.apiKey)FB.FBDebug.logLine(0,'API Key is not specified');if(!c&&b)c=b.xdChannelUrl;if(b)FB.Facebook.appSettings=b;FB.XdComm.Server.singleton.set_receiverUrl(c);FB.Facebook.apiClient=new FB.ApiClient(FB.Facebook.apiKey);FB.Facebook._isInitialNoSession=!FB.Facebook.get_sessionState().result;if(b)FB.Facebook._processOptionalAppSettings();(FB.Facebook.get_initialized())._setResult(true);}if(FB.Facebook.__initCalled)FB.Facebook.__initCalled();},_reloadIfSessionStateChanged:function(){FB.Facebook.get_sessionWaitable().add_changed(function(a){window.setTimeout(function(){var c=!a.result;if(FB.Facebook._isInitialSessionSwitch){FB.Facebook._isInitialSessionSwitch=false;var d=true;if(FB.Facebook.appSettings.doNotUseCachedConnectState){d=false;}else{var b=Math.random().toString();FBIntern.Cookie.set('testCookie',b,'/',FB.Facebook._baseDomain);if(b==FBIntern.Cookie.getValue('testCookie')){FBIntern.Cookie.clear('testCookie','/',FB.Facebook._baseDomain);}else d=false;}if(!d&&FB.Facebook._isInitialNoSession)FB.Facebook._isInitialNoSession=c;}if(c!==FB.Facebook._isInitialNoSession){FB.FBDebug.logLine(3,'reloading ...');window.setTimeout(function(){window.location.reload(true);},0);}},0);});},_processOptionalAppSettings:function(){var a=FB.Facebook.appSettings;for(var c in a){var b={key:c,value:a[c]};switch(b.key){case 'debugLogLevel':FB.FBDebug.logLevel=b.value;break;case 'apiKey':case 'xdChannelUrl':case 'fetchSignedPublicSessionData':case 'ifUserConnected':case 'ifUserNotConnected':case 'doNotUseCachedConnectState':case 'permsToRequestOnConnect':case 'disableCookies':break;case 'doNotMonitorUsage':FB.Monitor.disableLogging();break;case 'reloadIfSessionStateChanged':FB.Facebook._reloadIfSessionStateChanged();break;default:FB.FBDebug.logLine(1,'Invalid app setting key: '+b.key);break;}}if(FB.Facebook.appSettings.ifUserConnected||FB.Facebook.appSettings.ifUserNotConnected)FB.Connect.ifUserConnected(FB.Facebook.appSettings.ifUserConnected,FB.Facebook.appSettings.ifUserNotConnected);},get_sessionState:function(){return FB.Facebook.get_sessionWaitable();},get_sessionWaitable:function(){FB.FBDebug.assert(FB.Facebook.apiClient,'Facebook.init() is not called yet');return FB.Facebook.apiClient.get_sessionWaitable();},get_initialized:function(){if(!FB.Facebook._initialized)FB.Facebook._initialized=new FB.SimpleWaitable();return FB.Facebook._initialized;},get_baseDomain:function(){if(!FB.Facebook._isBaseDomainInitialized)if(FB.Facebook.apiKey){FB.Facebook._baseDomain=FBIntern.Cookie.getValue('base_domain_'+FB.Facebook.apiKey);}else FB.FBDebug.logLine(0,'Can\'t get BaseDomain property when API key is not set');return FB.Facebook._baseDomain;},set_baseDomain:function(b){FB.Facebook._isBaseDomainInitialized=true;if(FB.Sys.isUndefined(b)){FB.Facebook._baseDomain=null;}else FB.Facebook._baseDomain=b;if(FB.Facebook.apiKey){var a='base_domain_'+FB.Facebook.apiKey;if(!FB.Facebook._baseDomain){FBIntern.Cookie.clear(a,'/',null);}else FBIntern.Cookie.set(a,FB.Facebook._baseDomain,'/',FB.Facebook._baseDomain,0);}else throw new Error('Can\'t set BaseDomain property when api key is set');return b;},get_isInCanvas:function(){if(FB.Facebook._isInCanvas===-1)if(window.parent==window){FB.Facebook._isInCanvas=(document.domain=='facebook.com')?1:0;}else FB.Facebook._isInCanvas=(window.location.href.match("fb_sig_in_iframe=1")!=null?1:0);var a=(FB.Facebook._isInCanvas===1);return a;},get_isInConnect:function(){return FB.Facebook.isInConnect;},get_iframeSignature:function(){if(!FB.Facebook._iframeSignature){var d=-1;var b=window.location.search;if(b){var c=new RegExp('[\\?&]fb_sig_iframe_key=([^&#]*)');var a=c.exec(b);if(a)d=a[1];}FB.Facebook._iframeSignature=d;}if(FB.Facebook._iframeSignature===-1)return null;return FB.Facebook._iframeSignature;},add_initCalled:function(a){FB.Facebook.__initCalled=FB.Delegate.combine(FB.Facebook.__initCalled,a);},remove_initCalled:function(a){FB.Facebook.__initCalled=FB.Delegate.remove(FB.Facebook.__initCalled,a);}});
FB.subclass('FB.ApiClient','FB.Class',{init:function(a){this._sessionWaitable=new FB.SimpleWaitable();this._sessionRefreshInterval=20*60*1000;this._sessionRefreshIntervalId=null;this._apiKey=a;if(!FB.Facebook.apiKey)FB.Facebook.apiKey=a;var b=FBIntern.Utility.getFacebookUrl('api');this._serverAddress=b+'restserver.php';var e=b+'static/v0.4/client_restserver.php?r='+FBIntern.FbGlobals.get_fB_StaticResourceVersions().api_server;var d=b+'static/v0.4/xd_receiver.php?r='+FBIntern.FbGlobals.get_fB_StaticResourceVersions().api_channel;if(FB.FBDebug.logLevel>0)e=FBIntern.Uri.addQueryParameters(e,'debug_level='+FB.FBDebug.logLevel.toString());this._xdHttpClient=new FB._xdHttpRequestClient(e,d,'fb_api_server');this._isLoggedIn=window.location.href.match("fb_sig_user")!=null;var c=FB.ApiClient._getSessionFromUrl(document.URL);if(!c)if(FB.Facebook.get_isInCanvas()&&!this._isLoggedIn){this._setSessionCookies(null);}else c=this._getSessionFromCookies();if(c&&!FB.ApiClient.sessionIsExpired(c))this.set_session(c);},get_session:function(){return this._session;},set_session:function(a){if(a!==this._session){this._session=a;if(this._session&&this._session.base_domain)FB.Facebook.set_baseDomain(this._session.base_domain);this._setSessionCookies(a);if(this._sessionRefreshIntervalId)clearInterval(this._sessionRefreshIntervalId);this._sessionRefreshIntervalId=window.setInterval(FB.bind(function(){this._refreshSession(null);},this),this._sessionRefreshInterval);this._sessionWaitable._setResult(a,!a);}return a;},get_sessionWaitable:function(){return this._sessionWaitable;},requireLogin:function(a){if(this._session){if(a)a(null);}else FB.ApiClient.createSessionDelegate(this,FB.bind(function(b){FB.FBDebug.assert(b,'Invalid session returned');this._session=b;},this));},_getSessionFromCookies:function(){if(FB.Facebook.appSettings.doNotUseCachedConnectState)return null;var e=FBIntern.Cookie.getValue(this._apiKey);var f=FBIntern.Cookie.getValue(this._apiKey+'_user');var d=FBIntern.Cookie.getValue(this._apiKey+'_ss');var c=FBIntern.Cookie.getValue(this._apiKey+'_session_key');var a=parseInt(FBIntern.Cookie.getValue(this._apiKey+'_expires'));if(e&&f&&d&&c&&a!==-1){var b=FB._create_SessionRecord(c,f,a,d,FB.Facebook.get_baseDomain(),e);return b;}return null;},_setSessionCookies:function(a){if(FB.Facebook.appSettings.disableCookies)return;if(a&&a.expires!==-1&&a.secret&&a.session_key&&a.uid&&a.sig){FBIntern.Cookie.set(this._apiKey,a.sig,'/',FB.Facebook.get_baseDomain(),0);FBIntern.Cookie.set(this._apiKey+'_user',a.uid,'/',FB.Facebook.get_baseDomain(),0);FBIntern.Cookie.set(this._apiKey+'_ss',a.secret,'/',FB.Facebook.get_baseDomain(),0);FBIntern.Cookie.set(this._apiKey+'_session_key',a.session_key,'/',FB.Facebook.get_baseDomain(),0);FBIntern.Cookie.set(this._apiKey+'_expires',a.expires.toString(),'/',FB.Facebook.get_baseDomain(),0);}else if(!a){FBIntern.Cookie.clear(this._apiKey,'/',FB.Facebook.get_baseDomain());FBIntern.Cookie.clear(this._apiKey+'_user','/',FB.Facebook.get_baseDomain());FBIntern.Cookie.clear(this._apiKey+'_ss','/',FB.Facebook.get_baseDomain());FBIntern.Cookie.clear(this._apiKey+'_session_key','/',FB.Facebook.get_baseDomain());FBIntern.Cookie.clear(this._apiKey+'_expires','/',FB.Facebook.get_baseDomain());}},_createLoginUrl:function(){var a={api_key:this._apiKey,extern:FB.Facebook.get_isInConnect(),fbconnect:1,next:document.URL,return_session:1,v:FB.Facebook.version};return FBIntern.Utility.createFacebookUrl('www','login.php',a,false);},_refreshSession:function(a){var e=FBIntern.Utility.getFacebookUrl('api')+'session_state.php';var d='api_key='+this._apiKey.toString()+'&session_key='+((!this._session)?'null':this._session.session_key.toString());var b={};b['Content-Type']='application/x-www-form-urlencoded';var c=new FB._xdJsonRequest(this._xdHttpClient,'POST',e,d,b);c.callback=FB.bind(function(h,g){if(h){var f=h;if(!f['error']){this._session=f.session;this._setSessionCookies(this._session);if(a)a(null);}else if(f.error===-1){FB.FBDebug.logLine(1,'User has not authorized the application.');}else if(f.error===-2){FB.FBDebug.logLine(1,'User is not logged into Facebook.');}else if(f.error===-3)FB.FBDebug.logLine(1,'Unknown error while refreshing user session.');}},this);c.sendRequest();},auth_getAppPublicKey:function(b,a){return this.callMethod('auth.getAppPublicKey',{target_app_key:b},a);},auth_getSignedPublicSessionData:function(a){return this.callMethod('auth.getSignedPublicSessionData',null,a);},connect_getUnconnectedFriendsCount:function(a){return this.callMethod('connect.getUnconnectedFriendsCount',null,a);},events_get:function(g,a,f,b,e,c){var d={};if(g)d.uid=g;if(a)d.eids=a;d.start_time=f;d.end_time=b;if(e)d.rsvp_status=e;return this.callMethod('events.get',d,c);},events_getMembers:function(a,b){var c={};c.eid=a;return this.callMethod('events.getMembers',c,b);},fbml_refreshImgSrc:function(c,a){var b={};b.url=c;return this.callMethod('fbml.refreshImgSrc',b,a);},fbml_refreshRefUrl:function(c,a){var b={};b.url=c;return this.callMethod('fbml.refreshRefUrl',b,a);},fbml_setRefHandle:function(b,a,c){var d={};d.handle=b;d.fbml=a;return this.callMethod('fbml.setRefHandle',d,c);},intl_uploadNativeStrings:function(a,b){var c={};c.native_strings=a;return this.callMethod('intl.uploadNativeStrings',c,b);},feed_publishUserAction:function(f,g,e,a,d,h,b){var c={};c.template_bundle_id=f.toString();if(g)c.template_data=g;if(e)c.target_ids=e.toString();if(a)c.body_general=a;if(d>0)c.story_size=d;if(h)c.user_message=h;return this.callMethod('feed.publishUserAction',c,b);},feed_getAppFriendStories:function(a){var b=null;return this.callMethod('feed.getAppFriendStories',b,a);},friends_get:function(a,b){var c={};if(a)c.flid=a;return this.callMethod('friends.get',c,b);},revokeAuthorization:function(b,a){return this.callMethod('auth.revokeAuthorization',null,a);},preloadFQL_get:function(a){if(FB.Facebook.get_isInCanvas()&&this._isLoggedIn&&FB.XdComm.Server.singleton.get_receiverUrl()){FB.Bootstrap._requireFeatures(['CacheData'],function(){FBIntern.CacheClient.preloadFQLGet(a);});return true;}else{a(Array());return false;}},friends_areFriends:function(c,d,a){var b={};b.uids1=c.toString();b.uids2=d.toString();return this.callMethod('friends.areFriends',b,a);},friends_getAppUsers:function(a){return this.callMethod('friends.getAppUsers',null,a);},friends_getLists:function(a){return this.callMethod('friends.getLists',null,a);},groups_get:function(d,a,b){var c={};if(d)c.uid=d;if(a)c.gids=a.toString();return this.callMethod('groups.get',c,b);},groups_getMembers:function(a,b){var c={};c.gid=a;return this.callMethod('groups.getMembers',c,b);},privacy_canSee:function(c,d,a){var b={};b.uids=c.toString();b.whats=d.toString();return this.callMethod('privacy.canSee',b,a);},notifications_get:function(a){var b={};return this.callMethod('notifications.get',b,a);},notifications_send:function(d,a,b){var c={};c.to_ids=d.toString();c.notification=a;return this.callMethod('notifications.send',c,b);},notifications_sendEmail:function(d,e,f,a,b){var c={};c.recipients=d.toString();c.subject=e;if(f)c.text=f;if(a)c.fbml=a;return this.callMethod('notifications.sendEmail',c,b);},pages_getInfo:function(a,c,e,b){var d={};d.fields=a.toString();d.page_ids=c.toString();if(e)d.uid=e;return this.callMethod('pages.getInfo',d,b);},pages_isAdmin:function(b,a){var c={};c.page_id=b;return this.callMethod('pages.isAdmin',c,a);},pages_isAppAdded:function(b,a){var c={};c.page_id=b;return this.callMethod('pages.isAppAdded',c,a);},pages_isFan:function(b,d,a){var c={};c.page_id=b;c.uid=d;return this.callMethod('pages.isFan',c,a);},photos_addTag:function(c,e,d,g,h,f,a){var b={};b.pid=c;if(f){b.tags=f;}else{if(e){b.tag_uid=e;}else if(d){b.tag_text=d;}else FB.FBDebug.logLine(1,'Either tag_uid or tag_text must specified');b.x=g;b.y=h;}return this.callMethod('photos.addTag',b,a);},photos_createAlbum:function(c,b,a,d){var e={};e.name=c;e.location=b;e.description=a;return this.callMethod('photos.createAlbum',e,d);},photos_get:function(e,a,d,b){var c={};if(e)c.subj_id=e;if(a)c.aid=a;if(d)c.pids=d.toString();return this.callMethod('photos.get',c,b);},photos_getAlbums:function(d,a,b){var c={};if(d)c.uid=d;if(a)c.aids=a.toString();return this.callMethod('photos.getAlbums',c,b);},photos_getTags:function(c,a){var b={};b.pids=c.toString();return this.callMethod('photos.getTags',b,a);},users_getInfo:function(d,a,b){var c={};c.uids=d.toString();c.fields=a.toString();return this.callMethod('users.getInfo',c,b);},users_getLoggedInUser:function(a){var b={};return this.callMethod('users.getLoggedInUser',b,a);},users_hasAppPermission:function(a,b){var c={};c.ext_perm=a;return this.callMethod('users.hasAppPermission',c,b);},users_isAppAdded:function(a){var b={};return this.callMethod('users.isAppUser',b,a);},users_isAppUser:function(a){var b={};return this.callMethod('users.isAppUser',b,a);},users_setStatus:function(d,a,e,b){var c={};c.status=d;c.clear=a;c.status_includes_verb=e;return this.callMethod('users.setStatus',c,b);},stream_get:function(f,g,a,c,b,d){var e={};e.source_ids=f;e.start_time=g;e.end_time=a;e.limit=c;e.filter_key=b;return this.callMethod('stream.get',e,d);},stream_getComments:function(c,a){var b={};b.post_id=c;return this.callMethod('stream.getComments',b,a);},stream_getFilters:function(a){return this.callMethod('stream.getFilters',{},a);},fql_query:function(c,a){var b={};b.query=c;return this.callMethod('fql.query',b,a);},profile_setFBML:function(g,d,e,a,f,b){var c={};if(g)c.uid=g;c.profile=d;c.profile_action=e;c.mobile_profile=a;c.profile_main=f;return this.callMethod('profile.setFBML',c,b);},profile_getFBML:function(c,a){var b={};b.uid=c;return this.callMethod('profile.getFBML',b,a);},callMethod:function(e,f,b){var c=!this._session&&!FB.Facebook.appSecret&&e!=='fql.query';var d=this._generateJsonRequest(e,f);if(typeof(b)!=='function'){var g=new FB.PendingResult();if(!c){b._api=this;b._addStep(d,g);}else g.setPendingResult(null,FBIntern.Utility.createException('Invalid session state',FB.ApiErrorCode.invalid_session_key));return g;}else{var a=(b);if(!c){d.callback=FB.bind(function(i,h){if(!h&&(h=this._checkError(i)))i=null;a(i,h);},this);d.sendRequest();}else a(null,FBIntern.Utility.createException('Invalid session state',FB.ApiErrorCode.invalid_session_key));return null;}},_checkError:function(b){var a=b;if(!FB.Sys.isUndefined(a.error_code)){FB.FBDebug.logLine(1,'API failed with error code = '+FB.Enum.toString(FB.ApiErrorCode,a.error_code));if(a.error_code===FB.ApiErrorCode.invalid_session_key){FB.FBDebug.logLine(1,'Bad session key, clear it');this.set_session(null);}return FBIntern.Utility.createException(a.error_msg,a);}return null;},_generateJsonRequest:function(i,j){if(!j)j={};var b=j;for(var g in b){var d={key:g,value:b[g]};var n=typeof(d.value);if(n==='boolean'){j[d.key]=(j[d.key])?1:0;}else if(n==='object')j[d.key]=FB.JSON.serialize(d.value);}j.method=i;j.api_key=this._apiKey;j.format='JSON';var a=(new Date()).getMilliseconds();if(a===this._lastCallId)a=this._lastCallId+1;this._lastCallId=a;j.call_id=a;if(!j['v'])j.v=FB.Facebook.version;if(this._session){FB.FBDebug.writeLine('session key = '+this._session.session_key);j.session_key=this._session.session_key;}if(FB.Facebook.appSecret){j.sig=this._generateSignature(j,FB.Facebook.appSecret);}else if(this._session&&this._session.secret){j.ss=1;j.sig=this._generateSignature(j,this._session.secret);}var k=new FB.StringBuilder();var c=j;for(var h in c){var d={key:h,value:c[h]};if(!k.get_isEmpty())k.append('&');k.append(d.key+'='+encodeURIComponent(d.value));}var m=this._serverAddress;m+=('?method='+j.method);var l=k.toString();var e={};e['Content-Type']='application/x-www-form-urlencoded';var f=new FB._xdJsonRequest(this._xdHttpClient,'POST',m,l,e);return f;},get_apiKey:function(){return this._apiKey;},_convertDictKeysToList:function(b){var e=[];var a=b;for(var d in a){var c={key:d,value:a[d]};FB.Sys.add(e,c.key);}return e;},_generateSignature:function(e,f){var g=new FB.StringBuilder();var d=this._convertDictKeysToList(e);d.sort();var a=new FB.ArrayEnumerator(d);while(a.moveNext()){var c=a.get_current();g.append(c+'='+e[c]);}g.append(f);var b=FB.Sys.trim(FBIntern.Md5.computeHashToString(g.toString()));return b;},_apiKey:null,_session:null,_serverAddress:null,_lastCallId:0,_xdHttpClient:null,_isLoggedIn:false});FB.provide('FB.ApiClient',{_onLoad:function(){FB.ApiClient.createSessionDelegate=FB.ApiClient.defaultCreateSession;},sessionIsExpired:function(d){if(!d.expires){return false;}else if(d.expires!==-1){var a=Math.round((new Date()).getTime()/1000);var b=d.expires;var c=!(b>a);return c;}return true;},defaultCreateSession:function(a,b){window.location=a._createLoginUrl();},getSessionFromSigParams:function(j){var h='fb_sig_session_key';var n='fb_sig_user';var d='fb_sig_expires';var f='fb_sig_ss';var b='fb_sig_base_domain';var l='fb_sig_cookie_sig';if(FB.Sys.containsKey(j,l)&&FB.Sys.containsKey(j,h)&&FB.Sys.containsKey(j,n)&&FB.Sys.containsKey(j,d)&&FB.Sys.containsKey(j,f)){var k=j[l];var m=j[n];var i=j[f];var g=j[h];var c=parseInt(j[d]);var a=j[b];if(k&&m&&i&&g&&c!==-1){var e=FB._create_SessionRecord(g,m,c,i,a,k);return e;}}return null;},_getSessionFromUrl:function(e){var d='session';var a=new FBIntern.Uri(e);if(FB.Sys.containsKey(a.get_queryParameters(),d)){var c=a.get_queryParameters()[d];return FB.JSON.deserialize(c);}var b=a.get_queryParameters();return FB.ApiClient.getSessionFromSigParams(b);}});
FB.provide('FB.ConnectState',{connected:1,userNotLoggedIn:2,appNotAuthorized:3});
FB.provide('FB.DialogType',{popUp:0,iframe:1,canvas:2});
FB.subclass('FB.XdComm.XdRpcClient','FB.Class',{init:function(b,a,c){this._requestQueue={};this._serverEndPoint=c;this._rpcClientName=(a)?a:FB.XdComm.Server.singleton.getUniqueHandlerName('rpcClient');this._rcpServerName=b;FB.XdComm.Server.singleton.registerDataHandler(a,FB.bind(this._onDataReceived,this));},send:function(c,a,b){FB.FBDebug.logLine(3,'XdRpcClient.Send: '+c);var e=this._idCount++;var d=[e,this._rpcClientName,c,a,(b)?true:false];this._requestQueue[e.toString()]=b;FB.XdComm.Server.singleton.send(this._serverEndPoint,this._rcpServerName,d);},_onDataReceived:function(c,d){var a=c;var e=a[0];var b=this._requestQueue[e];if(b)b(a[1]);},detachClient:function(){FB.XdComm.Server.singleton.unregisterDataHandler(this._rpcClientName);},_serverEndPoint:null,_rpcClientName:null,_rcpServerName:null,_idCount:0});
FB._create_XdRpcMethodInfo=function(b,a){var c={};FB.FBDebug.assert((!b)^(!a),'One and only one of method or asyncMethod parameters must not be null.');c.method=b;c.asyncMethod=a;return c;};
FB.subclass('FB.XdComm.XdRpcServer','FB.Class',{init:function(b,a){if(a){this.registeredMethodMap=a;}else this.registeredMethodMap={};FB.XdComm.Server.singleton.registerDataHandler(b,FB.bind(this._onDataReceived,this));},_onDataReceived:function(c,j){var g=c;if(g.length!==5)FB.FBDebug.logLine(1,'XdRpcServer.OnDataReceived: invalid parameters.');var h=g[0];var b=g[1];var e=g[2];var a=g[3];var f=g[4];if(!FB.Sys.containsKey(this.registeredMethodMap,e)){FB.FBDebug.logLine(1,'XD RPC server: method '+e+' is not allowed or doesn\'t exist.');return;}var d=this.registeredMethodMap[e];FB.FBDebug.logLine(3,'XdRpcServer.Received: '+e);if(d.method){var i=d.method(a,j);if(f)FB.XdComm.Server.singleton.send(j,b,[h,i]);}else if(d.asyncMethod){d.asyncMethod(a,FB.bind(function(k){if(f)FB.XdComm.Server.singleton.send(j,b,[h,k]);},this),j);}else FB.FBDebug.logLine(1,'MethodInfo for '+e+' does not contain any function pointers.');},registeredMethodMap:null});
FB.provide('FB._contentSizeMethod',{oldMethod:0,newOnlyForFbml:1,newMethod:2});
FB.subclass('FB.CanvasClient','FB.Class',{init:function(){}});FB.provide('FB.CanvasClient',{_onLoad:function(){FB.CanvasClient.serverReceiverUrl=FBIntern.Utility.getFacebookUrl((FBIntern.Utility.isSecure())?'ssl':'static.ak')+'xd_receiver_v0.4.php?r='+FBIntern.FbGlobals.get_fB_StaticResourceVersions().www_channel;FB.CanvasClient.allowWidthChange=false;FB.CanvasClient.__windowSizeChangedCallback=null;FB.CanvasClient._rpcClient=null;FB.CanvasClient._rpcServer=null;FB.CanvasClient._lastSize=FB._create_Size(-1,-1);FB.CanvasClient._timer=-1;FB.CanvasClient._timerInternal=100;FB.CanvasClient._modifyBodyStyle=true;FB.CanvasClient._urlHandler=FB.CanvasClient.defaultUrlHandler;FB.CanvasClient._allowCallback=null;FB.CanvasClient._cancelCallback=null;FB.CanvasClient._feedCallback=null;FB.CanvasClient._isRenderFbml=false;FB.CanvasClient._allowCallback=function(a){};FB.CanvasClient._cancelCallback=Delegate.Null;FB.CanvasClient._feedCallback=Delegate.Null;},_ensureRpcClient:function(){if(!FB.CanvasClient._rpcClient){var a=new FB.XdComm.EndPoint(null,FB.XdComm.PageRelation.parent,FB.CanvasClient.serverReceiverUrl);a.flashOrigin=FB.CanvasClient._flashOrigin;FB.CanvasClient._rpcClient=new FB.XdComm.XdRpcClient('iframeOuterServer','iframeInnerClient',a);}},run:function(){if(!FB.CanvasClient._rpcServer){var a={loadNewUrl:FB._create_XdRpcMethodInfo(FB.CanvasClient.loadNewUrl,null),loginResponse:FB._create_XdRpcMethodInfo(FB.CanvasClient.loginResponse,null),feedResponse:FB._create_XdRpcMethodInfo(FB.CanvasClient.feedResponse,null)};var b='iframeInnerServer';FB.CanvasClient._rpcServer=new FB.XdComm.XdRpcServer(b,a);FB.CanvasClient._rpcClient.send('setInnerReceiver',{receiverUrl:FB.XdComm.Server.singleton.get_receiverUrl()},null);}},get_timerInterval:function(){return FB.CanvasClient._timerInternal;},set_timerInterval:function(a){FB.CanvasClient._timerInternal=a;return a;},startTimerToSizeToContent:function(){FB.FBDebug.logLine(4,'CanvasClient: StartTimerToSizeToContent');FB.CanvasClient.setSizeToContent();if(FB.CanvasClient._timer===-1)FB.CanvasClient._timer=window.setInterval(FB.bind(FB.CanvasClient.setSizeToContent),FB.CanvasClient._timerInternal);},stopTimerToSizeToContent:function(){if(FB.CanvasClient._timer!==-1){window.clearInterval(FB.CanvasClient._timer);FB.CanvasClient._timer=-1;}},setSizeToContent:function(){if(FB.CanvasClient.get__isInDialog()){FB.CanvasClient._sizeDialogToContent();return;}var a=document.documentElement;if(FB.CanvasClient._modifyBodyStyle)a.style.overflow='hidden';var b=FB.CanvasClient._computeContentSize();if(FB.CanvasClient.allowWidthChange){if(b.w!==FB.CanvasClient._lastSize.w||b.h!==FB.CanvasClient._lastSize.h){FB.CanvasClient._lastSize=b;FB.CanvasClient._setCanvasSize(b.w.toString()+'px',b.h.toString()+'px',null);}}else if(b.h!==FB.CanvasClient._lastSize.h){FB.CanvasClient._lastSize=b;FB.CanvasClient.setCanvasHeight(b.h.toString()+'px',null);}},_sizeDialogToContent:function(){var b=FBIntern.Utility.get_windowSize();var a=FBIntern.Utility.get_documentSize();var d=a.h-b.h;var e=a.w-b.w;if(d||e){FB.FBDebug.logLine(2,FB.Sys.format('CanvasClient: resize dialog by ({0}, {1})',e,d));try{window.resizeBy(e,d);}catch(c){FB.FBDebug.logLine(2,FB.Sys.format('CanvasClient: resize faield'));}}},setCanvasHeight:function(b,a){FB.FBDebug.logLine(2,'CanvasClient: set canvas height to '+b);FB.CanvasClient._ensureRpcClient();FB.CanvasClient._rpcClient.send('setCanvasHeight',b,a);},_setCanvasSize:function(c,b,a){FB.FBDebug.logLine(2,FB.Sys.format('CanvasClient: set canvas size to {0}, {1}',c,b));FB.CanvasClient._ensureRpcClient();FB.CanvasClient._rpcClient.send('setCanvasSize',{w:c,h:b},a);},getCanvasInfo:function(a){FB.CanvasClient._ensureRpcClient();FB.CanvasClient._rpcClient.send('getCanvasInfo',null,a);},scrollTo:function(b,c,a){FB.CanvasClient._ensureRpcClient();FB.CanvasClient._rpcClient.send('scrollTo',FB._create_Point(b,c),a);},changeUrlSuffix:function(b,a){FB.CanvasClient._ensureRpcClient();FB.CanvasClient._rpcClient.send('changeUrlSuffix',b,a);},syncUrl:function(){FB.CanvasClient._ensureRpcClient();var a=document.location;FB.CanvasClient._rpcClient.send('refreshUrl',a,null);FB.CanvasClient.run();},requireLogin:function(a,b){FB.CanvasClient._ensureRpcClient();FB.CanvasClient.run();FB.CanvasClient._allowCallback=a;FB.CanvasClient._cancelCallback=b;FB.CanvasClient._rpcClient.send('requireLogin',null,null);},closeLogin:function(){FB.CanvasClient._ensureRpcClient();FB.CanvasClient.run();FB.CanvasClient._rpcClient.send('closeLogin',null,null);},loginResponse:function(a,b){if(a){FB.CanvasClient._allowCallback(a);}else FB.CanvasClient._cancelCallback();return null;},showFeedDialog:function(e,f,b,d,c,h,g){FB.CanvasClient._ensureRpcClient();FB.CanvasClient.run();FB.CanvasClient._feedCallback=c;var a={template_bundle_id:e,template_data:f,body_general:b,target_id:d,user_message_prompt:h,user_message:g};FB.CanvasClient._rpcClient.send('showFeedDialog',a,null);},feedResponse:function(a,b){FB.CanvasClient._feedCallback();return null;},setUrlHandler:function(a){FB.CanvasClient._urlHandler=a;},loadNewUrl:function(a,b){var c=a;FB.FBDebug.logLine(2,FB.Sys.format('CanvasClient: set internal url to  {0}',c));FB.CanvasClient._urlHandler(c);return null;},defaultUrlHandler:function(a){window.location.replace(a);},go:function(a){FB.CanvasClient._ensureRpcClient();FB.CanvasClient._rpcClient.send('goURI',a,null);},add_windowSizeChanged:function(b){var a=FB.CanvasClient.__windowSizeChangedCallback;FB.CanvasClient.add__windowSizeChangedCallback(b);if(!a){FB.CanvasClient._ensureRpcClient();FB.CanvasClient._rpcClient.send('attachToWindowResizeEvent',null,FB.CanvasClient._onRpcCompleted);}},remove_windowSizeChanged:function(a){FB.CanvasClient.remove__windowSizeChangedCallback(a);},_onRpcCompleted:function(a){if(FB.CanvasClient.__windowSizeChangedCallback)FB.CanvasClient.__windowSizeChangedCallback(a);},_computeContentSize:function(){var a=document.body;var g=document.documentElement;var i=0;var b;var f=FBIntern.Utility.getSiteVar('canvas_client_compute_content_size_method',FB._contentSizeMethod.oldMethod);if((f===FB._contentSizeMethod.newOnlyForFbml&&FB.CanvasClient._isRenderFbml)||f===FB._contentSizeMethod.newMethod){b=Math.max(Math.max(a.offsetHeight,a.scrollHeight)+a.offsetTop,Math.max(g.offsetHeight,g.scrollHeight)+g.offsetTop);}else{if(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.IE){b=Math.max(a.offsetHeight,a.scrollHeight)+a.offsetTop;}else b=g.offsetHeight+g.offsetTop;if(window.Dialog)b=Math.max(b,Dialog.max_bottom);}if(FB.CanvasClient.allowWidthChange){if(a.offsetWidth<a.scrollWidth){i=a.scrollWidth+a.offsetLeft;}else{var e=a.childNodes;i=0;for(var h=0;h<e.length;h++){var c=e[h];var d=c.offsetWidth+c.offsetLeft;if(d>i)i=d;}}if(g.clientLeft>0)i+=(g.clientLeft*2);if(g.clientTop>0)b+=(g.clientTop*2);}return FB._create_Size(i,b);},get__isInDialog:function(){return window.opener&&window.opener!==window.self;},add__windowSizeChangedCallback:function(a){FB.CanvasClient.__windowSizeChangedCallback=FB.Delegate.combine(FB.CanvasClient.__windowSizeChangedCallback,a);},remove__windowSizeChangedCallback:function(a){FB.CanvasClient.__windowSizeChangedCallback=FB.Delegate.remove(FB.CanvasClient.__windowSizeChangedCallback,a);}});
FB.subclass('FB.IFrameUtil._resizeUtil','FB.Class',{init:function(a){this.allowWidthChange=a;},setCanvasHeight:function(a,d){var b=a;FB.FBDebug.logLine(2,'ResizeUtil: set canvas height to '+b);if(!b){FB.FBDebug.logLine(1,'Called ResizeUtil.SetCanvasHeight() with invalid input paramters.');}else{var c=this.getIFrameElement(d.frameName);if(c)this.resizeIframe(c,null,b);}return null;},setCanvasSize:function(a,e){var d=a;var f=d.w;var b=d.h;FB.FBDebug.logLine(2,FB.Sys.format('ResizeUtil: set canvas size to {0}, {1}',f,b));if(b){var c=this.getIFrameElement(e.frameName);if(c)this.resizeIframe(c,null,b);}if(f)if(this.allowWidthChange){var c=this.getIFrameElement(e.frameName);if(c)this.resizeIframe(c,f,null);}else FB.FBDebug.logLine(1,'Iframe width change is disallowed.');return null;},getIFrameElement:function(d){var c=document.getElementsByTagName('iframe');for(var a=0;a<c.length;a++){var b=c[a];if(b.name===d)return b;}return null;},resizeIframe:function(b,c,a){if(b.resizeHandler){b.resizeHandler((c==null)?null:parseInt(c),(a==null)?null:parseInt(a));}else{if(c!=null)b.style.width=c;if(a!=null)b.style.height=a;}},allowWidthChange:false});
FB.subclass('FB.IFrameUtil._canvasUtil','FB.IFrameUtil._resizeUtil',{init:function(a){this._super(a);},getCanvasInfo:function(a,g){var c=this.getIFrameElement(g.frameName);if(c){var h=Vector2.getViewportDimensions();var b=Vector2.getDocumentDimensions();var f=Vector2.getScrollPosition(null);var d=Vector2.getElementPosition(c,'document');var e={window:{w:h.x,h:h.y},page:{w:b.x,h:b.y},scrollPos:{x:f.x,y:f.y},canvas:{w:c.offsetWidth,h:c.offsetHeight},canvasPos:{x:d.x,y:d.y}};return e;}else return null;},changeUrlSuffix:function(a,b){var c=a;PlatformCanvasController.singleton.changeUrlSuffix(c,false);return null;},refreshUrl:function(a,b){var c=a;PlatformCanvasController.refreshUrl(c);return null;},scrollTo:function(a,c){var b=a;var d=new Vector2(b.x,b.y,'document');DOMScroll.scrollTo(d,false);return null;},attachToWindowResizeEvent:function(a,b,c){this.add_windowSizeChangedCallback(b);FBIntern.Utility.addEventListener(window.self,'resize',FB.bind(function(e){if(this.__windowSizeChangedCallback){var d=this.getCanvasInfo(null,c);this.__windowSizeChangedCallback(d);}},this));},requireLogin:function(a,b,c){PlatformCanvasController.singleton.requireLogin();},goURI:function(a,b,c){var d=a;PlatformCanvasController.singleton.goURI(d);},closeLogin:function(a,b,c){PlatformCanvasController.singleton.closeLogin();},showFeedDialog:function(a,c,d){var b=a;PlatformCanvasController.singleton.showFeedDialog(b.template_bundle_id,b.template_data,b.body_general,b.target_id,b.user_message_prompt,b.user_message);},add_windowSizeChangedCallback:function(a){this.__windowSizeChangedCallback=FB.Delegate.combine(this.__windowSizeChangedCallback,a);},remove_windowSizeChangedCallback:function(a){this.__windowSizeChangedCallback=FB.Delegate.remove(this.__windowSizeChangedCallback,a);},__windowSizeChangedCallback:null});
FB.subclass('FB.IFrameUtil.CanvasUtilServer','FB.Class',{init:function(){}});FB.provide('FB.IFrameUtil.CanvasUtilServer',{_onLoad:function(){FB.IFrameUtil.CanvasUtilServer._rpcServer=null;FB.IFrameUtil.CanvasUtilServer._rpcClient=null;FB.IFrameUtil.CanvasUtilServer._canvasUtil=null;},run:function(a,b){FB.IFrameUtil.CanvasUtilServer.iframeName=b;if(!FB.IFrameUtil.CanvasUtilServer._rpcServer){FB.IFrameUtil.CanvasUtilServer._canvasUtil=new FB.IFrameUtil._canvasUtil(a);var c={setCanvasHeight:FB._create_XdRpcMethodInfo(FB.bind(FB.IFrameUtil.CanvasUtilServer._canvasUtil.setCanvasHeight,FB.IFrameUtil.CanvasUtilServer._canvasUtil),null),setCanvasSize:FB._create_XdRpcMethodInfo(FB.bind(FB.IFrameUtil.CanvasUtilServer._canvasUtil.setCanvasSize,FB.IFrameUtil.CanvasUtilServer._canvasUtil),null),getCanvasInfo:FB._create_XdRpcMethodInfo(FB.bind(FB.IFrameUtil.CanvasUtilServer._canvasUtil.getCanvasInfo,FB.IFrameUtil.CanvasUtilServer._canvasUtil),null),scrollTo:FB._create_XdRpcMethodInfo(FB.bind(FB.IFrameUtil.CanvasUtilServer._canvasUtil.scrollTo,FB.IFrameUtil.CanvasUtilServer._canvasUtil),null),changeUrlSuffix:FB._create_XdRpcMethodInfo(FB.bind(FB.IFrameUtil.CanvasUtilServer._canvasUtil.changeUrlSuffix,FB.IFrameUtil.CanvasUtilServer._canvasUtil),null),refreshUrl:FB._create_XdRpcMethodInfo(FB.bind(FB.IFrameUtil.CanvasUtilServer._canvasUtil.refreshUrl,FB.IFrameUtil.CanvasUtilServer._canvasUtil),null),setInnerReceiver:FB._create_XdRpcMethodInfo(FB.IFrameUtil.CanvasUtilServer.setInnerReceiver,null),attachToWindowResizeEvent:FB._create_XdRpcMethodInfo(null,FB.bind(FB.IFrameUtil.CanvasUtilServer._canvasUtil.attachToWindowResizeEvent,FB.IFrameUtil.CanvasUtilServer._canvasUtil)),requireLogin:FB._create_XdRpcMethodInfo(null,FB.bind(FB.IFrameUtil.CanvasUtilServer._canvasUtil.requireLogin,FB.IFrameUtil.CanvasUtilServer._canvasUtil)),closeLogin:FB._create_XdRpcMethodInfo(null,FB.bind(FB.IFrameUtil.CanvasUtilServer._canvasUtil.closeLogin,FB.IFrameUtil.CanvasUtilServer._canvasUtil)),goURI:FB._create_XdRpcMethodInfo(null,FB.bind(FB.IFrameUtil.CanvasUtilServer._canvasUtil.goURI,FB.IFrameUtil.CanvasUtilServer._canvasUtil)),showFeedDialog:FB._create_XdRpcMethodInfo(null,FB.bind(FB.IFrameUtil.CanvasUtilServer._canvasUtil.showFeedDialog,FB.IFrameUtil.CanvasUtilServer._canvasUtil))};FB.FBDebug.assert(FB.XdComm.Server.singleton.get_receiverUrl(),'FB.XdComm.Server not initialized');FB.IFrameUtil.CanvasUtilServer._rpcServer=new FB.XdComm.XdRpcServer('iframeOuterServer',c);}else if(a&&!FB.IFrameUtil.CanvasUtilServer._canvasUtil.allowWidthChange)FB.IFrameUtil.CanvasUtilServer._canvasUtil.allowWidthChange=true;},setInnerReceiver:function(a,c){var b=a;FB.FBDebug.logLine(2,FB.Sys.format('CanvasClient: set innner url to  {0}',b.receiverUrl));FB.IFrameUtil.CanvasUtilServer.refreshRpcClient(b.receiverUrl);return null;},loadNewUrl:function(a){FB.IFrameUtil.CanvasUtilServer.ensureRpcClient();FB.IFrameUtil.CanvasUtilServer._rpcClient.send('loadNewUrl',a,null);},loginResponse:function(a,b){FB.IFrameUtil.CanvasUtilServer.ensureRpcClient();if(!a){FB.IFrameUtil.CanvasUtilServer._rpcClient.send('loginResponse',null,null);}else FB.IFrameUtil.CanvasUtilServer._rpcClient.send('loginResponse',b,null);},feedResponse:function(){FB.IFrameUtil.CanvasUtilServer.ensureRpcClient();FB.IFrameUtil.CanvasUtilServer._rpcClient.send('feedResponse',null,null);},refreshRpcClient:function(a){FB.FBDebug.assert(a,'Inner receiver url is null.');if(FB.IFrameUtil.CanvasUtilServer._rpcClient)FB.IFrameUtil.CanvasUtilServer._rpcClient.detachClient();var b=new FB.XdComm.EndPoint(FB.IFrameUtil.CanvasUtilServer.iframeName,FB.XdComm.PageRelation.child,a);b.UID=Math.floor(Math.random()*1e+06);FB.IFrameUtil.CanvasUtilServer._rpcClient=new FB.XdComm.XdRpcClient('iframeInnerServer','iframeOuterClient',b);},ensureRpcClient:function(){FB.FBDebug.assert(FB.IFrameUtil.CanvasUtilServer._rpcClient,'Inner iframe server not ready.');}});
FB.subclass('FB.IFrameUtil.ResizeUtilServer','FB.Class',{init:function(){}});FB.provide('FB.IFrameUtil.ResizeUtilServer',{run:function(){FB.IFrameUtil.CanvasUtilServer.run(true);}});
FB.provide('FBIntern.Intl',{_tx:function(f,a){function b(g){if(typeof g!='string')return false;return g.match(new RegExp(b.punct_char_class+'['+')"'+"'"+'\u00BB'+'\u0F3B'+'\u0F3D'+'\u2019'+'\u201D'+'\u203A'+'\u3009'+'\u300B'+'\u300D'+'\u300F'+'\u3011'+'\u3015'+'\u3017'+'\u3019'+'\u301B'+'\u301E'+'\u301F'+'\uFD3F'+'\uFF07'+'\uFF09'+'\uFF3D'+'\s'+']*$'));}b.punct_char_class='['+'.!?'+'\u3002'+'\uFF01'+'\uFF1F'+'\u0964'+'\u2026'+'\u0EAF'+'\u1801'+'\u0E2F'+'\uFF0E'+']';function c(p){var o=window.intl_locale_rewrites;var l;if(o!==undefined){var k=[];var n=[];for(var i in o.patterns){var j=i;var m=o.patterns[i];for(var h in o.meta){l=new RegExp(h.slice(1,-1),'g');j=j.replace(l,o.meta[h]);m=m.replace(l,o.meta[h]);}l=new RegExp("\\+",'g');k[k.length]=j.replace(l,'\x01');n[n.length]=m.replace(l,'\x01');}for(var g=0;g<k.length;g++){l=new RegExp(k[g].slice(1,-1),'g');p=p.replace(l,n[g]);}}l=new RegExp('\x01','g');p=p.replace(l,'');return p;}if(a!==undefined)if(typeof a!='object'){FB.Debug.writeLine('intl.js: the 2nd argument must be a keyed array (not a string) for tx('+f+', ...)');}else{var e;for(var d in a){if(b(a[d])){e=new RegExp('\{'+d+'\}'+b.punct_char_class+'*','g');}else e=new RegExp('\{'+d+'\}','g');f=f.replace(e,'\x01'+a[d]+'\x01');}f=c(f);}return f;},tx:function(b,a){function c(e,d){if(typeof _string_table=='undefined')return null;e=_string_table[e];return FBIntern.Intl._tx(e,d);}}});
FB.subclass('FB.UI.UIElement','FB.Class',{init:function(){},get_domElement:function(){return this._domElement;},set_domElement:function(a){this._domElement=a;return a;},setLeft:function(a){if(FB.localeIsRTL){this._domElement.style.right=a.toString()+'px';}else this._domElement.style.left=a.toString()+'px';},setTop:function(a){this._domElement.style.top=a.toString()+'px';},_domElement:null});FB.provide('FB.UI.UIElement',{addCssClass:function(b,c){var a=' '+b.className+' ';var d=' '+c+' ';if(a.indexOf(d)<0)b.className=b.className+' '+c;},containsCssClass:function(c,a){var b=' '+c.className+' ';return b.indexOf(' '+a+' ')>=0;},removeCssClass:function(d,a){var c=' '+d.className+' ';var b=' '+a+' ';var e=c.indexOf(b);if(e>=0){var f=c.substring(1,e)+c.substring(e+b.length,c.length-1);d.className=f;}}});
FB.provide('FB.UI.PopupPlacement',{center:1,topCenter:2,hidden:3});
FB.subclass('FB.UI.Popup','FB.UI.UIElement',{init:function(){this._placement=FB.UI.PopupPlacement.center;this._offset=FB._create_Point(0,0);this._popupHeight=-1;this._popupWidth=-1;this._super();},setContentWidth:function(a){this._popupWidth=a+FB.UI.Popup._borderSize;},setContentHeight:function(a){this._popupHeight=a+FB.UI.Popup._borderSize;},getContentWidth:function(){if(this._popupWidth<0)return -1;return this._popupWidth-FB.UI.Popup._borderSize;},getContentHeight:function(){if(this._popupHeight<0)return -1;return this._popupHeight-FB.UI.Popup._borderSize;},show:function(){if(!this._loadedInDom){FB.UI.UIElement.addCssClass(this.get_domElement(),'fb_popup');FB.UI.Popup.get__popupContainer().appendChild(this.get_domElement());this._loadedInDom=true;}this.sizing();this.onAfterShow();},sizing:function(){if(!this._loadedInDom)return false;if(this._popupWidth>=0)this.get_domElement().style.width=this._popupWidth.toString()+'px';if(this._popupHeight>=0)this.get_domElement().style.height=this._popupHeight.toString()+'px';var c=FB._create_Size(this.get_domElement().offsetWidth,this.get_domElement().offsetHeight);var b=null;var f=FBIntern.Utility.get_windowSize();var d=document.documentElement;var a=(this.hidden)?FB.UI.PopupPlacement.hidden:this.get_placement();var e;if(document.documentElement&&document.documentElement.scrollTop>0){e=document.documentElement.scrollTop;}else e=document.body.scrollTop;switch(a){case FB.UI.PopupPlacement.topCenter:b=FB._create_Point(d.scrollLeft+f.w/2,e+125);b.x-=(c.w/2);break;case FB.UI.PopupPlacement.center:b=FB._create_Point(d.scrollLeft+f.w/2,e+f.h/2);b.x-=(c.w/2);b.y-=(c.h/2);break;case FB.UI.PopupPlacement.hidden:b=FB._create_Point(-100-c.w,-100-c.h);break;}b.x+=this._offset.x;b.y+=this._offset.y;if(b.x<0)b.x=0;if(b.y<0&&a!==FB.UI.PopupPlacement.hidden)b.y=0;this.setLeft(b.x);this.setTop(b.y);return true;},onAfterShow:function(){},close:function(b){if(this.__closing)this.__closing(b);if(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()!==FBIntern.HostName.IE){FB.UI.Popup.get__popupContainer().removeChild(this.get_domElement());}else{var a=this.get_domElement();a.style.display='none';window.setTimeout(FB.bind(function(){if(a.parentNode)a.parentNode.removeChild(a);},this),4000);}if(this.__closed)this.__closed(b);},get_placementTarget:function(){return this._placementTarget;},set_placementTarget:function(a){this._placementTarget=a;return a;},get_offset:function(){return this._offset;},set_offset:function(a){this._offset=a;return a;},get_placement:function(){return this._placement;},set_placement:function(a){this._placement=a;return a;},add_closing:function(a){this.__closing=FB.Delegate.combine(this.__closing,a);},remove_closing:function(a){this.__closing=FB.Delegate.remove(this.__closing,a);},__closing:null,add_closed:function(a){this.__closed=FB.Delegate.combine(this.__closed,a);},remove_closed:function(a){this.__closed=FB.Delegate.remove(this.__closed,a);},__closed:null,_placementTarget:null,_loadedInDom:false,hidden:false});FB.provide('FB.UI.Popup',{_onLoad:function(){FB.UI.Popup._borderSize=20;FB.UI.Popup._popupContainer=null;},get__popupContainer:function(){if(!FB.UI.Popup._popupContainer){FB.UI.Popup._popupContainer=FB.$('fb_popupContainer');if(!FB.UI.Popup._popupContainer){var a=document.createElement('div');a.className='fb_resetstyles fb_popupContainer';FB.UI.Popup._popupContainer=document.body.appendChild(a);}}else FB.UI.Popup._popupContainer=document.body.appendChild(FB.UI.Popup._popupContainer);return FB.UI.Popup._popupContainer;}});
FB.subclass('FB.UI.DomResources','FB.Class',{init:function(){}});FB.provide('FB.UI.DomResources',{_onLoad:function(){FB.UI.DomResources._dicts=[];},addResourceDict:function(a){FB.Sys.add(FB.UI.DomResources._dicts,a);},getResourceById:function(d){var a=FB.UI.DomResources._dicts.length;var b;for(var c=0;c<a;c++){b=((FB.UI.DomResources._dicts[c])).getClonedElement(d);if(b)return b;}return null;}});
FB.subclass('FBIntern.UIHelper','FB.Class',{init:function(){}});FB.provide('FBIntern.UIHelper',{findElementById:function(f,d){if(f.id===d)return f;var a=f.childNodes.length;for(var c=0;c<a;c++){var b=f.childNodes[c];var e=FBIntern.UIHelper.findElementById(b,d);if(e)return e;}return null;}});
FB.subclass('FB.UI.PopupDialog','FB.UI.Popup',{init:function(e,b,d,c){this._super();this._content=b;this._showLoading=d;if(c)this.hidden=true;this.set_domElement(FB.UI.DomResources.getResourceById('fb_pop_dialog_table'));this._contentParent=FBIntern.UIHelper.findElementById(this.get_domElement(),'fb_dialog_content');this._header=FBIntern.UIHelper.findElementById(this.get_domElement(),'fb_dialog_header');this._header.innerHTML=FB.Sys.htmlEncode(e);var a=FBIntern.UIHelper.findElementById(this.get_domElement(),'fb_dialog_cancel_button');this._loader=FBIntern.UIHelper.findElementById(this.get_domElement(),'fb_dialog_loading_spinner');if(a)FBIntern.Utility.addEventListener(a,'click',FB.bind(this._onCloseButtonClicked,this));if(b)this._contentParent.appendChild(b);this._content.resizeHandler=FB.bind(function(i,h){if(i!=null){var g=parseInt(this._content.style.width);if(isNaN(g)||this.getContentWidth()<0){content_width=i+this._header.offsetWidth+FB.UI.PopupDialog._horizontalBorderSize;this.setContentWidth(content_width);}else if(i>g)this.setContentWidth(i-g+this.getContentWidth());}if(h!=null){var f=parseInt(this._content.style.height);if(isNaN(f)||this.getContentHeight()<0){content_height=h+this._header.offsetHeight+FB.UI.PopupDialog._verticalBorderSize;this.setContentHeight(content_height);}else if(h>=f)this.setContentHeight(h-f+this.getContentHeight());}this.sizing();},this);},sizing:function(){var a=this._super();if(!a)return false;if(this.getContentWidth()>=0){width=this.getContentWidth()-FB.UI.PopupDialog._horizontalBorderSize;this._content.style.width=width+'px';}if(this.getContentHeight()>=0){height=this.getContentHeight()-this._header.offsetHeight-FB.UI.PopupDialog._verticalBorderSize;this._content.style.height=height+'px';}return true;},_onCloseButtonClicked:function(a){this.close(false);},get__content:function(){return this._content;},set__content:function(a){if(this._content)this._contentParent.removeChild(this._content);this._content=a;this._contentParent.appendChild(this._content);return a;},get_id:function(){if(!this._id){if(!FB.UI.PopupDialog._dialogWithIds)FB.UI.PopupDialog._dialogWithIds={};this._id=FB.Sys.getKeyCount(FB.UI.PopupDialog._dialogWithIds).toString()+'_'+Math.random().toString();FB.UI.PopupDialog._dialogWithIds[this._id]=this;FB.UI.PopupDialog._enableXdTitleChange();}return this._id;},get__title:function(){this._header=FBIntern.UIHelper.findElementById(this.get_domElement(),'fb_dialog_header');return this._header.innerHTML;},set__title:function(a){this._header=FBIntern.UIHelper.findElementById(this.get_domElement(),'fb_dialog_header');this._header.innerHTML=FB.Sys.htmlEncode(a);return a;},_createCrossDomainClosingLink:function(c){if(!FB.XdComm.Server.singleton.isDataHandlerRegistered('fbClosingDialog'))FB.XdComm.Server.singleton.registerDataHandler('fbClosingDialog',FB.UI.PopupDialog._onXdClosingDialogHandler);var a={token:this.get_id(),result:c};var b=new FB.XdComm.EndPoint(null,FB.XdComm.PageRelation.self,FB.XdComm.Server.singleton.get_receiverUrl());return FB.XdComm.Server.singleton.createUdpUrl('fbClosingDialog',a,b);},onAfterShow:function(){if(this._showLoading){FB.UI.UIElement.addCssClass(this._loader,'fb_dialog_loading');FBIntern.Utility.waitForLoaded(this._content,FB.bind(function(){FB.UI.UIElement.removeCssClass(this._loader,'fb_dialog_loading');if(this.hidden){this.hidden=false;this.sizing();}},this));}},_content:null,_contentParent:null,_header:null,_loader:null,_id:null,_showLoading:false});FB.provide('FB.UI.PopupDialog',{_onLoad:function(){FB.UI.PopupDialog._dialogWithIds=null;FB.UI.PopupDialog._rpcServer=null;FB.UI.PopupDialog._horizontalBorderSize=2;FB.UI.PopupDialog._verticalBorderSize=3;},_createConfirmationDialog:function(f,e,a){var d=new FB.UI.PopupDialog(f,e,false,false);d.add_closing(a);var c=FBIntern.UIHelper.findElementById(e,'fb_confirm');var b=FBIntern.UIHelper.findElementById(e,'fb_cancel');if(c)FBIntern.Utility.addEventListener(c,'click',function(g){d.close(true);});if(b)FBIntern.Utility.addEventListener(b,'click',function(g){d.close(false);});return d;},getById:function(a){if(FB.UI.PopupDialog._dialogWithIds)return FB.UI.PopupDialog._dialogWithIds[a];return null;},_enableXdTitleChange:function(){if(!FB.UI.PopupDialog._rpcServer)FB.UI.PopupDialog._rpcServer=new FB.XdComm.XdRpcServer('popupDialogServer',{changeTitle:FB._create_XdRpcMethodInfo(FB.UI.PopupDialog._rpcChangeTitle,null)});},_rpcChangeTitle:function(a,e){var b=a;var d=b.id;var c=FB.UI.PopupDialog.getById(d);if(c){c.set__title((b.title));}else FB.FBDebug.logLine(0,'Ignore changeTitle rpc request because we can\'t find the given dialog id = '+d);return null;},_onXdClosingDialogHandler:function(a,e){var c=a;var f=c.token;var d=c.result;var b=FB.UI.PopupDialog.getById(f);if(b){FB.FBDebug.logLine(3,'Close dialog');b.close(d);}else FB.FBDebug.logLine(1,'Invalid token to close dialog: '+f);}});
FB.provide('FB.FeedStorySetting',{preview:1,autoaccept:2,doNotSend:3});
FB._create_UserInfoRecord=function(a,d,e,b){var c={};c.connectState=a;c.oneLineStorySetting=d;c.shortStorySetting=e;c.inFacebook=b;return c;};
FB.provide('FB.RequireConnect',{doNotRequire:0,require:1,promptConnect:2});
FB.subclass('FB.UI.DomResDict','FB.Class',{init:function(a){this._docFragment=document.createDocumentFragment();var b=document.createElement('div');b.innerHTML=a;this._docFragment.appendChild(b);},getClonedElement:function(b){var a=FB.UI.DomResDict._getElementInFragment(this._docFragment,'RES_ID_'+b);if(a){return a.cloneNode(true);}else return null;},_docFragment:null});FB.provide('FB.UI.DomResDict',{_getElementInFragment:function(c,d){if(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.IE){return c.getElementById(d);}else{var f=[];var b=c.childNodes;var e;var a;for(a=0;a<b.length;a++){e=b[a];if(e.nodeType==1)f[f.length]=e;}while(f.length){e=f.shift();if(e.id==d)return e;b=e.childNodes;if(b.length!=0)for(a=0;a<b.length;a++){e=b[a];if(e.nodeType==1)f.push(e);}}return null;}}});
FB.subclass('FB.Helper','FB.Class',{init:function(){}});FB.provide('FB.Helper',{invokeAsCallbackOrRedirect:function(b){if(!b)return;if(FB.Sys.isAssignableFrom(FB.Type.getInstanceType(b),String)){window.location=b;}else{var a=b;var c=FB.Facebook.apiClient.get_session();a((c)?c.uid:null);}}});
FB.subclass('FB.UI.FBMLPopupDialog','FB.UI.PopupDialog',{init:function(c,b){var a=document.createElement('div');this._super(c,a,false,false);this.setFBMLContent(b);},setFBMLContent:function(a){this.get__content().setAttribute('fbml','<fb:fbml>'+a+'</fb:fbml>');},setContentWidth:function(a){this._super(a);this.get__content().setAttribute('iframeWidth',a.toString()+'px');},setContentHeight:function(a){this._super(a);this.get__content().setAttribute('iframeHeight',a.toString()+'px');this.get_offset().y=-a/2;},onAfterShow:function(){this._super();var a=this.get__content();FB.Bootstrap._requireFeatures(['XFBML'],function(){serverFbml=new FB.XFBML.ServerFbml(a);FB.XFBML.Host.addElement(serverFbml);});}});
FB.provide('FB.FeedStorySize',{oneLine:1,shortStory:2,full:4});
FB.subclass('FB.SequencerBase','FB.Class',{init:function(){},_completedCallback:null,isParallel:true,_api:null});
FB._create__stepInfo=function(a,c){var b={};b.jsonRequest=a;b.result=c;return b;};
FB.subclass('FB.BatchSequencer','FB.SequencerBase',{init:function(){this.stepsList=[];this._super();},execute:function(b){this._completedCallback=b;var g=this.stepsList.length;if(g>1){var e={};var d=[];var c=new FB.ArrayEnumerator(this.stepsList);while(c.moveNext()){var f=c.get_current();FB.Sys.add(d,f.jsonRequest._requestBody);}e.method_feed=d;e.serial_only=!this.isParallel;var a=this._api._generateJsonRequest('batch.run',e);a.callback=FB.bind(function(i,h){if(!h&&(h=this._api._checkError(i)))i=null;this._setStepResults(i,h);this.onAllCompleted();},this);a.sendRequest();}else if(g===1){var f=this.stepsList[0];f.jsonRequest.callback=FB.bind(function(i,h){f.result.setPendingResult(i,h);this.onAllCompleted();},this);f.jsonRequest.sendRequest();}else this.onAllCompleted();},_setStepResults:function(a,c){var b=a;FB.FBDebug.assert(!b||b.length===this.stepsList.length,'Malformed batch result');var h=this.stepsList.length;for(var d=0;d<h;d++){var g=(this.stepsList[d]).result;if(c){g.exception=c;g.result=null;}else if(b){var f=b[d];var e=FB.JSON.deserialize(f,true);g.setPendingResult(e,null);}}},onAllCompleted:function(){FB.Sys.clear(this.stepsList);if(this._completedCallback){var a=this._completedCallback;this._completedCallback=null;a();}},_addStep:function(a,b){var c=FB._create__stepInfo(a,b);FB.Sys.add(this.stepsList,c);}});
FB.subclass('FB.ImmediateSequencer','FB.BatchSequencer',{init:function(a){this._super();this.isParallel=false;this._callback=a;},_addStep:function(a,b){this.pendingResult=b;this._super(a,b);this.execute(null);},onAllCompleted:function(){FB.Sys.clear(this.stepsList);if(this._callback)this._callback(this.pendingResult.result,this.pendingResult.exception);},pendingResult:null,_callback:null});
FB.subclass('FB.FeedDialogInfo','FB.Class',{init:function(b,a,c,d){this.parameters=b;this.callback=a;this.showLoginDialog=c;this.userMessageObj=d;},parameters:null,callback:null,showLoginDialog:false,userMessageObj:null});
FB.subclass('FB.SessionDialog','FB.Class',{init:function(){this._connect=FB.Connect._singleton;this._timerId=-1;this._channelUrl=FB.XdComm.Server.singleton.get_receiverUrl();this._cancelChannelUrl=FB.XdComm.Server.singleton.get_receiverUrl();this._apiKey=FB.Facebook.apiKey;this._initializeSession=true;},setIsUserActionHint:function(a){this._isUserActionHint=a;return this;},setUseBrowserPopup:function(a){return this;},setTarget:function(a){this._overrideTarget=a;return this;},setInitializeSession:function(a){this._initializeSession=a;return this;},setChannelUrl:function(a){this._channelUrl=a;return this;},setCancelChannelUrl:function(a){this._cancelChannelUrl=a;return this;},setApiKey:function(a){this._apiKey=a;return this;},_onCancelLoginHandler:function(a,b){this._cancelCallback();},_cancelCallback:function(){if(this.__cancelled)this.__cancelled();this.destroy(true);},_sessionCallback:function(){if(!this._session)this._session=FB.Facebook.apiClient.get_session();if(this.__sessionGranted)this.__sessionGranted(this._session);this.destroy();},_handleSession:function(a,b){switch(a){case FB.ConnectState.userNotLoggedIn:this._show(false,b,true);break;case FB.ConnectState.appNotAuthorized:this._show(true,b,true);break;default:break;}},_ensureHandlers:function(){if(!FB.XdComm.Server.singleton.isDataHandlerRegistered('fbLogin'))FB.XdComm.Server.singleton.registerDataHandler('fbLogin',FB.bind(this._onLoginHandler,this));if(!FB.XdComm.Server.singleton.isDataHandlerRegistered('fbCancelLogin'))FB.XdComm.Server.singleton.registerDataHandler('fbCancelLogin',FB.bind(this._onCancelLoginHandler,this));},_onLoginHandler:function(a,b){this._close();var e=FB.Connect._singleton;var c=a;var d=(a).split('&');this._session=FB.JSON.deserialize(d[0],true);if(this._initializeSession){this._connect._setupSession(this._session);}else this._sessionCallback();},_show:function(c,b,a){this._ensureHandlers();if(FB.Facebook.get_isInCanvas()){this._showCanvasDialog();}else{var d=this._createLoginUrl((c)?'tos.php':'login.php');if(b||!a)this._showBrowserPopup(d,c);if(!this._authWindow){FB.FBDebug.logLine(1,'Popup got blocked');if(a){this._showPopupBlockedWarning(FB.bind(function(){this._show(c,true,false);},this));}else FB.Facebook.apiClient.requireLogin(null);}}if(FB.Facebook.apiClient)FB.Facebook.apiClient.get_sessionWaitable().waitUntilReady(FB.bind(this._connect._apiClient_SessionReady,this._connect));},_showPopupBlockedWarning:function(a){var h=FBIntern.FbGlobals.get_fB_StaticResourceVersions();var f=h.login_img_white_medium_long;var d=document.createElement('div');d.innerHTML=('<div class="fb_popup_blocked">'+'<div class="fb_confirmation_stripes"></div>'+'<div class="fb_popup_blocked_inner">'+FBIntern.Intl._tx("Ce site n\u00e9cessite que vous soyez connect\u00e9 \u00e0 partir de Facebook.")+'<img id="fb_popup_blocked_connect" src="'+f+'" />'+'</div>'+'<div class="fb_popup_blocked_buttons">'+'<input id="fb_popup_blocked_cancel" '+'type="button" '+'value="Cancel" />'+'</div>'+'</div>');var g=FB.bind(function(i){this._warningDialog=null;if(!i)this._cancelCallback();},this);var e=new FB.UI.PopupDialog(FBIntern.Intl._tx("Connectez vous sur Facebook pour continuer"),d,false,false);e.add_closing(g);var c=FBIntern.UIHelper.findElementById(d,'fb_popup_blocked_connect');FBIntern.Utility.addEventListener(c,'click',FB.bind(function(i){e.close(true);a();},this));var b=FBIntern.UIHelper.findElementById(d,'fb_popup_blocked_cancel');FBIntern.Utility.addEventListener(b,'click',FB.bind(function(i){e.close(false);},this));this._warningDialog=e;e.show();},_showCanvasDialog:function(){if(this._isActive){this._dialogType=FB.DialogType.canvas;this._fbmlDialog=true;FB.CanvasClient.requireLogin(FB.bind(function(a){this._session=a;if(this._initializeSession)this._connect._setupSession(this._session);this._sessionCallback();},this),FB.bind(this._cancelCallback,this));}},_showBrowserPopup:function(e,b){var f=FBIntern.Utility.get_windowLocation();var g=FBIntern.Utility.get_windowSize();var d=FB._create_Size(627,326);var c=FB._create_Point(Math.max(0,f.x+(g.w-d.w)/2),Math.max(0,f.y+(g.h-d.h)/2));this._close();if(this._isActive){this._dialogType=FB.DialogType.popUp;var a=FB.Sys.format('location=yes,left={0},top={1},width={2},height={3},resizable=yes',c.x,c.y,d.w,d.h);this._authWindow=window.open(e,'_blank',a,true);this._monitorPopupWindowClosed();}},isActive:function(){if(this._isActive&&this._dialogType===FB.DialogType.popUp)if(!this._authWindow||this._authWindow.closed)this._isActive=false;return this._isActive;},focus:function(){if(this._dialogType===FB.DialogType.popUp)this._authWindow.focus();},_createLoginUrl:function(h){var i,b;var f;i='_opener';b='popup';f=FB.XdComm.PageRelation.opener;if(this._overrideTarget)i=this._overrideTarget;var c=new FB.XdComm.EndPoint(null,f,this._cancelChannelUrl);var j=FB.XdComm.Server.singleton;var d=j.get_GUID();var e;if(FB.XdComm.Server.singleton._useXdProxy()){e=(j._createXdProxyBase(c)+'guid='+d);}else e=FBIntern.Uri.addQueryParameters(this._channelUrl,'fb_login&fname='+i+'&guid='+d);var a=j.createUdpUrl('fbCancelLogin',null,c);var g={return_session:1,nochrome:1,fbconnect:1,extern:FB.Facebook.get_isInConnect(),display:b,api_key:this._apiKey,v:FB.Facebook.version,next:e,cancel_url:a,channel_url:this._channelUrl};if(FB.Sys.containsKey(FB.Facebook.appSettings,'permsToRequestOnConnect'))g.req_perms=FB.Facebook.appSettings.permsToRequestOnConnect;return FBIntern.Utility.createFacebookUrl('www',h,g,false);},request:function(){this._isActive=true;var a=FBIntern.Utility.get_isInUserActionCallstack()||this._isUserActionHint;if(!FB.Connect.get_status().get_isReady()&&a){this._waitForDialog();this._handleSession(FB.ConnectState.userNotLoggedIn,a);}else FB.Connect.get_status().waitUntilReady(FB.bind(function(b){var c=b;if(c===FB.ConnectState.connected){this._sessionCallback();}else{this._waitForDialog();this._handleSession(c,a);}},this));a=false;},listen:function(){this._ensureHandlers();},_waitForDialog:function(){FB.Connect.get_status().waitForValue(FB.ConnectState.connected,FB.bind(this._sessionCallback,this));},_close:function(a){if(this._authWindow){this._authWindow.close();this._authWindow=null;}if(this._fbmlDialog){FB.CanvasClient.closeLogin();this._fbmlDialog=false;}if(this._warningDialog){this._warningDialog.close(!a);this._warningDialog=null;}},destroy:function(a){this._close(a);this.__sessionGranted=null;this.__cancelled=null;this._isActive=false;if(FB.XdComm.Server.singleton.isDataHandlerRegistered('fbLogin'))FB.XdComm.Server.singleton.unregisterDataHandler('fbLogin');if(FB.XdComm.Server.singleton.isDataHandlerRegistered('fbCancelLogin'))FB.XdComm.Server.singleton.unregisterDataHandler('fbCancelLogin');},add_sessionGranted:function(a){this.__sessionGranted=FB.Delegate.combine(this.__sessionGranted,a);},remove_sessionGranted:function(a){this.__sessionGranted=FB.Delegate.remove(this.__sessionGranted,a);},__sessionGranted:null,addSessionHandler:function(a){this.add_sessionGranted(a);return this;},add_cancelled:function(a){this.__cancelled=FB.Delegate.combine(this.__cancelled,a);},remove_cancelled:function(a){this.__cancelled=FB.Delegate.remove(this.__cancelled,a);},__cancelled:null,addCancelHandler:function(a){this.add_cancelled(a);return this;},_monitorPopupWindowClosed:function(){if(this._authWindow&&this._timerId===-1)this._timerId=window.setInterval(FB.bind(function(){if(this._authWindow&&this._authWindow.closed){this._authWindow=null;window.clearInterval(this._timerId);this._timerId=-1;this._cancelCallback();}},this),200);},_isActive:false,_isUserActionHint:true,_authWindow:null,_fbmlDialog:false,_warningDialog:null,_apiKey:null,_channelUrl:null,_cancelChannelUrl:null,_overrideTarget:null,_session:null,_initializeSession:false,_dialogType:0});FB.provide('FB.SessionDialog',{_onLoad:function(){FB.SessionDialog._singleton=null;},closeAll:function(){if(FB.SessionDialog._singleton){FB.SessionDialog._singleton.destroy();FB.SessionDialog._singleton=null;}},make:function(){FB.SessionDialog.closeAll();FB.SessionDialog._singleton=new FB.SessionDialog();return FB.SessionDialog._singleton;},getActive:function(){if(FB.SessionDialog._singleton&&FB.SessionDialog._singleton.isActive())return FB.SessionDialog._singleton;return null;}});
FB.subclass('FB.Connect','FB.Class',{init:function(){this._status=new FB.SimpleWaitable();},get__userInfo:function(){return this._userInfo;},set__userInfo:function(a){if(a!==this._userInfo){this._userInfo=a;this._setInfoCookies(a);}return a;},_getInfoFromCookies:function(){if(FB.Facebook.appSettings.doNotUseCachedConnectState)return null;var a=FB.JSON.deserialize(FBIntern.Cookie.getValue('fbsetting_'+FB.Facebook.apiKey));if(a&&(a.connectState===FB.ConnectState.userNotLoggedIn||a.connectState===FB.ConnectState.appNotAuthorized||a.connectState===FB.ConnectState.connected)&&a.oneLineStorySetting>0&&a.shortStorySetting>0)return a;return null;},_setInfoCookies:function(a){if(FB.Facebook.appSettings.disableCookies)return;if(a&&a.oneLineStorySetting>0&&a.shortStorySetting>0){FBIntern.Cookie.set('fbsetting_'+FB.Facebook.apiKey,FB.JSON.serialize(a),'/',FB.Facebook.get_baseDomain(),1);}else if(!a)FBIntern.Cookie.clear('fbsetting_'+FB.Facebook.apiKey,'/',FB.Facebook.get_baseDomain());},_ensureQueryStatus:function(){if(!this._loginStatusIFrameCreated){var a=this._getInfoFromCookies();if(a&&(a.connectState===FB.ConnectState.userNotLoggedIn||a.connectState===FB.ConnectState.appNotAuthorized||a.connectState===FB.ConnectState.connected)){this.set__userInfo(a);this._status._setResult(a.connectState);}this._refreshQueryStatus();}},_refreshQueryStatus:function(){if(!this._loginStatusIFrameCreated||this._pollTries>0){this._loginStatusIFrameCreated=true;if(this._pollTries>0)this._pollTries--;var c=this._getInfoFromCookies();var b=0;if(c)b=(c.inFacebook)?1:2;this._setInfoCookies(null);if(!this._rpcServer)this._rpcServer=new FB.XdComm.XdRpcServer('loginServer',{InitLogin:FB._create_XdRpcMethodInfo(FB.bind(this._initLogin,this),null)});this._ensureLoginHandler();FB.FBDebug.assert(FB.Facebook.apiKey,'API key can\'t be null');var d={api_key:FB.Facebook.apiKey,extern:b,channel:FB.XdComm.Server.singleton.get_receiverUrl()};if(FB.Facebook.appSettings.fetchSignedPublicSessionData)d.public_session_data=1;var a=FB.Facebook.get_iframeSignature();if(a)d.iframe_key=a;var f=FB.XdComm.Server.singleton.getUniqueOrigin();if(f)d.origin=f;var e=FBIntern.Utility.createFacebookUrl('www','extern/login_status.php',d,false);FB.XdComm.Server.singleton.createNamedHiddenIFrame('loginStatus',e,null,null);}},_ensureLoginHandler:function(){if(!FB.XdComm.Server.singleton.isDataHandlerRegistered('fbLogout'))FB.XdComm.Server.singleton.registerDataHandler('fbLogout',FB.bind(this._onLogoutHandler,this));},_onLogoutHandler:function(a,b){FB.FBDebug.logLine(2,'User logged out');if(this._logoutIframe){if(this._logoutIframe.parentNode)this._logoutIframe.parentNode.removeChild(this._logoutIframe);this._logoutIframe=null;}FB.Facebook.apiClient.set_session(null);this.set__userInfo(null);this._status._setResult(FB.ConnectState.userNotLoggedIn);if(this._logoutCallback)this._logoutCallback(true);},_setupSession:function(a){var b=FB.Connect._singleton;this._setInfoCookies(null);if(this._dialogInfo){b._feedStatusRefetch();}else{this._feedStatusMustBeRefetched=true;FB.Facebook.apiClient.set_session(a);}},_feedStatusRefetch:function(){this._status._setResult(FB.ConnectState.connected,true);this._checkForPendingFeedDialog();this._loginStatusIFrameCreated=false;this._refreshQueryStatus();this._feedStatusMustBeRefetched=false;},_closeAllDialogs:function(a){FB.SessionDialog.closeAll();if(this._feedformDialog){this._feedformDialog.close(false);this._feedformDialog=null;}if(this._addSectionDialog){this._addSectionDialog.close(false);this._addSectionDialog=null;}if(this._permissionDialog){this._permissionDialog.close(false);this._permissionDialog=null;}if(a)a();},switchUser:function(){this._closeAllDialogs(FB.bind(function(){FB.Connect.requireSession(null);},this));},_initLogin:function(b,h){var g=b;var i=g.session;var j=g.settings;var c=g.connectState;var d=j.feedStorySettings;FB.Facebook.set_baseDomain(g.baseDomain);FB.Facebook.locale=j.locale;window.FB.locale=FB.Facebook.locale;this._publicSessionData=g.publicSessionData;this._perms=g.perms;var f;var k;if(d){f=d.one_line;k=d['short'];}else{f=FB.FeedStorySetting.doNotSend;k=FB.FeedStorySetting.doNotSend;}var e=j.inFacebook;FB.Facebook.isInConnect=(e)?1:2;this.set__userInfo(FB._create_UserInfoRecord(c,f,k,e));switch(c){case FB.ConnectState.userNotLoggedIn:FB.Facebook.apiClient.set_session(null);this._status._setResult(FB.ConnectState.userNotLoggedIn);break;case FB.ConnectState.appNotAuthorized:FB.Facebook.apiClient.set_session(null);this._status._setResult(FB.ConnectState.appNotAuthorized);break;case FB.ConnectState.connected:var a=FB.Facebook.apiClient;if(!a.get_session()||FBIntern.Utility.isConnectSession(a.get_session().session_key)||!FB.Facebook.get_isInCanvas())a.set_session(i);this._status._setResult(FB.ConnectState.connected);break;}if(c===FB.ConnectState.connected){if(this._onConnectedCallback)this._onConnectedCallback();this._pollTries=0;this._onConnectedCallback=null;}else if(this._pollTries>0){window.setTimeout(FB.bind(function(){this._refreshQueryStatus();},this),this._pollInterval);}else this._onConnectedCallback=null;return null;},_checkForPendingFeedDialog:function(){var a=FB.Connect._singleton;if(a._dialogInfo)FB.Connect.get_status().waitUntilReady(FB.bind(function(b){window.setTimeout(FB.bind(function(){FB.Connect._ShowFeedDialogGeneric(a._dialogInfo.parameters,FB.RequireConnect.require,a._dialogInfo.callback,a._dialogInfo.showLoginDialog,a._dialogInfo.userMessageObj);a._dialogInfo=null;},this),0);},this));},_apiClient_SessionReady:function(a){this._status._setResult(FB.ConnectState.connected);},_facebookIFrame:function(e,h,g){e.open();var a=new FB.StringBuilder();a.append('\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" >\n<head><title></title></head>\n<body>');var i=FBIntern.Utility.createFacebookUrl('www',h,{},false);a.append(FB.Sys.format('<form method=\"post\" action=\"{0}\" id=\"tempform\" name=\"tempform\" >',i));var b=g;for(var f in b){var c={key:f,value:b[f]};a.append(FB.Sys.format('<input type=\"hidden\" name=\"{0}\" id=\"{1}\" value=\"{2}\"  />',c.key,c.key,FB.Sys.htmlEncode(c.value)));}a.append('\n</form>\n    <script type=\"text/javascript\">\n      window.setTimeout(function(){document.forms[\'tempform\'].submit();}, 0);\n    </script>\n</body>\n</html>\n        ');var d=a.toString();e.write(d);e.close();},get__isInConnect:function(){var a=FB.Connect._singleton.get__userInfo();if(!a){return 0;}else return (a.inFacebook)?1:2;},_loginStatusIFrameCreated:false,_pollInterval:0,_pollTries:0,_onConnectedCallback:null,_feedStatusMustBeRefetched:false,_rpcServer:null,_feedformDialog:null,_addSectionDialog:null,_shareDialog:null,_permissionDialog:null,_feedformNum:0,_sessionlessFeedFrameNum:0,_addSectionNum:0,_dialogInfo:null,_userInfo:null,_logoutCallback:null,_logoutIframe:null,_sessionlessPublishCallback:null,_publicSessionData:null});FB.provide('FB.Connect',{_onLoad:function(){FB.Connect._singleton=new FB.Connect();FB.Connect._logoutMethod_infoDialog='info_dialog';FB.Connect._logoutMethod_prompt='prompt';FB.Connect._logoutMethod_noUI='no_ui';FB.Connect._logoutMethod=FB.Connect._logoutMethod_infoDialog;var a='\n     <table id=\"RES_ID_fb_pop_dialog_table\" class=\"fb_pop_dialog_table\">\n       <tr>\n         <td class=\"fb_pop_topleft\"></td>\n         <td class=\"fb_pop_border\"></td>\n         <td class=\"fb_pop_topright\"></td>\n       </tr>\n       <tr>\n         <td class=\"fb_pop_border\"></td>\n         <td class=\"fb_pop_content\" id=\"pop_content\">\n           <div class =\"fb_pop_content_container\">\n              <h2 class=\"fb_resetstyles\">\n                <div class=\"fb_dialog_icon\"></div>\n                <span class=\"fb_dialog_header\" id=\"fb_dialog_header\"></span>\n                <div class=\"fb_dialog_loading_spinner\" id=\"fb_dialog_loading_spinner\">&nbsp;</div>\n                <a id=\"fb_dialog_cancel_button\" class=\"fb_dialog_cancel_button\" title=\"close dialog\" href=\"#\" onclick=\"return false;\">&nbsp;</a>\n              </h2>\n              <div id=\"fb_dialog_content\" class=\"fb_dialog_content\"></div>\n           </div>\n         </td>\n         <td class=\"fb_pop_border\"></td>\n       </tr>\n       <tr>\n         <td class=\"fb_pop_bottomleft\"></td>\n         <td class=\"fb_pop_border\"></td>\n         <td class=\"fb_pop_bottomright\"></td>\n       </tr>\n    </table>\n    <div id=\"RES_ID_fb_logout_confirmation\" class=\"fb_logout_confirm_content\">\n      <div class=\"fb_confirmation_stripes\"></div>\n      <div class=\"fb_confirmation_content\">';a+='<p>'+FBIntern.Intl._tx("Voulez-vous vous d\u00e9connecter de ce site et de Facebook\u00a0?")+'</p>';a+='\n      </div>\n      <div class=\"fb_dialog_buttons\">';a+='<input id=\"fb_confirm\" type=\"button\" '+'class=\"fb_inputsubmit\" value=\"'+FBIntern.Intl._tx("D\u00e9connexion")+'\"/>';a+='<input id=\"fb_cancel\" type=\"button\" '+'class=\"fb_inputbutton fb_inputaux\" value=\"'+FBIntern.Intl._tx("Annuler")+'\"/>';a+='\n        </div>\n    </div>\n    <div id=\"RES_ID_fb_logout_info\" class=\"fb_logout_confirm_content\">\n      <div class=\"fb_confirmation_stripes\"></div>\n      <div class=\"fb_confirmation_content\">';a+='<p>'+FBIntern.Intl._tx("Vous vous d\u00e9connectez de ce site et de Facebook.")+'</p>';a+='\n      </div>\n      <div class=\"fb_dialog_buttons\">';a+='<input id=\"fb_confirm\" type=\"button\" '+'class=\"fb_inputsubmit\" value=\"'+FBIntern.Intl._tx("Fermer")+'\"/>';a+='\n       </div>\n   </div>';FB.UI.DomResources.addResourceDict(new FB.UI.DomResDict(a));},get_status:function(){var a=FB.Connect._singleton;a._ensureQueryStatus();return a._status;},_getLogoutUrl:function(a){var b={api_key:FB.Facebook.apiKey,session_key:FB.Facebook.apiClient.get_session().session_key,extern:FB.Connect._singleton.get__isInConnect(),next:a};return FBIntern.Utility.createFacebookUrl('www','logout.php',b,false);},logout:function(a){FB.Connect._handleLogout(a,function(d){if(d){var g=FB.Connect._singleton;var h=FB.XdComm.Server.singleton;var c=FB.XdComm.Server.singleton.get_GUID();var f;if(h._useXdProxy()){var b=new FB.XdComm.EndPoint(null,FB.XdComm.PageRelation.self,h.get_receiverUrl());f=(h._createXdProxyBase(b)+'guid='+c+'&session=loggedout');}else f=FBIntern.Uri.addQueryParameters(h.get_receiverUrl(),'fb_login&fname=_parent&guid='+c+'&session=loggedout');g._ensureLoginHandler();g._logoutCallback=a;var e=FB.Connect._getLogoutUrl(f);g._logoutIframe=h.createNamedHiddenIFrame('fbLogout',e,'fb_logout',null);}else if(a)a(false);});},logoutAndRedirect:function(a){FB.Connect._handleLogout(null,function(b){if(b){var e=FB.Connect._singleton;var d=FBIntern.Uri.create(new FBIntern.Uri(document.URL),a).get_uriString();var c=FB.Connect._getLogoutUrl(d);e.set__userInfo(null);FB.Facebook.apiClient.set_session(null);window.location=c;}});},ifUserConnected:function(a,b){FB.Connect.get_status().waitForCondition(function(c){FB.Connect._handleConnectStateLogout(a,b,c);return false;});},_handleConnectStateLogout:function(a,b,c){if(c.get_isReady())window.setTimeout(function(){var d=c.result===FB.ConnectState.connected;FB.Helper.invokeAsCallbackOrRedirect((d)?a:b);},0);},listenForIframeConnect:function(){var a=FB.Connect._singleton;FB.Facebook.apiClient.get_sessionWaitable().waitUntilReady(FB.bind(a._apiClient_SessionReady,a));},clientConnectSetup:function(a){var b=FB.Connect._singleton;FB.Connect.listenForIframeConnect();FB.Connect.get_status().add_changed(function(d){var c=FB.Connect.get_status().result;a(c===FB.ConnectState.connected);});},_handleLogout:function(a,b){FB.Connect.get_status().waitUntilReady(function(c){var d=FB.Facebook.apiClient.get_session();if(d){if(FB.Connect._logoutMethod===FB.Connect._logoutMethod_infoDialog){FB.Connect._createInfoDialog(b);}else if(FB.Connect._logoutMethod===FB.Connect._logoutMethod_noUI){b(true);}else FB.UI.PopupDialog._createConfirmationDialog(FBIntern.Intl._tx("D\u00e9connexion de Facebook\u00a0?"),FB.UI.DomResources.getResourceById('fb_logout_confirmation'),b).show();}else{FB.FBDebug.logLine(2,'Cannot logout because user does not have a session');if(a)a(false);}});},requireSession:function(b,d,c){if(arguments.length===1){if(typeof(b)!=='function'){c=(b);b=null;}}else if(arguments.length===2)if(typeof(d)!=='function'){c=(d);d=null;}var a=FB.SessionDialog.getActive();if(!a){a=FB.SessionDialog.make();a.setIsUserActionHint(c).request();}else a.focus();if(b)FB.Connect.get_status().waitForValue(FB.ConnectState.connected,b);if(d)a.add_cancelled(d);},_createInfoDialog:function(a){var b=null;b=FB.UI.PopupDialog._createConfirmationDialog(FBIntern.Intl._tx("D\u00e9connect\u00e9(e) de Facebook"),FB.UI.DomResources.getResourceById('fb_logout_info'),function(c){b=null;});b.show();b.add_closed(function(c){if(a)a(true);});window.setTimeout(function(){if(b)b.close(false);},2000);},inviteConnectUsers:function(){FB.Facebook.get_sessionWaitable().waitUntilReady(function(c){var b=new FB.UI.FBMLPopupDialog(FBIntern.Intl._tx("Invitez vos amis \u00e0 se connecter"),'');var a=b._createCrossDomainClosingLink(false);b.setFBMLContent('<fb:connect-form action=\"'+a+'\" view=\"dialog\" />');b.setContentWidth(474);b.setContentHeight(350);b.show();});},showPermissionDialog:function(h,a,c,i){var b=null;if(h.indexOf('offline_access')>=0){b=function(k){if(!FB.Sys.isNullOrEmpty(k)&&(k).indexOf('offline_access')>=0){FB.Connect.forceSessionRefresh(function(){if(a)a(k);});}else if(a)a(k);};}else if(a)b=a;var j={ext_perm:h};if(c)j.enable_profile_selector=1;if(i){var e=true;var g='';var d=new FB.ArrayEnumerator(i);while(d.moveNext()){var f=d.get_current();if(!e)g+=',';g+=f;e=false;}j.profile_selector_ids=g;}FB.Connect.showConnectDialog(FBIntern.Intl._tx("Demande de permission"),'connect/prompt_permissions.php',j,293,628,b);},showAddFriendDialog:function(d,a){var b=null;if(FB.Connect.isUIServerEnabled('friends.add')){if(a)b=function(e){a(e.action);};FB.Connect.showUIServerDialog('friends.add',{id:d},b);return;}if(a)b=function(e){var f=(e==='true')?true:false;a(f);};var c={id:d,display:'dialog'};FB.Connect.showConnectDialog(FBIntern.Intl._tx("Ajouter un ami"),'addfriend.php',c,-1,540,b);},showConnectDialog:function(e,d,c,b,f,a){FB.Connect.requireSession(function(){FB.IFrameUtil.ResizeUtilServer.run();var n=FB.Connect._singleton;var j=FB.XdComm.Server.singleton.createNamedHiddenIFrame('dialogContent'+Math.random().toString(),'','fb_connect_dialog_iframe',null);if(b>0)j.style.height=b+'px';n._permissionDialog=new FB.UI.PopupDialog(e,j,true,false);n._permissionDialog.set_placement(FB.UI.PopupPlacement.topCenter);if(f>0)n._permissionDialog.setContentWidth(f);if(a)n._permissionDialog.add_closed(a);var l=n._permissionDialog._createCrossDomainClosingLink('xxRESULTTOKENxx');var g=FB.XdComm.Server.singleton.get_receiverUrl();var m={api_key:FB.Facebook.apiKey,v:FB.Facebook.version,extern:n.get__isInConnect(),next:l,channel_url:g,dialog_id:encodeURIComponent(n._permissionDialog.get_id())};if(c){var h=c;for(var k in h){var i={key:k,value:h[k]};m[i.key]=i.value;}}var o=FB.XdComm.Server.singleton.getUniqueOrigin();if(o)m.origin=o;m.session_key=FB.Facebook.apiClient.get_session().session_key;j.src=FBIntern.Utility.createFacebookUrl('www',d,m,false);n._permissionDialog.show();});},createApplication:function(b,a){FB.Facebook.get_sessionState().waitUntilReady(function(h){FB.IFrameUtil.ResizeUtilServer.run();var i=FB.Connect._singleton;var f=FB.XdComm.Server.singleton.createNamedHiddenIFrame('dialogContent'+Math.random().toString(),'','fb_create_app_iframe',null);f.style.height='214px';f.style.width='448px';var d=new FB.UI.PopupDialog(FBIntern.Intl._tx("Int\u00e9grer avec Facebook\u00a0?"),f,true,false);if(a)d.add_closed(a);var c=d._createCrossDomainClosingLink('create-app-return-val');var e=d._createCrossDomainClosingLink(false);var g={api_key:FB.Facebook.apiKey,v:FB.Facebook.version,name:b,next:c,cancel:e,channel_url:FB.XdComm.Server.singleton.get_receiverUrl()};f.src=FBIntern.Utility.createFacebookUrl('www','connect/create_app.php',g,false);d.show();});},pollLoginStatus:function(b,c,a){var d=FB.Connect._singleton;if(d.get__userInfo().connectState===FB.ConnectState.connected){if(a)a();return;}d._pollTries=c;d._pollInterval=b;d._onConnectedCallback=a;window.setTimeout(function(){d._refreshQueryStatus();},d._pollInterval);},forceSessionRefresh:function(a){var b=FB.Connect._singleton;++b._pollTries;b._onConnectedCallback=a;b._refreshQueryStatus();},showAddSectionButton:function(g,a){var h=FB.Connect._singleton;var f={api_key:FB.Facebook.apiKey,section:g,channel_url:FB.XdComm.Server.singleton.get_receiverUrl(),extern:h.get__isInConnect()};var e='fb_section'+g;var c='fbShowAddSection_'+g;var d=FB.XdComm.Server.singleton.createNamedHiddenIFrame(e,FB.XdComm.Server.singleton.get_receiverUrl(),'fb_addSection',FB.Sys.format('style=\"width:130px; height:25px\" frameborder=\"0\" allowTransparency=\"true\"'));a.appendChild(d);if(!FB.XdComm.Server.singleton.isDataHandlerRegistered(c))FB.XdComm.Server.singleton.registerDataHandler(c,function(i,j){FB.Connect._showAddSectionDialog(i);});var b=(window.self.frames)[e];h._facebookIFrame(b.document,'connect/section_button.php',f);},_showAddSectionDialog:function(f){var g=FB.Connect._singleton;if(g._addSectionDialog)return false;FB.IFrameUtil.ResizeUtilServer.run();var e={section:f,api_key:FB.Facebook.apiKey,channel_url:FB.XdComm.Server.singleton.get_receiverUrl(),extern:g.get__isInConnect()};g._addSectionNum++;var d='fb_sectionIFrame_'+g._addSectionNum;var i=0;var b=0;var h='';if(f==='info'){i=718;b=350;h=FBIntern.Intl._tx("Ajouter l\u2019application dans votre onglet Infos\u00a0?");}else{i=430;b=321;h=FBIntern.Intl._tx("Ajouter l\u2019application sur votre profil\u00a0?");}var c=FB.XdComm.Server.singleton.createNamedHiddenIFrame(d,FB.XdComm.Server.singleton.get_receiverUrl(),'fb_addSection','frameborder=\"0\"');c.style.height=FB.Sys.format('{0}px',b);c.style.width=FB.Sys.format('{0}px',i);var a='fbCloseAddSection_'+f;g._addSectionDialog=FB.Connect._showStandardDialog(h,c,i,b);g._addSectionDialog.add_closed(function(j){g._addSectionDialog=null;});if(!FB.XdComm.Server.singleton.isDataHandlerRegistered(a))FB.XdComm.Server.singleton.registerDataHandler(a,function(j,k){g._addSectionDialog.close(true);});FBIntern.Utility.getIFrameDocument(d,c,function(j){g._facebookIFrame(j,'connect/prompt_section.php',e);});return true;},_sessionlessPublishUserAction:function(k,l,j,a,i,b,m){var h=FB.Connect._singleton;var c={template_id:k.toString()};if(l)c.template_data=l;if(j)c.target_ids=j;if(a)c.body_general=a;var d='sessionlessPublishCompletedHandler';if(!FB.XdComm.Server.singleton.isDataHandlerRegistered(d))FB.XdComm.Server.singleton.registerDataHandler(d,FB.Connect._onSessionlessPublishCompletedHandler);h._sessionlessPublishCallback=b;var g={feed_info:FB.JSON.serialize(c),api_key:FB.Facebook.apiKey,user_message:m,extern:h.get__isInConnect()};if(b)g.callback=FB.XdComm.Server.singleton.createUdpUrl(d,null,new FB.XdComm.EndPoint(null,FB.XdComm.PageRelation.self,FB.XdComm.Server.singleton.get_receiverUrl()));if(i===FB.FeedStorySize.oneLine||i===FB.FeedStorySize.shortStory)g.size=(i).toString();h._sessionlessFeedFrameNum++;var f='fb_sessionlessfeedIFrame_'+h._sessionlessFeedFrameNum;var e=FB.XdComm.Server.singleton.createNamedHiddenIFrame(f,FB.XdComm.Server.singleton.get_receiverUrl(),'','');FBIntern.Utility.getIFrameDocument(f,e,function(n){h._facebookIFrame(n,'connect/sessionless_feed.php',g);});},_onSessionlessPublishCompletedHandler:function(a,b){var c=FB.Connect._singleton;if(c._sessionlessPublishCallback)c._sessionlessPublishCallback();},streamPublish:function(k,d,a,j,l,f,e,b){var i=FB.Connect._singleton;if(e&&FB.Connect._singleton._perms&&FB.Connect._singleton._perms.extended&&FB.Sys.contains(FB.Connect._singleton._perms.extended,'publish_stream')){var h=new FB.ImmediateSequencer(function(n,m){if(f)f(n,m,{user_message:k});});var c={};c.message=k;c.attachment=d;c.action_links=a;c.target_id=j;FB.Facebook.apiClient.callMethod('stream.publish',c,h);return true;}var g={message:k,attachment:d,action_links:a,target_id:j,actor_id:b,user_message_prompt:l};return FB.Connect._ShowFeedDialogGeneric(g,FB.RequireConnect.doNotRequire,f,true,null);},showFeedDialog:function(h,i,g,a,f,e,b,l,j){var m=null;var k=j;if(j){var c=false;c=(typeof j=='string');if(c){m=j;k=null;}else m=k.value;}var d={message:m,template_id:h,template_data:i,body_general:a,user_message_prompt:l,to_ids:g};return FB.Connect._ShowFeedDialogGeneric(d,e,b,false,k);},_ShowFeedDialogGeneric:function(b,c,a,d,f){var e=FB.Connect._singleton;if(e._feedformDialog){if(a)a(null,null,null);return false;}if(e._feedStatusMustBeRefetched){e._dialogInfo=new FB.FeedDialogInfo(b,a,d,f);e._feedStatusRefetch();return true;}FB.Connect.get_status().waitUntilReady(function(h){var g=h;if(c===FB.RequireConnect.promptConnect&&g!==FB.ConnectState.connected){e._dialogInfo=new FB.FeedDialogInfo(b,a,d,f);FB.Connect.requireSession(null,function(){a(null,null,null);});}else if(c===FB.RequireConnect.require&&g!==FB.ConnectState.connected){a(null,null,null);}else{FB.Connect._prepareFeedDialogParameters(b);if(g===FB.ConnectState.connected)b.session_key=FB.Facebook.apiClient.get_session().session_key;var i=FB.XdComm.Server.singleton.getUniqueOrigin();if(i)b.origin=i;if(g===FB.ConnectState.connected){FB.Connect._openFeedDialogIframe(b,a,f);}else FB.Connect._openFeedDialogWindow(b,a,f);}});return true;},_prepareFeedDialogParameters:function(g){var h=FB.Connect._singleton;g.preview='true';g.api_key=FB.Facebook.apiKey;g.channel_url=FB.XdComm.Server.singleton.get_receiverUrl();g.extern=h.get__isInConnect();var f=['template_data','attachment','action_links','to_ids'];var c=new FB.ArrayEnumerator(f);while(c.moveNext()){var e=c.get_current();if(g[e])g[e]=encodeURIComponent(FB.JSON.serialize(g[e]));}var a=g;for(var d in a){var b={key:d,value:a[d]};if(!g[b.key])delete g[b.key];}},_processResultAndCallback:function(d,a,g){if(d==='xxRESULTTOKENxx')d=null;var c=null;var e=null;if(d===null)c="null";if(d){var b=false;b=(d instanceof Object);if(b){var f=d;c=f.postId;if(c===null)c="null";e=(f.data);if(g&&e.user_message)g.value=e.user_message;}else c=d;}if(a)a(c,null,e);},_openFeedDialogWindow:function(d,a,g){FB.XdComm.Server.registerSimpleHandler('login',function(h){FB.Connect.forceSessionRefresh(function(){});});FB.XdComm.Server.registerSimpleHandler('fbPublishPopup',function(h){if(window.fbDialog){window.fbDialog.close();window.fbDialog=null;}FB.Connect._processResultAndCallback(h,a,g);});var c='sharer'+Math.floor(Math.random()*10000);var e='?'+FBIntern.Uri.createQueryString(d);var f='http://www.facebook.com/connect/prompt_feed.php';var b=null;if((f.length+e.length)>=2000){b=document.createElement('form');b.setAttribute('method','post');b.setAttribute('target',c);b.setAttribute('action',f);FB.forEach(d,function(j,i){var h=document.createElement('input');h.setAttribute('type','hidden');h.setAttribute('name',i);h.setAttribute('value',j);b.appendChild(h);});FB.HiddenContainer.get().appendChild(b);f='about:blank';}else f+=e;window.fbDialog=window.open(f,c,'toolbar=0,status=0,width=600,height=388');if(b!==null){b.submit();FB.HiddenContainer.get().removeChild(b);}},_openFeedDialogIframe:function(h,b,n){FB.IFrameUtil.CanvasUtilServer.run(false);var i=FB.Connect._singleton;i._feedformNum++;var g='fb_feedIFrame_'+i._feedformNum;var j='switchUser';FB.XdComm.Server.registerSimpleHandler(j,function(o){i.switchUser();});var k=FB.XdComm.Server.singleton.createUdpUrl(j,null,new FB.XdComm.EndPoint(null,FB.XdComm.PageRelation.self,FB.XdComm.Server.singleton.get_receiverUrl()));h.switch_user_url=k;var f=FB.XdComm.Server.singleton.createNamedHiddenIFrame(g,FB.XdComm.Server.singleton.get_receiverUrl(),'fb_feedIFrame','frameborder=\"0\"');var m=h.to_ids;var l=h.target_id;var a=h.actor_id;var e=(m&&m.length>0)||l;var d;if(a){d=FBIntern.Intl._tx("Publier cette actualit\u00e9 sur le mur de la Page\u00a0?");}else if(e){d=FBIntern.Intl._tx("Publier cette actualit\u00e9 sur le mur Facebook de vos amis\u00a0?");}else d=FBIntern.Intl._tx("Publier cette actualit\u00e9 sur votre mur et sur les pages d\u2019accueil de vos amis\u00a0?");i._feedformDialog=new FB.UI.PopupDialog(d,f,true,true);i._feedformDialog.set_placement(FB.UI.PopupPlacement.topCenter);var c=i._feedformDialog._createCrossDomainClosingLink('xxRESULTTOKENxx');h.callback=c;i._feedformDialog.add_closed(function(o){i._feedformDialog=null;FB.Connect._processResultAndCallback(o,b,n);});h.in_iframe=1;i._feedformDialog.setContentWidth(600);i._feedformDialog.show();FBIntern.Utility.getIFrameDocument(g,f,function(o){i._facebookIFrame(o,'connect/prompt_feed.php',h);});},showShareDialog:function(c,a){var b=FB.Connect._singleton;if(b._shareDialog)a();FB.Connect.get_status().waitUntilReady(function(h){var g=h;if(g!==FB.ConnectState.connected){window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(c)+'&src=connect&apikey='+FB.Facebook.apiKey,'sharer','toolbar=0,status=0,width=626,height=436');}else{if(!this.shareFrameCounter)this.shareFrameCounter=0;var f='fb_share_iframe_'+this.shareFrameCounter++;var e=FB.XdComm.Server.singleton.createNamedHiddenIFrame(f,FB.XdComm.Server.singleton.get_receiverUrl(),'fb_shareIFrame','frameborder=\"0\"');var i=FBIntern.Intl._tx("Partager cette actualit\u00e9\u00a0?");b._shareDialog=new FB.UI.PopupDialog(i,e,true,true);b._shareDialog.set_placement(FB.UI.PopupPlacement.topCenter);b._shareDialog.add_closed(function(j){b._shareDialog=null;if(a)a();});var d=b._shareDialog._createCrossDomainClosingLink(false);b._shareDialog.setContentWidth(650);b._shareDialog.setContentHeight(175);b._shareDialog.show();FBIntern.Utility.getIFrameDocument(f,e,function(j){b._facebookIFrame(j,'sharer.php?u='+encodeURIComponent(c)+'&src=connect&apikey='+FB.Facebook.apiKey,{channel_url:FB.XdComm.Server.singleton.get_receiverUrl(),close_url:d,display:'dialog',session_key:FB.Facebook.apiClient.get_session().session_key,extern:b.get__isInConnect()});});}});},isUIServerEnabled:function(a){if(!FB.dynData)return false;return FB.dynData.ui_server_dialogs[a];},showUIServerDialog:function(b,c,a){FB.Connect.requireSession(function(){FB.IFrameUtil.ResizeUtilServer.run();var d=FB.XdComm.Server.singleton.get_receiverUrl();var h=FB.XdComm.Server.singleton.createNamedHiddenIFrame('fb_dialog_iframe',null,'fb_dialogIFrame',null);var l=FB.Connect.getUIServerDialogProperty(b,'title');var f=new FB.UI.PopupDialog(l,h,true,false);f.set_placement(FB.UI.PopupPlacement.topCenter);var m=FB.Connect.getUIServerDialogProperty(b,'width');var g=FB.Connect.getUIServerDialogProperty(b,'height');f.setContentWidth(m);f.setContentHeight(g);if(a)f.add_closed(function(n){a(n);});var e=f._createCrossDomainClosingLink('xxRESULTTOKENxx');var k=FB.Facebook.apiClient.get_session().session_key;var i=FB.Connect._singleton.get__isInConnect();var j={api_key:FB.Facebook.apiKey,method:b,next:e,channel:d,extern:i,session_key:k,display:'iframe'};FB.copy(j,c);h.src=FBIntern.Utility.createFacebookUrl('www','connect/uiserver.php',j,false);f.show();});},getUIServerDialogProperty:function(b,c){var a={'bookmark.add':{title:FBIntern.Intl._tx("Ajouter un signet pour l\u2019application"),width:460,height:226},'profile.addTab':{title:FBIntern.Intl._tx("Ajouter un onglet de profil"),width:460,height:230},'friends.add':{title:FBIntern.Intl._tx("Ajouter un ami"),width:460,height:230},'default':{title:FBIntern.Intl._tx("Se connecter"),width:460,height:250}};if(a.hasOwnProperty(b)&&a[b].hasOwnProperty(c))return a[b][c];if(a['default'].hasOwnProperty(c))return a['default'][c];return null;},showBookmarkDialog:function(a){FB.Connect.showUIServerDialog('bookmark.add',{},a);},showProfileTabDialog:function(a){FB.Connect.showUIServerDialog('profile.addTab',{},a);},get_loggedInUser:function(){var a=FB.Facebook.apiClient.get_session();return (a)?a.uid:null;},getSignedPublicSessionData:function(a){var b=FB.Connect._singleton;FB.Connect.get_status().waitUntilReady(function(c){if(b._publicSessionData&&FB.Facebook.apiClient.get_session()){a(b._publicSessionData,null);}else if(!FB.Facebook.apiClient.get_session()){a(null,null);}else FB.Facebook.apiClient.auth_getSignedPublicSessionData(new FB.ImmediateSequencer(a));});},addSignedPublicSessionDataToUrl:function(b,a){FB.Connect.getSignedPublicSessionData(function(d,c){if(d)b=FBIntern.Uri.addQueryParameters(b,'public_session_data='+encodeURIComponent(FB.JSON.serialize(d)));a(b,null);});},_showStandardDialog:function(d,c,e,b){var a=new FB.UI.PopupDialog(d,c,true,true);a.setContentWidth(e);a.setContentHeight(b);a.set_placement(FB.UI.PopupPlacement.topCenter);a.show();return a;}});
FB._create__cachedItem=function(b,a){var c={};c.data=b;c.createTime=a;return c;};
FB.subclass('FB.DependentWaitable','FB.Waitable',{init:function(){this._dependents=[];this._super();},get_isReady:function(){return this._waitItems<=0;},addDependent:function(a){if(!a.get_isReady()){FB.Sys.add(this._dependents,a);this._waitItems++;a.add_changed(FB.bind(this._dependent_OnReady,this));}},removeAll:function(){var b=new FB.ArrayEnumerator(this._dependents);while(b.moveNext()){var a=b.get_current();a.remove_changed(FB.bind(this._dependent_OnReady,this));}this._dependents=[];this._waitItems=0;},_dependent_OnReady:function(a){a.remove_changed(FB.bind(this._dependent_OnReady,this));this._waitItems--;if(!this._waitItems)this.onChange();},_waitItems:0});
FB.provide('FB.XFBML._elementState',{none:0,onProcessCalled:1,onDataReadyCalled:2,waitForCondition:4,ready:8});
FB.subclass('FB.XFBML.Element','FB.Class',{init:function(a){this._dependents=new FB.DependentWaitable();this.domElement=a;this.domElement._fbElement=this;},process:function(){try{this._state=FB.XFBML._elementState.none;var conditionAttribute=this.getAttribute('condition',null);if(conditionAttribute)if(typeof(conditionAttribute)==='string'){this._conditionResult=eval(conditionAttribute);}else{FB.FBDebug.assert(typeof(conditionAttribute)==='function','Invalid condition value');var conditionFunction=conditionAttribute;this._conditionResult=conditionFunction();}var result=true;var resultReady=true;var pendingResult=this._conditionResult;if(!FB.Sys.isNullOrUndefined(this._conditionResult))if(FB.Type.getInstanceType(this._conditionResult)===Boolean){result=this._conditionResult;}else{resultReady=pendingResult.get_isReady();result=pendingResult.result;}if(!resultReady){this._state|=FB.XFBML._elementState.waitForCondition;(this._conditionResult).add_changed(FB.bind(this._onConditionChanged,this));}if((resultReady&&result)||(!resultReady&&!this.getAttribute('noPreProcess',false))){this.onProcess();this._state|=FB.XFBML._elementState.onProcessCalled;this._checkDataReady();}else if(resultReady&&!result){this.onConditionFalse();this.set_isReady(true);}}catch(e){FB.Debug.logLine(1,"Failed rendering a XFBML element");}},isValid:function(){var a=this.domElement;while(a)if(a===document.body){return true;}else a=a.parentNode;return false;},refresh:function(){if((this._state&FB.XFBML._elementState.waitForCondition)&&this._conditionResult)(this._conditionResult).remove_changed(FB.bind(this._onConditionChanged,this));this._state=FB.XFBML._elementState.none;this._conditionResult=null;this._dependents.resetChange();this._dependents.removeAll();FB.UI.UIElement.removeCssClass(this.domElement,'FB_ElementReady');this.clearVisual();this.process();},_onConditionChanged:function(a){if(a.get_isReady()){a.remove_changed(FB.bind(this._onConditionChanged,this));this._state&=~FB.XFBML._elementState.waitForCondition;if(a.result){if(!(this._state&FB.XFBML._elementState.onProcessCalled)){this.onProcess();this._state|=FB.XFBML._elementState.onProcessCalled;}this._checkDataReady();}else{this.onConditionFalse();this.set_isReady(true);}}},onConditionFalse:function(){FB.UI.UIElement.addCssClass(this.domElement,'FB_ElementConditionFalse');this.domElement.style.display='none';},get_isReady:function(){return (this._state&FB.XFBML._elementState.ready);},set_isReady:function(a){if(a!==this.get_isReady()){if(a){this._state|=FB.XFBML._elementState.ready;}else this._state&=~FB.XFBML._elementState.ready;if(a){FB.UI.UIElement.addCssClass(this.domElement,'FB_ElementReady');}else FB.UI.UIElement.removeCssClass(this.domElement,'FB_ElementReady');if(this.__isReadyChanged)this.__isReadyChanged(this,null);}return a;},onProcess:function(){},onDataReady:function(){},clearVisual:function(){this.domElement.innerHTML='';},_getAttributeFromList:function(e,c,a){var b=this.getAttribute(e,c);var d=new FB.ArrayEnumerator(a);while(d.moveNext()){var f=d.get_current();if(b===f)return f;}return c;},getAttribute:function(b,a){var c=this.domElement.getAttribute(b);if(!c)c=a;return c;},_getBoolAttribute:function(b,a){var d=a;var c=this.domElement.getAttribute(b);if(c)d=FB.Sys.parseBool(c);return d;},addDataToWait:function(a){this._dependents.addDependent(a);},_checkDataReady:function(){try{if(this._dependents.get_isReady()){if(!(this._state&FB.XFBML._elementState.waitForCondition))this.onDataReady();}else this._dependents.waitUntilReady(FB.bind(function(b){this._checkDataReady();},this));}catch(a){FB.Debug.logLine(1,"Failed rendering a XFBML element");}},add_isReadyChanged:function(a){this.__isReadyChanged=FB.Delegate.combine(this.__isReadyChanged,a);},remove_isReadyChanged:function(a){this.__isReadyChanged=FB.Delegate.remove(this.__isReadyChanged,a);},__isReadyChanged:null,domElement:null,_conditionResult:null,_state:0});FB.provide('FB.XFBML.Element',{fromDomElement:function(a){return a._fbElement;}});
FB.subclass('FBIntern.DataHelper','FB.Class',{init:function(){}});FB.provide('FBIntern.DataHelper',{getPrimaryNetwork:function(a){if(a.affiliations&&a.affiliations.length>0){return a.affiliations[0].name;}else return null;}});
FB.subclass('FB.XFBML.Common.Constants','FB.Class',{init:function(){}});FB.provide('FB.XFBML.Common.Constants',{_onLoad:function(){FB.XFBML.Common.Constants.gendeR_MALE_SINGULAR='male';FB.XFBML.Common.Constants.gendeR_FEMALE_SINGULAR='female';}});
FB._create_ElementsRegistration=function(c,b,a){var d={};d.nameSpace=c;d.name=b;d.implementationType=a;return d;};
FB.subclass('FB.XFBML.LoginButton','FB.XFBML.Element',{init:function(a){this.status=FB.ConnectState.userNotLoggedIn;this._super(a);FBIntern.Utility.addEventListener(this.domElement,'click',FB.bind(this._onClick,this));this.intl_button=(this.getAttribute('v','1')=='2');if(this.intl_button)this.savedChildren=this.domElement.innerHTML;this.domElement.innerHTML='';this.domElement.appendChild(FB.UI.DomResources.getResourceById('fb_login'));var b=FBIntern.UIHelper.findElementById(this.domElement,'RES_ID_fb_login');if(this.intl_button){b.appendChild(FB.UI.DomResources.getResourceById('fb_login_text'));}else b.appendChild(FB.UI.DomResources.getResourceById('fb_login_image'));this._updateUI(null);FB.Connect.get_status().add_changed(FB.bind(this._updateUI,this));},clearVisual:function(){},_onClick:function(e){if(this.logoutOnClick){FB.Connect.logout(null);}else{var onLoginJS=this.getAttribute('onlogin','');var handlerEnv={enabled:true};var onLoginHandler=FB.bind(function(){if(this.enabled)eval(onLoginJS);},handlerEnv);var onCancelHandler=FB.bind(function(){this.enabled=false;},handlerEnv);FB.Connect.requireSession(onLoginHandler,onCancelHandler,true);}},_updateUI:function(i){var e=this.status;this.status=(FB.Connect.get_status().get_isReady())?FB.Connect.get_status().result:FB.ConnectState.userNotLoggedIn;var a={};a[FB.Enum.toString(FB.ConnectState,FB.ConnectState.appNotAuthorized)]='fb_login_not_authorized';a[FB.Enum.toString(FB.ConnectState,FB.ConnectState.connected)]='fb_login_ready';a[FB.Enum.toString(FB.ConnectState,FB.ConnectState.userNotLoggedIn)]='fb_login_not_logged_in';FB.UI.UIElement.removeCssClass(this.domElement,a[FB.Enum.toString(FB.ConnectState,e)]);FB.UI.UIElement.addCssClass(this.domElement,a[FB.Enum.toString(FB.ConnectState,this.status)]);var d=FBIntern.UIHelper.findElementById(this.domElement,'RES_ID_fb_login');this.logoutOnClick=(this.status===FB.ConnectState.connected&&this._getBoolAttribute('autologoutlink',false));if(this.intl_button){var g=this._getAttributeFromList('size','medium',['icon','small','medium','large','xlarge']);if(g=='icon'){FB.UI.UIElement.addCssClass(d,'FBConnectButton_Simple');}else{var f=FB.localeIsRTL?'_RTL':'';var h='';switch(g){case 'icon':h='_Simple';break;case 'small':h='_Small';break;case 'large':h='_Large';break;case 'xlarge':h='_BigPun';break;default:h='_Medium';break;}FB.UI.UIElement.addCssClass(d,'FBConnectButton'+f);FB.UI.UIElement.addCssClass(d,'FBConnectButton'+f+h);if(!this.savedChildren)if(this.logoutOnClick){this.savedChildren=FBIntern.Intl._tx("D\u00e9connexion de Facebook");}else{var c=this._getAttributeFromList('length','short',['long','short']);this.savedChildren=(c=='short'?FBIntern.Intl._tx("Se connecter"):FBIntern.Intl._tx("Se connecter avec Facebook"));}var j=FBIntern.UIHelper.findElementById(this.domElement,'RES_ID_fb_login_text');j.innerHTML=this.savedChildren;}}else{var b=FBIntern.UIHelper.findElementById(this.domElement,'RES_ID_fb_login_image');b.src=this.getImageSrc();b.alt=(this.logoutOnClick)?'Logout':'Connect';}},getImageSrc:function(){var d=this._getAttributeFromList('size','large',['small','medium','large']);var a=this._getAttributeFromList('background','light',['white','light','dark']);var b=this._getAttributeFromList('length','short',['long','short']);var c;if(this.logoutOnClick){c='logout_img_'+d;}else c='login_img_'+a+'_'+d+'_'+b;var e=FBIntern.FbGlobals.get_fB_StaticResourceVersions()[c];FB.FBDebug.assert(e,'Image source not found for resource '+c);return e;},onProcess:function(){this.set_isReady(true);},logoutOnClick:false});
FB.subclass('FB.XFBML.ServerFbml','FB.XFBML.Element',{init:function(a){this._super(a);},onDataReady:function(){FB.IFrameUtil.ResizeUtilServer.run();this._createIframeDoc();},clearVisual:function(){if(this._iframeContainer){this._iframeContainer.parentNode.removeChild(this._iframeContainer);this._iframeContainer=null;}},_createIframeDoc:function(){var c='fbmlIFrame_'+FB.XFBML.ServerFbml._iframeIdCount.toString();FB.XFBML.ServerFbml._iframeIdCount++;if(this._iframeContainer)this.clearVisual();this._iframeContainer=this.domElement.appendChild(FB.XdComm.Server.singleton.createNamedHiddenIFrame(c,FB.XdComm.Server.singleton.get_receiverUrl(),'fbmlIframe','frameborder=\"0\"'));var d=this.getAttribute('iframeWidth',null);var b=this.getAttribute('iframeHeight',null);if(d)this._iframeContainer.style.width=d;if(b)this._iframeContainer.style.height=b;var a=(window.self.frames)[c];FB.FBDebug.assert(!FB.Sys.isUndefined(a),'frameWindow is null in CreateIframeDoc. Make sure this.domElement is inserted in the DOM before creating an iframe. (Did you try to insert it in a Dialog before calling Dialog.Show?');FBIntern.Utility.getIFrameDocument(c,this._iframeContainer,FB.bind(function(e){e.open();this._writeDoc(e);},this));},_getFBML:function(){var c=this.getAttribute('fbml',null);if(!c){var a=this.domElement.childNodes.length;for(var d=0;d<a;d++){var b=this.domElement.childNodes[d];if(b.tagName==='SCRIPT'&&(b).type==='text/fbml'){c=b.innerHTML;break;}}}return c;},_writeDoc:function(f){var d=this._getFBML();var h={app_key:FB.Facebook.apiClient.get_apiKey(),channel_url:FB.XdComm.Server.singleton.get_receiverUrl(),fbml:d};var a=new FB.StringBuilder();a.append('\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" >\n<head><title></title></head>\n<body>\n    <form method=\"post\" action=\"'+FBIntern.Utility.getFacebookUrl('www')+'widgets/serverfbml.php\" id=\"form1\" name=\"form1\" >');var b=h;for(var g in b){var c={key:g,value:b[g]};a.append(FB.Sys.format('<input type=\"hidden\" name=\"{0}\" id=\"{1}\" value=\"{2}\"  />',c.key,c.key,FB.Sys.htmlEncode(c.value)));}a.append('\n</form>\n    <script type=\"text/javascript\">\n      window.setTimeout(function(){document.forms[\'form1\'].submit();}, 0);\n    </script>\n</body>\n</html>\n        ');var e=a.toString();f.write(e);f.close();this.set_isReady(true);},_iframeContainer:null});FB.provide('FB.XFBML.ServerFbml',{_onLoad:function(){FB.XFBML.ServerFbml._iframeIdCount=0;}});
FB.subclass('FB.XFBML.ContainerElement','FB.XFBML.Element',{init:function(a){this._super(a);},onDataReady:function(){this.set_isReady(true);}});
FB.subclass('FB.XFBML.AddSectionButton','FB.XFBML.Element',{init:function(a){this._super(a);},onProcess:function(){this._section=this.getAttribute('section',null);if(!this._section)this._section='profile';},onDataReady:function(){FB.Connect.showAddSectionButton(this._section,this.domElement);this.set_isReady(true);},_section:null});
FB.subclass('FB.XFBML.Comments','FB.XFBML.Element',{init:function(a){this._super(a);},refresh:function(){},onDataReady:function(){FB.IFrameUtil.ResizeUtilServer.run();this._createCommentIframe();},_createCommentIframe:function(){if(this._iframeContainer)return;this._iframeName='fbcommentsIFrame_'+FB.XFBML.Comments._iframeIdCount.toString();FB.XFBML.Comments._iframeIdCount++;var m=this.getAttribute('xid',null);var l=this.getAttribute('width','550');var k=this.getAttribute('url',document.URL);var j=this.getAttribute('title',document.title);var c=this.getAttribute('numposts','10');var a=this.getAttribute('css','');var h=this.getAttribute('simple','');var g=this.getAttribute('reverse','');var f=this.getAttribute('quiet','');var d=this.getAttribute('publish_feed','1');l=l.replace('px','');if(!m){var b=document.URL.indexOf('#');if(b>0){m=encodeURIComponent(document.URL.substring(0,b));}else m=encodeURIComponent(document.URL);}var e={api_key:FB.Facebook.apiKey,channel_url:FB.XdComm.Server.singleton.get_receiverUrl(),xid:m,width:l,url:k,title:j,numposts:c,css:a,simple:h,reverse:g,quiet:f,publish_feed:d};var i=FBIntern.Utility.createFacebookUrl('www','widgets/comments.php',e,false);this._iframeContainer=FB.XdComm.Server.singleton.createNamedHiddenIFrame(this._iframeName,i,'','frameborder=\"0\" allowtransparency=\"true\"');this._iframeContainer.style.width=l+'px';this._iframeContainer.style.display='none';this._iframeContainer.style.border='none';FB.Bootstrap.requireFeatures(['Comments'],FB.bind(function(){FB.CommentClient.run();var n=document.createElement('div');FB.UI.UIElement.addCssClass(n,'fb_content_loader_gif');this._loader=document.createElement('div');FB.UI.UIElement.addCssClass(this._loader,'fb_content_loader');FB.UI.UIElement.addCssClass(this._loader,'fb_content_loading');this._loader.style.width=l+'px';this._loader.appendChild(n);this.domElement.appendChild(this._loader);this.domElement.appendChild(this._iframeContainer);FBIntern.Utility.waitForLoaded(this._iframeContainer,FB.bind(function(){FB.UI.UIElement.removeCssClass(this._loader,'fb_content_loading');},this));this.set_isReady(true);},this));},_loader:null,_iframeContainer:null,_iframeName:null});FB.provide('FB.XFBML.Comments',{_onLoad:function(){FB.XFBML.Comments._iframeIdCount=0;}});
FB.subclass('FB.XFBML.LiveStream','FB.XFBML.Element',{init:function(a){this._super(a);this._createLiveStreamIframe();},refresh:function(){},onDataReady:function(){FB.IFrameUtil.ResizeUtilServer.run();},_createLiveStreamIframe:function(){if(this._iframeContainer)return;this._iframeName='fblivestreamIFrame_'+FB.XFBML.LiveStream._iframeIdCount.toString();FB.XFBML.LiveStream._iframeIdCount++;var j=this.getAttribute('xid','default');var i=this.getAttribute('width','400');var b=this.getAttribute('height','500');i=i.replace('px','');b=b.replace('px','');var g=this.getAttribute('redesigned_stream','false');var c=this.getAttribute('hide_friends_tab','0');var a=this.getAttribute('always_post_to_friends','0');var f={api_key:FB.Facebook.apiKey,xid:j,width:i,height:b,hide_friends_tab:c,always_post_to_friends:a};var e;if(g==='true'){e='plugins/live_stream_box.php';}else e='widgets/livefeed.php';var h=FBIntern.Utility.createFacebookUrl('www',e,f,false);this._iframeContainer=FB.XdComm.Server.singleton.createNamedHiddenIFrame(this._iframeName,h,'','width=\"'+i+'\" height=\"'+b+'\" '+'frameborder=\"0\" allowtransparency=\"true\"');this._iframeContainer.style.width=i+'px';this._iframeContainer.style.height=b+'px';this._iframeContainer.style.display='none';this._iframeContainer.style.border='none';var d=document.createElement('div');FB.UI.UIElement.addCssClass(d,'fb_content_loader_gif');this._loader=document.createElement('div');FB.UI.UIElement.addCssClass(this._loader,'fb_content_loader');FB.UI.UIElement.addCssClass(this._loader,'fb_content_loading');this._loader.style.width=i+'px';this._loader.appendChild(d);this.domElement.appendChild(this._loader);this.domElement.appendChild(this._iframeContainer);FBIntern.Utility.waitForLoaded(this._iframeContainer,FB.bind(function(){this._iframeContainer.style.display='block';FB.UI.UIElement.removeCssClass(this._loader,'fb_content_loading');},this));this.set_isReady(true);},_loader:null,_iframeContainer:null,_iframeName:null});FB.provide('FB.XFBML.LiveStream',{_onLoad:function(){FB.XFBML.LiveStream._iframeIdCount=0;}});
FB.subclass('FB.XFBML.Pay','FB.XFBML.Element',{init:function(a){this._super(a);},onDataReady:function(){var a=this.getAttribute('button','large');var e=this.getAttribute('next_js',null);var h=this.getAttribute('order_info',null);var f=this.getAttribute('next_url',null);var i=this.getAttribute('receiver',0);var d='';if(h){var c=false;var g='var fbpay = new FB.Payments(); fbpay.setParam(\'order_info\', \''+h+'\');';if(e)g+='fbpay.setParam(\'next_js\', '+e+');';if(f)g+='fbpay.setParam(\'next_url\', \''+f+'\');';if(i)g+='fbpay.setParam(\'receiver\', '+i+');';var b=null;switch(a){case 'large':b='/images/fbpayments/pay_white_large_long.gif';break;case 'small':b='/images/fbpayments/pay_white_large_short.gif';break;default:c=true;break;}if(!c){g+='fbpay.submitOrder(); return false;';d='<a onclick=\"'+g+'\">'+'<img src=\"'+b+'\" />'+'</a>';}}FBIntern.Utility.paymentsLog('render_tag',FB.Facebook.apiKey);this.domElement.innerHTML=d;this.set_isReady(true);}});
FB.subclass('FB.XFBML.Fan','FB.XFBML.Element',{init:function(a){this._super(a);this._createFanIframe();},onDataReady:function(){FB.IFrameUtil.ResizeUtilServer.run();},clearVisual:function(){if(this._iframeContainer){this._iframeContainer.parentNode.removeChild(this._iframeContainer);this._iframeContainer=null;}if(this._loader){this._loader.parentNode.removeChild(this._loader);this._loader=null;}},_createFanIframe:function(){if(this._iframeContainer||this._loader)this.clearVisual();this._iframeName='fbfanIFrame_'+FB.XFBML.Fan._iframeIdCount.toString();FB.XFBML.Fan._iframeIdCount++;var d=this.getAttribute('profile_id','');var g=this.getAttribute('name','');var l=this.getAttribute('width','300');var a=this.getAttribute('connections','');var j=this.getAttribute('stream','');var f=this.getAttribute('logobar','');var c=this.getAttribute('height','');var b=this.getAttribute('css','');l=l.replace('px','');c=c.replace('px','');if(c===''){if((a===''||a==='0')&&(j===''||j==='0')){c=65;}else if(a===''||a==='0'){c=375;}else if(j===''||j==='0'){c=250;}else c=550;}else{c=parseInt(c,10);if(isNaN(c))c=550;}if(f!==''&&f!=='0')c+=25;var h={api_key:FB.Facebook.apiKey,channel_url:FB.XdComm.Server.singleton.get_receiverUrl(),id:d,name:g,width:l,connections:a,stream:j,logobar:f,css:b};var k=FBIntern.Utility.getFacebookUrl('www')+'widgets/fan.php';var i=FBIntern.Uri.addQueryParameters(k,FBIntern.Uri.createQueryString(h));this._iframeContainer=FB.XdComm.Server.singleton.createNamedHiddenIFrame(this._iframeName,i,'','frameborder=\"0\" allowtransparency=\"true\"');this._iframeContainer.style.width=l+'px';this._iframeContainer.style.height=c+'px';this._iframeContainer.style.border='none';this._iframeContainer.style.display='none';var e=document.createElement('div');FB.UI.UIElement.addCssClass(e,'fb_content_loader_gif');this._loader=document.createElement('div');FB.UI.UIElement.addCssClass(this._loader,'fb_content_loader');FB.UI.UIElement.addCssClass(this._loader,'fb_content_loading');this._loader.style.width=l+'px';this._loader.style.height=c+'px';this._loader.appendChild(e);this.domElement.appendChild(this._iframeContainer);this.domElement.appendChild(this._loader);FBIntern.Utility.waitForLoaded(this._iframeContainer,FB.bind(function(){this._loader.parentNode.removeChild(this._loader);this._loader=null;this._iframeContainer.style.display='';this.set_isReady(true);},this));},_loader:null,_iframeContainer:null,_iframeName:null});FB.provide('FB.XFBML.Fan',{_onLoad:function(){FB.XFBML.Fan._iframeIdCount=0;}});
FB.subclass('FB.XFBML.Resources.ResourceDict','FB.Class',{init:function(){this._stringResources={link:'<a class=\'FB_Link\' href=\'{0}\'>{1}</a>',no_network:'no network'};},getResourceString:function(a){return this._stringResources[a];},_stringResources:null});
FB.subclass('FB.XFBML.Data.FqlTable','FB.Class',{init:function(b,a){this._pendingResults={};this._specialTables={};this._specialFields={};this._table=b;this._key=a;this._specialTables.translation=true;this._specialFields.translation='pre_hash_string';this._specialTables.link_stat=true;this._specialFields.link_stat='url';this._cache=FB.XFBML.Data.CacheManager._getValue(this.get__cacheKey());if(!this._cache){this._fields=[];this._cache=FB._create__fqlCache(this._fields);}else this._fields=this._cache.fields;},selectByKey:function(g,h){FB.FBDebug.assert(h,'value cannot be null');var c=false;var e=new FB.ArrayEnumerator(g);while(e.moveNext()){var f=e.get_current();if(!FB.Sys.contains(this._fields,f)){FB.Sys.add(this._fields,f);c=true;}}if(c)this._cache=FB._create__fqlCache(this._fields);var i=this._pendingResults[h];if(!i){var b=this._cache.rows[h];if(b){var a=(new Date()).getTime()-b.createTime;if(a<FB.XFBML.Data.CacheManager._maxUsableAge){if(FB.FBDebug.logLevel>5)FB.FBDebug.writeLine('Use cached value for key='+h+' in fql table '+this.get__cacheKey());i=new FB.PendingResult();i.setPendingResult(b.data,null);if(a>FB.XFBML.Data.CacheManager._refreshInternal){this._pendingResults[h]=i;}else return i;}}}if(!i){i=new FB.PendingResult();this._pendingResults[h]=i;}var d=FB.XFBML.Context.singleton;if(!this._subscribedToEvent){d.add_beforeSendBatchRequest(FB.bind(this._beforeSendBatchRequest,this));this._subscribedToEvent=true;}d.requestBatchProcess();return i;},invokeApi:function(a,b){if(FB.Connect.get_status().get_isReady()&&FB.Connect.get_status().result!==FB.ConnectState.connected&&this._table!=='user'){var c=new FB.PendingResult();c.setPendingResult(null,FBIntern.Utility.createException('Invalid session state',FB.ApiErrorCode.invalid_session_key));return c;}else{var d=FB.Sys.format('SELECT {0} from {1} WHERE {2} IN ({3})',a.toString(),this._table,this._key,b.toString());return FB.Facebook.apiClient.fql_query(d,FB.XFBML.Context.singleton.get_batchSequencer());}},_beforeSendBatchRequest:function(){var f=[];var g=this._pendingResults;if(!FB.Sys.getKeyCount(g))return;var b=g;for(var e in b){var c={key:e,value:b[e]};FB.Sys.add(f,c.key);}var h='';if(this._specialTables[this._table]){h=this._specialFields[this._table];}else h=this._key;if(!FB.Sys.contains(this._fields,h))FB.Sys.add(this._fields,h);var d=this._fields;this._fields=[];this._pendingResults={};var a=this.invokeApi(d,f);a.waitUntilReady(FB.bind(function(q){var o=(new Date()).getTime();var s=a.result;if(s){var i=s.length;for(var l=0;l<i;l++){var r=s[l];var n='';if(!this._specialTables[this._table]){n=r[this._key];}else n='\"'+r[this._specialFields[this._table]]+'\"';if(r&&g[n])(g[n]).setPendingResult(r,a.exception);}}var j=g;for(var m in j){var k={key:m,value:j[m]};var p=k.value;if(!p.get_isReady()){p.setPendingResult(null,new Error('No data received from server from FQL query.'));if(!a.exception)this._cache.rows[k.key]=FB._create__cachedItem(null,o);}else this._cache.rows[k.key]=FB._create__cachedItem(p.result,o);}FB.XFBML.Data.CacheManager._setValue(this.get__cacheKey(),this._cache);},this));},get__cacheKey:function(){return 'v0.1_fql_'+this._table+'_'+this._key;},_key:null,_table:null,_fields:null,_cache:null,_subscribedToEvent:false});
FB.subclass('FB.XFBML.ProfileTabButton','FB.XFBML.Element',{init:function(a){this._super(a);},onProcess:function(){if(FB.Facebook.apiClient.get_session()){this._uid=FB.Connect.get_loggedInUser();}else{FB.FBDebug.logLine(2,'Cannot show <fb:add-profile-tab button because'+' there is no logged in user');this._uid=null;return;}this._type=this.getAttribute('type','on-facebook');this._tabAdded=FB.XFBML.Context.singleton.getFqlTable('permissions','uid').selectByKey(['tab_added'],this._uid);this.addDataToWait(this._tabAdded);},onDataReady:function(){if(this._uid&&this._tabAdded.result&&this._tabAdded.result.tab_added==0){var c='';var d='FB.Connect.showProfileTabDialog(); return false;';var a='';var b='';if(this._type=='off-facebook'){a='class="FBConnectButton FBConnectButton_Medium"';b='<span class="FBConnectButton_Text">'+FBIntern.Intl._tx("Ajouter un onglet de profil sur Facebook")+'</span>';}else{a='class="FB_UIButton FB_UIButton_Gray '+'FB_UIButton_CustomIcon UIActionButton"';b='<span class="FB_UIButton_Text">'+'<span class="FB_Bookmark_Icon" ></span>'+FBIntern.Intl._tx("Ajouter un onglet de profil")+'</span>';}c=FB.Sys.format('<a '+' {0} '+'onclick=\'{1}\' '+'target=\'_blank\'>{2}</a>',a,d,b);this.domElement.innerHTML=c;}this.set_isReady(true);}});
FB.subclass('FB.XFBML.ShareButton','FB.XFBML.Element',{init:function(a){this._super(a);},onProcess:function(){this._href=this.getAttribute('href',null);if(!this._href)this._href=window.location.href;this._type=this.getAttribute('type','icon_link');var b='';var a='';var c=FBIntern.Intl._tx("Partager");switch(this._type){case 'icon':case 'icon_link':a='class=\'FBConnectButton_Simple\'';b='<span class=\'FBConnectButton_Text_Simple\'>'+(this._type=='icon_link'?c:'&nbsp;')+'</span>';break;case 'link':b=FBIntern.Intl._tx("Partager sur Facebook");break;default:b='<span class="FBConnectButton_Text">'+c+'</span>';a='class=\'FBConnectButton FBConnectButton_Small\'';break;}html=FB.Sys.format('<a href=\'{0}\''+' {2} onclick=\'FB.Connect.showShareDialog(\"{0}\", function(){});'+'return false;\''+'target=\'_blank\'>{1}</a>',this._href,b,a);this.domElement.innerHTML=html;this.content=html;this.container=this.domElement;if(this._type=='button_count'||this._type=='box_count'){this._count=FB.XFBML.Context.singleton.getFqlTable('link_stat','url').selectByKey(['url','total_count'],'"'+this._href+'"');this.addDataToWait(this._count);}},onDataReady:function(){var f=this._count.result;if(f&&typeof(f.total_count)=='number'&&f.total_count>=3){var d=function(h){return h>=1e+07?Math.round(h/1e+06)+'M':(h>=10000?Math.round(h/1000)+'K':h);};var e=d(f.total_count);var c='';var a='';var b='<span class=\'fb_share_count_inner\'>'+e+'</span>';var g='';if(this._type=='button_count'){c='<span class=\'fb_share_count_nub_right\'>&nbsp;</span>';a='<span class=\'fb_share_count fb_share_count_right\'>'+b+'</span>';this.content=this.content+c+a;}else if(this._type=='box_count'){c='<span class=\'fb_share_count_nub_top\'>&nbsp;</span>';a='<span class=\'fb_share_count fb_share_count_top\'>'+b+'</span>';this.content=c+a+this.content;g='fb_share_count_wrapper';}this.container.innerHTML='<span class=\''+g+'\'>'+this.content+'</span>';}this.set_isReady(true);},_href:null,_type:null});
FB.subclass('FB.XFBML.PromptPermission','FB.XFBML.Element',{init:function(a){this._super(a);},onProcess:function(){var b=FB.Connect.get_loggedInUser();if(b){this._permission=this.getAttribute('perms',null);if(!this._permission){FB.FBDebug.logLine(1,'No perms attribute was provided.');return;}var a=FB.XFBML.Context.singleton.getFqlTable('permissions','uid');this._data=a.selectByKey([this._permission],b);this.addDataToWait(this._data);}},onDataReady:function(){var c=null;if(this._data)c=this._data.result;var b=this.getAttribute('next_fbjs',null);var a='null';if(b)a='function(result) { '+'  if (result) { '+b+' } '+'}';if((c)&&!(c[this._permission])){this.domElement.innerHTML='<a href=\"#\" onclick=\"FB.Connect.showPermissionDialog(\''+this._permission+'\', '+a+'); return false;\">'+this.domElement.innerHTML+'</a>';}else this.domElement.innerHTML='';this.set_isReady(true);},_data:null,_permission:null});
FB.subclass('FB.XFBML.ProfilePic','FB.XFBML.Element',{init:function(a){this._super(a);},onProcess:function(){var d=this.getAttribute('size','thumb');var e={thumb:'pic_small',small:'pic',normal:'pic_big',square:'pic_square',t:'pic_small',s:'pic',n:'pic_big',q:'pic_square'};this._picFieldName=e[d];if(!this._picFieldName)this._picFieldName='pic';if(this._getBoolAttribute('facebook-logo',false))this._picFieldName+='_with_logo';this._linked=this._getBoolAttribute('linked',true);var f=this.getAttribute('width',null);var c=this.getAttribute('height',null);if(f)this.domElement.style.width=FB.XFBML.ProfilePic._addPxIfNecessary(f);if(c)this.domElement.style.height=FB.XFBML.ProfilePic._addPxIfNecessary(c);this._uid=FB.XFBML.ConnectUtility.normalizeInt64ForId(this.getAttribute('uid',null));if(this._uid==='loggedinuser')if(FB.Facebook.apiClient.get_session()){this._uid=FB.Connect.get_loggedInUser();}else{FB.FBDebug.logLine(2,'cannot use loggedinuser, there is no session');this._uid=null;return;}var b;var a=FB.XFBML.Context.singleton;if(FB.XFBML.ConnectUtility.isUser(this._uid)){b=a.getFqlTable('user','uid');}else b=a.getFqlTable('profile','id');this._data=b.selectByKey(['name',this._picFieldName],this._uid);this.addDataToWait(this._data);if(!this._dependents.get_isReady())this._renderImage(null);},onDataReady:function(){var a=(this._data)?this._data.result:null;this._renderImage(a);this.set_isReady(true);},_renderImage:function(g){var d=(g)?g[this._picFieldName]:null;if(!d){var f=(FBIntern.Utility.isSecure())?'ssl':'static.ak';d=FBIntern.Utility.getFacebookUrl(f)+'pics/'+FB.XFBML.ProfilePic._defaultPicMap[this._picFieldName];}var b=this.domElement.style.width;var a=this.domElement.style.height;var e=((b)?'width:'+b+';':'')+((a)?'height:'+a+';':'');var c=FB.Sys.format('<img src=\'{0}\' alt=\'{1}\' title=\'{1}\' style=\'{2}\' class=\'{3}\' />',d,(g)?g.name:'',e,this.domElement.className);if(this._linked)c=FB.XFBML.ConnectUtility._profileLink(g,c,this.getAttribute('href',null));this.domElement.innerHTML=c;FB.UI.UIElement.addCssClass(this.domElement,'fb_profile_pic_rendered');},_uid:null,_picFieldName:null,_linked:false,_data:null});FB.provide('FB.XFBML.ProfilePic',{_onLoad:function(){FB.XFBML.ProfilePic._defaultPicMap=null;FB.XFBML.ProfilePic._defaultPicMap={pic_small:'t_silhouette.jpg',pic:'s_silhouette.jpg',pic_big:'d_silhouette.gif',pic_square:'q_silhouette.gif',pic_small_with_logo:'t_silhouette_logo.gif',pic_with_logo:'s_silhouette_logo.gif',pic_big_with_logo:'d_silhouette_logo.gif',pic_square_with_logo:'q_silhouette_logo.gif'};},_addPxIfNecessary:function(a){return (FBIntern.Utility.isStrInt(a))?a+'px':a;}});
FB.subclass('FB.XFBML.UserLink','FB.XFBML.Element',{init:function(a){this._super(a);},onProcess:function(){this._uid=FB.XFBML.ConnectUtility.normalizeInt64ForId(this.getAttribute('uid',null));if(!this._uid)throw new Error('No uid parameter was provided.');var a=[];FB.Sys.addRange(a,['uid','name']);this._showNetwork=this._getBoolAttribute('shownetwork',true);if(this._showNetwork)FB.Sys.add(a,'affiliations');this._data=FB.XFBML.Context.singleton.getFqlTable('user','uid').selectByKey(a,this._uid);this.addDataToWait(this._data);},onDataReady:function(){var f=this._data.result;if(f){var e={id:f.uid};var c=FBIntern.Utility.createFacebookUrl('www','profile.php',e,true);var b=f.name;if(this._showNetwork)b+=' '+FB.XFBML.ConnectUtility.getNetworkInParentheses(f);var d='<a href=\''+c+'\'>'+FB.Sys.htmlEncode(b)+'</a>';this.domElement.innerHTML=d;}else{var a=this.getAttribute('ifcantsee',null);if(a)this.domElement.innerHTML=FB.Sys.htmlEncode(a);}this.set_isReady(true);},_data:null,_uid:null,_showNetwork:false});
FB.subclass('FB.XFBML.UserStatus','FB.XFBML.Element',{init:function(a){this._super(a);},onProcess:function(){this._uid=FB.XFBML.ConnectUtility.normalizeInt64ForId(this.getAttribute('uid',null));if(!this._uid)throw new Error('No \'uid\' parameter provided.');this._data=FB.XFBML.Context.singleton.getFqlTable('user','uid').selectByKey(['status'],this._uid);this.addDataToWait(this._data);},onDataReady:function(){var b=this._data.result;if(b&&b.status){var a=b.status.message;if(a){if((a.length>0)&&(a.charAt(a.length-1)!=='.'))a=a+'.';}else a='';this.domElement.innerHTML=FB.Sys.htmlEncode(a);}this.set_isReady(true);},_data:null,_uid:null});
FB.subclass('FB.XFBML.UnconnectedFriendsCount','FB.XFBML.Element',{init:function(a){this._super(a);},onProcess:function(){this.addDataToWait(FB.XFBML.Context.singleton.get_unconnectedFriendsCount());},onDataReady:function(){var b=FB.XFBML.Context.singleton.get_unconnectedFriendsCount();if(!b.exception){var a=FB.XFBML.Context.singleton.get_unconnectedFriendsCount().result;this.domElement.innerHTML=a.toString()+' ';}else FB.FBDebug.logLine(1,'Can\'t render UnconnectedFriendsCount because of invalid data');this.set_isReady(true);}});
FB.subclass('FB.XFBML.Video','FB.XFBML.Element',{init:function(a){this._super(a);},onProcess:function(){this._vid=FB.XFBML.ConnectUtility.normalizeInt64ForId(this.getAttribute('vid',null));this._width=this.getAttribute('width','576');this._height=this.getAttribute('height','432');},onDataReady:function(){var b=FB.Sys.format('http://www.facebook.com/swf/mvp.swf?vid={0}&stage_width={1}&stage_height={2}',this._vid,this._width,this._height);var a=FB.Sys.format('\n<object width=\"{0}\" height=\"{1}\">\n<param name=\"movie\" value=\"{2}\"></param>\n<param name=\"allowFullScreen\" value=\"true\"></param>\n<param name=\"allowScriptAccess\" value=\"always\"></param>\n<embed src=\"{2}\" type=\"application/x-shockwave-flash\" allowScriptAccess=\"always\" allowFullScreen=\"true\" width=\"{0}\" height=\"{1}\"></embed>\n</object>',this._width,this._height,b);this.domElement.innerHTML=a;this.set_isReady(true);},_vid:null,_width:null,_height:null});
FB.subclass('FB.XFBML.Photo','FB.XFBML.Element',{init:function(a){this._super(a);},onProcess:function(){this._pid=FB.XFBML.ConnectUtility.normalizeInt64ForId(this.getAttribute('pid',null));if(!this._pid)throw new Error('No pid parameter was provided.');var a=this.getAttribute('size','normal');var b={thumb:'src_small',t:'src_small',small:'src',s:'src',normal:'src_big',n:'src_big'};this._srcFieldName=b[a];if(!this._srcFieldName)this._srcFieldName='src_big';this._data=FB.XFBML.Context.singleton.getFqlTable('photo','pid').selectByKey(['pid','caption',this._srcFieldName],this._pid);this.addDataToWait(this._data);},onDataReady:function(){var b=this._data.result;if(b){var a=FB.Sys.format('<img src=\'{0}\' alt=\'{1}\' title=\'{1}\' />',b[this._srcFieldName],b.caption);this.domElement.innerHTML=a;}this.set_isReady(true);},_data:null,_pid:null,_srcFieldName:null});
FB.subclass('FB.XFBML.GroupLink','FB.XFBML.Element',{init:function(a){this._super(a);},onProcess:function(){this._gid=FB.XFBML.ConnectUtility.normalizeInt64ForId(this.getAttribute('gid',null));if(!this._gid)throw new Error('No gid parameter');this._data=FB.XFBML.Context.singleton.getFqlTable('group','gid').selectByKey(['gid','name'],this._gid);this.addDataToWait(this._data);},onDataReady:function(){var a=this._data.result;if(a){var d={gid:a.gid};var b=FBIntern.Utility.createFacebookUrl('www','group.php',d,true);var c='<a href=\''+b+'\'>'+FB.Sys.htmlEncode(a.name)+'</a>';this.domElement.innerHTML=c;}this.set_isReady(true);},_data:null,_gid:null});
FB.subclass('FB.XFBML.EventLink','FB.XFBML.Element',{init:function(a){this._super(a);},onProcess:function(){this._eid=FB.XFBML.ConnectUtility.normalizeInt64ForId(this.getAttribute('eid',null));if(!this._eid)throw new Error('No eid parameter');this._data=FB.XFBML.Context.singleton.getFqlTable('event','eid').selectByKey(['eid','name'],this._eid);this.addDataToWait(this._data);},onDataReady:function(){var a=this._data.result;if(a){var d={eid:a.eid};var b=FBIntern.Utility.createFacebookUrl('www','event.php',d,true);var c='<a href=\''+b+'\'>'+FB.Sys.htmlEncode(a.name)+'</a>';this.domElement.innerHTML=c;}this.set_isReady(true);},_data:null,_eid:null});
FB.subclass('FB.XFBML.Pronoun','FB.XFBML.Name',{init:function(a){this._super(a);},onDataReady:function(){this.renderPronoun();this.set_isReady(true);}});
FB.subclass('FB.XFBML.ConnectUtility','FB.Class',{init:function(){}});FB.provide('FB.XFBML.ConnectUtility',{upperCaseFirstChar:function(a){if(a.length>0){return a.substr(0,1).toUpperCase()+a.substr(1);}else return a;},getElementsByTagNameNS:function(b,f,c){var e=null;switch(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()){case FBIntern.HostName.MOZILLA:c=(f+':'+c).toLowerCase();e=b.getElementsByTagNameNS(document.body.namespaceURI,c);break;case FBIntern.HostName.IE:var a=document.namespaces;if(a&&FB.Sys.containsKey(a,f)){e=b.getElementsByTagName(c);}else{c=f+':'+c;e=b.getElementsByTagName(c);if(e&&e.length>0){var d='You appear to be using the XFBML tag '+c+' in your HTML markup. However, you are missing corresponding xmlns attribute in your <HTML> tag. That xmlns attribute is required in Internet Explorer. For example, to use XFBML tags with the \'fb\' namespace such as <fb:login-button></fb:login-button>, you must place xmlns:fb=\"http://www.facebook.com/2008/fbml\" in the <HTML> tag';FB.FBDebug.logLine(0,d);throw new Error(d);}}break;default:c=f+':'+c;e=b.getElementsByTagName(c);break;}return e;},normalizeInt64ForId:function(a){if(a){var b=typeof(a);if(b==='string'&&(a).length<10)a=parseInt(a);}return a;},getNetworkInParentheses:function(b){var a=FBIntern.DataHelper.getPrimaryNetwork(b);if(!a)a=FB.XFBML.Context.singleton.resources.getResourceString('no_network');return '('+a+')';},isNameAvailable:function(a){return a&&!(FB.Sys.isNullOrEmpty(a.first_name)&&FB.Sys.isNullOrEmpty(a.last_name)&&FB.Sys.isNullOrEmpty(a.name));},_profileLink:function(c,b,a){if(!FBIntern.Utility.getSiteVar('enable_custom_href'))a=null;if(!a&&FB.XFBML.ConnectUtility.isNameAvailable(c))a=FBIntern.Utility.getNonConnectFacebookUrl('www')+'profile.php?id='+c.uid;if(a)b=FB.Sys.format(FB.XFBML.Context.singleton.resources.getResourceString('link'),a,b);return b;},isUser:function(a){return a<2.2e+09||(a>=1e+14&&a<=100099999989999);}});
FB.subclass('FB.XFBML.Name','FB.XFBML.Element',{init:function(a){this._super(a);},onProcess:function(){this._uid=FB.XFBML.ConnectUtility.normalizeInt64ForId(this.getAttribute('uid',null));if(this._uid==='loggedinuser')if(FB.Facebook.apiClient.get_session()){this._uid=FB.Connect.get_loggedInUser();}else{FB.FBDebug.logLine(2,'Cannot use loggedinuser, there is no session');this._uid=null;return;}if(!this._uid){FB.FBDebug.logLine(2,'fb:name has no user id');return;}this._firstnameonly=this._getBoolAttribute('firstnameonly',false);this._lastnameonly=this._getBoolAttribute('lastnameonly',false);var b=[];if(this._firstnameonly){b.push('first_name');}else if(this._lastnameonly){b.push('last_name');}else b.push('name');this._possessive=this._getBoolAttribute('possessive',false);this._reflexive=this._getBoolAttribute('reflexive',false);this._objective=this._getBoolAttribute('objective',false);if(FB.Facebook.apiClient.get_session())this._shownetwork=this._getBoolAttribute('shownetwork',false);this._linked=this._getBoolAttribute('linked',true);if(this._shownetwork)FB.Sys.add(b,'affiliations');this._subjectId=FB.XFBML.ConnectUtility.normalizeInt64ForId(this.getAttribute('subjectid',null));if(this._subjectId){b.push('sex');if(FBIntern.Utility.id64BitEquals(this._subjectId,FB.Connect.get_loggedInUser()))this._reflexive=true;}var c;var a=FB.XFBML.Context.singleton;if(FB.XFBML.ConnectUtility.isUser(this._uid)){c=a.getFqlTable('user','uid');}else{c=a.getFqlTable('profile','id');b=['name'];}this._data=c.selectByKey(b,this._uid);this.addDataToWait(this._data);},onDataReady:function(){if(this._uid)if(FBIntern.Utility.id64BitEquals(this._subjectId,this._uid)){this.renderPronoun();}else this._renderOther();this.set_isReady(true);},renderPronoun:function(){var b=this._data.result;var c='';var a=this._objective;if(this._subjectId){a=true;if(this._subjectId===this._uid)this._reflexive=true;}if((FBIntern.Utility.id64BitEquals(this._uid,FB.Connect.get_loggedInUser()))&&this._getBoolAttribute('useyou',true)){if(this._possessive){if(this._reflexive){c='your own';}else c='your';}else if(this._reflexive){c='yourself';}else c='you';}else switch(b.sex){case FB.XFBML.Common.Constants.gendeR_MALE_SINGULAR:if(this._possessive){c=(this._reflexive)?'his own':'his';}else if(this._reflexive){c='himself';}else if(a){c='him';}else c='he';break;case FB.XFBML.Common.Constants.gendeR_FEMALE_SINGULAR:if(this._possessive){c=(this._reflexive)?'her own':'her';}else if(this._reflexive){c='herself';}else if(a){c='her';}else c='she';break;default:if(this._getBoolAttribute('usethey',true)){if(this._possessive){if(this._reflexive){c='their own';}else c='their';}else if(this._reflexive){c='themselves';}else if(a){c='them';}else c='they';}else if(this._possessive){if(this._reflexive){c='his/her own';}else c='his/her';}else if(this._reflexive){c='himself/herself';}else if(a){c='him/her';}else c='he/she';break;}if(this._getBoolAttribute('capitalize',false))c=FB.XFBML.ConnectUtility.upperCaseFirstChar(c);this.domElement.innerHTML=c;},_renderOther:function(){var d=this._data.result;if(!d){FB.FBDebug.logLine(1,'no data available');return;}var b='';var a='';var c='';if(FBIntern.Utility.id64BitEquals(this._uid,FB.Connect.get_loggedInUser())&&this._getBoolAttribute('useyou',true)){if(this._reflexive){if(this._possessive){b='your own';}else b='yourself';}else if(this._possessive){b='your';}else b='you';}else{if(null===d.first_name)d.first_name='';if(null===d.last_name)d.last_name='';if(this._firstnameonly){b=d.first_name;}else if(this._lastnameonly)b=d.last_name;if(!b)b=d.name;if(b!==''&&this._possessive)b+='\'s';if(this._shownetwork)c=FB.XFBML.ConnectUtility.getNetworkInParentheses(d);}if(!b)b=this.getAttribute('ifcantsee','Facebook User');if(b){if(this._getBoolAttribute('capitalize',false))b=FB.XFBML.ConnectUtility.upperCaseFirstChar(b);if(this._linked){a=FB.XFBML.ConnectUtility._profileLink(d,b,this.getAttribute('href',null));}else a=b;}if(this._shownetwork)a+=' '+c;this.domElement.innerHTML=a;},_data:null,_subjectId:null,_uid:null,_possessive:false,_firstnameonly:false,_linked:false,_lastnameonly:false,_reflexive:false,_shownetwork:false,_objective:false});
FB.subclass('FB.XFBML.Host','FB.Class',{init:function(){}});FB.provide('FB.XFBML.Host',{_onLoad:function(){FB.XFBML.Host.autoParseDomTree=true;FB.XFBML.Host._fbmlElements=[];FB.XFBML.Host._registeredElements=null;FB.XFBML.Host._areElementsReady=new FB.SimpleWaitable();FB.XFBML.Host._readyElementsCount=0;FB.UI.DomResources.addResourceDict(new FB.UI.DomResDict('<a id=\"RES_ID_fb_login\" class=\"fbconnect_login_button\"></a><img id=\"RES_ID_fb_login_image\"  /><span id=\"RES_ID_fb_login_text\" class=\"FBConnectButton_Text\"></span>'));var a=[FB._create_ElementsRegistration('fb','login-button',FB.XFBML.LoginButton),FB._create_ElementsRegistration('fb','name',FB.XFBML.Name),FB._create_ElementsRegistration('fb','pronoun',FB.XFBML.Pronoun),FB._create_ElementsRegistration('fb','serverFbml',FB.XFBML.ServerFbml),FB._create_ElementsRegistration('fb','eventLink',FB.XFBML.EventLink),FB._create_ElementsRegistration('fb','groupLink',FB.XFBML.GroupLink),FB._create_ElementsRegistration('fb','photo',FB.XFBML.Photo),FB._create_ElementsRegistration('fb','video',FB.XFBML.Video),FB._create_ElementsRegistration('fb','unconnected-friends-count',FB.XFBML.UnconnectedFriendsCount),FB._create_ElementsRegistration('fb','container',FB.XFBML.ContainerElement),FB._create_ElementsRegistration('fb','user-status',FB.XFBML.UserStatus),FB._create_ElementsRegistration('fb','userLink',FB.XFBML.UserLink),FB._create_ElementsRegistration('fb','profile-pic',FB.XFBML.ProfilePic),FB._create_ElementsRegistration('fb','prompt-permission',FB.XFBML.PromptPermission),FB._create_ElementsRegistration('fb','share-button',FB.XFBML.ShareButton),FB._create_ElementsRegistration('fb','add-section-button',FB.XFBML.AddSectionButton),FB._create_ElementsRegistration('fb','comments',FB.XFBML.Comments),FB._create_ElementsRegistration('fb','live-stream',FB.XFBML.LiveStream),FB._create_ElementsRegistration('fb','pay',FB.XFBML.Pay),FB._create_ElementsRegistration('fb','bookmark',FB.XFBML.BookmarkButton),FB._create_ElementsRegistration('fb','add-profile-tab',FB.XFBML.ProfileTabButton),FB._create_ElementsRegistration('fb','fan',FB.XFBML.Fan)];FB.XFBML.Host._registeredElements=(a);},registerCustomTag:function(c,b,a){FB.Sys.add(FB.XFBML.Host._registeredElements,FB._create_ElementsRegistration(c,b,a));},_pruneFbmlElements:function(){var d=[];var a=FB.XFBML.Host._fbmlElements.length;for(var c=0;c<a;c++){var b=FB.XFBML.Host._fbmlElements[c];if(b.isValid())FB.Sys.add(d,b);}FB.XFBML.Host._fbmlElements=d;},parseDomTree:function(){FB.XFBML.Host.parseDomElement(document.body);},parseDomElement:function(a){FB.XFBML.Data.CacheManager.get__initialized().waitUntilReady(function(g){FB.XFBML.Host._pruneFbmlElements();var i=[];var e=new FB.ArrayEnumerator(FB.XFBML.Host._registeredElements);while(e.moveNext()){var d=e.get_current();var h=FB.XFBML.ConnectUtility.getElementsByTagNameNS(a,d.nameSpace,d.name);var b='FB_'+d.name.replace(/-/g,'_');for(var f=0;f<h.length;f++){var c=FB.XFBML.Element.fromDomElement(h[f]);if(!c){if(!d.implementationType){FB.FBDebug.logLine(FB.Log.Level.ERROR,'Host.parseDomElement: XFBML tag '+b+' is not properly configured');continue;}c=new d.implementationType(h[f]);FB.UI.UIElement.addCssClass(h[f],b);FB.XFBML.Host._addElementToList(c);}FB.Sys.add(i,c);}}FB.XFBML.Host._readyElementsCount=0;FB.XFBML.Host._areElementsReady._setResult(false,true);FB.Connect.get_status().waitUntilReady(function(m){var j=i.length;for(var l=0;l<j;l++){var k=i[l];k.process();}});FB.XFBML.Host._logElements(i);});},_logElements:function(b){if(FB.Monitor&&FB.Monitor.loggingEnabled()){var a=b.length;for(var c=0;c<a;c++)FB.Monitor.logXFBML(b[c].domElement);}},refresh:function(){FB.XFBML.Host._pruneFbmlElements();var a=FB.XFBML.Host._fbmlElements.length;if(a>0){FB.FBDebug.logLine(2,'Host.Refresh: refresh all existing XFBML elements');FB.XFBML.Host._readyElementsCount=0;FB.XFBML.Host._areElementsReady._setResult(false,true);for(var c=0;c<a;c++){var b=FB.XFBML.Host._fbmlElements[c];b.refresh();}}},get_areElementsReady:function(){return FB.XFBML.Host._areElementsReady;},addElement:function(a){FB.Connect.get_status().waitUntilReady(function(b){FB.XFBML.Data.CacheManager.get__initialized().waitUntilReady(function(c){FB.XFBML.Host._addElementToList(a);a.process();});});},addElements:function(b){var c=new FB.ArrayEnumerator(b);while(c.moveNext()){var a=c.get_current();FB.XFBML.Host.addElement(a);}},_addElementToList:function(a){FB.Sys.add(FB.XFBML.Host._fbmlElements,a);if(a.get_isReady()){FB.XFBML.Host._readyElementsCount++;FB.XFBML.Host._checkReadyState();}else a.add_isReadyChanged(FB.XFBML.Host._elementIsReadyChanged);},_elementIsReadyChanged:function(b,a){(b).remove_isReadyChanged(FB.XFBML.Host._elementIsReadyChanged);FB.XFBML.Host._readyElementsCount++;FB.XFBML.Host._checkReadyState();},_checkReadyState:function(){var a=FB.XFBML.Host._readyElementsCount===FB.XFBML.Host._fbmlElements.length;if(a&&!FB.XFBML.Host._areElementsReady.get_isReady())FB.XFBML.Host._areElementsReady._setResult(true);}});
FB.subclass('FB.XFBML.Context','FB.Class',{init:function(){this.resources=new FB.XFBML.Resources.ResourceDict();this.fqlTables={};this._timerId=-1;this._connectStatus=FB.ConnectState.userNotLoggedIn;FB.Facebook.add_initCalled(FB.bind(function(){if(!this._initialized){this._initialized=true;this._connectStatus=FB.Connect.get_status().result;this._connectStatusReady=FB.Connect.get_status().get_isReady();FB.XFBML.Data.CacheManager._changeContext(FB.Connect.get_loggedInUser());FB.Connect.get_status().add_changed(FB.bind(this._onConnectStatusChanged,this));}if(FB.XFBML.Host.autoParseDomTree)FB.XFBML.Host.parseDomTree();},this));},requestBatchProcess:function(){if(this._timerId===-1)this._timerId=window.setTimeout(FB.bind(this._onTimer,this),0);},get_batchSequencer:function(){if(!this._batchSequencer){this._batchSequencer=new FB.BatchSequencer();this._batchSequencer.isParallel=true;this.requestBatchProcess();}return this._batchSequencer;},_onTimer:function(){FB.Connect.get_status().waitUntilReady(FB.bind(function(a){if(this.__beforeSendBatchRequest)this.__beforeSendBatchRequest();this._timerId=-1;if(this._batchSequencer){this._batchSequencer.execute(null);this._batchSequencer=null;}},this));},getFqlTable:function(d,a){var b=d+a;var c=this.fqlTables[b];if(!c){c=new FB.XFBML.Data.FqlTable(d,a);this.fqlTables[b]=c;}return c;},get_unconnectedFriendsCount:function(){if(!this._unconnectedFriendsCount){this._unconnectedFriendsCount=new FB.PendingResult();FB.Connect.get_status().waitUntilReady(FB.bind(function(e){var b=FB.XFBML.Data.CacheManager._getValue('UnconnectedFriendsCount');var c=true;if(b){var a=(new Date()).getTime()-b.createTime;if(a<FB.XFBML.Data.CacheManager._maxUsableAge){this._unconnectedFriendsCount.setPendingResult(b.data,null);if(a<FB.XFBML.Data.CacheManager._refreshInternal)c=false;}}if(c){var d=FB.Facebook.apiClient.connect_getUnconnectedFriendsCount(this.get_batchSequencer());d.waitUntilReady(FB.bind(function(f){this._unconnectedFriendsCount.setPendingResult(d.result,d.exception);FB.XFBML.Data.CacheManager._setValue('UnconnectedFriendsCount',FB._create__cachedItem(d.result,(new Date()).getTime()));},this));}},this));}return this._unconnectedFriendsCount;},_onConnectStatusChanged:function(b){var a=FB.Connect.get_status().result;FB.XFBML.Data.CacheManager._changeContext(FB.Connect.get_loggedInUser());if(this._connectStatusReady&&a!==this._connectStatus&&a===FB.ConnectState.connected)this._onConnectStateChangedToConnected();this._connectStatusReady=FB.Connect.get_status().get_isReady();this._connectStatus=a;},_onConnectStateChangedToConnected:function(){FB.FBDebug.logLine(2,'Connect state changed from from ready but unconnected to ready and connected');this.fqlTables={};this._unconnectedFriendsCount=null;FB.XFBML.Host.refresh();},add_beforeSendBatchRequest:function(a){this.__beforeSendBatchRequest=FB.Delegate.combine(this.__beforeSendBatchRequest,a);},remove_beforeSendBatchRequest:function(a){this.__beforeSendBatchRequest=FB.Delegate.remove(this.__beforeSendBatchRequest,a);},__beforeSendBatchRequest:null,_batchSequencer:null,_unconnectedFriendsCount:null,_connectStatusReady:false,_initialized:false});FB.provide('FB.XFBML.Context',{_onLoad:function(){FB.XFBML.Context.singleton=null;FB.XFBML.Context.singleton=new FB.XFBML.Context();}});
FB.subclass('FB.XFBML.BookmarkButton','FB.XFBML.Element',{init:function(a){this._super(a);},onProcess:function(){if(FB.Facebook.apiClient.get_session()){this._uid=FB.Connect.get_loggedInUser();}else{FB.FBDebug.logLine(2,'Cannot show bookmark button, no logged in user');this._uid=null;return;}this._type=this.getAttribute('type','on-facebook');this._bookmarked=FB.XFBML.Context.singleton.getFqlTable('permissions','uid').selectByKey(['bookmarked'],this._uid);this.addDataToWait(this._bookmarked);},onDataReady:function(){if(this._uid&&this._bookmarked.result&&this._bookmarked.result.bookmarked==0){var c='';var d='FB.Connect.showBookmarkDialog();return false;';var a='';var b='';if(this._type=='off-facebook'){a='class="FBConnectButton FBConnectButton_Medium"';b='<span class="FBConnectButton_Text">'+FBIntern.Intl._tx("Marquer sur Facebook")+'</span>';}else{a='class="FB_UIButton FB_UIButton_Gray '+'FB_UIButton_CustomIcon UIActionButton"';b='<span class="FB_UIButton_Text">'+'<span class="FB_Bookmark_Icon" ></span>'+FBIntern.Intl._tx("Ajouter un signet")+'</span>';}c=FB.Sys.format('<a '+' {0} '+'onclick=\'{1}\' '+'target=\'_blank\'>{2}</a>',a,d,b);this.domElement.innerHTML=c;}this.set_isReady(true);}});
FB.subclass('FBIntern.LoginStatus','FB.Class',{initialize:function(b,j,k,c,a,i,g,e,h){k.inFacebook=this._checkIfInFacebook();if(!this._rpcClient){var d=new FB.XdComm.EndPoint(null,FB.XdComm.PageRelation.parent,b);if(FB.Sys.isNullOrEmpty(g)){FB.FBDebug.logLine(1,'Disable use of postMessage because '+'parent_window_url parameter is null or empty therefore we cannot '+'securely send message using postMessage');FBIntern.Utility.setSiteVar('use_postMessage',false);}else d.origin=g;d.flashOrigin=e;this._rpcClient=new FB.XdComm.XdRpcClient('loginServer','loginStatus',d);}var f={baseDomain:a,connectState:c,perms:h,publicSessionData:i,session:j,settings:k};this._rpcClient.send('InitLogin',f,null);},_checkIfInFacebook:function(){var b=false;try{var loca=window.top.location.href.split("/")[2];var idx=loca.lastIndexOf('facebook.com');b=(idx!==-1)&&(idx+12)===loca.length;}catch(a){}return b;},_rpcClient:null});
FB.provide('FB.XFBML.OperatorType',{and:0,or:1,xor:2,not:3,greaterThan:4,lessThan:5,equals:6});
FB.subclass('FB.XFBML.Operator','FB.DependentWaitable',{init:function(b,d){this._super();this._op=b;this._operands=d;var a=new FB.ArrayEnumerator(d);while(a.moveNext()){var c=a.get_current();if(FB.Sys.isAssignableFrom(FB.Type.getInstanceType(c),FB.Waitable))this.addDependent(c);}},onChange:function(){this._evaluate();this._super();},_evaluate:function(){switch(this._op){case FB.XFBML.OperatorType.and:this.result=this._getOperandValue(0)&&this._getOperandValue(1);break;case FB.XFBML.OperatorType.not:this.result=!this._getOperandValue(0);break;case FB.XFBML.OperatorType.or:this.result=this._getOperandValue(0)||this._getOperandValue(1);break;case FB.XFBML.OperatorType.xor:this.result=this._getOperandValue(0)^this._getOperandValue(1);break;case FB.XFBML.OperatorType.greaterThan:this.result=this._getOperandValue(0)>this._getOperandValue(1);break;case FB.XFBML.OperatorType.lessThan:this.result=this._getOperandValue(0)<this._getOperandValue(1);break;case FB.XFBML.OperatorType.equals:this.result=this._getOperandValue(0)===this._getOperandValue(1);break;}},_getOperandValue:function(a){var b=this._operands[a];if(FB.Sys.isAssignableFrom(FB.Type.getInstanceType(b),FB.Waitable)){return (b).result;}else return b;},_op:0,_operands:null});FB.provide('FB.XFBML.Operator',{and:function(a,b){return new FB.XFBML.Operator(FB.XFBML.OperatorType.and,[a,b]);},or:function(a,b){return new FB.XFBML.Operator(FB.XFBML.OperatorType.or,[a,b]);},xor:function(a,b){return new FB.XFBML.Operator(FB.XFBML.OperatorType.xor,[a,b]);},not:function(a){return new FB.XFBML.Operator(FB.XFBML.OperatorType.not,[a]);},greaterThan:function(a,b){return new FB.XFBML.Operator(FB.XFBML.OperatorType.greaterThan,[a,b]);},lessThan:function(a,b){return new FB.XFBML.Operator(FB.XFBML.OperatorType.lessThan,[a,b]);},equals:function(a,b){return new FB.XFBML.Operator(FB.XFBML.OperatorType.equals,[a,b]);}});
FB.subclass('FB.XFBML._permisionTable','FB.Class',{init:function(){this._calls={};},ifCanSee:function(e,f){var b=e+f;var d;var c=this._calls[b];if(!c){d=new FB.PendingResult();c={uid:e,what:f,result:d};this._calls[b]=c;var a=FB.XFBML.Context.singleton;if(!this._subscribedToEvent){a.add_beforeSendBatchRequest(FB.bind(this._beforeSendBatchRequest,this));this._subscribedToEvent=true;}a.requestBatchProcess();}else d=c.result;return d;},_beforeSendBatchRequest:function(){var h=[];var f=[];var e=[];var b=this._calls;for(var d in b){var c={key:d,value:b[d]};var g=c.value;FB.Sys.add(h,g.uid);FB.Sys.add(f,g.what);FB.Sys.add(e,g.result);}this._calls={};var a=FB.Facebook.apiClient.privacy_canSee(h,f,FB.XFBML.Context.singleton.get_batchSequencer());a.waitUntilReady(FB.bind(function(k){var i=e.length;var l=a.result;if(l){FB.FBDebug.assert(i===l.length,'Returns results does not contains the exepcted number of items');for(var j=0;j<i;j++)(e[j]).setPendingResult(l[j],a.exception);}else for(var j=0;j<i;j++)(e[j]).setPendingResult(null,a.exception);},this));},_subscribedToEvent:false});
FB.subclass('FB.XFBML.Conditions','FB.Class',{init:function(){}});FB.provide('FB.XFBML.Conditions',{_onLoad:function(){FB.XFBML.Conditions._table=new FB.XFBML._permisionTable();},ifCanSee:function(a,b){return FB.XFBML.Conditions._table.ifCanSee(a,b);}});
FB.subclass('FB.XdHttpRequestServer','FB.Class',{init:function(){}});FB.provide('FB.XdHttpRequestServer',{_onLoad:function(){FB.XdHttpRequestServer._rootUrl=null;FB.XdHttpRequestServer._allowedUrlFilter=null;FB.XdHttpRequestServer._allowedUrls=null;},main:function(a){var d=a.receiver;if(FB.Sys.containsKey(a,'allowed_url_filter'))FB.XdHttpRequestServer._allowedUrlFilter=new RegExp(a.allowed_url_filter);if(FB.Sys.containsKey(a,'allowed_urls'))FB.XdHttpRequestServer._allowedUrls=a.allowed_urls;var e=new FBIntern.Uri(document.URL);FB.XdHttpRequestServer._rootUrl=e.get_schemeAndDomain();var b=e.get_queryParameters().debug_level;if(b){var c=parseInt(b);if(c>FB.FBDebug.logLevel)FB.FBDebug.logLevel=c;}FB.XdComm.Server.singleton.set_receiverUrl(d);FB.XdComm.Server.singleton.registerDataHandler('http_server',FB.XdHttpRequestServer._onDataReceived);},_isUrlAllowed:function(c){if(FB.XdHttpRequestServer._allowedUrlFilter&&FB.XdHttpRequestServer._allowedUrlFilter.test(c))return true;if(FB.XdHttpRequestServer._allowedUrls){var b=new FB.ArrayEnumerator(FB.XdHttpRequestServer._allowedUrls);while(b.moveNext()){var a=b.get_current();if(a===c)return true;}}return false;},_onDataReceived:function(a,h){var g=a;var f=FBIntern.Utility.createXMLHttpRequest();var i=g[2];if(!FB.XdHttpRequestServer._isUrlAllowed(i)){FB.FBDebug.logLine(1,'URL '+i+' is not allowed.');return;}i=FB.XdHttpRequestServer._rootUrl+i;FB.FBDebug.logLine(3,'XdHttpRequestServer: make XHR request to '+i);f.onreadystatechange=function(){if(f.readyState===4){var j=FB._create_XdHttpRequestResult(g[0],f.status,f.statusText,f.responseText);FB.FBDebug.logLine(3,'XdHttpRequestServer: send result back http_client');FB.XdComm.Server.singleton.send(h,'http_client',j);}};f.open(g[1],g[2],true);var c=g[4];if(c){var b=c;for(var e in b){var d={key:e,value:b[e]};f.setRequestHeader(d.key,d.value.toString());}}f.send(g[3]);}});
FB.MonitorSender={createPayload:function(){var a=[];var c=Math.min(FB.MonitorSender.MAX_SEND,FB.Monitor.loggingQueue.length);for(var b=0;b<c;b++)a.push(FB.Monitor.loggingQueue.pop());return FB.JSON.serialize(a);},send:function(){var a=FB.Facebook.apiClient&&FB.Facebook.apiClient.get_apiKey();if(!a)return false;var b=document.createElement('img');b.setAttribute('src',FBIntern.Utility.createFacebookUrl('www','impression.php',{lid:100,api_key:a,url:window.location.toString(),pv:FB.MonitorSender.getPageviewId(),payload:FB.MonitorSender.createPayload()},false));FB.HiddenContainer.get().appendChild(b);return true;},getPageviewId:function(){if(!FB.MonitorSender.pageviewId)FB.MonitorSender.pageviewId=(new Date()).getTime()+'.'+Math.floor(Math.random()*100000).toString();return FB.MonitorSender.pageviewId;},pageviewId:null,MAX_SEND:10};
FB.Integration=FB.Connect;

if (FB && FB.Loader) { FB.Loader.loadCssComps(["bookmark-button-css","connect-button-css","share-button-css","FB.Connect-css","connect-css"]); }
if (FB && FB.Loader) { FB.Loader.onScriptLoaded(["FB.monitor-wrapper","FB.Prelude","FB.Waitable","FB.SimpleWaitable","FBIntern.HostName","FBIntern.HostInfo","FBIntern.AppInfo","FB.Class","FB.Log","FB.Type","FB.Sys","FB.FBDebug","FBIntern.FbGlobals","FB.ArrayEnumerator","FBIntern.Uri","FB.Point","FB.Size","FBIntern.Utility","FBIntern.Flash","FB.JSON","FB.XFBML.Data.CacheManager","FB.XFBML.Data._fqlCache","FB.PendingResult","FB.XdComm._packetType","FB.StringBuilder","FB.XdComm._fragDataHolder","FB.XdComm._packet","FB.XdComm.PageRelation","FB.Delegate","FB.Loader","FB.Bootstrap","FB.Enum","FB.XdComm.PacketDataFormat","FB.HiddenContainer","FB.XdComm._receiveChannel","FB.XdComm.EndPoint","FB.XdComm._sendChannel","FB.XdComm.Server","FBIntern.Cookie","FB.XdHttpRequestResult","FB._xdHttpRequestClient","FB.SessionRecord","FB._xdJsonRequest","FB.ApiErrorCode","FBIntern.Md5","FB.Facebook","FB.ApiClient","FB.ConnectState","FB.DialogType","FB.XdComm.XdRpcClient","FB.XdComm.XdRpcMethodInfo","FB.XdComm.XdRpcServer","FB._contentSizeMethod","FB.CanvasClient","FB.IFrameUtil._resizeUtil","FB.IFrameUtil._canvasUtil","FB.IFrameUtil.CanvasUtilServer","FB.IFrameUtil.ResizeUtilServer","FBIntern.Intl","FB.UI.UIElement","FB.UI.PopupPlacement","FB.UI.Popup","FB.UI.DomResources","FBIntern.UIHelper","FB.UI.PopupDialog","FB.FeedStorySetting","FB.UserInfoRecord","FB.RequireConnect","FB.UI.DomResDict","FB.Helper","FB.UI.FBMLPopupDialog","FB.FeedStorySize","FB.SequencerBase","FB._stepInfo","FB.BatchSequencer","FB.ImmediateSequencer","FB.FeedDialogInfo","FB.SessionDialog","FB.Connect","FB.XFBML.Data._cachedItem","FB.DependentWaitable","FB.XFBML._elementState","FB.XFBML.Element","FBIntern.DataHelper","FB.XFBML.Common.Constants","FB.XFBML.ElementsRegistration","FB.XFBML.LoginButton","FB.XFBML.ServerFbml","FB.XFBML.ContainerElement","FB.XFBML.AddSectionButton","FB.XFBML.Comments","FB.XFBML.LiveStream","FB.XFBML.Pay","FB.XFBML.Fan","FB.XFBML.Resources.ResourceDict","FB.XFBML.Data.FqlTable","FB.XFBML.ProfileTabButton","FB.XFBML.ShareButton","FB.XFBML.PromptPermission","FB.XFBML.ProfilePic","FB.XFBML.UserLink","FB.XFBML.UserStatus","FB.XFBML.UnconnectedFriendsCount","FB.XFBML.Video","FB.XFBML.Photo","FB.XFBML.GroupLink","FB.XFBML.EventLink","FB.XFBML.Pronoun","FB.XFBML.ConnectUtility","FB.XFBML.Name","FB.XFBML.Host","FB.XFBML.Context","FB.XFBML.BookmarkButton","FBIntern.LoginStatus","FB.XFBML.OperatorType","FB.XFBML.Operator","FB.XFBML._permisionTable","FB.XFBML.Conditions","FB.XdHttpRequestServer","FB.monitor-sender","XFBML","Base","Common","XdComm","Api","Connect","Integration","CanvasUtil"]); }