/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  January 28th 2009 6:50:18 PM PST                             */
/*      Machine:  10.16.139.103                                                */
/*       Source:  Local Cache                                                  */
/*     Location:  rsrc:650vrrh1:nu_ll:/html/js/connect.js.pkg.php:141          */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/connect.js.pkg.php                                        */


if(!window._scriptsharp){function __loadCompatLayer(w){w.Debug=function(){};var disableConsoleLog=window!=window.parent&&window.navigator.userAgent.indexOf('Gecko')>=0&&document.domain=="facebook.com";w.Debug.writeln=function(text){if(disableConsoleLog){}else if(window.console){if(window.console.debug){window.console.debug(text);return;}
else if(window.console.log){window.console.log(text);return;}}
else if(window.opera&&window.opera.postError){window.opera.postError(text);return;}};w.__getNonTextNode=function(node){try{while(node&&(node.nodeType!=1)){node=node.parentNode;}}
catch(ex){node=null;}
return node;};w.__getLocation=function(e){var loc={x:0,y:0};while(e){loc.x+=e.offsetLeft;loc.y+=e.offsetTop;e=e.offsetParent;}
return loc;};RegExp._cacheable=true;String._quoteSkipTest=true;w.navigate=function(url){window.setTimeout('window.location = "'+url+'";',0);};var attachEventProxy=function(eventName,eventHandler){eventHandler._mozillaEventHandler=function(e){window.event=e;eventHandler();if(!e.avoidReturn){return e.returnValue;}};this.addEventListener(eventName.slice(2),eventHandler._mozillaEventHandler,false);};var detachEventProxy=function(eventName,eventHandler){if(eventHandler._mozillaEventHandler){var mozillaEventHandler=eventHandler._mozillaEventHandler;delete eventHandler._mozillaEventHandler;this.removeEventListener(eventName.slice(2),mozillaEventHandler,false);}};w.attachEvent=attachEventProxy;w.detachEvent=detachEventProxy;w.HTMLDocument.prototype.attachEvent=attachEventProxy;w.HTMLDocument.prototype.detachEvent=detachEventProxy;w.HTMLElement.prototype.attachEvent=attachEventProxy;w.HTMLElement.prototype.detachEvent=detachEventProxy;w.Event.prototype.__defineGetter__('srcElement',function(){return __getNonTextNode(this.target)||this.currentTarget;});w.Event.prototype.__defineGetter__('cancelBubble',function(){return this._bubblingCanceled||false;});w.Event.prototype.__defineSetter__('cancelBubble',function(v){if(v){this._bubblingCanceled=true;this.stopPropagation();}});w.Event.prototype.__defineGetter__('returnValue',function(){return!this._cancelDefault;});w.Event.prototype.__defineSetter__('returnValue',function(v){if(!v){this._cancelDefault=true;this.preventDefault();}});w.Event.prototype.__defineGetter__('fromElement',function(){var n;if(this.type=='mouseover'){n=this.relatedTarget;}
else if(this.type=='mouseout'){n=this.target;}
return __getNonTextNode(n);});w.Event.prototype.__defineGetter__('toElement',function(){var n;if(this.type=='mouseout'){n=this.relatedTarget;}
else if(this.type=='mouseover'){n=this.target;}
return __getNonTextNode(n);});w.Event.prototype.__defineGetter__('button',function(){return(this.which==1)?1:(this.which==3)?2:0});w.Event.prototype.__defineGetter__('offsetX',function(){return window.pageXOffset+this.clientX-__getLocation(this.srcElement).x;});w.Event.prototype.__defineGetter__('offsetY',function(){return window.pageYOffset+this.clientY-__getLocation(this.srcElement).y;});w.HTMLElement.prototype.__defineGetter__('parentElement',function(){return this.parentNode;});w.HTMLElement.prototype.__defineGetter__('children',function(){var children=[];var childCount=this.childNodes.length;for(var i=0;i<childCount;i++){var childNode=this.childNodes[i];if(childNode.nodeType==1){children.push(childNode);}}
return children;});w.HTMLElement.prototype.__defineGetter__('innerText',function(){try{return this.textContent}
catch(ex){var text='';for(var i=0;i<this.childNodes.length;i++){if(this.childNodes[i].nodeType==3){text+=this.childNodes[i].textContent;}}
return str;}});w.HTMLElement.prototype.__defineSetter__('innerText',function(v){var textNode=document.createTextNode(v);this.innerHTML='';this.appendChild(textNode);});w.HTMLElement.prototype.__defineGetter__('currentStyle',function(){return window.getComputedStyle(this,null);});w.HTMLElement.prototype.__defineGetter__('runtimeStyle',function(){return window.getOverrideStyle(this,null);});w.HTMLElement.prototype.removeNode=function(b){return this.parentNode.removeChild(this)};w.HTMLElement.prototype.contains=function(el){while(el!=null&&el!=this){el=el.parentNode;}
return(el!=null)};w.HTMLStyleElement.prototype.__defineGetter__('styleSheet',function(){return this.sheet;});w.CSSStyleSheet.prototype.__defineGetter__('rules',function(){return this.cssRules;});w.CSSStyleSheet.prototype.addRule=function(selector,style,index){this.insertRule(selector+'{'+style+'}',index);};w.CSSStyleSheet.prototype.removeRule=function(index){this.deleteRule(index);};w.CSSStyleDeclaration.prototype.__defineGetter__('styleFloat',function(){return this.cssFloat;});w.CSSStyleDeclaration.prototype.__defineSetter__('styleFloat',function(v){this.cssFloat=v;});DocumentFragment.prototype.getElementById=function(id){var nodeQueue=[];var childNodes=this.childNodes;var node;var c;for(c=0;c<childNodes.length;c++){node=childNodes[c];if(node.nodeType==1){nodeQueue.push(node);}}
while(nodeQueue.length){node=nodeQueue.dequeue();if(node.id==id){return node;}
childNodes=node.childNodes;if(childNodes.length!=0){for(c=0;c<childNodes.length;c++){node=childNodes[c];if(node.nodeType==1){nodeQueue.push(node);}}}}
return null;};DocumentFragment.prototype.getElementsByTagName=function(tagName){var elements=[];var nodeQueue=[];var childNodes=this.childNodes;var node;var c;for(c=0;c<childNodes.length;c++){node=childNodes[c];if(node.nodeType==1){nodeQueue.push(node);}}
while(nodeQueue.length){node=nodeQueue.dequeue();if(node.tagName==tagName){elements.add(node);}
childNodes=node.childNodes;if(childNodes.length!=0){for(c=0;c<childNodes.length;c++){node=childNodes[c];if(node.nodeType==1){nodeQueue.push(node);}}}}
return elements;};DocumentFragment.prototype.createElement=function(tagName){return document.createElement(tagName);};var selectNodes=function(doc,path,contextNode){contextNode=contextNode?contextNode:doc;var xpath=new XPathEvaluator();var result=xpath.evaluate(path,contextNode,doc.createNSResolver(doc.documentElement),XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);var nodeList=new Array(result.snapshotLength);for(var i=0;i<result.snapshotLength;i++){nodeList[i]=result.snapshotItem(i);}
return nodeList;};var selectSingleNode=function(doc,path,contextNode){path+='[1]';var nodes=selectNodes(doc,path,contextNode);if(nodes.length!=0){for(var i=0;i<nodes.length;i++){if(nodes[i]){return nodes[i];}}}
return null;};w.XMLDocument.prototype.selectNodes=function(path,contextNode){return selectNodes(this,path,contextNode);};w.XMLDocument.prototype.selectSingleNode=function(path,contextNode){return selectSingleNode(this,path,contextNode);};w.XMLDocument.prototype.transformNode=function(xsl){var xslProcessor=new XSLTProcessor();xslProcessor.importStylesheet(xsl);var ownerDocument=document.implementation.createDocument("","",null);var transformedDoc=xslProcessor.transformToDocument(this);return transformedDoc.xml;};Node.prototype.selectNodes=function(path){var doc=this.ownerDocument;return doc.selectNodes(path,this);};Node.prototype.selectSingleNode=function(path){var doc=this.ownerDocument;return doc.selectSingleNode(path,this);};Node.prototype.__defineGetter__('baseName',function(){return this.localName;});Node.prototype.__defineGetter__('text',function(){return this.textContent;});Node.prototype.__defineSetter__('text',function(value){this.textContent=value;});Node.prototype.__defineGetter__('xml',function(){return(new XMLSerializer()).serializeToString(this);});}
function __supportsCompatLayer(ua){return(ua.indexOf('Gecko')>=0)||(ua.indexOf('AppleWebKit')>=0)||(ua.indexOf('Opera')>=0);}
if(__supportsCompatLayer(window.navigator.userAgent)){try{__loadCompatLayer(window);}
catch(e){}}
function isUndefined(o){return(o===undefined);}
function isNull(o){return(o===null);}
function isNullOrUndefined(o){return(o===null)||(o===undefined);}
function $SS(id){return document.getElementById(id);}
Object.__typeName='Object';Object.__baseType=null;Object.parse=function Object$parse(s){return eval(s);}
Object.getKeyCount=function Object$getKeyCount(d){var count=0;for(var n in d){count++;}
return count;}
Object.clearKeys=function Object$clearKeys(d){for(var n in d){delete d[n];}}
Object.keyExists=function Object$keyExists(d,key){return d[key]!==undefined;}
Function.parse=function Function$parse(s){if(!Function._parseCache){Function._parseCache={};}
var fn=Function._parseCache[s];if(!fn){try{eval('fn = '+s);if(typeof(fn)!='function'){fn=null;}
else{Function._parseCache[s]=fn;}}
catch(ex){}}
return fn;}
Boolean.__typeName='Boolean';Boolean.parse=function Boolean$parse(s){return(s.toLowerCase()=='true');}
Number.__typeName='Number';Number.parse=function Number$parse(s){if(!s||!s.length){return 0;}
if((s.indexOf('.')>=0)||(s.indexOf('e')>=0)||s.endsWith('f')||s.endsWith('F')){return parseFloat(s);}
return parseInt(s);}
Number.prototype.format=function Number$format(format,useLocale){if(isNullOrUndefined(format)||(format.length==0)||(format=='i')){if(useLocale){return this.toLocaleString();}
else{return this.toString();}}
return this._netFormat(format,useLocale);}
Number._commaFormat=function Number$_commaFormat(number,groups,decimal,comma){var decimalPart=null;var decimalIndex=number.indexOf(decimal);if(decimalIndex>0){decimalPart=number.substr(decimalIndex);number=number.substr(0,decimalIndex);}
var negative=number.startsWith('-');if(negative){number=number.substr(1);}
var groupIndex=0;var groupSize=groups[groupIndex];if(number.length<groupSize){return decimalPart?number+decimalPart:number;}
var index=number.length;var s='';var done=false;while(!done){var length=groupSize;var startIndex=index-length;if(startIndex<0){groupSize+=startIndex;length+=startIndex;startIndex=0;done=true;}
if(!length){break;}
var part=number.substr(startIndex,length);if(s.length){s=part+comma+s;}
else{s=part;}
index-=length;if(groupIndex<groups.length-1){groupIndex++;groupSize=groups[groupIndex];}}
if(negative){s='-'+s;}
return decimalPart?s+decimalPart:s;}
Number.prototype._netFormat=function Number$_netFormat(format,useLocale){var nf=useLocale?CultureInfo.Current.numberFormat:CultureInfo.Neutral.numberFormat;var s='';var precision=-1;if(format.length>1){precision=parseInt(format.substr(1));}
var fs=format.charAt(0);switch(fs){case'd':case'D':s=parseInt(Math.abs(this)).toString();if(precision!=-1){s=s.padLeft(precision,'0');}
if(this<0){s='-'+s;}
break;case'x':case'X':s=parseInt(Math.abs(this)).toString(16);if(fs=='X'){s=s.toUpperCase();}
if(precision!=-1){s=s.padLeft(precision,'0');}
break;case'e':case'E':if(precision==-1){s=this.toExponential();}
else{s=this.toExponential(precision);}
if(fs=='E'){s=s.toUpperCase();}
break;case'f':case'F':case'n':case'N':if(precision==-1){precision=nf.numberDecimalDigits;}
s=this.toFixed(precision).toString();if(precision&&(nf.numberDecimalSeparator!='.')){var index=s.indexOf('.');s=s.substr(0,index)+nf.numberDecimalSeparator+s.substr(index+1);}
if((fs=='n')||(fs=='N')){s=Number._commaFormat(s,nf.numberGroupSizes,nf.numberDecimalSeparator,nf.numberGroupSeparator);}
break;case'c':case'C':if(precision==-1){precision=nf.currencyDecimalDigits;}
s=Math.abs(this).toFixed(precision).toString();if(precision&&(nf.currencyDecimalSeparator!='.')){var index=s.indexOf('.');s=s.substr(0,index)+nf.currencyDecimalSeparator+s.substr(index+1);}
s=Number._commaFormat(s,nf.currencyGroupSizes,nf.currencyDecimalSeparator,nf.currencyGroupSeparator);if(this<0){s=String.format(nf.currencyNegativePattern,s);}
else{s=String.format(nf.currencyPositivePattern,s);}
break;case'p':case'P':if(precision==-1){precision=nf.percentDecimalDigits;}
s=(Math.abs(this)*100.0).toFixed(precision).toString();if(precision&&(nf.percentDecimalSeparator!='.')){var index=s.indexOf('.');s=s.substr(0,index)+nf.percentDecimalSeparator+s.substr(index+1);}
s=Number._commaFormat(s,nf.percentGroupSizes,nf.percentDecimalSeparator,nf.percentGroupSeparator);if(this<0){s=String.format(nf.percentNegativePattern,s);}
else{s=String.format(nf.percentPositivePattern,s);}
break;}
return s;}
Math.truncate=function Math$truncate(n){return(n>=0)?Math.floor(n):Math.ceil(n);}
String.__typeName='String';String.Empty='';String.compare=function String$compare(s1,s2,ignoreCase){if(ignoreCase){if(s1){s1=s1.toUpperCase();}
if(s2){s2=s2.toUpperCase();}}
s1=s1||'';s2=s2||'';if(s1==s2){return 0;}
if(s1<s2){return-1;}
return 1;}
String.prototype.compareTo=function String$compareTo(s,ignoreCase){return String.compare(this,s,ignoreCase);}
String.prototype.endsWith=function String$endsWith(suffix){if(!suffix.length){return true;}
if(suffix.length>this.length){return false;}
return(this.substr(this.length-suffix.length)==suffix);}
String.equals=function String$equals1(s1,s2,ignoreCase){return String.compare(s1,s2,ignoreCase)==0;}
String._format=function String$_format(format,values,useLocale){if(!String._formatRE){String._formatRE=/(\{[^\}^\{]+\})/g;}
return format.replace(String._formatRE,function(str,m){var index=parseInt(m.substr(1));var value=values[index+1];if(isNullOrUndefined(value)){return'';}
if(value.format){var formatSpec=null;var formatIndex=m.indexOf(':');if(formatIndex>0){formatSpec=m.substring(formatIndex+1,m.length-1);}
return value.format.call(value,formatSpec,useLocale);}
else{if(useLocale){return value.toLocaleString();}
return value.toString();}});}
String.format=function String$format(format){return String._format(format,arguments,false);}
String.fromChar=function String$fromChar(ch,count){var s=ch;for(var i=1;i<count;i++){s+=ch;}
return s;}
String.prototype.htmlDecode=function String$htmlDecode(){if(this==window){throw new TypeError();}
if(!String._htmlDecRE){String._htmlDecMap={'&amp;':'&','&lt;':'<','&gt;':'>','&quot;':'"'};String._htmlDecRE=/(&amp;|&lt;|&gt;|&quot;)/gi;}
var s=this;s=s.replace(String._htmlDecRE,function(str,m){return String._htmlDecMap[m];});return s;}
String.prototype.htmlEncode=function String$htmlEncode(){if(this==window){throw new TypeError();}
if(!String._htmlEncRE){String._htmlEncMap={'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;'};}
String._htmlEncRE=/([&<>"])/g;var s=this;if(String._htmlEncRE.test(s)){s=s.replace(String._htmlEncRE,function(str,m){return String._htmlEncMap[m];});}
return s;}
String.prototype.indexOfAny=function String$indexOfAny(chars,startIndex,count){var length=this.length;if(!length){return-1;}
startIndex=startIndex||0;count=count||length;var endIndex=startIndex+count-1;if(endIndex>=length){endIndex=length-1;}
for(var i=startIndex;i<=endIndex;i++){if(chars.indexOf(this.charAt(i))>=0){return i;}}
return-1;}
String.prototype.insert=function String$insert(index,value){if(this==window){throw new TypeError();}
if(!value){return this;}
if(!index){return value+this;}
var s1=this.substr(0,index);var s2=this.substr(index);return s1+value+s2;}
String.isNullOrEmpty=function String$isNullOrEmpty(s){return!s||!s.length;}
String.prototype.lastIndexOfAny=function String$lastIndexOfAny(chars,startIndex,count){var length=this.length;if(!length){return-1;}
startIndex=startIndex||length-1;count=count||length;var endIndex=startIndex-count+1;if(endIndex<0){endIndex=0;}
for(var i=startIndex;i>=endIndex;i--){if(chars.indexOf(this.charAt(i))>=0){return i;}}
return-1;}
String.localeFormat=function String$localeFormat(format){return String._format(format,arguments,true);}
String.prototype.padLeft=function String$padLeft(totalWidth,ch){if(this==window){throw new TypeError();}
if(this.length<totalWidth){ch=ch||' ';return String.fromChar(ch,totalWidth-this.length)+this;}
return this;}
String.prototype.padRight=function String$padRight(totalWidth,ch){if(this==window){throw new TypeError();}
if(this.length<totalWidth){ch=ch||' ';return this+String.fromChar(ch,totalWidth-this.length);}
return this;}
String.prototype.quote=function String$quote(){return fb_quote_string(this);}
function fb_quote_string(value){var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};var a,i,k,l,r=/["\\\x00-\x1f\x7f-\x9f]/g,v;return r.test(value)?'"'+value.replace(r,function(a){var c=m[a];if(c){return c;}
c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+
(c%16).toString(16);})+'"':'"'+value+'"';}
String.prototype.remove=function String$remove(index,count){if(!count||((index+count)>this.length)){return this.substr(0,index);}
return this.substr(0,index)+this.substr(index+count);}
String.prototype.startsWith=function String$startsWith(prefix){if(!prefix.length){return true;}
if(prefix.length>this.length){return false;}
return(this.substr(0,prefix.length)==prefix);}
String.prototype.trim=function String$trim(){return this.trimEnd().trimStart();}
String.prototype.trimEnd=function String$trimEnd(){return this.replace(/\s*$/,'');}
String.prototype.trimStart=function String$trimStart(){return this.replace(/^\s*/,'');}
Array.__typeName='Array';Array.prototype.add=function Array$add(item){if(this==window){throw new TypeError();}
this[this.length]=item;}
Array.prototype.addRange=function Array$addRange(items){if(this==window){throw new TypeError();}
if(!items){return;}
var length=items.length;for(var index=0;index<length;index++){this[this.length]=items[index];}}
Array.prototype.aggregate=function Array$aggregate(seed,callback){if(this==window){throw new TypeError();}
var length=this.length;for(var index=0;index<length;index++){seed=callback(seed,this[index],index,this);}
return seed;}
Array.prototype.clear=function Array$clear(){if(this==window){throw new TypeError();}
if(this.length>0){this.splice(0,this.length);}}
if(!Array.prototype.clone){Array.prototype.clone=Array.prototype.slice;}
Array.prototype.contains=function Array$contains(item){if(this==window){throw new TypeError();}
var index=this.indexOf(item);return(index>=0);}
Array.prototype.dequeue=function Array$dequeue(){if(this==window){throw new TypeError();}
return this.shift();}
Array.prototype.enqueue=function Array$enqueue(item){if(this==window){throw new TypeError();}
this.push(item);}
if(!Array.prototype.every){Array.prototype.every=function Array$every(callback){if(this==window){throw new TypeError();}
for(var i=this.length-1;i>=0;i--){if(!callback(this[i],i,this)){return false;}}
return true;}}
Array.prototype.extract=function Array$extract(index,count){if(this==window){throw new TypeError();}
if(!count){return this.slice(index);}
return this.slice(index,index+count);}
if(!Array.prototype.filter){Array.prototype.filter=function Array$filter(callback){if(this==window){throw new TypeError();}
var filtered=[];for(var i=0;i<this.length;i++){if(callback(this[i],i,this)){filtered.add(this[i]);}}
return filtered;}}
if(!Array.prototype.forEach){Array.prototype.forEach=function Array$forEach(callback){if(this==window){throw new TypeError();}
for(var i=0;i<this.length;i++){callback(this[i],i,this);}}}
Array.prototype.groupBy=function Array$groupBy(callback){if(this==window){throw new TypeError();}
var length=this.length;var groups=[];var keys={};for(var index=0;index<length;index++){var key=callback(this[index],index);if(String.isNullOrEmpty(key)){continue;}
var items=keys[key];if(!items){items=[];items.key=key;keys[key]=items;groups.add(items);}
items.add(this[index]);}
return groups;}
Array.prototype.index=function Array$index(callback){if(this==window){throw new TypeError();}
var length=this.length;var items={};for(var index=0;index<length;index++){var key=callback(this[index],index);if(String.isNullOrEmpty(key)){continue;}
items[key]=this[index];}
return items;}
Array.prototype.indexOf=function Array$indexOf(item){if(this==window){throw new TypeError();}
var length=this.length;if(length){for(var index=0;index<length;index++){if(this[index]===item){return index;}}}
return-1;}
Array.prototype.insert=function Array$insert(index,item){if(this==window){throw new TypeError();}
this.splice(index,0,item);}
Array.prototype.insertRange=function Array$insertRange(index,items){if(this==window){throw new TypeError();}
this.splice(index,0,items);}
if(!Array.prototype.map){Array.prototype.map=function Array$map(callback){if(this==window){throw new TypeError();}
var mapped=new Array(this.length);for(var i=this.length-1;i>=0;i--){mapped[i]=callback(this[i],i,this);}
return mapped;}}
Array.parse=function Array$parse(s){if(this==window){throw new TypeError();}
return eval('('+s+')');}
Array.prototype.remove=function Array$remove(item){if(this==window){throw new TypeError();}
var index=this.indexOf(item);if(index>=0){this.splice(index,1);return true;}
return false;}
Array.prototype.removeAt=function Array$removeAt(index){if(this==window){throw new TypeError();}
return this.splice(index,1)[0];}
Array.prototype.removeRange=function Array$removeRange(index,count){if(this==window){throw new TypeError();}
return this.splice(index,count);}
if(!Array.prototype.some){Array.prototype.some=function Array$some(callback){if(this==window){throw new TypeError();}
for(var i=this.length-1;i>=0;i--){if(callback(this[i],i,this)){return true;}}
return false;}}
RegExp.__typeName='RegExp';RegExp.parse=function RegExp$parse(s){if(s.startsWith('/')){var endSlashIndex=s.lastIndexOf('/');if(endSlashIndex>1){var expression=s.substring(1,endSlashIndex);var flags=s.substr(endSlashIndex+1);return new RegExp(expression,flags);}}
return null;}
Date.__typeName='Date';Date.get_now=function Date$get_now(){return new Date();}
Date.get_today=function Date$get_today(){var d=new Date();return new Date(d.getFullYear(),d.getMonth(),d.getDate());}
Date.prototype.format=function Date$format(format,useLocale){if(isNullOrUndefined(format)||(format.length==0)||(format=='i')){if(useLocale){return this.toLocaleString();}
else{return this.toString();}}
if(format=='id'){if(useLocale){return this.toLocaleDateString();}
else{return this.toDateString();}}
if(format=='it'){if(useLocale){return this.toLocaleTimeString();}
else{return this.toTimeString();}}
return this._netFormat(format,useLocale);}
Date.prototype._netFormat=function Date$_netFormat(format,useLocale){var dtf=useLocale?CultureInfo.Current.dateFormat:CultureInfo.Neutral.dateFormat;var useUTC=false;if(format.length==1){switch(format){case'f':format=dtf.longDatePattern+' '+dtf.shortTimePattern;case'F':format=dtf.dateTimePattern;break;case'd':format=dtf.shortDatePattern;break;case'D':format=dtf.longDatePattern;break;case't':format=dtf.shortTimePattern;break;case'T':format=dtf.longTimePattern;break;case'g':format=dtf.shortDatePattern+' '+dtf.shortTimePattern;break;case'G':format=dtf.shortDatePattern+' '+dtf.longTimePattern;break;case'R':case'r':format=dtf.gmtDateTimePattern;useUTC=true;break;case'u':format=dtf.universalDateTimePattern;useUTC=true;break;case'U':format=dtf.dateTimePattern;useUTC=true;break;case's':format=dtf.sortableDateTimePattern;break;}}
if(format.charAt(0)=='%'){format=format.substr(1);}
if(!Date._formatRE){Date._formatRE=/dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z/g;}
var re=Date._formatRE;var sb=new StringBuilder();var dt=this;if(useUTC){dt=new Date(Date.UTC(dt.getUTCFullYear(),dt.getUTCMonth(),dt.getUTCDate(),dt.getUTCHours(),dt.getUTCMinutes(),dt.getUTCSeconds(),dt.getUTCMilliseconds()));}
re.lastIndex=0;while(true){var index=re.lastIndex;var match=re.exec(format);sb.append(format.slice(index,match?match.index:format.length));if(!match){break;}
var fs=match[0];var part=fs;switch(fs){case'dddd':part=dtf.dayNames[dt.getDay()];break;case'ddd':part=dtf.shortDayNames[dt.getDay()];break;case'dd':part=dt.getDay().toString().padLeft(2,'0');break;case'd':part=dt.getDay();break;case'MMMM':part=dtf.monthNames[dt.getMonth()];break;case'MMM':part=dtf.shortMonthNames[dt.getMonth()];break;case'MM':part=(dt.getMonth()+1).toString().padLeft(2,'0');break;case'M':part=(dt.getMonth()+1);break;case'yyyy':part=dt.getFullYear();break;case'yy':part=(dt.getFullYear()%100).toString().padLeft(2,'0');break;case'y':part=(dt.getFullYear()%100);break;case'h':case'hh':part=dt.getHours()%12;if(!part){part='12';}
else if(fs=='hh'){part=part.toString().padLeft(2,'0');}
break;case'HH':part=dt.getHours().toString().padLeft(2,'0');break;case'H':part=dt.getHours();break;case'mm':part=dt.getMinutes().toString().padLeft(2,'0');break;case'm':part=dt.getMinutes();break;case'ss':part=dt.getSeconds().toString().padLeft(2,'0');break;case's':part=dt.getSeconds();break;case't':case'tt':part=(dt.getHours()<12)?dtf.amDesignator:dtf.pmDesignator;if(fs=='t'){part=part.charAt(0);}
break;case'fff':part=dt.getMilliseconds().toString().padLeft(3,'0');break;case'ff':part=dt.getMilliseconds().toString().padLeft(3).substr(0,2);break;case'f':part=dt.getMilliseconds().toString().padLeft(3).charAt(0);break;case'z':part=dt.getTimezoneOffset()/60;part=((part>=0)?'-':'+')+Math.floor(Math.abs(part));break;case'zz':case'zzz':part=dt.getTimezoneOffset()/60;part=((part>=0)?'-':'+')+Math.floor(Math.abs(part)).toString().padLeft(2,'0');if(fs=='zzz'){part+=dtf.timeSeparator+Math.abs(dt.getTimezoneOffset()%60).toString().padLeft(2,'0');}
break;}
sb.append(part);}
return sb.toString();}
Error.__typeName='Error';Error.create=function Error$create(message,userData,innerException){var e=new Error(message);if(userData){e.userData=userData;}
if(innerException){e.innerException=innerException;}
return e;}
if(!Debug._fail){Debug._fail=function Debug$_fail(message){Debug.writeln(message);eval('debugger;');}}
Debug.assert=function Debug$assert(condition,message){if(!condition){message='Assert failed: '+message;if(confirm(message+'\r\n\r\nBreak into debugger?')){Debug._fail(message);}}}
Debug._dumpCore=function Debug$_dumpCore(sb,object,name,indentation,dumpedObjects){if(object===null){sb.appendLine(indentation+name+': null');return;}
switch(typeof(object)){case'undefined':sb.appendLine(indentation+name+': undefined');break;case'number':case'string':case'boolean':sb.appendLine(indentation+name+': '+object);break;default:if(Date.isInstance(object)||RegExp.isInstance(object)){sb.appendLine(indentation+name+': '+object);break;}
if(dumpedObjects.contains(object)){sb.appendLine(indentation+name+': ...');break;}
dumpedObjects.add(object);var type=Type.getInstanceType(object);var typeName=type.get_fullName();var recursiveIndentation=indentation+'  ';if(IArray.isInstance(object)){sb.appendLine(indentation+name+': {'+typeName+'}');var length=object.getLength();for(var i=0;i<length;i++){Debug._dumpCore(sb,object.getItem(i),'['+i+']',recursiveIndentation,dumpedObjects);}}
else{var td=TypeDescriptor._getObjectDescriptor(object);if(!td){if(object.tagName){sb.appendLine(indentation+name+': <'+object.tagName+'>');var attributes=object.attributes;for(var i=0;i<attributes.length;i++){var attrValue=attributes[i].nodeValue;if(attrValue){Debug._dumpCore(sb,attrValue,attributes[i].nodeName,recursiveIndentation,dumpedObjects);}}}
else{sb.appendLine(indentation+name+': {'+typeName+'}');for(var field in object){var v=object[field];if(!Function.isInstance(v)){Debug._dumpCore(sb,v,field,recursiveIndentation,dumpedObjects);}}}}
else{sb.appendLine(indentation+name+': {'+typeName+'}');var properties=td._properties;if(properties){for(var prop in properties){var propValue=TypeDescriptor.getProperty(object,prop);Debug._dumpCore(sb,propValue,prop,recursiveIndentation,dumpedObjects);}}}}
dumpedObjects.remove(object);break;}}
Debug.dump=function Debug$dump(object,name){if((!name||!name.length)&&(object!==null)){name=Type.getInstanceType(object).get_fullName();}
if(!name||!name.length){return;}
var sb=new StringBuilder();Debug._dumpCore(sb,object,name,'',[]);Debug.writeLine(sb.toString());}
Debug.fail=function Debug$fail(message){Debug._fail(message);}
Debug.inspect=function Debug$inspect(object,name){var dumped=false;if(window.debugService){dumped=window.debugService.inspect(name,object);}
if(!dumped){Debug.dump(object,name);}}
Debug.writeLine=function Debug$writeLine(message){if(window.debugService){window.debugService.trace(message);return;}
Debug.writeln(message);var traceTextBox=$SS('_traceTextBox');if(traceTextBox){traceTextBox.value=traceTextBox.value+'\r\n'+message;}}
Debug.__typeName='Debug';var Type=Function;Type.__typeName='Type';var __Namespace=function(name){this.__typeName=name;}
__Namespace.prototype={__namespace:true,getName:function(){return this.__typeName;}}
Type.createNamespace=function Type$createNamespace(name){if(!window.__namespaces){window.__namespaces={};}
if(!window.__rootNamespaces){window.__rootNamespaces=[];}
if(window.__namespaces[name]){return;}
var ns=window;var nameParts=name.split('.');for(var i=0;i<nameParts.length;i++){var part=nameParts[i];var nso=ns[part];if(!nso){ns[part]=nso=new __Namespace(nameParts.slice(0,i+1).join('.'));if(i==0){window.__rootNamespaces.add(nso);}}
ns=nso;}
window.__namespaces[name]=ns;}
Type.prototype.createClass=function Type$createClass(name,baseType,interfaceType){this.prototype.constructor=this;this.__typeName=name;this.__class=true;this.__baseType=baseType||Object;if(baseType){this.__basePrototypePending=true;}
if(interfaceType){this.__interfaces=[];for(var i=2;i<arguments.length;i++){interfaceType=arguments[i];this.__interfaces.add(interfaceType);}}}
Type.prototype.createInterface=function Type$createInterface(name){this.__typeName=name;this.__interface=true;}
Type.prototype.createEnum=function Type$createEnum(name,flags){for(var field in this.prototype){this[field]=this.prototype[field];}
this.__typeName=name;this.__enum=true;if(flags){this.__flags=true;}}
Type.prototype.setupBase=function Type$setupBase(){if(this.__basePrototypePending){var baseType=this.__baseType;if(baseType.__basePrototypePending){baseType.setupBase();}
for(var memberName in baseType.prototype){var memberValue=baseType.prototype[memberName];if(!this.prototype[memberName]){this.prototype[memberName]=memberValue;}}
delete this.__basePrototypePending;}}
Type.prototype.constructBase=function Type$constructBase(instance,args){if(this.__basePrototypePending){this.setupBase();}
if(!args){this.__baseType.apply(instance);}
else{this.__baseType.apply(instance,args);}}
Type.prototype.callBase=function Type$callBase(instance,name,args){var baseMethod=this.__baseType.prototype[name];if(!args){return baseMethod.apply(instance);}
else{return baseMethod.apply(instance,args);}}
Type.prototype.get_baseType=function Type$get_baseType(){return this.__baseType||null;}
Type.prototype.get_fullName=function Type$get_fullName(){return this.__typeName;}
Type.prototype.get_name=function Type$get_name(){var fullName=this.__typeName;var nsIndex=fullName.lastIndexOf('.');if(nsIndex>0){return fullName.substr(nsIndex+1);}
return fullName;}
Type.prototype.isInstance=function Type$isInstance(instance){if(isNullOrUndefined(instance)){return false;}
if((this==Object)||(instance instanceof this)){return true;}
var type=Type.getInstanceType(instance);return this.isAssignableFrom(type);}
Type.prototype.isAssignableFrom=function Type$isAssignableFrom(type){if((this==Object)||(this==type)){return true;}
if(this.__class){var baseType=type.__baseType;while(baseType){if(this==baseType){return true;}
baseType=baseType.__baseType;}}
else if(this.__interface){var interfaces=type.__interfaces;if(interfaces&&interfaces.contains(this)){return true;}
var baseType=type.__baseType;while(baseType){interfaces=baseType.__interfaces;if(interfaces&&interfaces.contains(this)){return true;}
baseType=baseType.__baseType;}}
return false;}
Type.isClass=function Type$isClass(type){return(type.__class==true);}
Type.isEnum=function Type$isEnum(type){return(type.__enum==true);}
Type.isFlagsEnum=function Type$isFlagsEnum(type){return((type.__enum==true)&&(type.__flags==true));}
Type.isInterface=function Type$isInterface(type){return(type.__interface==true);}
Type.canCast=function Type$canCast(instance,type){return type.isInstance(instance);}
Type.safeCast=function Type$safeCast(instance,type){if(type.isInstance(instance)){return instance;}
return null;}
Type.getInstanceType=function Type$getInstanceType(instance){var ctor=null;try{ctor=instance.constructor;}
catch(ex){}
if(!ctor||!ctor.__typeName){ctor=Object;}
return ctor;}
Type.getType=function Type$getType(typeName){if(!typeName){return null;}
if(!Type.__typeCache){Type.__typeCache={};}
var type=Type.__typeCache[typeName];if(!type){type=eval(typeName);Type.__typeCache[typeName]=type;}
return type;}
Type.parse=function Type$parse(typeName){return Type.getType(typeName);}
var Enum=function(){}
Enum.createClass('Enum');Enum.parse=function Enum$parse(enumType,s){var values=enumType.prototype;if(!enumType.__flags){for(var f in values){if(f===s){return values[f];}}}
else{var parts=s.split('|');var value=0;var parsed=true;for(var i=parts.length-1;i>=0;i--){var part=parts[i].trim();var found=false;for(var f in values){if(f===part){value|=values[f];found=true;break;}}
if(!found){parsed=false;break;}}
if(parsed){return value;}}
throw'Invalid Enumeration Value';}
Enum.toString=function Enum$toString(enumType,value){var values=enumType.prototype;if(!enumType.__flags||(value===0)){for(var i in values){if(values[i]===value){return i;}}
throw'Invalid Enumeration Value';}
else{var parts=[];for(var i in values){if(values[i]&value){if(parts.length){parts.add(' | ');}
parts.add(i);}}
if(!parts.length){throw'Invalid Enumeration Value';}
return parts.join('');}}
Function.prototype.invoke=function(){return this.apply(this,arguments);}
var Delegate=function(){}
Delegate.createClass('Delegate');Delegate.Null=function(){}
Delegate._create=function Delegate$_create(targets){var delegate=function(){if(targets.length==2){return targets[1].apply(targets[0],arguments);}
else{var targets_copy=targets.clone();for(var i=0;i<targets_copy.length;i+=2){targets_copy[i+1].apply(targets_copy[i],arguments);}
return null;}};delegate.invoke=delegate;delegate._targets=targets;return delegate;}
Delegate.create=function Delegate$create(object,method){if(!object){method.invoke=method;return method;}
return Delegate._create([object,method]);}
Delegate.combine=function Delegate$combine(delegate1,delegate2){if(!delegate1){if(!delegate2._targets){return Delegate.create(null,delegate2);}
return delegate2;}
if(!delegate2){if(!delegate1._targets){return Delegate.create(null,delegate1);}
return delegate1;}
var targets1=delegate1._targets?delegate1._targets:[null,delegate1];var targets2=delegate2._targets?delegate2._targets:[null,delegate2];return Delegate._create(targets1.concat(targets2));}
Delegate.remove=function Delegate$remove(delegate1,delegate2){if(!delegate1||(delegate1===delegate2)){return null;}
if(!delegate2){return delegate1;}
var targets=delegate1._targets;var object=null;var method;if(delegate2._targets){object=delegate2._targets[0];method=delegate2._targets[1];}
else{method=delegate2;}
for(var i=0;i<targets.length;i+=2){if((targets[i]===object)&&(targets[i+1]===method)){if(targets.length==2){return null;}
targets.splice(i,2);return Delegate._create(targets);}}
return delegate1;}
Delegate.createExport=function Delegate$createExport(delegate,multiUse){var name='__'+(new Date()).valueOf();Delegate[name]=function(){if(!multiUse){Delegate.deleteExport(name);}
delegate.apply(null,arguments);};return name;}
Delegate.deleteExport=function Delegate$deleteExport(name){if(Delegate[name]){delete Delegate[name];}}
Delegate.clearExport=function Delegate$clearExport(name){if(Delegate[name]){Delegate[name]=Delegate.Null;}}
var CultureInfo=function(name,numberFormat,dateFormat){this.name=name;this.numberFormat=numberFormat;this.dateFormat=dateFormat;}
CultureInfo.createClass('CultureInfo');CultureInfo.Neutral=new CultureInfo('en-US',{naNSymbol:'NaN',negativeSign:'-',positiveSign:'+',negativeInfinityText:'-Infinity',positiveInfinityText:'Infinity',percentSymbol:'%',percentGroupSizes:[3],percentDecimalDigits:2,percentDecimalSeparator:'.',percentGroupSeparator:',',percentPositivePattern:'{0} %',percentNegativePattern:'-{0} %',currencySymbol:'$',currencyGroupSizes:[3],currencyDecimalDigits:2,currencyDecimalSeparator:'.',currencyGroupSeparator:',',currencyNegativePattern:'(${0})',currencyPositivePattern:'${0}',numberGroupSizes:[3],numberDecimalDigits:2,numberDecimalSeparator:'.',numberGroupSeparator:','},{amDesignator:'AM',pmDesignator:'PM',dateSeparator:'/',timeSeparator:':',gmtDateTimePattern:'ddd, dd MMM yyyy HH:mm:ss \'GMT\'',universalDateTimePattern:'yyyy-MM-dd HH:mm:ssZ',sortableDateTimePattern:'yyyy-MM-ddTHH:mm:ss',dateTimePattern:'dddd, MMMM dd, yyyy h:mm:ss tt',longDatePattern:'dddd, MMMM dd, yyyy',shortDatePattern:'M/d/yyyy',longTimePattern:'h:mm:ss tt',shortTimePattern:'h:mm tt',firstDayOfWeek:0,dayNames:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],shortDayNames:['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],minimizedDayNames:['Su','Mo','Tu','We','Th','Fr','Sa'],monthNames:['January','February','March','April','May','June','July','August','September','October','November','December',''],shortMonthNames:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec','']});CultureInfo.Current=CultureInfo.Neutral;var IArray=function(){};IArray.prototype={getLength:null,getItem:null}
IArray.createInterface('IArray');var IEnumerator=function(){};IEnumerator.prototype={get_current:null,moveNext:null,reset:null}
IEnumerator.createInterface('IEnumerator');var IEnumerable=function(){};IEnumerable.prototype={getEnumerator:null}
IEnumerable.createInterface('IEnumerable');var ArrayEnumerator=function ArrayEnumerator$(array){this._array=array;this._index=-1;}
ArrayEnumerator.prototype={get_current:function(){return this._array[this._index];},moveNext:function(){this._index++;return(this._index<this._array.length);},reset:function(){this._index=-1;}}
ArrayEnumerator.createClass('ArrayEnumerator',null,IEnumerator);Array.__interfaces=[IArray,IEnumerable];Array.prototype.getLength=function Array$getLength(){return this.length;}
Array.prototype.getItem=function Array$getItem(index){if(this==window){throw new TypeError();}
return this[index];}
Array.prototype.getEnumerator=function Array$getEnumerator(){if(this==window){throw new TypeError();}
return new ArrayEnumerator(this);}
var IDisposable=function(){};IDisposable.prototype={dispose:null}
IDisposable.createInterface('IDisposable');var IServiceProvider=function(){};IServiceProvider.prototype={getService:null}
IServiceProvider.createInterface('IServiceProvider');var IServiceContainer=function(){};IServiceContainer.prototype={registerService:null,unregisterService:null}
IServiceContainer.createInterface('IServiceContainer');var StringBuilder=function StringBuilder$(s){if((s!==undefined)&&(s!==null)){this._parts=[s];}
else{this._parts=[];}}
StringBuilder.prototype={get_isEmpty:function(){return(this._parts.length==0);},append:function(s){if((s!==undefined)&&(s!==null)){this._parts.add(s);}},appendLine:function(s){this.append(s);this.append('\r\n');},clear:function(){this._parts.clear();},toString:function(){return this._parts.join('');}};StringBuilder.createClass('StringBuilder');var EventArgs=function EventArgs$(){}
EventArgs.createClass('EventArgs');EventArgs.Empty=new EventArgs();var IEventAccessor=function(){};IEventAccessor.prototype={addHandler:null,removeHandler:null}
IEventAccessor.createInterface('IEventAccessor');var IPropertyAccessor=function(){};IPropertyAccessor.prototype={getProperty:null,setProperty:null}
IPropertyAccessor.createInterface('IPropertyAccessor');var IMethodAccessor=function(){};IMethodAccessor.prototype={invokeMethod:null}
IMethodAccessor.createInterface('IMethodAccessor');var TypeDescriptor=function TypeDescriptor$(attributes,properties,methods,events,options){if(attributes){this._attributes=attributes;}
if(properties){this._properties=properties;}
if(methods){this._methods=methods;}
if(events){this._events=events;}
if(options){this._options=options;}}
TypeDescriptor.prototype={_attributes:null,_properties:null,_methods:null,_events:null,_options:null};TypeDescriptor.createClass('TypeDescriptor');TypeDescriptor.createMetadata=function TypeDescriptor$createMetadata(memberName,memberType,params,attrs){var memberInfo={name:memberName,type:memberType,parameters:params};if(attrs){memberInfo.attributes=attrs;}
return memberInfo;}
TypeDescriptor._getDescriptor=function TypeDescriptor$_getDescriptor(type){if(!type.getMetadata){return null;}
var td=type._td;if(td){return td;}
var attributes;var properties;var methods;var events;var options;var baseType=type.get_baseType();if(baseType){var baseTD=TypeDescriptor._getDescriptor(baseType);attributes=Object._clone(baseTD._attributes);properties=Object._clone(baseTD._properties);methods=Object._clone(baseTD._methods);events=Object._clone(baseTD._events);options=Object._clone(baseTD._options);}
var metadata=type.getMetadata();if(metadata){if(metadata.attributes){if(!attributes){attributes={};}
var attrsEnum=metadata.attributes.getEnumerator();while(attrsEnum.moveNext()){var attr=attrsEnum.get_current();attributes[attr.name]=attr;}}
if(metadata.properties){if(!properties){properties={};}
var propEnum=metadata.properties.getEnumerator();while(propEnum.moveNext()){var propInfo=propEnum.get_current();properties[propInfo.name]=propInfo;}}
if(metadata.methods){if(!methods){methods={};}
var methodEnum=metadata.methods.getEnumerator();while(methodEnum.moveNext()){var methodInfo=methodEnum.get_current();methods[methodInfo.name]=methodInfo;}}
if(metadata.events){if(!events){events={};}
var eventEnum=metadata.events.getEnumerator();while(eventEnum.moveNext()){var eventInfo=eventEnum.get_current();events[eventInfo.name]=eventInfo;}}
if(metadata.options){if(!options){options={};}
var optionsEnum=metadata.events.getEnumerator();while(optionsEnum.moveNext()){var optionInfo=optionsEnum.get_current();options[optionInfo.name]=optionInfo;}}}
td=new TypeDescriptor(attributes,properties,methods,events);type._td=td;return td;}
TypeDescriptor._getObjectDescriptor=function TypeDescriptor$_getObjectDescriptor(instance){var type=Type.getInstanceType(instance);return TypeDescriptor._getDescriptor(type);}
TypeDescriptor.getProperty=function TypeDescriptor$getProperty(instance,propName,propKey){var propValue=null;if(IPropertyAccessor.isInstance(instance)){propValue=instance.getProperty(propName);}
else{var td=TypeDescriptor._getObjectDescriptor(instance);if(!td){propValue=instance[propName];}
else if(td._properties){var propInfo=td._properties[propName];if(propInfo){var getter=instance['get_'+propName];propValue=getter.call(instance);}}}
if(propValue&&propKey){propValue=propValue[propKey];}
return propValue;}
TypeDescriptor.setProperty=function TypeDescriptor$setProperty(instance,propName,propKey,value){if(propKey){var prop=TypeDescriptor.getProperty(instance,propName);prop[propKey]=value;return;}
if(IPropertyAccessor.isInstance(instance)){instance.setProperty(propName,value);}
else{var td=TypeDescriptor._getObjectDescriptor(instance);if(!td){instance[propName]=value;}
else if(td._properties){var propInfo=td._properties[propName];if(propInfo&&!propInfo.readOnly){if((propInfo.type!=String)&&(typeof(value)=='string')&&propInfo.type.parse){value=propInfo.type.parse(value);}
var setter=instance['set_'+propName];propValue=setter.call(instance,value);}}}}
TypeDescriptor.addHandler=function TypeDescriptor$addHandler(instance,eventName,handler){if(IEventAccessor.isInstance(instance)){instance.addHandler(eventName,handler);return;}
var td=Sys.TypeDescriptor._getObjectDescriptor(instance);if(td&&td._events){var eventInfo=td._events[eventName];if(eventInfo){var addMethod=instance['add_'+eventName];addMethod.call(instance,handler);}}}
TypeDescriptor.removeHandler=function TypeDescriptor$removeHandler(instance,eventName,handler){if(IEventAccessor.isInstance(instance)){instance.removeHandler(eventName,handler);return;}
var td=Sys.TypeDescriptor._getObjectDescriptor(instance);if(td&&td._events){var eventInfo=td._events[eventName];if(eventInfo){var removeMethod=instance['remove_'+eventName];removeMethod.call(instance,handler);}}}
TypeDescriptor.invokeMethod=function TypeDescriptor$invokeMethod(instance,methodName,args){if(IMethodAccessor.isInstance(instance)){return instance.invokeMethod(methodName,args);}
var td=Sys.TypeDescriptor._getObjectDescriptor(instance);if(!td){return instance[methodName].call(instance);}
if(td._methods){var methodInfo=td._methods[methodName];var method=instance[methodInfo.name];if(!methodInfo.parameters){return method.call(instance);}
else{var arguments=[];for(var i=0;i<methodInfo.parameters.length;i++){var paramInfo=methodInfo.parameters[i];var value=args[parameterInfo.name];if(value&&(paramInfo.type!=String)&&(typeof(value)=='string')&&paramInfo.type.parse){value=paramInfo.type.parse(value);}
arguments[i]=value;}
return method.apply(instance,arguments);}}
return null;}
if(!window.XMLHttpRequest){window.XMLHttpRequest=function(){var progIDs=['Msxml2.XMLHTTP','Microsoft.XMLHTTP'];for(var i=0;i<progIDs.length;i++){try{var xmlHttp=new ActiveXObject(progIDs[i]);return xmlHttp;}
catch(ex){}}
return null;}}
var XMLDocumentParser=function(){}
XMLDocumentParser.createClass('XMLDocumentParser');XMLDocumentParser.parse=function XMLDocumentParser$parse(markup){if(!window.DOMParser){var progIDs=['Msxml2.DOMDocument.3.0','Msxml2.DOMDocument'];for(var i=0;i<progIDs.length;i++){try{var xmlDOM=new ActiveXObject(progIDs[i]);xmlDOM.async=false;xmlDOM.loadXML(markup);xmlDOM.setProperty('SelectionLanguage','XPath');return xmlDOM;}
catch(ex){}}}
else{try{var domParser=new DOMParser();return domParser.parseFromString(markup,'text/xml');}
catch(ex){}}
return null;}
window._scriptsharp=true;}
Type.createNamespace('FB');FB.FeatureLoader=function FB_FeatureLoader(){this._loadedFeatures={};this._requestedFeatures={};this._scriptsToLoad=[];this._loadedStyleSheets={};}
FB.FeatureLoader.prototype={get_requestQueue:function(){return window.self.FB.Bootstrap.FeatureRequestQueue;},get_featureMap:function(){return window.self.FB.Bootstrap.FeatureMap;},get_customFeatureMap:function(){return FB.Bootstrap.CustomFeatureMap;},isFeatureRequestedAndLoaded:function(feature){return Object.keyExists(this._loadedFeatures,feature)&&Object.keyExists(this._requestedFeatures,feature);},_getFeatureInfo:function(feature){var info=null;if(this.get_customFeatureMap()){info=this.get_customFeatureMap()[feature];}
if(!info){info=this.get_featureMap()[feature];}
return info;},_addFeature:function(feature){var info=this._getFeatureInfo(feature);if(!info){}
else{if(info.dependencies){var $enum1=info.dependencies.getEnumerator();while($enum1.moveNext()){var dependentFeature=$enum1.get_current();this._addFeature(dependentFeature);}}
if(!Object.keyExists(this._loadedFeatures,feature)&&!this._scriptsToLoad.contains(info.src)){this._scriptsToLoad.add(info.src);}}},onScriptLoaded:function(featuresLoaded){this._isWaiting=false;var loadedFeatures=this._loadedFeatures;var $enum1=featuresLoaded.getEnumerator();while($enum1.moveNext()){var featureLoaded=$enum1.get_current();var info=this._getFeatureInfo(featureLoaded);if(info){this._loadedStyleSheetsForFeature(info);}
loadedFeatures[featureLoaded]=true;}
window.setTimeout(Delegate.create(this,this.checkRequestQueue),0);},checkRequestQueue:function(){var requestQueue=this.get_requestQueue();var $enum1=requestQueue.getEnumerator();while($enum1.moveNext()){var request=$enum1.get_current();if(!request.addedToScriptsQueue){var $enum2=request.features.getEnumerator();while($enum2.moveNext()){var feature=$enum2.get_current();this._addFeature(feature);}
request.addedToScriptsQueue=true;}}
var filledRequests=[];for(var i=0;i<requestQueue.length;i++){var request=requestQueue[i];var loadedCount=0;for(var j=0;j<request.features.length;j++){var feature=request.features[j];this._requestedFeatures[feature]=true;if(Object.keyExists(this._loadedFeatures,feature)){loadedCount++;}}
if(loadedCount===request.features.length){filledRequests.add(request);}}
var $enum3=filledRequests.getEnumerator();while($enum3.moveNext()){var request=$enum3.get_current();requestQueue.remove(request);if(request.callback){request.callback.invoke();}}
this._loadNextScript();},_loadNextScript:function(){if(!this._isWaiting){if(this._scriptsToLoad.length>0){var src=this._scriptsToLoad[0];this._scriptsToLoad.removeAt(0);this._isWaiting=true;var scriptElement=document.createElement('script');scriptElement.type='text/javascript';scriptElement.src=src;document.getElementsByTagName('HEAD')[0].appendChild(scriptElement);}}},_loadedStyleSheetsForFeature:function(info){if(info.styleSheets){var $enum1=info.styleSheets.getEnumerator();while($enum1.moveNext()){var styleSheet=$enum1.get_current();this._loadStyleSheet(styleSheet);}}},_loadStyleSheet:function(cssSrc){if(!Object.keyExists(this._loadedStyleSheets,cssSrc)){var linkElement=document.createElement('link');linkElement.setAttribute('rel','stylesheet');linkElement.setAttribute('type','text/css');linkElement.setAttribute('href',cssSrc);document.getElementsByTagName('head')[0].appendChild(linkElement);this._loadedStyleSheets[cssSrc]=true;}},_isWaiting:false}
FB.FeatureLoader.createClass('FB.FeatureLoader');FB.FeatureLoader.singleton=new FB.FeatureLoader();FB.FeatureLoader.singleton.onScriptLoaded(['Base']);

Type.createNamespace('FBIntern');FBIntern.HostName=function(){};FBIntern.HostName.prototype={IE:0,MOZILLA:1,SAFARI:2,OPERA:3,OTHER:4}
FBIntern.HostName.createEnum('FBIntern.HostName',false);FBIntern.Cookie=function FBIntern_Cookie(){}
FBIntern.Cookie.set=function FBIntern_Cookie$set(name,value,path,domain,days){if(isNullOrUndefined(value)){value='';}
var cookie=name+'='+encodeURIComponent(value)+';';if(days){var today=new Date();var expire=new Date(today.getTime()+3600000*24*days);cookie+='expires='+expire.toUTCString()+';';}
if(path){cookie+='path='+path+';';}
if(domain){cookie+='domain='+domain+';';}
document.cookie=cookie;}
FBIntern.Cookie.clear=function FBIntern_Cookie$clear(name,path,domain){FBIntern.Cookie.set(name,'',path,domain,-10);}
FBIntern.Cookie.getValue=function FBIntern_Cookie$getValue(name){var nameEQ=name+'=';var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];c=c.trim();if(!c.indexOf(nameEQ)){c=decodeURIComponent(c.substr(nameEQ.length));return c;}}
return null;}
FBIntern.FbGlobals=function FBIntern_FbGlobals(){}
FBIntern.FbGlobals.get_fB_StaticResourceVersions=function FBIntern_FbGlobals$get_fB_StaticResourceVersions(){return FB.Bootstrap.StaticResourceVersions;}
FBIntern.HostInfo=function FBIntern_HostInfo(){var userAgent=window.navigator.userAgent.toLowerCase();var index;var version=null;if((index=userAgent.indexOf('msie'))>=0){this._hostName=FBIntern.HostName.IE;version=userAgent.substr(index+5);}
else if((index=userAgent.indexOf('firefox'))>=0){this._hostName=FBIntern.HostName.MOZILLA;version=userAgent.substr(index+8);}
else if((index=userAgent.indexOf('safari'))>=0){this._hostName=FBIntern.HostName.SAFARI;version=userAgent.substr(index+7);}
else if((index=userAgent.indexOf('gecko'))>=0){this._hostName=FBIntern.HostName.MOZILLA;version=window.navigator.appVersion;}
else{this._hostName=FBIntern.HostName.OTHER;}
if(version){var verFloat=parseFloat(version);this.majorVersion=parseInt(verFloat);if((index=version.indexOf('.'))>=0){this.minorVersion=parseInt(version.substr(index+1));}}}
FBIntern.HostInfo.prototype={get_hostName:function(){return this._hostName;},majorVersion:0,minorVersion:0,_hostName:0}
FBIntern.AppInfo=function FBIntern_AppInfo(){this._hostInfo=new FBIntern.HostInfo();}
FBIntern.AppInfo.get_singleton=function FBIntern_AppInfo$get_singleton(){if(!FBIntern.AppInfo._current){FBIntern.AppInfo._current=new FBIntern.AppInfo();}
return FBIntern.AppInfo._current;}
FBIntern.AppInfo.prototype={get_hostInfo:function(){return this._hostInfo;},_hostInfo:null}
FBIntern.Uri=function FBIntern_Uri(uriString){this._uriString=uriString;}
FBIntern.Uri.create=function FBIntern_Uri$create(baseUri,relativeUri){var uri;if(FBIntern.Uri.isAbsoluteUri(relativeUri)){uri=relativeUri;}
else if(relativeUri.charAt(0)==='/'){uri=baseUri.get_schemeAndDomain()+relativeUri;}
else{var i=baseUri.get_uriString().lastIndexOf('/');uri=baseUri.get_uriString().substr(0,i+1)+relativeUri;}
return new FBIntern.Uri(uri);}
FBIntern.Uri.isAbsoluteUri=function FBIntern_Uri$isAbsoluteUri(uri){return uri.indexOf('://')>0;}
FBIntern.Uri.addQueryParameters=function FBIntern_Uri$addQueryParameters(url,queryParameters){if(url.indexOf('?')>0){return url+'&'+queryParameters;}
else{return url+'?'+queryParameters;}}
FBIntern.Uri.prototype={get_uriString:function(){return this._uriString;},get_pathAndQuery:function(){var i=this._uriString.indexOf('://');if(i>=0){i=this._uriString.indexOf('/',i+3);if(i>=0){return this._uriString.substr(i);}}
return this._uriString;},get_schemeAndDomain:function(){var i=this._uriString.indexOf('://');if(i>=0){i=this._uriString.indexOf('/',i+3);if(i>=0){return this._uriString.substr(0,i);}}
throw new Error('This object is not an absolute URI.');},get_queryParameters:function(){if(!this._queryParameters){this._queryParameters={};var queryString;var i=this._uriString.indexOf('?');if(i>-1){queryString=this._uriString.substr(i+1);i=queryString.indexOf('#');if(i>0){queryString=queryString.substring(0,i-1);}
var segments=queryString.split('&');var $enum1=segments.getEnumerator();while($enum1.moveNext()){var segment=$enum1.get_current();i=segment.indexOf('=');if(i>0){var key=segment.substr(0,i);var value=segment.substr(i+1);this._queryParameters[key]=decodeURIComponent(value);}}}}
return this._queryParameters;},_queryParameters:null,_uriString:null}
FBIntern.Utility=function FBIntern_Utility(){}
FBIntern.Utility.getFacebookUrl=function FBIntern_Utility$getFacebookUrl(subDomain){return String.format(FBIntern.FbGlobals.get_fB_StaticResourceVersions()['base_url_format'],subDomain);}
FBIntern.Utility.getNonConnectFacebookUrl=function FBIntern_Utility$getNonConnectFacebookUrl(subDomain){var baseUrlFormat=FBIntern.FbGlobals.get_fB_StaticResourceVersions()['base_url_format'];if(baseUrlFormat.indexOf('connect.facebook.com')>=0){baseUrlFormat='http://{0}.facebook.com/';return String.format(baseUrlFormat,subDomain);}
else{return FBIntern.Utility.getFacebookUrl(subDomain);}}
FBIntern.Utility.id64BitEquals=function FBIntern_Utility$id64BitEquals(id1,id2){var val1='';var val2='';if(Type.canCast(id1,Number)){if(id1>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.');}
val1=id1.toString();}
else{val1=id1;}
if(Type.canCast(id2,Number)){if(id2>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.');}
val2=id2.toString();}
else{val2=id2;}
return String.equals(val1,val2,false);}
FBIntern.Utility.waitForLoaded=function FBIntern_Utility$waitForLoaded(domElement,callback){var eventHandler=null;eventHandler=Delegate.create(null,function(){domElement.detachEvent('onload',eventHandler);callback.invoke();});domElement.attachEvent('onload',eventHandler);}
FBIntern.Utility.waitForWindowReady=function FBIntern_Utility$waitForWindowReady(callback){if((window.FB_IsDomContentReady)){callback.invoke();}
else{var eventHandler=null;var eventName=(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()!==FBIntern.HostName.IE)?'DOMContentLoaded':'onload';eventHandler=Delegate.create(null,function(){window.detachEvent(eventName,eventHandler);callback.invoke();});window.attachEvent(eventName,eventHandler);}}
FBIntern.Utility.get_windowLocation=function FBIntern_Utility$get_windowLocation(){var location=FB.$create_Point(0,0);var l,t;if(window.screenLeft){l=window.screenLeft;t=window.screenTop;}else{l=window.screenX;t=window.screenY;}
location.x=l;location.y=t;;if(isUndefined(location.x)){location.x=0;}
if(isUndefined(location.y)){location.y=0;}
return location;}
FBIntern.Utility.get_windowSize=function FBIntern_Utility$get_windowSize(){var size=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 size;}
FBIntern.Utility.get_documentSize=function FBIntern_Utility$get_documentSize(){var s=FB.$create_Size(document.body.scrollWidth,document.body.scrollHeight);if(s.w<=0){s.w=document.documentElement.scrollWidth;}
if(s.h<=0){s.h=document.documentElement.scrollHeight;}
return s;}
FBIntern.Utility.get_isInUserActionCallstack=function FBIntern_Utility$get_isInUserActionCallstack(){var e=FBIntern.Utility.get_currentEvent();if(!e){return false;}
else{var userEventTypes=['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 eventType=e.type;return eventType&&userEventTypes.contains(eventType);}}
FBIntern.Utility.get_currentEvent=function FBIntern_Utility$get_currentEvent(){var e=window.event;if(!e&&FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.MOZILLA){var frame=arguments.callee;var frameList=[];var caller;while(true){frameList.add(frame);caller=frame.caller;if(!caller){break;}
if(frameList.indexOf(caller)>=0){FB.FBDebug.logLine(1,'FB.Connect.get_isInUserActionCallstack(): we can\'t correctly make a detection because of recursion in call stack');return null;}
frame=caller;}
e=frame.arguments.length==1&&frame.arguments[0]&&frame.arguments[0].type?frame.arguments[0]:null;}
return e;}
FBIntern.Utility.getIFrameDocument=function FBIntern_Utility$getIFrameDocument(iframeName,iframe,callback){var frameWindow=(window.self.frames)[iframeName];var iframeDoc=null;if(window.location.hostname===document.domain){try{iframeDoc=frameWindow.document;}
catch($e1){FB.FBDebug.logLine(1,'Failed to get frameWindow.document, will try again later');}}
if(iframeDoc){callback.invoke(iframeDoc);}
else{FBIntern.Utility.waitForLoaded(iframe,Delegate.create(null,function(){callback.invoke(frameWindow.document);}));}}
FBIntern.Utility.isConnectSession=function FBIntern_Utility$isConnectSession(sessionKey){if(!sessionKey){throw new Error('session key is null');}
return sessionKey.substr(0,2)==='3.';}
Type.createNamespace('FB');FB.$create_Size=function FB_Size(w,h){var $o={};$o.w=w;$o.h=h;return $o;}
FB.$create_Point=function FB_Point(x,y){var $o={};$o.x=x;$o.y=y;return $o;}
FB.FBDebug=function FB_FBDebug(){}
FB.FBDebug.assert=function FB_FBDebug$assert(condition,message){if(FB.FBDebug.logLevel>0&&!condition){FB.FBDebug.writeLine(message);Debug.assert(condition,message);}}
FB.FBDebug.writeLine=function FB_FBDebug$writeLine(message){if(FB.FBDebug.logLevel>0){Debug.writeLine(message);}}
FB.FBDebug.logLine=function FB_FBDebug$logLine(logLevel,message){if(logLevel<=FB.FBDebug.logLevel){FB.FBDebug.writeLine(message);}}
FB.FBDebug.dump=function FB_FBDebug$dump(o,name){if(FB.FBDebug.logLevel>0){Debug.dump(o,name);}}
Type.createNamespace('FB.UI');FB.UI.DomResources=function FB_UI_DomResources(){}
FB.UI.DomResources.addResourceDict=function FB_UI_DomResources$addResourceDict(dict){FB.UI.DomResources._dicts.add(dict);}
FB.UI.DomResources.getResourceById=function FB_UI_DomResources$getResourceById(id){var c=FB.UI.DomResources._dicts.length;var element;for(var i=0;i<c;i++){element=((FB.UI.DomResources._dicts[i])).getClonedElement(id);if(element){return element;}}
return null;}
FB.UI.DomResDict=function FB_UI_DomResDict(resMarkup){this._docFragment=document.createDocumentFragment();var root=document.createElement('div');root.innerHTML=resMarkup;this._docFragment.appendChild(root);}
FB.UI.DomResDict.prototype={getClonedElement:function(id){var element=this._docFragment.getElementById('RES_ID_'+id);if(element){return element.cloneNode(true);}
else{return null;}},_docFragment:null}
FBIntern.Cookie.createClass('FBIntern.Cookie');FBIntern.FbGlobals.createClass('FBIntern.FbGlobals');FBIntern.HostInfo.createClass('FBIntern.HostInfo');FBIntern.AppInfo.createClass('FBIntern.AppInfo');FBIntern.Uri.createClass('FBIntern.Uri');FBIntern.Utility.createClass('FBIntern.Utility');FB.FBDebug.createClass('FB.FBDebug');FB.UI.DomResources.createClass('FB.UI.DomResources');FB.UI.DomResDict.createClass('FB.UI.DomResDict');FBIntern.AppInfo._current=null;FB.FBDebug.logLevel=0;FB.UI.DomResources._dicts=[];FB.JSON=function FB_JSON(){}
FB.JSON.deserialize=function FB_JSON$deserialize(s,convert64bitIntToString){if(String.isNullOrEmpty(s)){return null;}
if(convert64bitIntToString){if(!FB.JSON._64bitIntRegex){FB.JSON._64bitIntRegex=new RegExp('([^\\\\]\"\:)([0-9]{11,20})(,|}|])','gm');}
s=s.replace(FB.JSON._64bitIntRegex,'$1"$2"$3');}
return eval('('+s+')');}
FB.JSON.serialize=function FB_JSON$serialize(o){if(isNullOrUndefined(o)){return String.Empty;}
var sb=new StringBuilder();FB.JSON._serializeCore(sb,o);return sb.toString();}
FB.JSON._serializeCore=function FB_JSON$_serializeCore(sb,o){if(isNullOrUndefined(o)){sb.append('null');return;}
var scriptType=typeof(o);switch(scriptType){case'boolean':sb.append(o.toString());return;case'number':sb.append((isFinite(o))?o.toString():'null');return;case'string':sb.append((o).quote());return;case'object':if(Array.isInstance(o)){sb.append('[');var a=o;var length=a.length;var first=true;for(var i=0;i<length;i++){if(typeof(a[i])=='function'){continue;}
if(first){first=false;}
else{sb.append(',');}
FB.JSON._serializeCore(sb,a[i]);}
sb.append(']');}
else if(Date.isInstance(o)){var d=o;var utcValue=Date.UTC(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate(),d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds());sb.append('\"\\@');sb.append(utcValue.toString());sb.append('@\"');}
else if(RegExp.isInstance(o)){sb.append(o.toString());}
else{sb.append('{');var first=true;var $dict1=o;for(var $key2 in $dict1){var entry={key:$key2,value:$dict1[$key2]};if((entry.key).startsWith('$')){continue;}
if(typeof(entry.value)=='function'){continue;}
if(first){first=false;}
else{sb.append(',');}
sb.append('"'+entry.key+'"');sb.append(':');FB.JSON._serializeCore(sb,entry.value);}
sb.append('}');}
return;default:sb.append('null');return;}}
FBIntern.Md5=function FBIntern_Md5(){}
FBIntern.Md5.computeHashToString=function FBIntern_Md5$computeHashToString(string){function RotateLeft(lValue,iShiftBits){return(lValue<<iShiftBits)|(lValue>>>(32-iShiftBits));}
function AddUnsigned(lX,lY){var lX4,lY4,lX8,lY8,lResult;lX8=(lX&0x80000000);lY8=(lY&0x80000000);lX4=(lX&0x40000000);lY4=(lY&0x40000000);lResult=(lX&0x3FFFFFFF)+(lY&0x3FFFFFFF);if(lX4&lY4){return(lResult^0x80000000^lX8^lY8);}
if(lX4|lY4){if(lResult&0x40000000){return(lResult^0xC0000000^lX8^lY8);}else{return(lResult^0x40000000^lX8^lY8);}}else{return(lResult^lX8^lY8);}}
function F(x,y,z){return(x&y)|((~x)&z);}
function G(x,y,z){return(x&z)|(y&(~z));}
function H(x,y,z){return(x^y^z);}
function I(x,y,z){return(y^(x|(~z)));}
function FF(a,b,c,d,x,s,ac){a=AddUnsigned(a,AddUnsigned(AddUnsigned(F(b,c,d),x),ac));return AddUnsigned(RotateLeft(a,s),b);};function GG(a,b,c,d,x,s,ac){a=AddUnsigned(a,AddUnsigned(AddUnsigned(G(b,c,d),x),ac));return AddUnsigned(RotateLeft(a,s),b);};function HH(a,b,c,d,x,s,ac){a=AddUnsigned(a,AddUnsigned(AddUnsigned(H(b,c,d),x),ac));return AddUnsigned(RotateLeft(a,s),b);};function II(a,b,c,d,x,s,ac){a=AddUnsigned(a,AddUnsigned(AddUnsigned(I(b,c,d),x),ac));return AddUnsigned(RotateLeft(a,s),b);};function ConvertToWordArray(string){var lWordCount;var lMessageLength=string.length;var lNumberOfWords_temp1=lMessageLength+8;var lNumberOfWords_temp2=(lNumberOfWords_temp1-(lNumberOfWords_temp1%64))/64;var lNumberOfWords=(lNumberOfWords_temp2+1)*16;var lWordArray=Array(lNumberOfWords-1);var lBytePosition=0;var lByteCount=0;while(lByteCount<lMessageLength){lWordCount=(lByteCount-(lByteCount%4))/4;lBytePosition=(lByteCount%4)*8;lWordArray[lWordCount]=(lWordArray[lWordCount]|(string.charCodeAt(lByteCount)<<lBytePosition));lByteCount++;}
lWordCount=(lByteCount-(lByteCount%4))/4;lBytePosition=(lByteCount%4)*8;lWordArray[lWordCount]=lWordArray[lWordCount]|(0x80<<lBytePosition);lWordArray[lNumberOfWords-2]=lMessageLength<<3;lWordArray[lNumberOfWords-1]=lMessageLength>>>29;return lWordArray;};function WordToHex(lValue){var WordToHexValue="",WordToHexValue_temp="",lByte,lCount;for(lCount=0;lCount<=3;lCount++){lByte=(lValue>>>(lCount*8))&255;WordToHexValue_temp="0"+lByte.toString(16);WordToHexValue=WordToHexValue+WordToHexValue_temp.substr(WordToHexValue_temp.length-2,2);}
return WordToHexValue;};function Utf8Encode(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c);}
else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128);}
else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128);}}
return utftext;};var x=Array();var k,AA,BB,CC,DD,a,b,c,d;var S11=7,S12=12,S13=17,S14=22;var S21=5,S22=9,S23=14,S24=20;var S31=4,S32=11,S33=16,S34=23;var S41=6,S42=10,S43=15,S44=21;string=Utf8Encode(string);x=ConvertToWordArray(string);a=0x67452301;b=0xEFCDAB89;c=0x98BADCFE;d=0x10325476;for(k=0;k<x.length;k+=16){AA=a;BB=b;CC=c;DD=d;a=FF(a,b,c,d,x[k+0],S11,0xD76AA478);d=FF(d,a,b,c,x[k+1],S12,0xE8C7B756);c=FF(c,d,a,b,x[k+2],S13,0x242070DB);b=FF(b,c,d,a,x[k+3],S14,0xC1BDCEEE);a=FF(a,b,c,d,x[k+4],S11,0xF57C0FAF);d=FF(d,a,b,c,x[k+5],S12,0x4787C62A);c=FF(c,d,a,b,x[k+6],S13,0xA8304613);b=FF(b,c,d,a,x[k+7],S14,0xFD469501);a=FF(a,b,c,d,x[k+8],S11,0x698098D8);d=FF(d,a,b,c,x[k+9],S12,0x8B44F7AF);c=FF(c,d,a,b,x[k+10],S13,0xFFFF5BB1);b=FF(b,c,d,a,x[k+11],S14,0x895CD7BE);a=FF(a,b,c,d,x[k+12],S11,0x6B901122);d=FF(d,a,b,c,x[k+13],S12,0xFD987193);c=FF(c,d,a,b,x[k+14],S13,0xA679438E);b=FF(b,c,d,a,x[k+15],S14,0x49B40821);a=GG(a,b,c,d,x[k+1],S21,0xF61E2562);d=GG(d,a,b,c,x[k+6],S22,0xC040B340);c=GG(c,d,a,b,x[k+11],S23,0x265E5A51);b=GG(b,c,d,a,x[k+0],S24,0xE9B6C7AA);a=GG(a,b,c,d,x[k+5],S21,0xD62F105D);d=GG(d,a,b,c,x[k+10],S22,0x2441453);c=GG(c,d,a,b,x[k+15],S23,0xD8A1E681);b=GG(b,c,d,a,x[k+4],S24,0xE7D3FBC8);a=GG(a,b,c,d,x[k+9],S21,0x21E1CDE6);d=GG(d,a,b,c,x[k+14],S22,0xC33707D6);c=GG(c,d,a,b,x[k+3],S23,0xF4D50D87);b=GG(b,c,d,a,x[k+8],S24,0x455A14ED);a=GG(a,b,c,d,x[k+13],S21,0xA9E3E905);d=GG(d,a,b,c,x[k+2],S22,0xFCEFA3F8);c=GG(c,d,a,b,x[k+7],S23,0x676F02D9);b=GG(b,c,d,a,x[k+12],S24,0x8D2A4C8A);a=HH(a,b,c,d,x[k+5],S31,0xFFFA3942);d=HH(d,a,b,c,x[k+8],S32,0x8771F681);c=HH(c,d,a,b,x[k+11],S33,0x6D9D6122);b=HH(b,c,d,a,x[k+14],S34,0xFDE5380C);a=HH(a,b,c,d,x[k+1],S31,0xA4BEEA44);d=HH(d,a,b,c,x[k+4],S32,0x4BDECFA9);c=HH(c,d,a,b,x[k+7],S33,0xF6BB4B60);b=HH(b,c,d,a,x[k+10],S34,0xBEBFBC70);a=HH(a,b,c,d,x[k+13],S31,0x289B7EC6);d=HH(d,a,b,c,x[k+0],S32,0xEAA127FA);c=HH(c,d,a,b,x[k+3],S33,0xD4EF3085);b=HH(b,c,d,a,x[k+6],S34,0x4881D05);a=HH(a,b,c,d,x[k+9],S31,0xD9D4D039);d=HH(d,a,b,c,x[k+12],S32,0xE6DB99E5);c=HH(c,d,a,b,x[k+15],S33,0x1FA27CF8);b=HH(b,c,d,a,x[k+2],S34,0xC4AC5665);a=II(a,b,c,d,x[k+0],S41,0xF4292244);d=II(d,a,b,c,x[k+7],S42,0x432AFF97);c=II(c,d,a,b,x[k+14],S43,0xAB9423A7);b=II(b,c,d,a,x[k+5],S44,0xFC93A039);a=II(a,b,c,d,x[k+12],S41,0x655B59C3);d=II(d,a,b,c,x[k+3],S42,0x8F0CCC92);c=II(c,d,a,b,x[k+10],S43,0xFFEFF47D);b=II(b,c,d,a,x[k+1],S44,0x85845DD1);a=II(a,b,c,d,x[k+8],S41,0x6FA87E4F);d=II(d,a,b,c,x[k+15],S42,0xFE2CE6E0);c=II(c,d,a,b,x[k+6],S43,0xA3014314);b=II(b,c,d,a,x[k+13],S44,0x4E0811A1);a=II(a,b,c,d,x[k+4],S41,0xF7537E82);d=II(d,a,b,c,x[k+11],S42,0xBD3AF235);c=II(c,d,a,b,x[k+2],S43,0x2AD7D2BB);b=II(b,c,d,a,x[k+9],S44,0xEB86D391);a=AddUnsigned(a,AA);b=AddUnsigned(b,BB);c=AddUnsigned(c,CC);d=AddUnsigned(d,DD);}
var temp=WordToHex(a)+WordToHex(b)+WordToHex(c)+WordToHex(d);return temp.toLowerCase();}
FB.FeatureLoader.singleton.onScriptLoaded(['Common']);

Type.createNamespace('FB');FB.$create_XdHttpRequestResult=function FB_XdHttpRequestResult(id,status,statusText,responseText){var $o={};$o.status=status;$o.statusText=statusText;$o.responseText=responseText;$o.id=id;return $o;}
Type.createNamespace('FB.XdComm');FB.XdComm.$create__packet=function FB_XdComm__packet(){return{};}
FB.XdComm._packetType=function(){};FB.XdComm._packetType.prototype={data:0,dataFragment:1,dataFragmentEnd:2,udpSingle:3,ack:4}
FB.XdComm._packetType.createEnum('FB.XdComm._packetType',false);FB.XdComm.PacketDataFormat=function(){};FB.XdComm.PacketDataFormat.prototype={JSON:0,rawText:1}
FB.XdComm.PacketDataFormat.createEnum('FB.XdComm.PacketDataFormat',false);FB.XdComm.PageRelation=function(){};FB.XdComm.PageRelation.prototype={parent:1,child:2,self:3,opener:4,openee:5}
FB.XdComm.PageRelation.createEnum('FB.XdComm.PageRelation',false);FB.XdComm.$create_XdRpcMethodInfo=function FB_XdComm_XdRpcMethodInfo(method,asyncMethod){var $o={};FB.FBDebug.assert((!method)^(!asyncMethod),'One and only one of method or asyncMethod parameters must not be null.');$o.method=method;$o.asyncMethod=asyncMethod;return $o;}
FB.XdComm._receiveChannel=function FB_XdComm__receiveChannel(id){this._fragDataDict={};this._ackList=[];this._id=id;}
FB.XdComm._receiveChannel.prototype={_onReceivedPacket:function(packet){FB.FBDebug.logLine(3,'XdComm: Received packet');var fullPacket=null;if(packet.t===FB.XdComm._packetType.dataFragment||packet.t===FB.XdComm._packetType.dataFragmentEnd){var holder=this._fragDataDict[packet.id.toString()];if(!holder){holder=new FB.XdComm._fragDataHolder();this._fragDataDict[packet.id.toString()]=holder;}
fullPacket=holder._addSegment(packet);if(fullPacket){delete this._fragDataDict[fullPacket.id.toString()];}}
else{fullPacket=packet;}
if(fullPacket){if(!fullPacket.id){this._endPoint=new FB.XdComm.EndPoint(fullPacket.sf,fullPacket.sr,fullPacket.sc);if(this._queuedPackets){var $enum1=this._queuedPackets.getEnumerator();while($enum1.moveNext()){var queuedPacket=$enum1.get_current();this._onFullDataReceived(queuedPacket);}
this._queuedPackets=null;}}
if(this._endPoint){this._onFullDataReceived(fullPacket);}
else{if(!this._queuedPackets){this._queuedPackets=[];this._queuedPackets.add(fullPacket);}}}},_onFullDataReceived:function(packet){var server=FB.XdComm.Server.singleton;server._onFullDataReceived(packet,this._endPoint);this._ackList.add(packet.id);if(this._ackList.length>5){if(FB.FBDebug.logLevel>4){FB.FBDebug.writeLine('ReceiveChannel.Ack: '+this._ackList.toString());}
var ackPacket=FB.XdComm.$create__packet();ackPacket.t=FB.XdComm._packetType.ack;ackPacket.sid=server._id;ackPacket.sc=server.get_receiverUrl();ackPacket.sf=window.name;ackPacket.sr=FB.XdComm._sendChannel._getReverseRelation(this._endPoint.relation);var ackIframeSrc=server._createPacketUrl(ackPacket,this._endPoint);ackIframeSrc+=encodeURIComponent(FB.JSON.serialize(this._ackList));server._removeIframe(this._ackIframe);this._ackIframe=server._createHiddenIFrame(ackIframeSrc);this._ackList.clear();}},_queuedPackets:null,_endPoint:null,_ackIframe:null,_id:null}
FB.XdComm._fragDataHolder=function FB_XdComm__fragDataHolder(){this._segments={};this._totalSegments=-1;}
FB.XdComm._fragDataHolder.prototype={_addSegment:function(packet){if(packet.t===FB.XdComm._packetType.dataFragmentEnd){this._totalSegments=packet.fid+1;}
if(!packet.fid){this._combinedPacket=packet;}
this._segments[packet.fid.toString()]=packet.d;if(this._totalSegments!==-1&&this._totalSegments===Object.getKeyCount(this._segments)){var builder=new StringBuilder();for(var i=0;i<this._totalSegments;i++){builder.append(this._segments[i.toString()]);}
this._combinedPacket.d=builder.toString();this._combinedPacket.t=FB.XdComm._packetType.data;return this._combinedPacket;}
else{return null;}},_combinedPacket:null}
FB.XdComm._sendChannel=function FB_XdComm__sendChannel(endPoint){this._iframes={};this._endPoint=endPoint;}
FB.XdComm._sendChannel._getReverseRelation=function FB_XdComm__sendChannel$_getReverseRelation(relation){switch(relation){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;default:throw new Error('Unknown relation');}}
FB.XdComm._sendChannel.prototype={_send:function(handlerName,data){var server=FB.XdComm.Server.singleton;var serializedData=FB.JSON.serialize(data);var dataLength=serializedData.length;var offset=0;var sendComplete=false;var fid=0;while(!sendComplete){var type=FB.XdComm._packetType.data;var packet=FB.XdComm.$create__packet();packet.id=this._sendIdCount;if(!this._sendIdCount&&!offset){packet.sc=server.get_receiverUrl();packet.sf=window.name;packet.sr=FB.XdComm._sendChannel._getReverseRelation(this._endPoint.relation);}
if(!offset){packet.h=handlerName;}
var packetData;if(!offset&&dataLength<=server._maxPacketDataLength){packetData=serializedData;sendComplete=true;}
else{packet.fid=fid++;var packetLength=dataLength-offset;if(packetLength>server._maxPacketDataLength){packetLength=server._maxPacketDataLength;type=FB.XdComm._packetType.dataFragment;}
else{type=FB.XdComm._packetType.dataFragmentEnd;sendComplete=true;}
packetData=serializedData.substr(offset,packetLength);offset+=packetLength;}
packet.sid=server._id;packet.t=type;var iframeSrc=server._createPacketUrl(packet,this._endPoint);iframeSrc+=encodeURIComponent(packetData);this._addIframe(iframeSrc,packet);}
this._sendIdCount++;},_onAck:function(ackedPacketIds){if(FB.FBDebug.logLevel>4){FB.FBDebug.writeLine('SendChannel.OnAck: '+ackedPacketIds.toString());}
var $enum1=ackedPacketIds.getEnumerator();while($enum1.moveNext()){var ackedPacketId=$enum1.get_current();var key=ackedPacketId.toString();var list=this._iframes[key];var $enum2=list.getEnumerator();while($enum2.moveNext()){var iframe=$enum2.get_current();FB.XdComm.Server.singleton._removeIframe(iframe);}
delete this._iframes[key];}},_addIframe:function(iframeSrc,packet){var iframe=FB.XdComm.Server.singleton._createHiddenIFrame(iframeSrc);var key=packet.id.toString();var list=this._iframes[key];if(!list){this._iframes[key]=list=[];}
list.add(iframe);},_sendIdCount:0,_endPoint:null}
FB.XdComm.EndPoint=function FB_XdComm_EndPoint(frameName,relation,channelUrl){this.frameName=(!frameName)?'':frameName;this.relation=relation;this.channelUrl=channelUrl;this.UID=0;}
FB.XdComm.EndPoint.prototype={isEqual:function(x){return x.frameName===this.frameName&&x.relation===this.relation&&x.UID===this.UID;},frameName:null,relation:0,channelUrl:null,UID:0}
FB.XdComm.Server=function FB_XdComm_Server(){this._sendChannels=[];this._receiveChannels=[];this._handlers={};this._dataRequestQueues={};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;}}
FB.XdComm.Server.init=function FB_XdComm_Server$init(receiverUrl){FB.XdComm.Server.singleton.set_receiverUrl(receiverUrl);}
FB.XdComm.Server.prototype={get_receiverUrl:function(){return this._receiverUrl;},set_receiverUrl:function(value){if(!value){FB.FBDebug.logLine(0,'Cross Domain Channel cannot be null');throw new Error('Cross Domain Channel cannot be null');}
var uri=FBIntern.Uri.create(new FBIntern.Uri(document.URL),value);if(window.location.hostname!==document.domain){FB.FBDebug.logLine(2,'You appear to have changed the document.domain property.\r\nIf you run into problems with the Facebook Connect library, please refer to\r\n http://wiki.developers.facebook.com/index.php/How_To_Support_Subdomain_In_Connect for\r\nhelp.');}
this._receiverUrl=uri.get_uriString();return value;},send:function(endPoint,handlerName,data){if(FB.FBDebug.logLevel>2){FB.FBDebug.writeLine('<<<<<<< '+document.URL);FB.FBDebug.writeLine('Server.send: handler='+handlerName);FB.FBDebug.dump(data,'data');FB.FBDebug.dump(endPoint,'endPoint');}
var channel=null;var $enum1=this._sendChannels.getEnumerator();while($enum1.moveNext()){var item=$enum1.get_current();if(endPoint.isEqual(item._endPoint)){channel=item;}}
if(!channel){channel=new FB.XdComm._sendChannel(endPoint);this._sendChannels.add(channel);}
channel._send(handlerName,data);},createUdpUrl:function(handlerName,data,endPoint){return this._createUdpUrlWithFormat(handlerName,data,endPoint,FB.XdComm.PacketDataFormat.JSON);},createUdpUrlWithRawText:function(handlerName,data,endPoint){return this._createUdpUrlWithFormat(handlerName,data,endPoint,FB.XdComm.PacketDataFormat.rawText);},_createUdpUrlWithFormat:function(handlerName,data,endPoint,dataFormat){var packet=FB.XdComm.$create__packet();packet.t=FB.XdComm._packetType.udpSingle;packet.h=handlerName;packet.sid=this._id;if(dataFormat!==FB.XdComm.PacketDataFormat.JSON){packet.df=dataFormat;}
var url=this._createPacketUrl(packet,endPoint);var packetData=FB.JSON.serialize(data);if(packetData.length>this._maxPacketDataLength){throw new Error('data length is too long');}
url+=encodeURIComponent(packetData);return url;},unregisterDataHandler:function(handlerName){FB.FBDebug.logLine(2,'Unregister data handler '+handlerName);if(!Object.keyExists(this._handlers,handlerName)){throw new Error('Handler doesn\'t exist');}
delete this._handlers[handlerName];},registerDataHandler:function(handlerName,handler){FB.FBDebug.logLine(2,'Register data handler '+handlerName);if(Object.keyExists(this._handlers,handlerName)){throw new Error('Handler already exists');}
this._handlers[handlerName]=handler;var queue=this._dataRequestQueues[handlerName];if(queue){var $enum1=queue.getEnumerator();while($enum1.moveNext()){var packet=$enum1.get_current();FB.FBDebug.logLine(2,'handle queued request');var endPoint=null;var $enum2=this._receiveChannels.getEnumerator();while($enum2.moveNext()){var item=$enum2.get_current();if(item._id===packet.sid){endPoint=item._endPoint;break;}}
FB.FBDebug.assert(endPoint,'can\'t find endpoint');handler.invoke(this._getDataObject(packet),endPoint);}}},isDataHandlerRegistered:function(handlerName){return this._handlers[handlerName];},get_hiddenIFrameContainer:function(){if(!this._hiddenIframeContainer){this._hiddenIframeContainer=$SS('FB_HiddenContainer');FB.FBDebug.assert(this._hiddenIframeContainer,'Can\'t find the DOM element with id FB_HiddenContainer');}
return this._hiddenIframeContainer;},createNamedHiddenIFrame:function(frameName,srcUrl,className,otherAttributes){var divDom=document.createElement('div');divDom=FB.XdComm.Server.singleton.get_hiddenIFrameContainer().appendChild(divDom);if(!this._iframeCreated&&FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.IE){divDom.innerHTML='<iframe src=\'about:blank\' ></iframe>';this._iframeCreated=true;}
if(!className){className='FB_SERVER_IFRAME';}
var iframe_markup='<iframe name=\"'+frameName+'\" ';if(otherAttributes){iframe_markup+=otherAttributes;}
iframe_markup+=' src=\"'+srcUrl+'\" class=\"'+className+'\" scrolling=\"no\" frameborder=\"0\"></iframe>';divDom.innerHTML=iframe_markup;return divDom.children[0];},onReceiverLoaded:function(hash){if(hash){window.setTimeout(Delegate.create(this,function(){this._onHashReceived(hash);}),0);}},_createPacketUrl:function(packet,endPoint){var serializedPacket=FB.JSON.serialize(packet);serializedPacket=encodeURIComponent(serializedPacket);var src=endPoint.channelUrl+'#';if(FB.FBDebug.logLevel>4){src+='debug=1&';}
if(endPoint.relation===FB.XdComm.PageRelation.child){FB.FBDebug.assert(endPoint.frameName,'XdComm.Server.CreatePacketUrl: end point does not have child name name specified');src+='fname='+endPoint.frameName+'&';}
else if(endPoint.relation===FB.XdComm.PageRelation.self){src+='fname=_parent&';}
else if(endPoint.relation===FB.XdComm.PageRelation.opener){src+='fname=_opener&';}
else if(endPoint.relation===FB.XdComm.PageRelation.openee){throw new Error('Can\'t handle endPoint '+Enum.toString(FB.XdComm.PageRelation,endPoint.relation));}
src+=serializedPacket;return src;},_createHiddenIFrame:function(src){if(FB.FBDebug.logLevel>4){FB.FBDebug.writeLine('Create iframe '+src+' in '+document.URL);}
var receiverDom;receiverDom=document.createElement('iframe');receiverDom.className='FB_RECEIVER_DOM';if(!this._iframeCreated&&FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.IE){receiverDom.src='about:blank';this._iframeCreated=true;}
if(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.IE){receiverDom.src=src;receiverDom=FB.XdComm.Server.singleton.get_hiddenIFrameContainer().appendChild(receiverDom);}
else{receiverDom=FB.XdComm.Server.singleton.get_hiddenIFrameContainer().appendChild(receiverDom);receiverDom.src=src;}
return receiverDom;},_removeIframe:function(element){if(FB.FBDebug.logLevel>4){FB.FBDebug.writeLine('Remove iframe in '+document.URL);}
if(element){var parent=element.parentNode;if(parent){parent.removeChild(element);}}},_onHashReceived:function(hash){if(FB.FBDebug.logLevel>3){FB.FBDebug.writeLine('>>>>>> '+document.URL);FB.FBDebug.writeLine('received hash '+hash);}
var decodedHash;if(hash.startsWith('session=')){var handler=this._handlers['fbLogin'];if(handler){decodedHash=decodeURIComponent(hash);handler.invoke(decodedHash.substr(8),null);}}
else{var packetEndDelimiter=encodeURIComponent('}');var packetLength=hash.indexOf(packetEndDelimiter)+packetEndDelimiter.length;var packetString=decodeURIComponent(hash.substring(0,packetLength));var dataString=hash.substr(packetLength);var packet=FB.JSON.deserialize(packetString);packet.d=dataString;switch(packet.t){case FB.XdComm._packetType.udpSingle:this._onFullDataReceived(packet,new FB.XdComm.EndPoint(packet.sf,packet.sr,packet.sc));break;case FB.XdComm._packetType.ack:var endPoint=new FB.XdComm.EndPoint(packet.sf,packet.sr,packet.sc);var $enum1=this._sendChannels.getEnumerator();while($enum1.moveNext()){var sChannel=$enum1.get_current();if(endPoint.isEqual(sChannel._endPoint)){sChannel._onAck(this._getDataObject(packet));}}
break;default:var rChannel=null;var $enum2=this._receiveChannels.getEnumerator();while($enum2.moveNext()){var item=$enum2.get_current();if(item._id===packet.sid){rChannel=item;break;}}
if(!rChannel){rChannel=new FB.XdComm._receiveChannel(packet.sid);this._receiveChannels.add(rChannel);}
rChannel._onReceivedPacket(packet);break;}}},_onFullDataReceived:function(fullPacket,endPoint){if(FB.FBDebug.logLevel>3){FB.FBDebug.dump(fullPacket,'received full packet');FB.FBDebug.dump(endPoint,'sender');}
if(Object.keyExists(this._handlers,fullPacket.h)){var handler=this._handlers[fullPacket.h];handler.invoke(this._getDataObject(fullPacket),endPoint);}
else{FB.FBDebug.logLine(2,'queue request to unknown handler {0} '+fullPacket.h);var queue=this._dataRequestQueues[fullPacket.h];if(!queue){this._dataRequestQueues[fullPacket.h]=queue=[];}
queue.add(fullPacket);}},_getDataObject:function(packet){var dataString=packet.d;switch(packet.df){case FB.XdComm.PacketDataFormat.rawText:return dataString;case FB.XdComm.PacketDataFormat.JSON:default:return FB.JSON.deserialize(decodeURIComponent(dataString));}},_receiverUrl:null,_hiddenIframeContainer:null,_iframeCreated:false,_id:null,_maxPacketDataLength:0}
FB.XdComm.XdRpcClient=function FB_XdComm_XdRpcClient(rpcServerName,rpcClientName,serverEndPoint){this._requestQueue={};this._serverEndPoint=serverEndPoint;this._rpcClientName=rpcClientName;this._rcpServerName=rpcServerName;FB.XdComm.Server.singleton.registerDataHandler(rpcClientName,Delegate.create(this,this._onDataReceived));}
FB.XdComm.XdRpcClient.prototype={send:function(methodName,arg,callback){FB.FBDebug.logLine(3,'XdRpcClient.Send: '+methodName);var request_id=this._idCount++;var request_data=[request_id,this._rpcClientName,methodName,arg,(callback)?true:false];this._requestQueue[request_id.toString()]=callback;FB.XdComm.Server.singleton.send(this._serverEndPoint,this._rcpServerName,request_data);},_onDataReceived:function(data,endPoint){var array=data;var requestId=array[0];var callback=this._requestQueue[requestId];if(callback){callback.invoke(array[1]);}},detachClient:function(){FB.XdComm.Server.singleton.unregisterDataHandler(this._rpcClientName);},_serverEndPoint:null,_rpcClientName:null,_rcpServerName:null,_idCount:0}
FB.XdComm.XdRpcServer=function FB_XdComm_XdRpcServer(rpcServerName,registeredMethodMap){if(registeredMethodMap){this.registeredMethodMap=registeredMethodMap;}
else{this.registeredMethodMap={};}
FB.XdComm.Server.singleton.registerDataHandler(rpcServerName,Delegate.create(this,this._onDataReceived));}
FB.XdComm.XdRpcServer.prototype={_onDataReceived:function(data,senderEndPoint){var requestData=data;if(requestData.length!==5){FB.FBDebug.assert(false,'XdRpcServer.OnDataReceived: invalid parameters.');}
var requestId=requestData[0];var clientName=requestData[1];var methodName=requestData[2];var arg=requestData[3];var needResultBack=requestData[4];if(!Object.keyExists(this.registeredMethodMap,methodName)){FB.FBDebug.assert(false,'XD RPC server: method '+methodName+' is not allowed or doesn\'t exist.');return;}
var methodInfo=this.registeredMethodMap[methodName];FB.FBDebug.logLine(3,'XdRpcServer.Received: '+methodName);if(methodInfo.method){var result=methodInfo.method.invoke(arg,senderEndPoint);if(needResultBack){FB.XdComm.Server.singleton.send(senderEndPoint,clientName,[requestId,result]);}}
else if(methodInfo.asyncMethod){methodInfo.asyncMethod.invoke(arg,Delegate.create(this,function(result){if(needResultBack){FB.XdComm.Server.singleton.send(senderEndPoint,clientName,[requestId,result]);}}),senderEndPoint);}
else{FB.FBDebug.assert(false,'MethodInfo for '+methodName+' does not contain any function pointers.');}},registeredMethodMap:null}
FB.XdComm._receiveChannel.createClass('FB.XdComm._receiveChannel');FB.XdComm._fragDataHolder.createClass('FB.XdComm._fragDataHolder');FB.XdComm._sendChannel.createClass('FB.XdComm._sendChannel');FB.XdComm.EndPoint.createClass('FB.XdComm.EndPoint');FB.XdComm.Server.createClass('FB.XdComm.Server');FB.XdComm.XdRpcClient.createClass('FB.XdComm.XdRpcClient');FB.XdComm.XdRpcServer.createClass('FB.XdComm.XdRpcServer');FB.XdComm.Server.singleton=new FB.XdComm.Server();FB.FeatureLoader.singleton.onScriptLoaded(['XdComm']);

Type.createNamespace('FB');FB.$create_SessionRecord=function FB_SessionRecord(session_key,uid,expires,secret,base_domain,sig){var $o={};$o.session_key=session_key;$o.uid=uid;$o.expires=expires;$o.secret=secret;$o.sig=sig;$o.base_domain=base_domain;return $o;}
FB.FeedStorySetting=function(){};FB.FeedStorySetting.prototype={preview:1,autoaccept:2,doNotSend:3}
FB.FeedStorySetting.createEnum('FB.FeedStorySetting',false);FB.FeedStorySize=function(){};FB.FeedStorySize.prototype={oneLine:1,shortStory:2,full:4}
FB.FeedStorySize.createEnum('FB.FeedStorySize',false);FB.ConnectState=function(){};FB.ConnectState.prototype={connected:1,userNotLoggedIn:2,appNotAuthorized:3}
FB.ConnectState.createEnum('FB.ConnectState',false);FB.$create_UserInfoRecord=function FB_UserInfoRecord(connect_state,one_line_setting,short_setting,full_setting){var $o={};$o.connectState=connect_state;$o.oneLineStorySetting=one_line_setting;$o.shortStorySetting=short_setting;$o.fullStorySetting=full_setting;return $o;}
FB.$create_FeedDialogInfo=function FB_FeedDialogInfo(template_bundle_id,template_data,target_id,body_general,story_size,callback){var $o={};$o.template_bundle_id=template_bundle_id;$o.template_data=template_data;$o.target_id=target_id;$o.body_general=body_general;$o.story_size=story_size;$o.callback=callback;return $o;}
Type.createNamespace('FBIntern');FBIntern.Flash=function FBIntern_Flash(){}
FBIntern.Flash.hasRequireVersion=function FBIntern_Flash$hasRequireVersion(){return FBIntern.Flash._verifyMinimumVersion(9,0);}
FBIntern.Flash._verifyMinimumVersion=function FBIntern_Flash$_verifyMinimumVersion(major,minor){if(!FBIntern.Flash.versionDetected){var verArray=['0','0'];var isIE=FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.IE;var plugins=navigator.plugins;if(plugins&&plugins.length>0){if(plugins['Shockwave Flash 2.0']||plugins['Shockwave Flash']){var description;if(plugins['Shockwave Flash 2.0']){description=(plugins['Shockwave Flash 2.0'].description);}
else{description=(plugins['Shockwave Flash'].description);}
var array1=description.split(' ');verArray=array1[2].split('.');}}
else if(isIE){var versionStr=null;var activexObj;try{activexObj=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.7');versionStr=activexObj.GetVariable('$version');}
catch($e1){}
if(!verArray){try{activexObj=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');versionStr='WIN 6,0,21,0';}
catch($e2){}}
if(!String.isNullOrEmpty(versionStr)){verArray=versionStr.split(' ')[1].split(',');}}
if(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.MOZILLA){FB.FBDebug.logLine(1,'Cannot use Flash on Firefox 2 due to a possible bug in Flash');FBIntern.Flash.curMajor=0;FBIntern.Flash.curMinor=0;}
else{FBIntern.Flash.curMajor=parseInt(verArray[0]);FBIntern.Flash.curMinor=parseInt(verArray[1]);}
FBIntern.Flash.versionDetected=true;}
return FBIntern.Flash.curMajor>major||(FBIntern.Flash.curMajor===major&&FBIntern.Flash.curMinor>=minor);}
FBIntern.Flash._createFlashObject=function FBIntern_Flash$_createFlashObject(id,srcUrl){var html;if(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.IE){html=String.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>',id,id,srcUrl);}
else{html=String.format('<embed width=\'1\' height=\'1\' type=\'application/x-shockwave-flash\' pluginspage=\'http://www.adobe.com/go/getflashplayer\' allowscriptaccess=\'always\' name=\'{0}\' id=\'{1}\' bgcolor=\'#869ca7\' quality=\'high\'  src=\'{2}\' />',id,id,srcUrl);}
var div=document.createElement('div');FB.XdComm.Server.singleton.get_hiddenIFrameContainer().appendChild(div);div.innerHTML=html;if(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.IE){return window[id];}
else{return document[id];}}
FBIntern.Flash.get_xdComm=function FBIntern_Flash$get_xdComm(){if(!FBIntern.Flash.xdComm&&FBIntern.Flash.hasRequireVersion()){FB.FBDebug.logLine(3,'Create Flash XdComm object');FBIntern.Flash.xdComm=new FB.SimpleWaitable();var flashObj=null;var isReady=false;window.FB_OnFlashXdCommReady=Delegate.create(null,function(){FB.FBDebug.logLine(3,'Flash XdComm ready');isReady=true;if(flashObj){FBIntern.Flash.xdComm.setResult(flashObj);}});flashObj=FBIntern.Flash._createFlashObject('flashXdComm',FBIntern.FbGlobals.get_fB_StaticResourceVersions()['xd_comm_swf_url']);if(flashObj&&isReady){FBIntern.Flash.xdComm.setResult(flashObj);}}
return FBIntern.Flash.xdComm;}
FBIntern.Flash.decode=function FBIntern_Flash$decode(data){if(data&&data.length&&typeof data!="string"){data=data[0];}
if(!data||typeof data!="string"){return data;}
data=data.replace(/\&custom_lt\;/g,"<");data=data.replace(/\&custom_gt\;/g,">");data=data.replace(/\&custom_backslash\;/g,'\\');data=data.replace(/\\0/g,"\0");;return data;}
Type.createNamespace('FB');FB.$create_ApiErrorResult=function FB_ApiErrorResult(){return{};}
FB.$create_ApiErrorRequestArg=function FB_ApiErrorRequestArg(){return{};}
FB.ApiErrorCode=function(){};FB.ApiErrorCode.prototype={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.ApiErrorCode.createEnum('FB.ApiErrorCode',false);FB.$create__stepInfo=function FB__stepInfo(jsonRequest,pendingResult){var $o={};$o.jsonRequest=jsonRequest;$o.result=pendingResult;return $o;}
FB.ApiClient=function FB_ApiClient(apiKey){this._sessionWaitable=new FB.SimpleWaitable();this._apiKey=apiKey;if(!FB.Facebook.apiKey){FB.Facebook.apiKey=apiKey;}
var server_root=FBIntern.Utility.getFacebookUrl('api');this._serverAddress=server_root+'restserver.php';var xdServerUrl=server_root+'static/v0.4/client_restserver.php?r='+FBIntern.FbGlobals.get_fB_StaticResourceVersions()['api_server'];var xdReceiverUrl=server_root+'static/v0.4/xd_receiver.php?r='+FBIntern.FbGlobals.get_fB_StaticResourceVersions()['api_channel'];if(FB.FBDebug.logLevel>0){xdServerUrl=FBIntern.Uri.addQueryParameters(xdServerUrl,'debug_level='+FB.FBDebug.logLevel.toString());}
this._xdHttpClient=new FB._xdHttpRequestClient(xdServerUrl,xdReceiverUrl,'fb_api_server');this._isLoggedIn=window.location.href.match("fb_sig_user")!=null;;var session=FB.ApiClient._getSessionFromUrl(document.URL);if(!session){if(FB.Facebook.get_isInCanvas()&&!this._isLoggedIn){this._setSessionCookies(null);}
else{session=this._getSessionFromCookies();}}
if(session&&!FB.ApiClient.sessionIsExpired(session)){this.set_session(session);}}
FB.ApiClient.sessionIsExpired=function FB_ApiClient$sessionIsExpired(record){if(!record.expires){return false;}
else if(record.expires!==-1){var currentUnixTime=Math.round(Date.get_now().getTime()/1000);var expireUnixTime=record.expires;var isExpired=!(expireUnixTime>currentUnixTime);return isExpired;}
return true;}
FB.ApiClient.defaultCreateSession=function FB_ApiClient$defaultCreateSession(apiClient,callback){window.navigate(apiClient._createLoginUrl());}
FB.ApiClient._getSessionFromUrl=function FB_ApiClient$_getSessionFromUrl(url){var sessionTokenString='session';var sessionKeyStringC='fb_sig_session_key';var userStringC='fb_sig_user';var expiresStringC='fb_sig_expires';var secretStringC='fb_sig_ss';var sigStringC='fb_sig';var domainStringC='fb_sig_base_domain';var documentUri=new FBIntern.Uri(url);if(Object.keyExists(documentUri.get_queryParameters(),sessionTokenString)){var sessionToken=documentUri.get_queryParameters()[sessionTokenString];return FB.JSON.deserialize(sessionToken);}
else if(Object.keyExists(documentUri.get_queryParameters(),sessionKeyStringC)&&Object.keyExists(documentUri.get_queryParameters(),userStringC)&&Object.keyExists(documentUri.get_queryParameters(),expiresStringC)&&Object.keyExists(documentUri.get_queryParameters(),secretStringC)&&Object.keyExists(documentUri.get_queryParameters(),sigStringC)){var sigString=documentUri.get_queryParameters()[sigStringC];var userString=documentUri.get_queryParameters()[userStringC];var sessionSecretString=documentUri.get_queryParameters()[secretStringC];var sessionKeyString=documentUri.get_queryParameters()[sessionKeyStringC];var expireString=Number.parse(documentUri.get_queryParameters()[expiresStringC]);var domainString=documentUri.get_queryParameters()[domainStringC];if(sigString&&userString&&sessionSecretString&&sessionKeyString&&expireString!==-1){var s=FB.$create_SessionRecord(sessionKeyString,userString,expireString,sessionSecretString,domainString,sigString);return s;}}
return null;}
FB.ApiClient.prototype={get_session:function(){return this._session;},set_session:function(value){if(value!==this._session){this._session=value;if(this._session){FB.Facebook.set_baseDomain(this._session.base_domain);}
this._setSessionCookies(value);this._sessionWaitable.setResult(value,!value);}
return value;},get_sessionWaitable:function(){return this._sessionWaitable;},requireLogin:function(callback){if(this._session){callback.invoke(null);}
else{FB.ApiClient.createSessionDelegate.invoke(this,Delegate.create(this,function(session){FB.FBDebug.assert(session,'Invalid session returned');this._session=session;}));}},_getSessionFromCookies:function(){var sigCookie=FBIntern.Cookie.getValue(this._apiKey);var userCookie=FBIntern.Cookie.getValue(this._apiKey+'_user');var sessionSecretCookie=FBIntern.Cookie.getValue(this._apiKey+'_ss');var sessionKeyCookie=FBIntern.Cookie.getValue(this._apiKey+'_session_key');var expireCookie=Number.parse(FBIntern.Cookie.getValue(this._apiKey+'_expires'));if(sigCookie&&userCookie&&sessionSecretCookie&&sessionKeyCookie&&expireCookie!==-1){var s=FB.$create_SessionRecord(sessionKeyCookie,userCookie,expireCookie,sessionSecretCookie,FB.Facebook.get_baseDomain(),sigCookie);return s;}
return null;},_setSessionCookies:function(record){if(record&&record.expires!==-1&&record.secret&&record.session_key&&record.uid&&record.sig){FBIntern.Cookie.set(this._apiKey,record.sig,'/',FB.Facebook.get_baseDomain(),0);FBIntern.Cookie.set(this._apiKey+'_user',record.uid,'/',FB.Facebook.get_baseDomain(),0);FBIntern.Cookie.set(this._apiKey+'_ss',record.secret,'/',FB.Facebook.get_baseDomain(),0);FBIntern.Cookie.set(this._apiKey+'_session_key',record.session_key,'/',FB.Facebook.get_baseDomain(),0);FBIntern.Cookie.set(this._apiKey+'_expires',record.expires.toString(),'/',FB.Facebook.get_baseDomain(),0);}
else if(!record){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 url=FBIntern.Utility.getFacebookUrl('www')+'login.php?return_session=1&api_key='+this._apiKey+'&v='+FB.Facebook.version+'&next='+encodeURIComponent(document.URL);return url;},_refreshSession:function(callback){var requestUrl=FBIntern.Utility.getFacebookUrl('api')+'session_state.php';var requestBody='api_key='+this._apiKey.toString()+'&session_key='+((!this._session)?'null':this._session.session_key.toString());var headers={};headers['Content-Type']='application/x-www-form-urlencoded';var r=new FB._xdJsonRequest(this._xdHttpClient,'POST',requestUrl,requestBody,headers);r.callback=Delegate.create(this,function(result,e){if(result){var dict=result;if(!dict['error']){this._session=dict['session'];this._setSessionCookies(this._session);if(callback){callback.invoke(null);}}
else if(dict['error']===-1){FB.FBDebug.assert(false,'User has not authorized the application.');}
else if(dict['error']===-2){FB.FBDebug.assert(false,'User is not logged into Facebook.');}
else if(dict['error']===-3){FB.FBDebug.assert(false,'Unknown error while refreshing user session.');}}});r.sendRequest();},connect_getUnconnectedFriendsCount:function(sequencer){return this._callMethod('connect.getUnconnectedFriendsCount',null,sequencer);},events_get:function(uid,eids,startTime,endTime,rsvpStatus,sequencer){var parameters={};if(uid){parameters['uid']=uid;}
if(eids){parameters['eids']=eids;}
parameters['start_time']=startTime;parameters['end_time']=endTime;if(rsvpStatus){parameters['rsvp_status']=rsvpStatus;}
return this._callMethod('events.get',parameters,sequencer);},events_getMembers:function(eid,sequencer){var parameters={};parameters['eid']=eid;return this._callMethod('events.getMembers',parameters,sequencer);},fbml_refreshImgSrc:function(url,sequencer){var parameters={};parameters['url']=url;return this._callMethod('fbml.refreshImgSrc',parameters,sequencer);},fbml_refreshRefUrl:function(url,sequencer){var parameters={};parameters['url']=url;return this._callMethod('fbml.refreshRefUrl',parameters,sequencer);},fbml_setRefHandle:function(handle,fbml,sequencer){var parameters={};parameters['handle']=handle;parameters['fbml']=fbml;return this._callMethod('fbml.setRefHandle',parameters,sequencer);},feed_publishUserAction:function(template_bundle_id,template_data,target_ids,body_general,story_size,sequencer){var parameters={};parameters['template_bundle_id']=template_bundle_id.toString();if(template_data){parameters['template_data']=template_data;}
if(target_ids){parameters['target_ids']=target_ids.toString();}
if(body_general){parameters['body_general']=body_general;}
if(story_size>0){parameters['story_size']=story_size;}
return this._callMethod('feed.publishUserAction',parameters,sequencer);},feed_registerTemplateBundle:function(){FB.FBDebug.logLine(1,'Please call Feed.registerTemplateBundle server side.');},friends_get:function(flid,sequencer){var parameters={};if(flid){parameters['flid']=flid;}
else if(FB.Facebook.get_isInCanvas()&&this._isLoggedIn&&FB.XdComm.Server.singleton.get_receiverUrl()&&typeof(sequencer)==='function'){FB_RequireFeatures(['CacheData'],function(){FBIntern.CacheClient.friendsGet(sequencer);});;return null;}
return this._callMethod('friends.get',parameters,sequencer);},preloadFQL_get:function(callback){if(FB.Facebook.get_isInCanvas()&&this._isLoggedIn&&FB.XdComm.Server.singleton.get_receiverUrl()){FB_RequireFeatures(['CacheData'],function(){FBIntern.CacheClient.preloadFQLGet(callback);});;return true;}
else{callback(Array());;return false;}},friends_areFriends:function(uids1,uids2,sequencer){var parameters={};parameters['uids1']=uids1.toString();parameters['uids2']=uids2.toString();return this._callMethod('friends.areFriends',parameters,sequencer);},friends_getAppUsers:function(sequencer){return this._callMethod('friends.getAppUsers',null,sequencer);},friends_getLists:function(sequencer){return this._callMethod('friends.getLists',null,sequencer);},groups_get:function(uid,gids,sequencer){var parameters={};if(uid){parameters['uid']=uid;}
if(gids){parameters['gids']=gids.toString();}
return this._callMethod('groups.get',parameters,sequencer);},groups_getMembers:function(gid,sequencer){var parameters={};parameters['gid']=gid;return this._callMethod('groups.getMembers',parameters,sequencer);},privacy_canSee:function(uids,whats,sequencer){var parameters={};parameters['uids']=uids.toString();parameters['whats']=whats.toString();return this._callMethod('privacy.canSee',parameters,sequencer);},marketplace_createListing:function(listing_id,show_on_profile,listing_attrs,sequencer){var parameters={};parameters['listing_id']=listing_id;parameters['show_on_profile']=show_on_profile;parameters['listing_attrs']=listing_attrs;return this._callMethod('marketplace.createListing',parameters,sequencer);},marketplace_getCategories:function(sequencer){var parameters={};return this._callMethod('marketplace.getCategories',parameters,sequencer);},marketplace_getListings:function(listing_ids,uids,sequencer){var parameters={};if(listing_ids){parameters['listing_ids']=listing_ids.toString();}
if(uids){parameters['uids']=uids.toString();}
return this._callMethod('marketplace.getListings',parameters,sequencer);},marketplace_getSubCategories:function(category,sequencer){var parameters={};parameters['category']=category;return this._callMethod('marketplace.getSubCategories',parameters,sequencer);},marketplace_RemoveListing:function(listing_id,status,sequencer){var parameters={};parameters['listing_id']=listing_id;parameters['status']=status;return this._callMethod('marketplace.removeListing',parameters,sequencer);},marketplace_Search:function(category,subcategory,query,sequencer){var parameters={};if(category){parameters['category']=category;if(subcategory){parameters['subcategory']=subcategory;}}
parameters['query']=query;return this._callMethod('marketplace.search',parameters,sequencer);},notifications_get:function(sequencer){var parameters={};return this._callMethod('notifications.get',parameters,sequencer);},notifications_send:function(to_ids,notification,sequencer){var parameters={};parameters['to_ids']=to_ids.toString();parameters['notification']=notification;return this._callMethod('notifications.send',parameters,sequencer);},notifications_sendEmail:function(recipients,subject,text,fbml,sequencer){var parameters={};parameters['recipients']=recipients.toString();parameters['subject']=subject;if(text){parameters['text']=text;}
if(fbml){parameters['fbml']=fbml;}
return this._callMethod('notifications.sendEmail',parameters,sequencer);},pages_getInfo:function(fields,page_ids,uid,sequencer){var parameters={};parameters['fields']=fields.toString();parameters['page_ids']=page_ids.toString();if(uid){parameters['uid']=uid;}
return this._callMethod('pages.getInfo',parameters,sequencer);},pages_isAdmin:function(page_id,sequencer){var parameters={};parameters['page_id']=page_id;return this._callMethod('pages.isAdmin',parameters,sequencer);},pages_isAppAdded:function(page_id,sequencer){var parameters={};parameters['page_id']=page_id;return this._callMethod('pages.isAppAdded',parameters,sequencer);},pages_isFan:function(page_id,uid,sequencer){var parameters={};parameters['page_id']=page_id;parameters['uid']=uid;return this._callMethod('pages.isFan',parameters,sequencer);},photos_addTag:function(pid,tag_uid,tag_text,x,y,tags,sequencer){var parameters={};parameters['pid']=pid;if(tags){parameters['tags']=tags;}
else{if(tag_uid){parameters['tag_uid']=tag_uid;}
else if(tag_text){parameters['tag_text']=tag_text;}
else{FB.FBDebug.assert(false,'Either tag_uid or tag_text must specified');}
parameters['x']=x;parameters['y']=y;}
return this._callMethod('photos.addTag',parameters,sequencer);},photos_createAlbum:function(name,location,description,sequencer){var parameters={};parameters['name']=name;parameters['location']=location;parameters['description']=description;return this._callMethod('photos.createAlbum',parameters,sequencer);},photos_get:function(subj_id,aid,pids,sequencer){var parameters={};if(subj_id){parameters['subj_id']=subj_id;}
if(aid){parameters['aid']=aid;}
if(pids){parameters['pids']=pids.toString();}
return this._callMethod('photos.get',parameters,sequencer);},photos_getAlbums:function(uid,aids,sequencer){var parameters={};if(uid){parameters['uid']=uid;}
if(aids){parameters['aids']=aids.toString();}
return this._callMethod('photos.getAlbums',parameters,sequencer);},photos_getTags:function(pids,sequencer){var parameters={};parameters['pids']=pids.toString();return this._callMethod('photos.getTags',parameters,sequencer);},users_getInfo:function(uids,fields,sequencer){var parameters={};parameters['uids']=uids.toString();parameters['fields']=fields.toString();return this._callMethod('users.getInfo',parameters,sequencer);},users_getLoggedInUser:function(sequencer){var parameters={};return this._callMethod('users.getLoggedInUser',parameters,sequencer);},users_hasAppPermission:function(ext_perm,sequencer){var parameters={};parameters['ext_perm']=ext_perm;return this._callMethod('users.hasAppPermission',parameters,sequencer);},users_isAppAdded:function(sequencer){var parameters={};return this._callMethod('users.isAppAdded',parameters,sequencer);},users_isAppUser:function(sequencer){var parameters={};return this._callMethod('users.isAppUser',parameters,sequencer);},users_setStatus:function(status,clear,status_includes_verb,sequencer){var parameters={};parameters['status']=status;parameters['clear']=clear;parameters['status_includes_verb']=status_includes_verb;return this._callMethod('users.setStatus',parameters,sequencer);},fql_query:function(query,sequencer){var parameters={};parameters['query']=query;return this._callMethod('fql.query',parameters,sequencer);},profile_setFBML:function(uid,profile,profile_action,mobile_profile,profile_main,sequencer){var parameters={};if(uid){parameters['uid']=uid;}
parameters['profile']=profile;parameters['profile_action']=profile_action;parameters['mobile_profile']=mobile_profile;parameters['profile_main']=profile_main;return this._callMethod('profile.setFBML',parameters,sequencer);},profile_getFBML:function(uid,sequencer){var parameters={};parameters['uid']=uid;return this._callMethod('profile.getFBML',parameters,sequencer);},_callMethod:function(method,parameters,executeUnit){var invalidSession=!this._session&&!FB.Facebook.appSecret&&method!=='fql.query';var jsonRequest=this._generateJsonRequest(method,parameters);if(typeof(executeUnit)!=='function'){var pendingResult=new FB.PendingResult();if(!invalidSession){executeUnit._api=this;executeUnit._addStep(jsonRequest,pendingResult);}
else{pendingResult.setPendingResult(null,Error.create('Invalid session state',FB.ApiErrorCode.invalid_session_key));}
return pendingResult;}
else{var callback=(executeUnit);if(!invalidSession){jsonRequest.callback=Delegate.create(this,function(result,exception){if(!exception&&(exception=this._checkError(result))){result=null;}
callback.invoke(result,exception);});jsonRequest.sendRequest();}
else{callback.invoke(null,Error.create('Invalid session state',FB.ApiErrorCode.invalid_session_key));}
return null;}},_checkError:function(result){var apiError=result;if(!isUndefined(apiError.error_code)){FB.FBDebug.logLine(1,'API failed with error code = '+Enum.toString(FB.ApiErrorCode,apiError.error_code));if(apiError.error_code===FB.ApiErrorCode.invalid_session_key){FB.FBDebug.logLine(1,'Bad session key, clear it');this.set_session(null);}
return Error.create(apiError.error_msg,apiError);}
return null;},_generateJsonRequest:function(method,parameters){if(!parameters){parameters={};}
var $dict1=parameters;for(var $key2 in $dict1){var entry={key:$key2,value:$dict1[$key2]};var scriptType=typeof(entry.value);if(scriptType==='boolean'){parameters[entry.key]=(parameters[entry.key])?1:0;}
else if(scriptType==='object'){parameters[entry.key]=FB.JSON.serialize(entry.value);}}
parameters['method']=method;parameters['api_key']=this._apiKey;parameters['format']='JSON';var callId=Date.get_now().getMilliseconds();if(callId===this._lastCallId){callId=this._lastCallId+1;}
this._lastCallId=callId;parameters['call_id']=callId;if(!parameters['v']){parameters['v']=FB.Facebook.version;}
if(this._session){FB.FBDebug.writeLine('session key = '+this._session.session_key);parameters['session_key']=this._session.session_key;}
if(FB.Facebook.appSecret){parameters['sig']=this._generateSignature(parameters,FB.Facebook.appSecret);}
else if(this._session&&this._session.secret){parameters['ss']=1;parameters['sig']=this._generateSignature(parameters,this._session.secret);}
var queryBuilder=new StringBuilder();var $dict3=parameters;for(var $key4 in $dict3){var entry={key:$key4,value:$dict3[$key4]};if(!queryBuilder.get_isEmpty()){queryBuilder.append('&');}
queryBuilder.append(entry.key+'='+encodeURIComponent(entry.value.toString()));}
var requestUrl=this._serverAddress;requestUrl+=('?method='+parameters['method']);var requestBody=queryBuilder.toString();var headers={};headers['Content-Type']='application/x-www-form-urlencoded';var jsonRequest=new FB._xdJsonRequest(this._xdHttpClient,'POST',requestUrl,requestBody,headers);return jsonRequest;},get_apiKey:function(){return this._apiKey;},_convertDictKeysToList:function(dictionary){var keyList=[];var $dict1=dictionary;for(var $key2 in $dict1){var entry={key:$key2,value:$dict1[$key2]};keyList.add(entry.key);}
return keyList;},_generateSignature:function(parameters,secret){var signatureBuilder=new StringBuilder();var keyList=this._convertDictKeysToList(parameters);keyList.sort();var $enum1=keyList.getEnumerator();while($enum1.moveNext()){var key=$enum1.get_current();signatureBuilder.append(key+'='+parameters[key]);}
signatureBuilder.append(secret);var hashString=FBIntern.Md5.computeHashToString(signatureBuilder.toString().trim());return hashString;},_apiKey:null,_session:null,_serverAddress:null,_lastCallId:0,_xdHttpClient:null,_isLoggedIn:false}
FB.Helper=function FB_Helper(){}
FB.Helper.invokeAsCallbackOrRedirect=function FB_Helper$invokeAsCallbackOrRedirect(o){if(!o){return;}
if(Type.canCast(o,String)){window.navigate(o);}
else{var callback=o;var s=FB.Facebook.apiClient.get_session();callback.invoke((s)?s.uid:null);}}
FB.Waitable=function FB_Waitable(){}
FB.Waitable.prototype={onChange:function(){if(this.__changed){this.__changed.invoke(this);}},waitUntilReady:function(callback){if(this.get_isReady()){callback.invoke(this.result);}
else{var onReady=null;onReady=Delegate.create(this,function(waitable){this.remove_changed(onReady);callback.invoke(this.result);});this.add_changed(onReady);}},waitForValue:function(expectedValue,callback){this.waitForCondition(Delegate.create(this,function(waitable){if(this.get_isReady()&&this.result===expectedValue){callback.invoke();return true;}
return false;}));},waitForCondition:function(callback){if(!callback.invoke(this)){var onChange=null;onChange=Delegate.create(this,function(waitable){if(callback.invoke(waitable)){this.remove_changed(onChange);}});this.add_changed(onChange);}},resetChange:function(){this.__changed=null;},result:null,add_changed:function(value){this.__changed=Delegate.combine(this.__changed,value);},remove_changed:function(value){this.__changed=Delegate.remove(this.__changed,value);},__changed:null}
FB.SimpleWaitable=function FB_SimpleWaitable(){FB.SimpleWaitable.constructBase(this);}
FB.SimpleWaitable.prototype={get_isReady:function(){return this._isReady$1;},setResult:function(result,unsetReady){this.result=result;this._isReady$1=(!unsetReady);this.onChange();},_isReady$1:false}
FB.DependentWaitable=function FB_DependentWaitable(){this._dependents$1=[];FB.DependentWaitable.constructBase(this);}
FB.DependentWaitable.prototype={get_isReady:function(){return this._waitItems$1<=0;},addDependent:function(dependent){if(!dependent.get_isReady()){this._dependents$1.add(dependent);this._waitItems$1++;dependent.add_changed(Delegate.create(this,this._dependent_OnReady$1));}},removeAll:function(){var $enum1=this._dependents$1.getEnumerator();while($enum1.moveNext()){var dependent=$enum1.get_current();dependent.remove_changed(Delegate.create(this,this._dependent_OnReady$1));}
this._dependents$1=[];this._waitItems$1=0;},_dependent_OnReady$1:function(waitable){waitable.remove_changed(Delegate.create(this,this._dependent_OnReady$1));this._waitItems$1--;if(!this._waitItems$1){this.onChange();}},_waitItems$1:0}
FB._xdHttpRequestClient=function FB__xdHttpRequestClient(requestServerUrl,receiverUrl,server_iframe_name){if(!FBIntern.Flash.hasRequireVersion()){FB.XdComm.Server.singleton.createNamedHiddenIFrame(server_iframe_name,requestServerUrl,'FB_SERVER_IFRAME',null);this._serverEndPoint=new FB.XdComm.EndPoint(server_iframe_name,FB.XdComm.PageRelation.child,receiverUrl);}
else if(!window.FB_OnXdHttpResult){FB.FBDebug.logLine(2,'Set window.FB_OnXdHttpResult');window.FB_OnXdHttpResult=Delegate.create(null,FB._xdHttpRequestClient._onFlashDataReceived);}}
FB._xdHttpRequestClient._ensureListenerStarted=function FB__xdHttpRequestClient$_ensureListenerStarted(){if(!FB._xdHttpRequestClient._handlerRegistered){FB.XdComm.Server.singleton.registerDataHandler('http_client',Delegate.create(null,FB._xdHttpRequestClient._onDataReceived));FB._xdHttpRequestClient._handlerRegistered=true;}}
FB._xdHttpRequestClient._onFlashDataReceived=function FB__xdHttpRequestClient$_onFlashDataReceived(id,responseText){responseText=FBIntern.Flash.decode(responseText);var result=FB.$create_XdHttpRequestResult(id,200,'Success',responseText);window.setTimeout(Delegate.create(null,function(){FB._xdHttpRequestClient._onDataReceived(result,null);}),0);}
FB._xdHttpRequestClient._onDataReceived=function FB__xdHttpRequestClient$_onDataReceived(data,senderEndPoint){FB.FBDebug.logLine(3,'XdHttpRequestClient: got result ');var result=data;var callback=FB._xdHttpRequestClient._requestQueue[result.id];callback.invoke(result);}
FB._xdHttpRequestClient.prototype={send:function(method,url,requestBody,extraHeaders,callback){if(!FBIntern.Flash.hasRequireVersion()){var uri=new FBIntern.Uri(url);var rootedUrl=uri.get_pathAndQuery();FB._xdHttpRequestClient._ensureListenerStarted();var requestId=FB._xdHttpRequestClient._idCount++;var request_data=[requestId,method,rootedUrl,requestBody,extraHeaders];FB._xdHttpRequestClient._requestQueue[requestId.toString()]=callback;FB.FBDebug.logLine(3,'XdHttpRequestClient: send request for '+url);FB.XdComm.Server.singleton.send(this._serverEndPoint,'http_server',request_data);}
else{FBIntern.Flash.get_xdComm().waitUntilReady(Delegate.create(this,function(result){var flashXdComm=result;FB.FBDebug.logLine(3,'XdHttpRequestClient: send flash request for '+url);var requestId=flashXdComm.sendXdHttpRequest(method,url,requestBody,extraHeaders);FB._xdHttpRequestClient._requestQueue[requestId.toString()]=callback;}));}},_serverEndPoint:null}
FB.PendingResult=function FB_PendingResult(){FB.PendingResult.constructBase(this);}
FB.PendingResult.prototype={exception:null,setPendingResult:function(result,exception){var apiError=result;if(!exception&&apiError&&!isUndefined(apiError.error_code)){exception=Error.create(apiError.error_msg,apiError);FB.FBDebug.assert(false,'Facebook API error: '+apiError.error_msg);result=null;}
this.exception=exception;this.setResult(result);}}
FB.SequencerBase=function FB_SequencerBase(){}
FB.SequencerBase.prototype={_completedCallback:null,isParallel:true,_api:null}
FB.BatchSequencer=function FB_BatchSequencer(){this.stepsList=[];FB.BatchSequencer.constructBase(this);}
FB.BatchSequencer.prototype={execute:function(completedCallback){this._completedCallback=completedCallback;var stepsCount=this.stepsList.length;if(stepsCount>1){var parameters={};var methodFeed=[];var $enum1=this.stepsList.getEnumerator();while($enum1.moveNext()){var stepInfo=$enum1.get_current();methodFeed.add(stepInfo.jsonRequest._requestBody);}
parameters['method_feed']=methodFeed;parameters['serial_only']=!this.isParallel;var batchRequest=this._api._generateJsonRequest('batch.run',parameters);batchRequest.callback=Delegate.create(this,function(result,exception){if(!exception&&(exception=this._api._checkError(result))){result=null;}
this._setStepResults$1(result,exception);this.onAllCompleted();});batchRequest.sendRequest();}
else if(stepsCount===1){var stepInfo=this.stepsList[0];stepInfo.jsonRequest.callback=Delegate.create(this,function(result,exception){stepInfo.result.setPendingResult(result,exception);this.onAllCompleted();});stepInfo.jsonRequest.sendRequest();}
else{this.onAllCompleted();}},_setStepResults$1:function(batchResult,exception){var batchResultList=batchResult;FB.FBDebug.assert(!batchResultList||batchResultList.length===this.stepsList.length,'Malformed batch result');var stepsCount=this.stepsList.length;for(var i=0;i<stepsCount;i++){var pendingResult=(this.stepsList[i]).result;if(exception){pendingResult.exception=exception;pendingResult.result=null;}
else if(batchResultList){var individualResultString=batchResultList[i];var individualResult=FB.JSON.deserialize(individualResultString,true);pendingResult.setPendingResult(individualResult,null);}}},onAllCompleted:function(){this.stepsList.clear();if(this._completedCallback){var callback=this._completedCallback;this._completedCallback=null;callback.invoke();}},_addStep:function(jsonRequest,pendingResult){var stepInfo=FB.$create__stepInfo(jsonRequest,pendingResult);this.stepsList.add(stepInfo);}}
FB.ImmediateSequencer=function FB_ImmediateSequencer(callback){FB.ImmediateSequencer.constructBase(this);this.isParallel=false;this._callback$2=callback;}
FB.ImmediateSequencer.prototype={_addStep:function(jsonRequest,pendingResult){this.pendingResult=pendingResult;FB.ImmediateSequencer.callBase(this,'_addStep',[jsonRequest,pendingResult]);this.execute(null);},onAllCompleted:function(){this.stepsList.clear();if(this._callback$2){this._callback$2.invoke(this.pendingResult.result,this.pendingResult.exception);}},pendingResult:null,_callback$2:null}
FB._xdJsonRequest=function FB__xdJsonRequest(xdHttpClient,method,url,requestBody,extraHeaders){this._method=method;this._url=url;this._requestBody=requestBody;this._extraHeaders=extraHeaders;this._xdHttpClient=xdHttpClient;}
FB._xdJsonRequest.prototype={sendRequest:function(){this._xdHttpClient.send(this._method,this._url,this._requestBody,this._extraHeaders,Delegate.create(this,function(xd_result){if(xd_result.status<400){var responseText=xd_result.responseText;var result;try{result=FB.JSON.deserialize(responseText,true);}
catch(exception){var jsonException=Error.create('JSON exception during deserialization.',responseText,exception);this.callback.invoke(null,exception);return;}
this.callback.invoke(result,null);}
else{var exception=new Error(String.format('HTTP request failure status code=\'{0}\', text=\'{1}\'',xd_result.status,xd_result.statusText));this.callback.invoke(null,exception);}}));},callback:null,_method:null,_url:null,_requestBody:null,_extraHeaders:null,_xdHttpClient:null}
FB.Facebook=function FB_Facebook(){}
FB.Facebook.init=function FB_Facebook$init(apiKey,xdChannelUrl,appSettings){if(typeof(apiKey)==='object'&&!xdChannelUrl&&!appSettings){appSettings=arguments[0];apiKey=null;xdChannelUrl=null;}
if(FB.Facebook.apiClient){FB.FBDebug.writeLine('Error: Facebook.init() has already been called.');return;}
FB.Facebook.apiKey=(apiKey)?apiKey:appSettings['apiKey'];if(!FB.Facebook.apiKey){FB.FBDebug.logLine(0,'API Key is not specified');throw new Error('API Key is not specified');}
FB.XdComm.Server.singleton.set_receiverUrl((xdChannelUrl)?xdChannelUrl:appSettings['xdChannelUrl']);FB.Facebook.apiClient=new FB.ApiClient(FB.Facebook.apiKey);FB.Facebook._isInitialNoSession=!FB.Facebook.get_sessionState().result;if(appSettings){FB.Facebook.appSettings=appSettings;FB.Facebook._processOptionalAppSettings();}
(FB.Facebook.get_initialized()).setResult(true);}
FB.Facebook._reloadIfSessionStateChanged=function FB_Facebook$_reloadIfSessionStateChanged(){FB.Facebook.get_sessionWaitable().add_changed(Delegate.create(null,function(waitable){window.setTimeout(Delegate.create(null,function(){var newNoSession=!waitable.result;if(newNoSession!==FB.Facebook._isInitialNoSession&&FB.Facebook.appSettings['reloadIfSessionStateChanged']){FB.FBDebug.logLine(3,'reloading ...');window.location.reload(true);}
else if(newNoSession&&Object.keyExists(FB.Facebook.appSettings,'ifUserConnected')){FB.Helper.invokeAsCallbackOrRedirect(FB.Facebook.appSettings['ifUserConnected']);}
else if(!newNoSession&&Object.keyExists(FB.Facebook.appSettings,'ifUserNotConnected')){FB.Helper.invokeAsCallbackOrRedirect(FB.Facebook.appSettings['ifUserNotConnected']);}}),0);}));}
FB.Facebook._processOptionalAppSettings=function FB_Facebook$_processOptionalAppSettings(){var $dict1=FB.Facebook.appSettings;for(var $key2 in $dict1){var entry={key:$key2,value:$dict1[$key2]};switch(entry.key){case'debugLogLevel':FB.FBDebug.logLevel=entry.value;break;case'apiKey':case'xdChannelUrl':break;case'ifUserConnected':case'ifUserNotConnected':FB.Connect.ifUserConnected(FB.Facebook.appSettings['ifUserConnected'],FB.Facebook.appSettings['ifUserNotConnected']);break;case'reloadIfSessionStateChanged':FB.Facebook._reloadIfSessionStateChanged();break;default:FB.FBDebug.logLine(1,'Invalid app setting key: '+entry.key);throw new Error('Invalid app setting key: '+entry.key);}}}
FB.Facebook.get_sessionState=function FB_Facebook$get_sessionState(){return FB.Facebook.get_sessionWaitable();}
FB.Facebook.get_sessionWaitable=function FB_Facebook$get_sessionWaitable(){FB.FBDebug.assert(FB.Facebook.apiClient,'Facebook.init() is not called yet');return FB.Facebook.apiClient.get_sessionWaitable();}
FB.Facebook.get_initialized=function FB_Facebook$get_initialized(){if(!FB.Facebook._initialized){FB.Facebook._initialized=new FB.SimpleWaitable();}
return FB.Facebook._initialized;}
FB.Facebook.get_baseDomain=function FB_Facebook$get_baseDomain(){if(!FB.Facebook._isBaseDomainInitialized){if(FB.Facebook.apiKey){FB.Facebook._baseDomain=FBIntern.Cookie.getValue('base_domain_'+FB.Facebook.apiKey);}
else{throw new Error('Can\'t get BaseDomain property when API key is not set');}}
return FB.Facebook._baseDomain;}
FB.Facebook.set_baseDomain=function FB_Facebook$set_baseDomain(value){FB.Facebook._isBaseDomainInitialized=true;if(isUndefined(value)){FB.Facebook._baseDomain=null;}
else{FB.Facebook._baseDomain=value;}
if(FB.Facebook.apiKey){var baseDomainCookie='base_domain_'+FB.Facebook.apiKey;if(!FB.Facebook._baseDomain){FBIntern.Cookie.clear(baseDomainCookie,'/',null);}
else{FBIntern.Cookie.set(baseDomainCookie,FB.Facebook._baseDomain,'/',FB.Facebook._baseDomain,0);}}
else{throw new Error('Can\'t set BaseDomain property when api key is set');}
return value;}
FB.Facebook.get_isInCanvas=function FB_Facebook$get_isInCanvas(){if(FB.Facebook._isInCanvas===-1){FB.Facebook._isInCanvas=window.parent!=window&&window.location.href.match("fb_sig_in_iframe=1")!=null?1:0;;}
return FB.Facebook._isInCanvas===1;}
FBIntern.Flash.createClass('FBIntern.Flash');FB.ApiClient.createClass('FB.ApiClient');FB.Helper.createClass('FB.Helper');FB.Waitable.createClass('FB.Waitable');FB.SimpleWaitable.createClass('FB.SimpleWaitable',FB.Waitable);FB.DependentWaitable.createClass('FB.DependentWaitable',FB.Waitable);FB._xdHttpRequestClient.createClass('FB._xdHttpRequestClient');FB.PendingResult.createClass('FB.PendingResult',FB.SimpleWaitable);FB.SequencerBase.createClass('FB.SequencerBase');FB.BatchSequencer.createClass('FB.BatchSequencer',FB.SequencerBase);FB.ImmediateSequencer.createClass('FB.ImmediateSequencer',FB.BatchSequencer);FB._xdJsonRequest.createClass('FB._xdJsonRequest');FB.Facebook.createClass('FB.Facebook');FBIntern.Flash.xdComm=null;FBIntern.Flash.curMajor=0;FBIntern.Flash.curMinor=0;FBIntern.Flash.versionDetected=false;FB.ApiClient.createSessionDelegate=Delegate.create(null,FB.ApiClient.defaultCreateSession);FB._xdHttpRequestClient._requestQueue={};FB._xdHttpRequestClient._handlerRegistered=false;FB._xdHttpRequestClient._idCount=0;FB.Facebook.apiKey=null;FB.Facebook.apiClient=null;FB.Facebook.appSecret=null;FB.Facebook.version='1.0';FB.Facebook.appSettings={};FB.Facebook._initialized=null;FB.Facebook._baseDomain=null;FB.Facebook._isBaseDomainInitialized=false;FB.Facebook._isInCanvas=-1;FB.Facebook._isInitialNoSession=false;Type.createNamespace('FB');FB.XdHttpRequestServer=function FB_XdHttpRequestServer(){}
FB.XdHttpRequestServer.main=function FB_XdHttpRequestServer$main(args){var receiverUrl=args['receiver'];if(Object.keyExists(args,'allowed_url_filter')){FB.XdHttpRequestServer._allowedUrlFilter=new RegExp(args['allowed_url_filter']);}
if(Object.keyExists(args,'allowed_urls')){FB.XdHttpRequestServer._allowedUrls=args['allowed_urls'];}
var rootUri=new FBIntern.Uri(document.URL);FB.XdHttpRequestServer._rootUrl=rootUri.get_schemeAndDomain();var debugLevel=rootUri.get_queryParameters()['debug_level'];if(debugLevel){var level=Number.parse(debugLevel);if(level>FB.FBDebug.logLevel){FB.FBDebug.logLevel=level;}}
FB.XdComm.Server.singleton.set_receiverUrl(receiverUrl);FB.XdComm.Server.singleton.registerDataHandler('http_server',Delegate.create(null,FB.XdHttpRequestServer._onDataReceived));}
FB.XdHttpRequestServer._isUrlAllowed=function FB_XdHttpRequestServer$_isUrlAllowed(url){if(FB.XdHttpRequestServer._allowedUrlFilter&&FB.XdHttpRequestServer._allowedUrlFilter.test(url)){return true;}
if(FB.XdHttpRequestServer._allowedUrls){var $enum1=FB.XdHttpRequestServer._allowedUrls.getEnumerator();while($enum1.moveNext()){var allowed_url=$enum1.get_current();if(allowed_url===url){return true;}}}
return false;}
FB.XdHttpRequestServer._onDataReceived=function FB_XdHttpRequestServer$_onDataReceived(data,sender){var request_data=data;var request=new XMLHttpRequest();var url=request_data[2];if(!FB.XdHttpRequestServer._isUrlAllowed(url)){FB.FBDebug.assert(false,'URL '+url+' is not allowed.');return;}
url=FB.XdHttpRequestServer._rootUrl+url;FB.FBDebug.logLine(3,'XdHttpRequestServer: make XHR request to '+url);request.onreadystatechange=Delegate.create(null,function(){if(request.readyState===4){var result=FB.$create_XdHttpRequestResult(request_data[0],request.status,request.statusText,request.responseText);FB.FBDebug.logLine(3,'XdHttpRequestServer: send result back http_client');FB.XdComm.Server.singleton.send(sender,'http_client',result);}});request.open(request_data[1],request_data[2],true);var extraHeaders=request_data[4];if(extraHeaders){var $dict1=extraHeaders;for(var $key2 in $dict1){var headerItem={key:$key2,value:$dict1[$key2]};request.setRequestHeader(headerItem.key,headerItem.value.toString());}}
request.send(request_data[3]);}
FB.XdHttpRequestServer.createClass('FB.XdHttpRequestServer');FB.XdHttpRequestServer._rootUrl=null;FB.XdHttpRequestServer._allowedUrlFilter=null;FB.XdHttpRequestServer._allowedUrls=null;FB.FeatureLoader.singleton.onScriptLoaded(['Api']);

Type.createNamespace('FB');FB.CanvasClient=function FB_CanvasClient(){}
FB.CanvasClient._ensureRpcClient=function FB_CanvasClient$_ensureRpcClient(){if(!FB.CanvasClient._rpcClient){FB.CanvasClient._rpcClient=new FB.XdComm.XdRpcClient('iframeOuterServer','iframeInnerClient',new FB.XdComm.EndPoint(null,FB.XdComm.PageRelation.parent,FB.CanvasClient.serverReceiverUrl));}}
FB.CanvasClient.run=function FB_CanvasClient$run(){if(!FB.CanvasClient._rpcServer){var methodMap={loadNewUrl:FB.XdComm.$create_XdRpcMethodInfo(Delegate.create(null,FB.CanvasClient.loadNewUrl),null)};var serverName='iframeInnerServer';FB.CanvasClient._rpcServer=new FB.XdComm.XdRpcServer(serverName,methodMap);FB.CanvasClient._rpcClient.send('setInnerReceiver',{receiverUrl:FB.XdComm.Server.singleton.get_receiverUrl()},null);}}
FB.CanvasClient.get_timerInterval=function FB_CanvasClient$get_timerInterval(){return FB.CanvasClient._timerInternal;}
FB.CanvasClient.set_timerInterval=function FB_CanvasClient$set_timerInterval(value){FB.CanvasClient._timerInternal=value;return value;}
FB.CanvasClient.startTimerToSizeToContent=function FB_CanvasClient$startTimerToSizeToContent(){FB.FBDebug.logLine(4,'CanvasClient: StartTimerToSizeToContent');FB.CanvasClient.setSizeToContent();if(FB.CanvasClient._timer===-1){FB.CanvasClient._timer=window.setInterval(Delegate.create(null,FB.CanvasClient.setSizeToContent),FB.CanvasClient._timerInternal);}}
FB.CanvasClient.stopTimerToSizeToContent=function FB_CanvasClient$stopTimerToSizeToContent(){if(FB.CanvasClient._timer!==-1){window.clearInterval(FB.CanvasClient._timer);FB.CanvasClient._timer=-1;}}
FB.CanvasClient.setSizeToContent=function FB_CanvasClient$setSizeToContent(){if(FB.CanvasClient.get__isInDialog()){FB.CanvasClient._sizeDialogToContent();return;}
var docElement=document.documentElement;if(FB.CanvasClient._modifyBodyStyle){docElement.style.overflow='hidden';}
var size=FB.CanvasClient._computeContentSize();if(FB.CanvasClient.allowWidthChange){if(size.w!==FB.CanvasClient._lastSize.w||size.h!==FB.CanvasClient._lastSize.h){FB.CanvasClient._lastSize=size;FB.CanvasClient._setCanvasSize(size.w.toString()+'px',size.h.toString()+'px',null);}}
else if(size.h!==FB.CanvasClient._lastSize.h){FB.CanvasClient._lastSize=size;FB.CanvasClient.setCanvasHeight(size.h.toString()+'px',null);}}
FB.CanvasClient._sizeDialogToContent=function FB_CanvasClient$_sizeDialogToContent(){var docViewSize=FBIntern.Utility.get_windowSize();var docSize=FBIntern.Utility.get_documentSize();var hOffset=docSize.h-docViewSize.h;var wOffset=docSize.w-docViewSize.w;if(hOffset||wOffset){FB.FBDebug.logLine(2,String.format('CanvasClient: resize dialog by ({0}, {1})',wOffset,hOffset));try{window.resizeBy(wOffset,hOffset);}
catch($e1){FB.FBDebug.logLine(2,String.format('CanvasClient: resize faield'));}}}
FB.CanvasClient.setCanvasHeight=function FB_CanvasClient$setCanvasHeight(height,callback){FB.FBDebug.logLine(2,'CanvasClient: set canvas height to '+height);FB.CanvasClient._ensureRpcClient();FB.CanvasClient._rpcClient.send('setCanvasHeight',height,callback);}
FB.CanvasClient._setCanvasSize=function FB_CanvasClient$_setCanvasSize(width,height,callback){FB.FBDebug.logLine(2,String.format('CanvasClient: set canvas size to {0}, {1}',width,height));FB.CanvasClient._ensureRpcClient();FB.CanvasClient._rpcClient.send('setCanvasSize',{w:width,h:height},callback);}
FB.CanvasClient.getCanvasInfo=function FB_CanvasClient$getCanvasInfo(callback){FB.CanvasClient._ensureRpcClient();FB.CanvasClient._rpcClient.send('getCanvasInfo',null,callback);}
FB.CanvasClient.scrollTo=function FB_CanvasClient$scrollTo(x,y,callback){FB.CanvasClient._ensureRpcClient();FB.CanvasClient._rpcClient.send('scrollTo',FB.$create_Point(x,y),callback);}
FB.CanvasClient.changeUrlSuffix=function FB_CanvasClient$changeUrlSuffix(suffix,callback){FB.CanvasClient._ensureRpcClient();FB.CanvasClient._rpcClient.send('changeUrlSuffix',suffix,callback);}
FB.CanvasClient.syncUrl=function FB_CanvasClient$syncUrl(){FB.CanvasClient._ensureRpcClient();var curUrl=document.location;FB.CanvasClient._rpcClient.send('refreshUrl',curUrl,null);FB.CanvasClient.run();}
FB.CanvasClient.setUrlHandler=function FB_CanvasClient$setUrlHandler(urlHandler){FB.CanvasClient._urlHandler=urlHandler;}
FB.CanvasClient.loadNewUrl=function FB_CanvasClient$loadNewUrl(arg,senderEndPoint){var url=arg;FB.FBDebug.logLine(2,String.format('CanvasClient: set internal url to  {0}',url));FB.CanvasClient._urlHandler.invoke(url);return null;}
FB.CanvasClient.defaultUrlHandler=function FB_CanvasClient$defaultUrlHandler(url){window.location.replace(url);;}
FB.CanvasClient.add_windowSizeChanged=function FB_CanvasClient$add_windowSizeChanged(value){var rpcEventAttachedAlready=FB.CanvasClient.__windowSizeChangedCallback;FB.CanvasClient.add__windowSizeChangedCallback(value);if(!rpcEventAttachedAlready){FB.CanvasClient._ensureRpcClient();FB.CanvasClient._rpcClient.send('attachToWindowResizeEvent',null,Delegate.create(null,FB.CanvasClient._onRpcCompleted));}}
FB.CanvasClient.remove_windowSizeChanged=function FB_CanvasClient$remove_windowSizeChanged(value){FB.CanvasClient.remove__windowSizeChangedCallback(value);}
FB.CanvasClient._onRpcCompleted=function FB_CanvasClient$_onRpcCompleted(result){if(FB.CanvasClient.__windowSizeChangedCallback){FB.CanvasClient.__windowSizeChangedCallback.invoke(result);}}
FB.CanvasClient._computeContentSize=function FB_CanvasClient$_computeContentSize(){var body=document.body;var docElement=document.documentElement;var right=0;var bottom;if(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()===FBIntern.HostName.IE){bottom=Math.max(body.offsetHeight,body.scrollHeight)+body.offsetTop;}
else{bottom=docElement.offsetHeight+docElement.offsetTop;}
if(FB.CanvasClient._isRenderFbml){var dialog_table=$SS('pop_dialog_table');if(dialog_table){var dialog_bottom=Rect.getElementBounds(dialog_table).b;bottom=Math.max(bottom,dialog_bottom);}}
if(FB.CanvasClient.allowWidthChange){if(body.offsetWidth<body.scrollWidth){right=body.scrollWidth+body.offsetLeft;}
else{var children=body.children;right=0;for(var i=0;i<children.length;i++){var child=children[i];var childRight=child.offsetWidth+child.offsetLeft;if(childRight>right){right=childRight;}}}
if(docElement.clientLeft>0){right+=(docElement.clientLeft*2);}
if(docElement.clientTop>0){bottom+=(docElement.clientTop*2);}}
return FB.$create_Size(right,bottom);}
FB.CanvasClient.get__isInDialog=function FB_CanvasClient$get__isInDialog(){return window.opener&&window.opener!==window.self;}
FB.CanvasClient.add__windowSizeChangedCallback=function FB_CanvasClient$add__windowSizeChangedCallback(value){FB.CanvasClient.__windowSizeChangedCallback=Delegate.combine(FB.CanvasClient.__windowSizeChangedCallback,value);}
FB.CanvasClient.remove__windowSizeChangedCallback=function FB_CanvasClient$remove__windowSizeChangedCallback(value){FB.CanvasClient.__windowSizeChangedCallback=Delegate.remove(FB.CanvasClient.__windowSizeChangedCallback,value);}
FB.CanvasClient.createClass('FB.CanvasClient');FB.CanvasClient.serverReceiverUrl=FBIntern.Utility.getFacebookUrl('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=Delegate.create(null,FB.CanvasClient.defaultUrlHandler);FB.CanvasClient._isRenderFbml=false;Type.createNamespace('FB.IFrameUtil');FB.IFrameUtil._resizeUtil=function FB_IFrameUtil__resizeUtil(allowWidthChange){this.allowWidthChange=allowWidthChange;}
FB.IFrameUtil._resizeUtil.prototype={setCanvasHeight:function(arg,senderEndPoint){var height=arg;FB.FBDebug.logLine(2,'ResizeUtil: set canvas height to '+height);if(!height){FB.FBDebug.assert(false,'Called ResizeUtil.SetCanvasHeight() with invalid input paramters.');}
else{var iframe=this._getIFrameElement(senderEndPoint.frameName);iframe.style.height=height;}
return null;},setCanvasSize:function(arg,senderEndPoint){var parameters=arg;var width=parameters['w'];var height=parameters['h'];FB.FBDebug.logLine(2,String.format('ResizeUtil: set canvas size to {0}, {1}',width,height));if(height){var iframe=this._getIFrameElement(senderEndPoint.frameName);iframe.style.height=height;}
if(width){if(this.allowWidthChange){var iframe=this._getIFrameElement(senderEndPoint.frameName);iframe.style.width=width;}
else{FB.FBDebug.assert(false,'Iframe width change is disallowed.');}}
return null;},getCanvasInfo:function(arg,senderEndPoint){var iframe=this._getIFrameElement(senderEndPoint.frameName);var viewPortVec=Vector2.getViewportDimensions();var docVec=Vector2.getDocumentDimensions();var scrollVec=Vector2.getScrollPosition(null);var iframePosVect=Vector2.getElementPosition(iframe,'document');var result={window:{w:viewPortVec.x,h:viewPortVec.y},page:{w:docVec.x,h:docVec.y},scrollPos:{x:scrollVec.x,y:scrollVec.y},canvas:{w:iframe.offsetWidth,h:iframe.offsetHeight},canvasPos:{x:iframePosVect.x,y:iframePosVect.y}};return result;},changeUrlSuffix:function(arg,senderEndPoint){var suffix=arg;PlatformCanvasController.singleton.changeUrlSuffix(suffix,false);return null;},refreshUrl:function(arg,senderEndPoint){var url=arg;PlatformCanvasController.refreshUrl(url);return null;},scrollTo:function(arg,senderEndPoint){var pos=arg;var vector=new Vector2(pos.x,pos.y,'document');DOMScroll.scrollTo(vector,false);return null;},_getIFrameElement:function(senderIframeName){var iframes=document.getElementsByTagName('iframe');for(var i=0;i<iframes.length;i++){var iframe=iframes[i];if(iframe.name===senderIframeName){return iframe;}}
return null;},attachToWindowResizeEvent:function(arg,callback,senderEndPoint){this.add__windowSizeChangedCallback(callback);window.attachEvent('onresize',Delegate.create(this,function(){if(this.__windowSizeChangedCallback){var canvasInfo=this.getCanvasInfo(null,senderEndPoint);this.__windowSizeChangedCallback.invoke(canvasInfo);}}));},allowWidthChange:false,add__windowSizeChangedCallback:function(value){this.__windowSizeChangedCallback=Delegate.combine(this.__windowSizeChangedCallback,value);},remove__windowSizeChangedCallback:function(value){this.__windowSizeChangedCallback=Delegate.remove(this.__windowSizeChangedCallback,value);},__windowSizeChangedCallback:null}
FB.IFrameUtil.CanvasUtilServer=function FB_IFrameUtil_CanvasUtilServer(){}
FB.IFrameUtil.CanvasUtilServer.run=function FB_IFrameUtil_CanvasUtilServer$run(allowWidthChange){if(!FB.IFrameUtil.CanvasUtilServer._rpcServer){FB.IFrameUtil.CanvasUtilServer._resizeUtil=new FB.IFrameUtil._resizeUtil(allowWidthChange);var methodMap={setCanvasHeight:FB.XdComm.$create_XdRpcMethodInfo(Delegate.create(FB.IFrameUtil.CanvasUtilServer._resizeUtil,FB.IFrameUtil.CanvasUtilServer._resizeUtil.setCanvasHeight),null),setCanvasSize:FB.XdComm.$create_XdRpcMethodInfo(Delegate.create(FB.IFrameUtil.CanvasUtilServer._resizeUtil,FB.IFrameUtil.CanvasUtilServer._resizeUtil.setCanvasSize),null),getCanvasInfo:FB.XdComm.$create_XdRpcMethodInfo(Delegate.create(FB.IFrameUtil.CanvasUtilServer._resizeUtil,FB.IFrameUtil.CanvasUtilServer._resizeUtil.getCanvasInfo),null),scrollTo:FB.XdComm.$create_XdRpcMethodInfo(Delegate.create(FB.IFrameUtil.CanvasUtilServer._resizeUtil,FB.IFrameUtil.CanvasUtilServer._resizeUtil.scrollTo),null),changeUrlSuffix:FB.XdComm.$create_XdRpcMethodInfo(Delegate.create(FB.IFrameUtil.CanvasUtilServer._resizeUtil,FB.IFrameUtil.CanvasUtilServer._resizeUtil.changeUrlSuffix),null),refreshUrl:FB.XdComm.$create_XdRpcMethodInfo(Delegate.create(FB.IFrameUtil.CanvasUtilServer._resizeUtil,FB.IFrameUtil.CanvasUtilServer._resizeUtil.refreshUrl),null),setInnerReceiver:FB.XdComm.$create_XdRpcMethodInfo(Delegate.create(null,FB.IFrameUtil.CanvasUtilServer.setInnerReceiver),null),attachToWindowResizeEvent:FB.XdComm.$create_XdRpcMethodInfo(null,Delegate.create(FB.IFrameUtil.CanvasUtilServer._resizeUtil,FB.IFrameUtil.CanvasUtilServer._resizeUtil.attachToWindowResizeEvent))};FB.FBDebug.assert(FB.XdComm.Server.singleton.get_receiverUrl(),'FB.XdComm.Server not initialized');FB.IFrameUtil.CanvasUtilServer._rpcServer=new FB.XdComm.XdRpcServer('iframeOuterServer',methodMap);}
else if(allowWidthChange&&!FB.IFrameUtil.CanvasUtilServer._resizeUtil.allowWidthChange){FB.IFrameUtil.CanvasUtilServer._resizeUtil.allowWidthChange=true;}}
FB.IFrameUtil.CanvasUtilServer.setInnerReceiver=function FB_IFrameUtil_CanvasUtilServer$setInnerReceiver(args,senderEndPoint){var dict=args;FB.FBDebug.logLine(2,String.format('CanvasClient: set innner url to  {0}',dict['receiverUrl']));FB.IFrameUtil.CanvasUtilServer.refreshRpcClient(dict['receiverUrl']);return null;}
FB.IFrameUtil.CanvasUtilServer.loadNewUrl=function FB_IFrameUtil_CanvasUtilServer$loadNewUrl(url){FB.IFrameUtil.CanvasUtilServer.ensureRpcClient();FB.IFrameUtil.CanvasUtilServer._rpcClient.send('loadNewUrl',url,null);}
FB.IFrameUtil.CanvasUtilServer.refreshRpcClient=function FB_IFrameUtil_CanvasUtilServer$refreshRpcClient(innerReceiverUrl){FB.FBDebug.assert(innerReceiverUrl,'Inner receiver url is null.');if(FB.IFrameUtil.CanvasUtilServer._rpcClient){FB.IFrameUtil.CanvasUtilServer._rpcClient.detachClient();}
var uniqEndPoint=new FB.XdComm.EndPoint('iframe_canvas',FB.XdComm.PageRelation.child,innerReceiverUrl);uniqEndPoint.UID=Math.floor(Math.random()*1000000);FB.IFrameUtil.CanvasUtilServer._rpcClient=new FB.XdComm.XdRpcClient('iframeInnerServer','iframeOuterClient',uniqEndPoint);}
FB.IFrameUtil.CanvasUtilServer.ensureRpcClient=function FB_IFrameUtil_CanvasUtilServer$ensureRpcClient(){FB.FBDebug.assert(FB.IFrameUtil.CanvasUtilServer._rpcClient,'Inner iframe server not ready.');}
FB.IFrameUtil._resizeUtil.createClass('FB.IFrameUtil._resizeUtil');FB.IFrameUtil.CanvasUtilServer.createClass('FB.IFrameUtil.CanvasUtilServer');FB.IFrameUtil.CanvasUtilServer._rpcServer=null;FB.IFrameUtil.CanvasUtilServer._rpcClient=null;FB.IFrameUtil.CanvasUtilServer._resizeUtil=null;FB.FeatureLoader.singleton.onScriptLoaded(['CanvasUtil']);

Type.createNamespace('FBIntern');FBIntern.LoginStatus=function FBIntern_LoginStatus(){}
FBIntern.LoginStatus.prototype={init:function(channel,session,settings,connectState,baseDomain){if(!this._rpcClient){this._rpcClient=new FB.XdComm.XdRpcClient('loginServer','loginStatus',new FB.XdComm.EndPoint(null,FB.XdComm.PageRelation.parent,channel));}
var parameters={session:session,settings:settings,connectState:connectState,baseDomain:baseDomain};this._rpcClient.send('InitLogin',parameters,null);},_rpcClient:null}
FBIntern.UIHelper=function FBIntern_UIHelper(){}
FBIntern.UIHelper.findElementById=function FBIntern_UIHelper$findElementById(root,id){if(root.id===id){return root;}
var c=root.children.length;for(var i=0;i<c;i++){var child=root.children[i];var result=FBIntern.UIHelper.findElementById(child,id);if(result){return result;}}
return null;}
Type.createNamespace('FB');FB.RequireConnect=function(){};FB.RequireConnect.prototype={doNotRequire:0,require:1,promptConnect:2}
FB.RequireConnect.createEnum('FB.RequireConnect',false);FB.Connect=function FB_Connect(){this._status=new FB.SimpleWaitable();}
FB.Connect.get_status=function FB_Connect$get_status(){var singleton=FB.Connect._singleton;singleton._ensureQueryStatus();return singleton._status;}
FB.Connect.requireSession=function FB_Connect$requireSession(callback,isUserActionHint){if(isUndefined(isUserActionHint)&&!isUndefined(callback)&&typeof(callback)!=='function'){isUserActionHint=(callback);callback=null;}
var singleton=FB.Connect._singleton;var handleSessionCallback=Delegate.create(null,function(connectState,isInUserActionCallstack){switch(connectState){case FB.ConnectState.userNotLoggedIn:singleton._showLoginDialog(false,isInUserActionCallstack);break;case FB.ConnectState.appNotAuthorized:singleton._showLoginDialog(true,isInUserActionCallstack);break;default:break;}});var isUserAction=FBIntern.Utility.get_isInUserActionCallstack()||isUserActionHint;if(FB.Connect.get__useBrowserPopupForLogin()&&!FB.Connect.get_status().get_isReady()&&isUserAction){handleSessionCallback.invoke(FB.ConnectState.userNotLoggedIn,isUserAction);}
else{FB.Connect.get_status().waitUntilReady(Delegate.create(null,function(connectState){handleSessionCallback.invoke(connectState,isUserAction);}));}
isUserAction=false;if(callback){FB.Connect.get_status().waitForValue(FB.ConnectState.connected,Delegate.create(null,function(){callback.invoke();}));}}
FB.Connect.logout=function FB_Connect$logout(callback){FB.Connect._handleLogout(callback,Delegate.create(null,function(logoutConfirmed){if(logoutConfirmed){var singleton=FB.Connect._singleton;var nextUrl=FBIntern.Uri.addQueryParameters(FB.XdComm.Server.singleton.get_receiverUrl(),'fb_login&fname=_parent&session=loggedout');singleton._ensureLoginHandler();singleton._logoutCallback=callback;var logoutUrl=FBIntern.Utility.getFacebookUrl('www')+'logout.php?app_key='+FB.Facebook.apiKey+'&session_key='+encodeURIComponent(FB.Facebook.apiClient.get_session().session_key)+'&next='+encodeURIComponent(nextUrl);singleton._logoutIframe=FB.XdComm.Server.singleton.createNamedHiddenIFrame('fbLogout',logoutUrl,'fb_logout',null);}
else if(callback){callback.invoke(false);}}));}
FB.Connect.logoutAndRedirect=function FB_Connect$logoutAndRedirect(redirectUrl){FB.Connect._handleLogout(null,Delegate.create(null,function(logoutConfirmed){if(logoutConfirmed){var singleton=FB.Connect._singleton;var nextUrl=FBIntern.Uri.create(new FBIntern.Uri(document.URL),redirectUrl).get_uriString();var logoutUrl=FBIntern.Utility.getFacebookUrl('www')+'logout.php?app_key='+FB.Facebook.apiKey+'&session_key='+encodeURIComponent(FB.Facebook.apiClient.get_session().session_key)+'&next='+encodeURIComponent(nextUrl);singleton.set__userInfo(null);FB.Facebook.apiClient.set_session(null);window.navigate(logoutUrl);}}));}
FB.Connect.ifUserConnected=function FB_Connect$ifUserConnected(connectedArg,notConnectedArg){FB.Connect.get_status().waitForCondition(Delegate.create(null,function(status){if(status.get_isReady()){window.setTimeout(Delegate.create(null,function(){FB.Helper.invokeAsCallbackOrRedirect((status.result===FB.ConnectState.connected)?connectedArg:notConnectedArg);}),0);}
return false;}));}
FB.Connect._handleLogout=function FB_Connect$_handleLogout(appCallback,confirmationCallback){var singleton=FB.Connect._singleton;FB.Connect.get_status().waitUntilReady(Delegate.create(null,function(result){var session=FB.Facebook.apiClient.get_session();if(session){if(FB.Connect._logoutMethod===FB.Connect._logoutMethod_infoDialog){FB.Connect._createInfoDialog(confirmationCallback);}
else if(FB.Connect._logoutMethod===FB.Connect._logoutMethod_noUI){confirmationCallback.invoke(true);}
else{FB.UI.PopupDialog._createConfirmationDialog('Logging Out of Facebook?',FB.UI.DomResources.getResourceById('fb_logout_confirmation'),confirmationCallback).show();}}
else{FB.FBDebug.logLine(2,'Cannot logout because user does not have a session');if(appCallback){appCallback.invoke(false);}}}));}
FB.Connect._createInfoDialog=function FB_Connect$_createInfoDialog(confirmationCallback){var dialog=null;dialog=FB.UI.PopupDialog._createConfirmationDialog('Logged Out of Facebook',FB.UI.DomResources.getResourceById('fb_logout_info'),Delegate.create(null,function(result){dialog=null;}));dialog.show();dialog.add_closing(Delegate.create(null,function(result){if(confirmationCallback){confirmationCallback.invoke(true);}}));window.setTimeout(Delegate.create(null,function(){if(dialog){dialog.close(false);}}),2000);}
FB.Connect.inviteConnectUsers=function FB_Connect$inviteConnectUsers(){FB.Facebook.get_sessionWaitable().waitUntilReady(Delegate.create(null,function(result){var dialog=new FB.UI.FBMLPopupDialog('Invite Your Friends to Connect','');var closeUrl=dialog._createCrossDomainClosingLink(false);dialog.setFBMLContent('<fb:connect-form action=\"'+closeUrl+'\" view=\"dialog\" />');dialog.setContentWidth(474);dialog.setContentHeight(350);dialog.show();}));}
FB.Connect.showPermissionDialog=function FB_Connect$showPermissionDialog(permission,callback){FB.Facebook.get_sessionState().waitUntilReady(Delegate.create(null,function(result){FB.IFrameUtil.CanvasUtilServer.run(true);var singleton=FB.Connect._singleton;var iframeDom=FB.XdComm.Server.singleton.createNamedHiddenIFrame('dialogContent','','fb_permission_iframe',null);iframeDom.style.height='173px';singleton._permissionDialog=new FB.UI.PopupDialog('Allow Extended Access?',iframeDom,true,false);if(callback){singleton._permissionDialog.add_closed(callback);}
var allowUrl=singleton._permissionDialog._createCrossDomainClosingLink(true);allowUrl=encodeURIComponent(allowUrl);var denyUrl=singleton._permissionDialog._createCrossDomainClosingLink(false);denyUrl=encodeURIComponent(denyUrl);var channelUrl=encodeURIComponent(FB.XdComm.Server.singleton.get_receiverUrl());iframeDom.src=FBIntern.Utility.getFacebookUrl('www')+'connect/prompt_permission.php'+'?api_key='+FB.Facebook.apiKey+'&v='+FB.Facebook.version+'&next='+allowUrl+'&cancel='+denyUrl+'&channel_url='+channelUrl+'&ext_perm='+permission;singleton._permissionDialog.show();}));}
FB.Connect.pollLoginStatus=function FB_Connect$pollLoginStatus(pollInterval,pollTries,callback){var singleton=FB.Connect._singleton;if(singleton.get__userInfo().connectState===FB.ConnectState.connected){if(callback){callback.invoke();}
return;}
singleton._pollTries=pollTries;singleton._pollInterval=pollInterval;singleton._onConnectedCallback=callback;window.setTimeout(Delegate.create(null,function(){singleton._refreshQueryStatus();}),singleton._pollInterval);}
FB.Connect.showAddSectionButton=function FB_Connect$showAddSectionButton(section,element){var singleton=FB.Connect._singleton;var parameters={api_key:FB.Facebook.apiKey,section:section,channel_url:FB.XdComm.Server.singleton.get_receiverUrl()};var iframeName='fb_section'+section;var handlerName='fbShowAddSection_'+section;var iframe=FB.XdComm.Server.singleton.createNamedHiddenIFrame(iframeName,FB.XdComm.Server.singleton.get_receiverUrl(),'fb_addSection',String.format('style=\"width:130px; height:25px\" frameborder=\"0\" allowTransparency=\"true\"'));element.appendChild(iframe);if(!FB.XdComm.Server.singleton.isDataHandlerRegistered(handlerName)){FB.XdComm.Server.singleton.registerDataHandler(handlerName,Delegate.create(null,function(data,endpoint){FB.Connect._showAddSectionDialog(data);}));}
var frameWindow=(window.self.frames)[iframeName];singleton._facebookIFrame(frameWindow.document,'connect/section_button.php',parameters);}
FB.Connect._showAddSectionDialog=function FB_Connect$_showAddSectionDialog(section){var singleton=FB.Connect._singleton;if(singleton._addSectionDialog){return false;}
FB.IFrameUtil.CanvasUtilServer.run(false);var parameters={section:section,api_key:FB.Facebook.apiKey,channel_url:FB.XdComm.Server.singleton.get_receiverUrl()};singleton._addSectionNum++;var iframeName='fb_sectionIFrame_'+singleton._addSectionNum;var width=0;var height=0;var title='';if(section==='info'){width=718;height=350;title='Add application section to your Info tab?';}
else{width=430;height=321;title='Add application to your profile?';}
var iframe=FB.XdComm.Server.singleton.createNamedHiddenIFrame(iframeName,FB.XdComm.Server.singleton.get_receiverUrl(),'fb_addSection','frameborder=\"0\"');iframe.style.height=String.format('{0}px',height);iframe.style.width=String.format('{0}px',width);var handlerName='fbCloseAddSection_'+section;singleton._addSectionDialog=FB.Connect._showStandardDialog(title,iframe,width,height);singleton._addSectionDialog.add_closing(Delegate.create(null,function(result){singleton._addSectionDialog=null;}));if(!FB.XdComm.Server.singleton.isDataHandlerRegistered(handlerName)){FB.XdComm.Server.singleton.registerDataHandler(handlerName,Delegate.create(null,function(data,end){singleton._addSectionDialog.close(true);}));}
FBIntern.Utility.getIFrameDocument(iframeName,iframe,Delegate.create(null,function(iframeDoc){singleton._facebookIFrame(iframeDoc,'connect/prompt_section.php',parameters);}));return true;}
FB.Connect._sessionlessPublishUserAction=function FB_Connect$_sessionlessPublishUserAction(template_bundle_id,template_data,target_ids,body_general,story_size,callback){var singleton=FB.Connect._singleton;var feedInfo={template_id:template_bundle_id.toString()};if(template_data){feedInfo['template_data']=template_data;}
if(target_ids){feedInfo['target_ids']=target_ids;}
if(body_general){feedInfo['body_general']=body_general;}
var handlerName='sessionlessPublishCompletedHandler';if(!FB.XdComm.Server.singleton.isDataHandlerRegistered(handlerName)){FB.XdComm.Server.singleton.registerDataHandler(handlerName,Delegate.create(null,FB.Connect._onSessionlessPublishCompletedHandler));}
singleton._sessionlessPublishCallback=callback;var parameters={feed_info:FB.JSON.serialize(feedInfo),api_key:FB.Facebook.apiKey};if(callback){parameters['callback']=FB.XdComm.Server.singleton.createUdpUrl(handlerName,null,new FB.XdComm.EndPoint(null,FB.XdComm.PageRelation.self,FB.XdComm.Server.singleton.get_receiverUrl()));}
if(story_size===FB.FeedStorySize.oneLine||story_size===FB.FeedStorySize.shortStory){parameters['size']=(story_size).toString();}
singleton._sessionlessFeedFrameNum++;var iframeName='fb_sessionlessfeedIFrame_'+singleton._sessionlessFeedFrameNum;var iframe=FB.XdComm.Server.singleton.createNamedHiddenIFrame(iframeName,FB.XdComm.Server.singleton.get_receiverUrl(),'','');FBIntern.Utility.getIFrameDocument(iframeName,iframe,Delegate.create(null,function(iframeDoc){singleton._facebookIFrame(iframeDoc,'connect/sessionless_feed.php',parameters);}));}
FB.Connect._onSessionlessPublishCompletedHandler=function FB_Connect$_onSessionlessPublishCompletedHandler(data,endPoint){var singleton=FB.Connect._singleton;if(singleton._sessionlessPublishCallback){singleton._sessionlessPublishCallback.invoke();}}
FB.Connect.showFeedDialog=function FB_Connect$showFeedDialog(template_bundle_id,template_data,target_id,body_general,story_size,require_connect,callback){var singleton=FB.Connect._singleton;if(singleton._feedformDialog){if(callback){callback.invoke();}
return false;}
if(singleton._feedStatusMustBeRefetched){singleton._dialogInfo=FB.$create_FeedDialogInfo(template_bundle_id,template_data,target_id,body_general,story_size,callback);singleton._feedStatusRefetch();FB.Connect.requireSession(null);return true;}
FB.Connect.get_status().waitUntilReady(Delegate.create(null,function(result){var login_state=result;if(require_connect===FB.RequireConnect.promptConnect&&login_state!==FB.ConnectState.connected){singleton._dialogInfo=FB.$create_FeedDialogInfo(template_bundle_id,template_data,target_id,body_general,story_size,callback);FB.Connect.requireSession(null);}
else if(require_connect===FB.RequireConnect.require&&login_state!==FB.ConnectState.connected){if(callback){callback.invoke();}}
else if(login_state!==FB.ConnectState.userNotLoggedIn){var story_setting;var targetFeed=false;if(target_id&&target_id.length>0){targetFeed=true;if(singleton.get__userInfo().oneLineStorySetting===FB.FeedStorySetting.doNotSend){story_setting=FB.FeedStorySetting.doNotSend;}
else{story_setting=FB.FeedStorySetting.preview;}}
else if(story_size===FB.FeedStorySize.oneLine){story_setting=singleton.get__userInfo().oneLineStorySetting;}
else if(story_size===FB.FeedStorySize.full){story_setting=singleton.get__userInfo().fullStorySetting;}
else{story_setting=singleton.get__userInfo().shortStorySetting;}
if(story_setting===FB.FeedStorySetting.doNotSend){if(callback){callback.invoke();}}
else if(story_setting===FB.FeedStorySetting.autoaccept){FB.Connect._sessionlessPublishUserAction(template_bundle_id,template_data,target_id,body_general,story_size,callback);}
else{FB.IFrameUtil.CanvasUtilServer.run(false);var feedInfo={template_id:template_bundle_id.toString()};if(template_data){feedInfo['template_data']=template_data;}
if(body_general){feedInfo['body_general']=body_general;}
singleton._feedformNum++;var iframeName='fb_feedIFrame_'+singleton._feedformNum;var switchUserHandlerName='switchUser';if(!FB.XdComm.Server.singleton.isDataHandlerRegistered(switchUserHandlerName)){FB.XdComm.Server.singleton.registerDataHandler(switchUserHandlerName,Delegate.create(null,function(data,endpoint){singleton.switchUser();}));}
var switchUserUrl=FB.XdComm.Server.singleton.createUdpUrl(switchUserHandlerName,null,new FB.XdComm.EndPoint(null,FB.XdComm.PageRelation.self,FB.XdComm.Server.singleton.get_receiverUrl()));var iframe=FB.XdComm.Server.singleton.createNamedHiddenIFrame(iframeName,FB.XdComm.Server.singleton.get_receiverUrl(),'fb_feedIFrame','frameborder=\"0\"');var dialogTitle;if(targetFeed){dialogTitle='Publish this story to your friend\'s Facebook profile?';}
else{dialogTitle='Publish this story to your Facebook profile?';}
singleton._feedformDialog=new FB.UI.PopupDialog(dialogTitle,iframe,true,true);singleton._feedformDialog.set_placement(FB.UI.PopupPlacement.topCenter);singleton._feedformDialog.add_closing(Delegate.create(null,function(closingResult){singleton._feedformDialog=null;if(callback){callback.invoke();}}));singleton._feedformDialog.setContentWidth(600);singleton._feedformDialog.show();var parameters={preview:'true',feed_info:FB.JSON.serialize(feedInfo),feed_target_type:(targetFeed)?'target_feed':'self_feed',api_key:FB.Facebook.apiKey,callback:singleton._feedformDialog._createCrossDomainClosingLink(false),switch_user_url:switchUserUrl,channel_url:FB.XdComm.Server.singleton.get_receiverUrl()};if(login_state===FB.ConnectState.connected){parameters['session_key']=FB.Facebook.apiClient.get_session().session_key;}
if(target_id){parameters['to_ids']=FB.JSON.serialize(target_id);}
if(story_size>0){parameters['size']=(story_size).toString();}
FBIntern.Utility.getIFrameDocument(iframeName,iframe,Delegate.create(null,function(iframeDoc){singleton._facebookIFrame(iframeDoc,'connect/prompt_feed.php',parameters);}));}}
else{if(callback){callback.invoke();}}}));return true;}
FB.Connect.showShareDialog=function FB_Connect$showShareDialog(url,callback){var singleton=FB.Connect._singleton;if(singleton._shareDialog){callback.invoke();}
FB.Connect.get_status().waitUntilReady(Delegate.create(null,function(result){var login_state=result;if(login_state===FB.ConnectState.userNotLoggedIn){window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(url),'sharer','toolbar=0,status=0,width=626,height=436');;}
else{var iframeName='fb_share_iframe';var iframe=FB.XdComm.Server.singleton.createNamedHiddenIFrame(iframeName,FB.XdComm.Server.singleton.get_receiverUrl(),'fb_shareIFrame','frameborder=\"0\"');singleton._shareDialog=new FB.UI.PopupDialog('Share this story?',iframe,true,true);singleton._shareDialog.set_placement(FB.UI.PopupPlacement.topCenter);singleton._shareDialog.add_closing(Delegate.create(null,function(closingResult){singleton._shareDialog=null;if(callback){callback.invoke();}}));var closeUrl=singleton._shareDialog._createCrossDomainClosingLink(false);singleton._shareDialog.setContentWidth(630);singleton._shareDialog.setContentHeight(400);singleton._shareDialog.show();FBIntern.Utility.getIFrameDocument(iframeName,iframe,Delegate.create(null,function(iframeDoc){singleton._facebookIFrame(iframeDoc,'sharer.php?u='+encodeURIComponent(url)+'&connect',{channel_url:FB.XdComm.Server.singleton.get_receiverUrl(),close_url:closeUrl});}));}}));}
FB.Connect.get_loggedInUser=function FB_Connect$get_loggedInUser(){var session=FB.Facebook.apiClient.get_session();return(session)?session.uid:null;}
FB.Connect._showStandardDialog=function FB_Connect$_showStandardDialog(title,iframe,width,height){var dialog=new FB.UI.PopupDialog(title,iframe,true,true);dialog.setContentWidth(width);dialog.setContentHeight(height);dialog.set_placement(FB.UI.PopupPlacement.topCenter);dialog.show();return dialog;}
FB.Connect.get__useBrowserPopupForLogin=function FB_Connect$get__useBrowserPopupForLogin(){return(FB.Connect._loginMethod!=='iframe');}
FB.Connect.prototype={get__userInfo:function(){return this._userInfo;},set__userInfo:function(value){if(value!==this._userInfo){this._userInfo=value;this._setInfoCookies(value);}
return value;},_ensureLoginHandler:function(){if(!FB.XdComm.Server.singleton.isDataHandlerRegistered('fbLogin')){FB.XdComm.Server.singleton.registerDataHandler('fbLogin',Delegate.create(this,this._onLoginHandler));}
if(!FB.XdComm.Server.singleton.isDataHandlerRegistered('fbCancelLogin')){FB.XdComm.Server.singleton.registerDataHandler('fbCancelLogin',Delegate.create(this,this._onCancelLoginHandler));}},_getInfoFromCookies:function(){var infoRecord=FB.JSON.deserialize(FBIntern.Cookie.getValue('fbsetting_'+FB.Facebook.apiKey));if(infoRecord&&(infoRecord.connectState===FB.ConnectState.userNotLoggedIn||infoRecord.connectState===FB.ConnectState.appNotAuthorized||infoRecord.connectState===FB.ConnectState.connected)&&infoRecord.oneLineStorySetting>0&&infoRecord.shortStorySetting>0){return infoRecord;}
return null;},_setInfoCookies:function(info_record){if(info_record&&info_record.oneLineStorySetting>0&&info_record.shortStorySetting>0){FBIntern.Cookie.set('fbsetting_'+FB.Facebook.apiKey,FB.JSON.serialize(info_record),'/',FB.Facebook.get_baseDomain(),1);}
else if(!info_record){FBIntern.Cookie.clear('fbsetting_'+FB.Facebook.apiKey,'/',FB.Facebook.get_baseDomain());}},_ensureQueryStatus:function(){if(!this._loginStatusIFrameCreated){if(FB.Facebook.appSettings&&!FB.Facebook.appSettings['doNotUseCachedConnectState']){var info=this._getInfoFromCookies();if(info&&(info.connectState===FB.ConnectState.userNotLoggedIn||info.connectState===FB.ConnectState.appNotAuthorized||info.connectState===FB.ConnectState.connected)){this.set__userInfo(info);this._status.setResult(info.connectState);}}
this._refreshQueryStatus();}},_refreshQueryStatus:function(){if(!this._loginStatusIFrameCreated||this._pollTries>0){this._loginStatusIFrameCreated=true;if(this._pollTries>0){this._pollTries--;}
this._setInfoCookies(null);if(!this._rpcServer){this._rpcServer=new FB.XdComm.XdRpcServer('loginServer',{InitLogin:FB.XdComm.$create_XdRpcMethodInfo(Delegate.create(this,this._initLogin),null)});}
this._ensureLoginHandler();FB.FBDebug.assert(FB.Facebook.apiKey,'API key can\'t be null');var srcUrl=FBIntern.Utility.getFacebookUrl('www')+'extern/login_status.php?api_key='+FB.Facebook.apiKey+'&extern='+!FB.Facebook.get_isInCanvas()+'&channel='+encodeURIComponent(FB.XdComm.Server.singleton.get_receiverUrl());FB.XdComm.Server.singleton.createNamedHiddenIFrame('loginStatus',srcUrl,null,null);}},_onCancelLoginHandler:function(data,endPoint){this._closeLoginDialog();},_onLoginHandler:function(data,endPoint){this._closeLoginDialog();var hash=data;if(hash==='loggedout'){FB.FBDebug.logLine(2,'User logged out');if(this._logoutIframe){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.invoke(true);}}
else{var segments=(data).split('&');var session=FB.JSON.deserialize(segments[0]);if(this._dialogInfo){this._feedStatusRefetch();}
else{this._feedStatusMustBeRefetched=true;FB.Facebook.apiClient.set_session(session);}}},_feedStatusRefetch:function(){this._status.setResult(FB.ConnectState.connected,true);this._checkForPendingFeedDialog();this._loginStatusIFrameCreated=false;this._refreshQueryStatus();this._feedStatusMustBeRefetched=false;},_closeLoginDialog:function(){if(this._tosDialog){this._tosDialog.close(true);this._tosDialog=null;}
if(this._loginWindow){this._loginWindow.close();this._loginWindow=null;}},_closeAllDialogs:function(callback){this._closeLoginDialog();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(callback){callback.invoke();}},switchUser:function(){this._closeAllDialogs(Delegate.create(this,function(){FB.Connect.requireSession(null);}));},_initLogin:function(arg,sender){var parameters=arg;var session=parameters['session'];var settings=parameters['settings'];var connectState=parameters['connectState'];var feedStorySettings=settings['feedStorySettings'];FB.Facebook.set_baseDomain(parameters['baseDomain']);var oneLineSetting;var shortStorySetting;var fullStorySetting;if(feedStorySettings){oneLineSetting=feedStorySettings['one_line'];shortStorySetting=feedStorySettings['short'];fullStorySetting=feedStorySettings['full'];}
else{oneLineSetting=FB.FeedStorySetting.doNotSend;shortStorySetting=FB.FeedStorySetting.doNotSend;fullStorySetting=FB.FeedStorySetting.doNotSend;}
if(settings['loginMethod']){FB.Connect._loginMethod=settings['loginMethod'];}
if(settings['logoutMethod']){FB.Connect._logoutMethod=settings['logoutMethod'];}
this.set__userInfo(FB.$create_UserInfoRecord(connectState,oneLineSetting,shortStorySetting,fullStorySetting));switch(connectState){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 apiClient=FB.Facebook.apiClient;if(!apiClient.get_session()||FBIntern.Utility.isConnectSession(apiClient.get_session().session_key)||!FB.Facebook.get_isInCanvas()){apiClient.set_session(session);}
this._status.setResult(FB.ConnectState.connected);break;}
if(connectState===FB.ConnectState.connected){if(this._onConnectedCallback){this._onConnectedCallback.invoke();}
this._pollTries=0;this._onConnectedCallback=null;}
else{if(this._pollTries>0){window.setTimeout(Delegate.create(this,function(){this._refreshQueryStatus();}),this._pollInterval);}
else{this._onConnectedCallback=null;}}
return null;},_showLoginDialog:function(isTosOnly,isInUserActionCallstack){var relativeUrl=(isTosOnly)?'tos.php':'login.php';var usePopupWindow=FB.Connect.get__useBrowserPopupForLogin()&&!isTosOnly;var useRedirect=false;if(usePopupWindow&&!isInUserActionCallstack){usePopupWindow=false;}
var singleton=FB.Connect._singleton;FB.Facebook.apiClient.get_sessionWaitable().waitUntilReady(Delegate.create(this,this._apiClient_SessionReady));var url=this._createLoginUrl(relativeUrl,usePopupWindow);if(!usePopupWindow&&!useRedirect&&!this._tosDialog){this._showIframeLoginDialog(url,isTosOnly);}
else if(usePopupWindow){this._showBrowserPopupLogin(url);if(!this._loginWindow){useRedirect=true;}}
if(useRedirect){FB.FBDebug.logLine(1,'Can\'t create login window because the call is not inside an user action event handler, will redirect instead');FB.Facebook.apiClient.requireLogin(null);}},_showIframeLoginDialog:function(url,isTosOnly){FB.IFrameUtil.CanvasUtilServer.run(false);var popupTitle='Connect with Facebook';this._tosDialog=new FB.UI.PopupDialog(popupTitle,null,true,false);var iframeDom=FB.XdComm.Server.singleton.createNamedHiddenIFrame('dialogContent',url,'fb_tosIFrame',null);if(!isTosOnly){iframeDom.style.height='340px';}
else{iframeDom.style.height='288px';}
this._tosDialog.set__content(iframeDom);this._tosDialog.add_closing(Delegate.create(this,function(closingResult){this._tosDialog=null;}));this._tosDialog.show();},_showBrowserPopupLogin:function(url){var windowLocation=FBIntern.Utility.get_windowLocation();var windowSize=FBIntern.Utility.get_windowSize();var popupSize=FB.$create_Size(448,426);var popupScreen=FB.$create_Point(Math.max(0,windowLocation.x+(windowSize.w-popupSize.w)/2),Math.max(0,windowLocation.y+(windowSize.h-popupSize.h)/2));if(this._loginWindow&&!this._loginWindow.closed){this._loginWindow.close();}
this._loginWindow=window.open(url,'_blank',String.format('location=yes,left={0},top={1},width={2},height={3},resizable=yes',popupScreen.x,popupScreen.y,popupSize.w,popupSize.h),true);},_createLoginUrl:function(relativeUrl,isPopupWindow){var nextUrl=FBIntern.Uri.addQueryParameters(FB.XdComm.Server.singleton.get_receiverUrl(),'fb_login&fname='+((isPopupWindow)?'_opener':'_parent'));var url=FBIntern.Utility.getFacebookUrl('www')+relativeUrl;var cancelUrl=FB.XdComm.Server.singleton.createUdpUrl('fbCancelLogin',null,new FB.XdComm.EndPoint(null,(isPopupWindow)?FB.XdComm.PageRelation.opener:FB.XdComm.PageRelation.self,FB.XdComm.Server.singleton.get_receiverUrl()));url+='?return_session=1&fbconnect=1'+'&connect_display='+((isPopupWindow)?'popup':'dialog')+'&api_key='+FB.Facebook.apiKey+'&v='+FB.Facebook.version+'&next='+encodeURIComponent(nextUrl)+'&cancel_url='+encodeURIComponent(cancelUrl)+'&channel_url='+encodeURIComponent(FB.XdComm.Server.singleton.get_receiverUrl());return url;},_checkForPendingFeedDialog:function(){var singleton=FB.Connect._singleton;if(singleton._dialogInfo){FB.Connect.get_status().waitUntilReady(Delegate.create(this,function(result){window.setTimeout(Delegate.create(this,function(){FB.Connect.showFeedDialog(singleton._dialogInfo.template_bundle_id,singleton._dialogInfo.template_data,singleton._dialogInfo.target_id,singleton._dialogInfo.body_general,singleton._dialogInfo.story_size,FB.RequireConnect.require,singleton._dialogInfo.callback);singleton._dialogInfo=null;}),0);}));}},_apiClient_SessionReady:function(result){this._closeLoginDialog();this._status.setResult(FB.ConnectState.connected);},_facebookIFrame:function(iframeDoc,relUrl,postParams){iframeDoc.open();var builder=new StringBuilder();builder.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>');builder.append(String.format('<form method=\"post\" action=\"{0}\" id=\"tempform\" name=\"tempform\" >',FBIntern.Utility.getFacebookUrl('www')+relUrl));var $dict1=postParams;for(var $key2 in $dict1){var entry={key:$key2,value:$dict1[$key2]};builder.append(String.format('<input type=\"hidden\" name=\"{0}\" id=\"{1}\" value=\"{2}\"  />',entry.key,entry.key,(entry.value).htmlEncode()));}
builder.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 html=builder.toString();iframeDoc.write(html);iframeDoc.close();},_loginStatusIFrameCreated:false,_pollInterval:0,_pollTries:0,_onConnectedCallback:null,_feedStatusMustBeRefetched:false,_rpcServer:null,_tosDialog:null,_loginWindow: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}
Type.createNamespace('FB.UI');FB.UI.PopupPlacement=function(){};FB.UI.PopupPlacement.prototype={center:1,topCenter:2,hidden:3}
FB.UI.PopupPlacement.createEnum('FB.UI.PopupPlacement',false);FB.UI.PopupDialog=function FB_UI_PopupDialog(title,content,showLoading,hideUntilLoaded){FB.UI.PopupDialog.constructBase(this);this._content$2=content;this._showLoading$2=showLoading;if(hideUntilLoaded){this.hidden=true;}
this.set_domElement(FB.UI.DomResources.getResourceById('fb_pop_dialog_table'));this._contentParent$2=FBIntern.UIHelper.findElementById(this.get_domElement(),'fb_dialog_content');this._header$2=FBIntern.UIHelper.findElementById(this.get_domElement(),'fb_dialog_header');this._header$2.innerHTML=title.htmlEncode();var closeButton=FBIntern.UIHelper.findElementById(this.get_domElement(),'fb_dialog_cancel_button');this._loader$2=FBIntern.UIHelper.findElementById(this.get_domElement(),'fb_dialog_loading_spinner');if(closeButton){closeButton.attachEvent('onclick',Delegate.create(this,this._onCloseButtonClicked$2));}
if(content){this._contentParent$2.appendChild(content);}}
FB.UI.PopupDialog._createConfirmationDialog=function FB_UI_PopupDialog$_createConfirmationDialog(title,content,callback){var confirmDialog=new FB.UI.PopupDialog(title,content,false,false);confirmDialog.add_closing(callback);var confirmButton=FBIntern.UIHelper.findElementById(content,'fb_confirm');var cancelButton=FBIntern.UIHelper.findElementById(content,'fb_cancel');if(confirmButton){confirmButton.attachEvent('onclick',Delegate.create(null,function(){confirmDialog.close(true);}));}
if(cancelButton){cancelButton.attachEvent('onclick',Delegate.create(null,function(){confirmDialog.close(false);}));}
return confirmDialog;}
FB.UI.PopupDialog._onXdClosingDialogHandler$2=function FB_UI_PopupDialog$_onXdClosingDialogHandler$2(data,sender){var dictionary=data;var token=dictionary['token'];var result=dictionary['result'];var dialog=FB.UI.PopupDialog._xdClosingDialogDict$2[token];if(dialog){FB.FBDebug.logLine(3,'Close dialog');dialog.close(result);}
else{FB.FBDebug.logLine(1,'Invalid token to close dialog: '+token);}}
FB.UI.PopupDialog.prototype={_onCloseButtonClicked$2:function(){this.close(false);},get__content:function(){return this._content$2;},set__content:function(value){if(this._content$2){this._contentParent$2.removeChild(this._content$2);}
this._content$2=value;this._contentParent$2.appendChild(this._content$2);return value;},_createCrossDomainClosingLink:function(result){if(!FB.UI.PopupDialog._xdClosingDialogDict$2){FB.UI.PopupDialog._xdClosingDialogDict$2={};FB.XdComm.Server.singleton.registerDataHandler('fbClosingDialog',Delegate.create(null,FB.UI.PopupDialog._onXdClosingDialogHandler$2));}
var token=Object.getKeyCount(FB.UI.PopupDialog._xdClosingDialogDict$2).toString()+'_'+Math.random().toString();FB.UI.PopupDialog._xdClosingDialogDict$2[token]=this;var data={token:token,result:result};var endpoint=new FB.XdComm.EndPoint(null,FB.XdComm.PageRelation.self,FB.XdComm.Server.singleton.get_receiverUrl());return FB.XdComm.Server.singleton.createUdpUrl('fbClosingDialog',data,endpoint);},onAfterShow:function(){if(this._showLoading$2){FB.UI.UIElement.addCssClass(this._loader$2,'fb_dialog_loading');FBIntern.Utility.waitForLoaded(this._content$2,Delegate.create(this,function(){FB.UI.UIElement.removeCssClass(this._loader$2,'fb_dialog_loading');if(this.hidden){this.hidden=false;this.sizing();}}));}},_content$2:null,_contentParent$2:null,_header$2:null,_loader$2:null,_showLoading$2:false}
FB.UI.FBMLPopupDialog=function FB_UI_FBMLPopupDialog(title,fbml){FB.UI.FBMLPopupDialog.constructBase(this,[title,null,false,false]);var serverFbmlDom=document.createElement('div');this.set__content(serverFbmlDom);this.setFBMLContent(fbml);}
FB.UI.FBMLPopupDialog.prototype={setFBMLContent:function(fbml){this.get__content().setAttribute('fbml','<fb:fbml>'+fbml+'</fb:fbml>');},setContentWidth:function(width){FB.UI.FBMLPopupDialog.callBase(this,'setContentWidth',[width]);this.get__content().setAttribute('iframeWidth',width.toString()+'px');},setContentHeight:function(height){this.get__content().setAttribute('iframeHeight',height.toString()+'px');this.get_offset().y=-height/2;},onAfterShow:function(){FB.UI.FBMLPopupDialog.callBase(this,'onAfterShow');var content=this.get__content();FB_RequireFeatures(['XFBML'],function(){serverFbml=new FB.XFBML.ServerFbml(content);FB.XFBML.Host.addElement(serverFbml);});;}}
FB.UI.Popup=function FB_UI_Popup(){this._placement$1=FB.UI.PopupPlacement.center;this._offset$1=FB.$create_Point(0,0);this._popupHeight$1=-1;this._popupWidth$1=-1;FB.UI.Popup.constructBase(this);}
FB.UI.Popup.get__popupContainer$1=function FB_UI_Popup$get__popupContainer$1(){if(!FB.UI.Popup._popupContainer$1){FB.UI.Popup._popupContainer$1=$SS('fb_popupContainer');if(!FB.UI.Popup._popupContainer$1){var div=document.createElement('div');div.className='fb_resetstyles fb_popupContainer';FB.UI.Popup._popupContainer$1=document.body.appendChild(div);}}
else{FB.UI.Popup._popupContainer$1=document.body.appendChild(FB.UI.Popup._popupContainer$1);}
return FB.UI.Popup._popupContainer$1;}
FB.UI.Popup.prototype={setContentWidth:function(width){this._popupWidth$1=width+FB.UI.Popup._borderSize$1;},setContentHeight:function(height){this._popupHeight$1=height+FB.UI.Popup._borderSize$1;},show:function(){if(!this._loadedInDom$1){FB.UI.UIElement.addCssClass(this.get_domElement(),'fb_popup');FB.UI.Popup.get__popupContainer$1().appendChild(this.get_domElement());this._loadedInDom$1=true;}
this.sizing();this.onAfterShow();},sizing:function(){if(!this._loadedInDom$1){return false;}
if(this._popupWidth$1>=0){this.get_domElement().style.width=this._popupWidth$1.toString()+'px';}
if(this._popupHeight$1>=0){this.get_domElement().style.height=this._popupHeight$1.toString()+'px';}
var popupSize=FB.$create_Size(this.get_domElement().offsetWidth,this.get_domElement().offsetHeight);var location=null;var windowSize=FBIntern.Utility.get_windowSize();var target=document.documentElement;var dialog_placement=(this.hidden)?FB.UI.PopupPlacement.hidden:this.get_placement();var topHeight;if(document.documentElement&&document.documentElement.scrollTop>0){topHeight=document.documentElement.scrollTop;}
else{topHeight=document.body.scrollTop;}
switch(dialog_placement){case FB.UI.PopupPlacement.topCenter:location=FB.$create_Point(target.scrollLeft+windowSize.w/2,topHeight+125);location.x-=(popupSize.w/2);break;case FB.UI.PopupPlacement.center:location=FB.$create_Point(target.scrollLeft+windowSize.w/2,topHeight+windowSize.h/2);location.x-=(popupSize.w/2);location.y-=(popupSize.h/2);break;case FB.UI.PopupPlacement.hidden:location=FB.$create_Point(-100-popupSize.w,-100-popupSize.h);break;}
location.x+=this._offset$1.x;location.y+=this._offset$1.y;if(location.x<0&&dialog_placement!==FB.UI.PopupPlacement.hidden){location.x=0;}
if(location.y<0&&dialog_placement!==FB.UI.PopupPlacement.hidden){location.y=0;}
this.setLeft(location.x);this.setTop(location.y);return true;},onAfterShow:function(){},close:function(result){if(this.__closing$1){this.__closing$1.invoke(result);}
if(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()!==FBIntern.HostName.IE){FB.UI.Popup.get__popupContainer$1().removeChild(this.get_domElement());}
else{var domElement=this.get_domElement();domElement.style.display='none';window.setTimeout(Delegate.create(this,function(){if(domElement.parentNode){domElement.parentNode.removeChild(domElement);}}),4000);}
if(this.__closed$1){this.__closed$1.invoke(result);}},get_placementTarget:function(){return this._placementTarget$1;},set_placementTarget:function(value){this._placementTarget$1=value;return value;},get_offset:function(){return this._offset$1;},set_offset:function(value){this._offset$1=value;return value;},get_placement:function(){return this._placement$1;},set_placement:function(value){this._placement$1=value;return value;},add_closing:function(value){this.__closing$1=Delegate.combine(this.__closing$1,value);},remove_closing:function(value){this.__closing$1=Delegate.remove(this.__closing$1,value);},__closing$1:null,add_closed:function(value){this.__closed$1=Delegate.combine(this.__closed$1,value);},remove_closed:function(value){this.__closed$1=Delegate.remove(this.__closed$1,value);},__closed$1:null,_placementTarget$1:null,_loadedInDom$1:false,hidden:false}
FB.UI.UIElement=function FB_UI_UIElement(){}
FB.UI.UIElement.addCssClass=function FB_UI_UIElement$addCssClass(domElement,newClass){var cssClassWithSpace=' '+domElement.className+' ';var newClassWithSpace=' '+newClass+' ';if(cssClassWithSpace.indexOf(newClassWithSpace)<0){domElement.className=domElement.className+' '+newClass;}}
FB.UI.UIElement.containsCssClass=function FB_UI_UIElement$containsCssClass(domElement,className){var cssClassWithSpace=' '+domElement.className+' ';return cssClassWithSpace.indexOf(' '+className+' ')>=0;}
FB.UI.UIElement.removeCssClass=function FB_UI_UIElement$removeCssClass(domElement,className){var cssClassWithSpace=' '+domElement.className+' ';var classNameWithSpace=' '+className+' ';var index=cssClassWithSpace.indexOf(classNameWithSpace);if(index>=0){var newClassName=cssClassWithSpace.substring(1,index)+cssClassWithSpace.substring(index+classNameWithSpace.length,cssClassWithSpace.length-1);domElement.className=newClassName;}}
FB.UI.UIElement.prototype={get_domElement:function(){return this._domElement;},set_domElement:function(value){this._domElement=value;return value;},setLeft:function(left){this._domElement.style.left=left.toString()+'px';},setTop:function(top){this._domElement.style.top=top.toString()+'px';},_domElement:null}
FBIntern.LoginStatus.createClass('FBIntern.LoginStatus');FBIntern.UIHelper.createClass('FBIntern.UIHelper');FB.Connect.createClass('FB.Connect');FB.UI.UIElement.createClass('FB.UI.UIElement');FB.UI.Popup.createClass('FB.UI.Popup',FB.UI.UIElement);FB.UI.PopupDialog.createClass('FB.UI.PopupDialog',FB.UI.Popup);FB.UI.FBMLPopupDialog.createClass('FB.UI.FBMLPopupDialog',FB.UI.PopupDialog);FB.Connect._singleton=new FB.Connect();FB.Connect._loginMethod='popup';FB.Connect._logoutMethod_infoDialog='info_dialog';FB.Connect._logoutMethod_prompt='prompt';FB.Connect._logoutMethod_noUI='no_ui';FB.Connect._logoutMethod=FB.Connect._logoutMethod_infoDialog;FB.UI.DomResources.addResourceDict(new FB.UI.DomResDict('\n<table id=\"RES_ID_fb_pop_dialog_table\" class=\"fb_pop_dialog_table\">\n <tr><td class=\"fb_pop_topleft\"></td><td class=\"fb_pop_border\"></td><td class=\"fb_pop_topright\"></td></tr>\n <tr><td class=\"fb_pop_border\"></td><td class=\"fb_pop_content\" id=\"pop_content\">\n<div class =\"fb_pop_content_container\">\n<h2 ><div class=\"fb_dialog_icon\"></div><span class=\"fb_dialog_header\" id=\"fb_dialog_header\"></span><div class=\"fb_dialog_loading_spinner\" id=\"fb_dialog_loading_spinner\">&nbsp;</div><a id=\"fb_dialog_cancel_button\" class=\"fb_dialog_cancel_button\" title=\"close dialog\" href=\"#\" onclick=\"return false;\">&nbsp;</a></h2>\n<div id=\"fb_dialog_content\" class=\"fb_dialog_content\"></div>\n</div>\n</td><td class=\"fb_pop_border\"></td></tr>\n <tr><td class=\"fb_pop_bottomleft\"></td><td class=\"fb_pop_border\"></td><td class=\"fb_pop_bottomright\"></td></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\">\n    <p>Do you want to log out of both this site and Facebook?</p>\n  </div>\n  <div class=\"fb_dialog_buttons\">\n      <input id=\"fb_confirm\" type=\"button\" class=\"fb_inputsubmit\" value=\"Logout\"/>\n      <input id=\"fb_cancel\" type=\"button\" class=\"fb_inputbutton fb_inputaux\" value=\"Cancel\"/>\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\">\n    <p>You are logging out of both this site and Facebook.</p>\n  </div>\n  <div class=\"fb_dialog_buttons\">\n      <input id=\"fb_confirm\" type=\"button\" class=\"fb_inputsubmit\" value=\"Close\"/>\n  </div>\n</div>\n'));FB.UI.PopupDialog._xdClosingDialogDict$2=null;FB.UI.Popup._borderSize$1=22;FB.UI.Popup._popupContainer$1=null;FB.FeatureLoader.singleton.onScriptLoaded(['Connect']);

Type.createNamespace('FBIntern');FBIntern.DataHelper=function FBIntern_DataHelper(){}
FBIntern.DataHelper.getPrimaryNetwork=function FBIntern_DataHelper$getPrimaryNetwork(userInfo){if(userInfo.affiliations&&userInfo.affiliations.length>0){return userInfo.affiliations[0].name;}
else{return null;}}
Type.createNamespace('FB.XFBML.Data');FB.XFBML.Data.$create__cachedItem=function FB_XFBML_Data__cachedItem(data,createTime){var $o={};$o.data=data;$o.createTime=createTime;return $o;}
FB.XFBML.Data.$create__fqlCache=function FB_XFBML_Data__fqlCache(fields){var $o={};$o.fields=fields;$o.rows={};return $o;}
FB.XFBML.Data.CacheManager=function FB_XFBML_Data_CacheManager(){}
FB.XFBML.Data.CacheManager.clearAll=function FB_XFBML_Data_CacheManager$clearAll(){if(FBIntern.Flash.get_xdComm()){FBIntern.Flash.get_xdComm().waitUntilReady(Delegate.create(null,function(result){(result).clearAllCache();}));}}
FB.XFBML.Data.CacheManager._changeContext=function FB_XFBML_Data_CacheManager$_changeContext(uid){if(FBIntern.Flash.hasRequireVersion()){FBIntern.Flash.get_xdComm().waitUntilReady(Delegate.create(null,function(result){FB.FBDebug.logLine(3,'CacheManager.ChangeContext to '+uid);(result).setCacheContext(uid);FB.XFBML.Data.CacheManager._initialized.setResult(true);}));}
else{FB.XFBML.Data.CacheManager._initialized.setResult(true);}}
FB.XFBML.Data.CacheManager._getValue=function FB_XFBML_Data_CacheManager$_getValue(key){try{var flash=FBIntern.Flash.get_xdComm();if(flash&&flash.get_isReady()){var s=(flash.result).getCache(key);if(s){s=FBIntern.Flash.decode(s);if(FB.FBDebug.logLevel>4){FB.FBDebug.writeLine('CacheManager.GetValue returns '+s);}
return FB.JSON.deserialize(s);}}}
catch(e){FB.FBDebug.logLine(1,'CacheManager.GetValue failed on key '+key+' exception='+e.toString());}
return null;}
FB.XFBML.Data.CacheManager._setValue=function FB_XFBML_Data_CacheManager$_setValue(key,value){try{var flash=FBIntern.Flash.get_xdComm();if(flash&&flash.get_isReady()){var s=FB.JSON.serialize(value);if(FB.FBDebug.logLevel>4){FB.FBDebug.writeLine('CacheManager.SetValue key='+key+', value='+s);}
(flash.result).setCache(key,FB.JSON.serialize(value));}}
catch(e){FB.FBDebug.logLine(1,'CacheManager.SetValue failed on key '+key+' exception='+e.toString());}}
FB.XFBML.Data.CacheManager.get__initialized=function FB_XFBML_Data_CacheManager$get__initialized(){return FB.XFBML.Data.CacheManager._initialized;}
FB.XFBML.Data.FqlTable=function FB_XFBML_Data_FqlTable(table,key){this._pendingResults={};this._table=table;this._key=key;this._cache=FB.XFBML.Data.CacheManager._getValue(this.get__cacheKey());if(!this._cache){this._fields=[];this._cache=FB.XFBML.Data.$create__fqlCache(this._fields);}
else{this._fields=this._cache.fields;}}
FB.XFBML.Data.FqlTable.prototype={selectByKey:function(fields,keyValue){FB.FBDebug.assert(keyValue,'value cannot be null');var clearCache=false;var $enum1=fields.getEnumerator();while($enum1.moveNext()){var field=$enum1.get_current();if(!this._fields.contains(field)){this._fields.add(field);clearCache=true;}}
if(clearCache){this._cache=FB.XFBML.Data.$create__fqlCache(this._fields);}
var result=this._pendingResults[keyValue];if(!result){var cachedItem=this._cache.rows[keyValue];if(cachedItem){var age=Date.get_now().getTime()-cachedItem.createTime;if(age<FB.XFBML.Data.CacheManager._maxUsableAge){if(FB.FBDebug.logLevel>5){FB.FBDebug.writeLine('Use cached value for key='+keyValue+' in fql table '+this.get__cacheKey());}
result=new FB.PendingResult();result.setPendingResult(cachedItem.data,null);if(age>FB.XFBML.Data.CacheManager._refreshInternal){this._pendingResults[keyValue]=result;}
else{return result;}}}}
if(!result){result=new FB.PendingResult();this._pendingResults[keyValue]=result;}
var context=FB.XFBML.Context.singleton;if(!this._subscribedToEvent){context.add_beforeSendBatchRequest(Delegate.create(this,this._beforeSendBatchRequest));this._subscribedToEvent=true;}
context.requestBatchProcess();return result;},invokeApi:function(fields,keyValues){if(FB.Connect.get_status().get_isReady()&&FB.Connect.get_status().result!==FB.ConnectState.connected&&this._table!=='user'){var pendingResult=new FB.PendingResult();pendingResult.setPendingResult(null,Error.create('Invalid session state',FB.ApiErrorCode.invalid_session_key));return pendingResult;}
else{var query=String.format('SELECT {0} from {1} WHERE {2} IN ({3})',fields.toString(),this._table,this._key,keyValues.toString());return FB.Facebook.apiClient.fql_query(query,FB.XFBML.Context.singleton.get_batchSequencer());}},_beforeSendBatchRequest:function(){var keyValues=[];var pendingResults=this._pendingResults;if(!Object.getKeyCount(pendingResults)){return;}
var $dict1=pendingResults;for(var $key2 in $dict1){var entry={key:$key2,value:$dict1[$key2]};keyValues.add(entry.key);}
if(!this._fields.contains(this._key)){this._fields.add(this._key);}
var fieldsArray=this._fields;this._fields=[];this._pendingResults={};var combinedResult=this.invokeApi(fieldsArray,keyValues);combinedResult.waitUntilReady(Delegate.create(this,function(r){var now=Date.get_now().getTime();var rows=combinedResult.result;if(rows){var c=rows.length;for(var i=0;i<c;i++){var result=rows[i];var keyValue=result[this._key];if(result&&pendingResults[keyValue]){(pendingResults[keyValue]).setPendingResult(result,combinedResult.exception);}}}
var $dict1=pendingResults;for(var $key2 in $dict1){var entry={key:$key2,value:$dict1[$key2]};var pendingResult=entry.value;if(!pendingResult.get_isReady()){pendingResult.setPendingResult(null,new Error('No data received from server from FQL query.'));if(!combinedResult.exception){this._cache.rows[entry.key]=FB.XFBML.Data.$create__cachedItem(null,now);}}
else{this._cache.rows[entry.key]=FB.XFBML.Data.$create__cachedItem(pendingResult.result,now);}}
FB.XFBML.Data.CacheManager._setValue(this.get__cacheKey(),this._cache);}));},get__cacheKey:function(){return'v0.1_fql_'+this._table+'_'+this._key;},_key:null,_table:null,_fields:null,_cache:null,_subscribedToEvent:false}
Type.createNamespace('FB.XFBML.Common');FB.XFBML.Common.Constants=function FB_XFBML_Common_Constants(){}
Type.createNamespace('FB.XFBML');FB.XFBML.OperatorType=function(){};FB.XFBML.OperatorType.prototype={and:0,or:1,xor:2,not:3,greaterThan:4,lessThan:5,equals:6}
FB.XFBML.OperatorType.createEnum('FB.XFBML.OperatorType',false);FB.XFBML._elementState=function(){};FB.XFBML._elementState.prototype={none:0,onProcessCalled:1,onDataReadyCalled:2,waitForCondition:4,ready:8}
FB.XFBML._elementState.createEnum('FB.XFBML._elementState',false);FB.XFBML.$create_ElementsRegistration=function FB_XFBML_ElementsRegistration(nameSpace,name,implementationType){var $o={};$o.nameSpace=nameSpace;$o.name=name;$o.implementationType=implementationType;return $o;}
FB.XFBML.UnconnectedFriendsCount=function FB_XFBML_UnconnectedFriendsCount(domElement){FB.XFBML.UnconnectedFriendsCount.constructBase(this,[domElement]);}
FB.XFBML.UnconnectedFriendsCount.prototype={onProcess:function(){this.addDataToWait(FB.XFBML.Context.singleton.get_unconnectedFriendsCount());},onDataReady:function(){var result=FB.XFBML.Context.singleton.get_unconnectedFriendsCount();if(!result.exception){var count=FB.XFBML.Context.singleton.get_unconnectedFriendsCount().result;this.domElement.innerHTML=count.toString()+' ';}
else{FB.FBDebug.logLine(1,'Can\'t render UnconnectedFriendsCount because of invalid data');}
this.set_isReady(true);}}
FB.XFBML.Operator=function FB_XFBML_Operator(op,operands){FB.XFBML.Operator.constructBase(this);this._op$2=op;this._operands$2=operands;var $enum1=operands.getEnumerator();while($enum1.moveNext()){var operand=$enum1.get_current();if(FB.Waitable.isAssignableFrom(Type.getInstanceType(operand))){this.addDependent(operand);}}}
FB.XFBML.Operator.and=function FB_XFBML_Operator$and(op1,op2){return new FB.XFBML.Operator(FB.XFBML.OperatorType.and,[op1,op2]);}
FB.XFBML.Operator.or=function FB_XFBML_Operator$or(op1,op2){return new FB.XFBML.Operator(FB.XFBML.OperatorType.or,[op1,op2]);}
FB.XFBML.Operator.xor=function FB_XFBML_Operator$xor(op1,op2){return new FB.XFBML.Operator(FB.XFBML.OperatorType.xor,[op1,op2]);}
FB.XFBML.Operator.not=function FB_XFBML_Operator$not(op){return new FB.XFBML.Operator(FB.XFBML.OperatorType.not,[op]);}
FB.XFBML.Operator.greaterThan=function FB_XFBML_Operator$greaterThan(op1,op2){return new FB.XFBML.Operator(FB.XFBML.OperatorType.greaterThan,[op1,op2]);}
FB.XFBML.Operator.lessThan=function FB_XFBML_Operator$lessThan(op1,op2){return new FB.XFBML.Operator(FB.XFBML.OperatorType.lessThan,[op1,op2]);}
FB.XFBML.Operator.equals=function FB_XFBML_Operator$equals(op1,op2){return new FB.XFBML.Operator(FB.XFBML.OperatorType.equals,[op1,op2]);}
FB.XFBML.Operator.prototype={onChange:function(){this._evaluate$2();FB.XFBML.Operator.callBase(this,'onChange');},_evaluate$2:function(){switch(this._op$2){case FB.XFBML.OperatorType.and:this.result=this._getOperandValue$2(0)&&this._getOperandValue$2(1);break;case FB.XFBML.OperatorType.not:this.result=!this._getOperandValue$2(0);break;case FB.XFBML.OperatorType.or:this.result=this._getOperandValue$2(0)||this._getOperandValue$2(1);break;case FB.XFBML.OperatorType.xor:this.result=this._getOperandValue$2(0)^this._getOperandValue$2(1);break;case FB.XFBML.OperatorType.greaterThan:this.result=this._getOperandValue$2(0)>this._getOperandValue$2(1);break;case FB.XFBML.OperatorType.lessThan:this.result=this._getOperandValue$2(0)<this._getOperandValue$2(1);break;case FB.XFBML.OperatorType.equals:this.result=this._getOperandValue$2(0)===this._getOperandValue$2(1);break;}},_getOperandValue$2:function(i){var obj=this._operands$2[i];if(FB.Waitable.isAssignableFrom(Type.getInstanceType(obj))){return(obj).result;}
else{return obj;}},_op$2:0,_operands$2:null}
FB.XFBML.Conditions=function FB_XFBML_Conditions(){}
FB.XFBML.Conditions.ifCanSee=function FB_XFBML_Conditions$ifCanSee(uid,what){return FB.XFBML.Conditions._table.ifCanSee(uid,what);}
FB.XFBML._permisionTable=function FB_XFBML__permisionTable(){this._calls={};}
FB.XFBML._permisionTable.prototype={ifCanSee:function(uid,what){var key=uid+what;var result;var record=this._calls[key];if(!record){result=new FB.PendingResult();record={uid:uid,what:what,result:result};this._calls[key]=record;var context=FB.XFBML.Context.singleton;if(!this._subscribedToEvent){context.add_beforeSendBatchRequest(Delegate.create(this,this._beforeSendBatchRequest));this._subscribedToEvent=true;}
context.requestBatchProcess();}
else{result=record['result'];}
return result;},_beforeSendBatchRequest:function(){var uids=[];var permissions=[];var pendingResults=[];var $dict1=this._calls;for(var $key2 in $dict1){var entry={key:$key2,value:$dict1[$key2]};var record=entry.value;uids.add(record['uid']);permissions.add(record['what']);pendingResults.add(record['result']);}
this._calls={};var combinedResult=FB.Facebook.apiClient.privacy_canSee(uids,permissions,FB.XFBML.Context.singleton.get_batchSequencer());combinedResult.waitUntilReady(Delegate.create(this,function(r){var c=pendingResults.length;var rows=combinedResult.result;if(rows){FB.FBDebug.assert(c===rows.length,'Returns results does not contains the exepcted number of items');for(var i=0;i<c;i++){(pendingResults[i]).setPendingResult(rows[i],combinedResult.exception);}}
else{for(var i=0;i<c;i++){(pendingResults[i]).setPendingResult(null,combinedResult.exception);}}}));},_subscribedToEvent:false}
FB.XFBML.Context=function FB_XFBML_Context(){this.resources=new FB.XFBML.Resources.ResourceDict();this.fqlTables={};this._timerId=-1;this._connectStatus=FB.ConnectState.userNotLoggedIn;FB.Facebook.get_initialized().waitUntilReady(Delegate.create(this,function(result){if(FB.FeatureLoader.singleton.isFeatureRequestedAndLoaded('XFBML')){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(Delegate.create(this,this._onConnectStatusChanged));if(FB.XFBML.Host.autoParseDomTree){FB.XFBML.Host.parseDomTree();}}
else{FB.FBDebug.logLine(4,'Skip XFBML.Context initialization because XFBML feature is not loaded by request');}}));}
FB.XFBML.Context.prototype={requestBatchProcess:function(){if(this._timerId===-1){this._timerId=window.setTimeout(Delegate.create(this,this._onTimer),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(Delegate.create(this,function(status){if(this.__beforeSendBatchRequest){this.__beforeSendBatchRequest.invoke();}
this._timerId=-1;if(this._batchSequencer){this._batchSequencer.execute(null);this._batchSequencer=null;}}));},getFqlTable:function(tableName,indexKey){var key=tableName+indexKey;var table=this.fqlTables[key];if(!table){table=new FB.XFBML.Data.FqlTable(tableName,indexKey);this.fqlTables[key]=table;}
return table;},get_unconnectedFriendsCount:function(){if(!this._unconnectedFriendsCount){this._unconnectedFriendsCount=new FB.PendingResult();FB.Connect.get_status().waitUntilReady(Delegate.create(this,function(state){var cachedItem=FB.XFBML.Data.CacheManager._getValue('UnconnectedFriendsCount');var fetch=true;if(cachedItem){var age=Date.get_now().getTime()-cachedItem.createTime;if(age<FB.XFBML.Data.CacheManager._maxUsableAge){this._unconnectedFriendsCount.setPendingResult(cachedItem.data,null);if(age<FB.XFBML.Data.CacheManager._refreshInternal){fetch=false;}}}
if(fetch){var r=FB.Facebook.apiClient.connect_getUnconnectedFriendsCount(this.get_batchSequencer());r.waitUntilReady(Delegate.create(this,function(result){this._unconnectedFriendsCount.setPendingResult(r.result,r.exception);FB.XFBML.Data.CacheManager._setValue('UnconnectedFriendsCount',FB.XFBML.Data.$create__cachedItem(r.result,Date.get_now().getTime()));}));}}));}
return this._unconnectedFriendsCount;},_onConnectStatusChanged:function(waitable){var newState=FB.Connect.get_status().result;FB.XFBML.Data.CacheManager._changeContext(FB.Connect.get_loggedInUser());if(this._connectStatusReady&&newState!==this._connectStatus&&newState===FB.ConnectState.connected){this._onConnectStateChangedToConnected();}
this._connectStatusReady=FB.Connect.get_status().get_isReady();this._connectStatus=newState;},_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(value){this.__beforeSendBatchRequest=Delegate.combine(this.__beforeSendBatchRequest,value);},remove_beforeSendBatchRequest:function(value){this.__beforeSendBatchRequest=Delegate.remove(this.__beforeSendBatchRequest,value);},__beforeSendBatchRequest:null,_batchSequencer:null,_unconnectedFriendsCount:null,_connectStatusReady:false}
FB.XFBML.ContainerElement=function FB_XFBML_ContainerElement(domElement){FB.XFBML.ContainerElement.constructBase(this,[domElement]);}
FB.XFBML.ContainerElement.prototype={onDataReady:function(){this.set_isReady(true);}}
FB.XFBML.LoginButton=function FB_XFBML_LoginButton(domElement){this.status=FB.ConnectState.userNotLoggedIn;FB.XFBML.LoginButton.constructBase(this,[domElement]);this.domElement.attachEvent('onclick',Delegate.create(this,this._onClick$1));this.domElement.innerHTML='';this.domElement.appendChild(FB.UI.DomResources.getResourceById('fb_login'));this._updateUI$1(null);FB.Connect.get_status().add_changed(Delegate.create(this,this._updateUI$1));}
FB.XFBML.LoginButton.prototype={clearVisual:function(){},_onClick$1:function(){if(this.logoutOnClick){FB.Connect.logout(null);}
else{var onLoginHandler=this._getAttribute('onlogin','');if(onLoginHandler!==''){FB.Facebook.get_sessionWaitable().waitUntilReady(Delegate.create(this,function(state){if((state).uid!==''){eval(onLoginHandler);}}));}
FB.Connect.requireSession(null);}},_updateUI$1:function(statusWaitable){var oldStatus=this.status;this.status=(FB.Connect.get_status().get_isReady())?FB.Connect.get_status().result:FB.ConnectState.userNotLoggedIn;var cssDict={};cssDict[Enum.toString(FB.ConnectState,FB.ConnectState.appNotAuthorized)]='fb_login_not_authorized';cssDict[Enum.toString(FB.ConnectState,FB.ConnectState.connected)]='fb_login_ready';cssDict[Enum.toString(FB.ConnectState,FB.ConnectState.userNotLoggedIn)]='fb_login_not_logged_in';FB.UI.UIElement.removeCssClass(this.domElement,cssDict[Enum.toString(FB.ConnectState,oldStatus)]);FB.UI.UIElement.addCssClass(this.domElement,cssDict[Enum.toString(FB.ConnectState,this.status)]);var image=FBIntern.UIHelper.findElementById(this.domElement,'fb_login_image');this.logoutOnClick=(this.status===FB.ConnectState.connected&&this._getBoolAttribute('autologoutlink',false));image.src=this.getImageSrc();image.alt=(this.logoutOnClick)?'Logout':'Connect';},getImageSrc:function(){var size=this._getAttributeFromList('size','large',['small','medium','large']);var background=this._getAttributeFromList('background','light',['white','light','dark']);var length=this._getAttributeFromList('length','short',['long','short']);var resourceId;if(this.logoutOnClick){resourceId='logout_img_'+size;}
else{resourceId='login_img_'+background+'_'+size+'_'+length;}
var src=FBIntern.FbGlobals.get_fB_StaticResourceVersions()[resourceId];FB.FBDebug.assert(src,'Image source not found for resource '+resourceId);return src;},onProcess:function(){this.set_isReady(true);},logoutOnClick:false}
FB.XFBML.UserStatus=function FB_XFBML_UserStatus(domElement){FB.XFBML.UserStatus.constructBase(this,[domElement]);}
FB.XFBML.UserStatus.prototype={onProcess:function(){this._uid$1=FB.XFBML.ConnectUtility.normalizeInt64ForId(this._getAttribute('uid',null));if(!this._uid$1){throw new Error('No \'uid\' parameter provided.');}
this._data$1=FB.XFBML.Context.singleton.getFqlTable('user','uid').selectByKey(['status'],this._uid$1);this.addDataToWait(this._data$1);},onDataReady:function(){var user=this._data$1.result;if(user&&user.status){var message=user.status.message;if(message&&(message.length>0)&&(message.charAt(message.length-1)!=='.')){message=message+'.';}
else{message='';}
this.domElement.innerHTML=message.htmlEncode();}
this.set_isReady(true);},_data$1:null,_uid$1:null}
FB.XFBML.UserLink=function FB_XFBML_UserLink(domElement){FB.XFBML.UserLink.constructBase(this,[domElement]);}
FB.XFBML.UserLink.prototype={onProcess:function(){this._uid$1=FB.XFBML.ConnectUtility.normalizeInt64ForId(this._getAttribute('uid',null));if(!this._uid$1){throw new Error('No uid parameter was provided.');}
var fields=[];fields.addRange(['uid','name']);this._showNetwork$1=this._getBoolAttribute('shownetwork',true);if(this._showNetwork$1){fields.add('affiliations');}
this._data$1=FB.XFBML.Context.singleton.getFqlTable('user','uid').selectByKey(fields,this._uid$1);this.addDataToWait(this._data$1);},onDataReady:function(){var user=this._data$1.result;if(user){var href=FBIntern.Utility.getNonConnectFacebookUrl('www')+'profile.php?id='+user.uid;var content=user.name;if(this._showNetwork$1){content+=' '+FB.XFBML.ConnectUtility.getNetworkInParentheses(user);}
var html='<a href=\''+href+'\'>'+content.htmlEncode()+'</a>';this.domElement.innerHTML=html;}
else{var altText=this._getAttribute('ifcantsee',null);if(altText){this.domElement.innerHTML=altText.htmlEncode();}}
this.set_isReady(true);},_data$1:null,_uid$1:null,_showNetwork$1:false}
FB.XFBML.Photo=function FB_XFBML_Photo(domElement){FB.XFBML.Photo.constructBase(this,[domElement]);}
FB.XFBML.Photo.prototype={onProcess:function(){this._pid$1=FB.XFBML.ConnectUtility.normalizeInt64ForId(this._getAttribute('pid',null));if(!this._pid$1){throw new Error('No pid parameter was provided.');}
var size=this._getAttribute('size','normal');var sizeToSrcFieldMap={thumb:'src_small',small:'src',normal:'src_big',square:'src_big'};this._srcFieldName$1=sizeToSrcFieldMap[size];if(!this._srcFieldName$1){this._srcFieldName$1='src_big';}
this._data$1=FB.XFBML.Context.singleton.getFqlTable('photo','pid').selectByKey(['pid','caption',this._srcFieldName$1],this._pid$1);this.addDataToWait(this._data$1);},onDataReady:function(){var photo=this._data$1.result;if(photo){var html=String.format('<img src=\'{0}\' alt=\'{1}\' title=\'{1}\' />',photo[this._srcFieldName$1],photo.caption);this.domElement.innerHTML=html;}
this.set_isReady(true);},_data$1:null,_pid$1:null,_srcFieldName$1:null}
FB.XFBML.Video=function FB_XFBML_Video(domElement){FB.XFBML.Video.constructBase(this,[domElement]);}
FB.XFBML.Video.prototype={onProcess:function(){this._vid$1=FB.XFBML.ConnectUtility.normalizeInt64ForId(this._getAttribute('vid',null));this._width$1=this._getAttribute('width','576');this._height$1=this._getAttribute('height','432');},onDataReady:function(){var url=String.format('http://www.facebook.com/swf/mvp.swf?vid={0}&stage_width={1}&stage_height={2}',this._vid$1,this._width$1,this._height$1);var html=String.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$1,this._height$1,url);this.domElement.innerHTML=html;this.set_isReady(true);},_vid$1:null,_width$1:null,_height$1:null}
FB.XFBML.GroupLink=function FB_XFBML_GroupLink(domElement){FB.XFBML.GroupLink.constructBase(this,[domElement]);}
FB.XFBML.GroupLink.prototype={onProcess:function(){this._gid$1=FB.XFBML.ConnectUtility.normalizeInt64ForId(this._getAttribute('gid',null));if(!this._gid$1){throw new Error('No gid parameter');}
this._data$1=FB.XFBML.Context.singleton.getFqlTable('group','gid').selectByKey(['gid','name'],this._gid$1);this.addDataToWait(this._data$1);},onDataReady:function(){var group=this._data$1.result;if(group){var href=FBIntern.Utility.getNonConnectFacebookUrl('www')+'group.php?gid='+group.gid;var html='<a href=\''+href+'\'>'+group.name.htmlEncode()+'</a>';this.domElement.innerHTML=html;}
this.set_isReady(true);},_data$1:null,_gid$1:null}
FB.XFBML.EventLink=function FB_XFBML_EventLink(domElement){FB.XFBML.EventLink.constructBase(this,[domElement]);}
FB.XFBML.EventLink.prototype={onProcess:function(){this._eid$1=FB.XFBML.ConnectUtility.normalizeInt64ForId(this._getAttribute('eid',null));if(!this._eid$1){throw new Error('No eid parameter');}
this._data$1=FB.XFBML.Context.singleton.getFqlTable('event','eid').selectByKey(['eid','name'],this._eid$1);this.addDataToWait(this._data$1);},onDataReady:function(){var e=this._data$1.result;if(e){var href=FBIntern.Utility.getNonConnectFacebookUrl('www')+'event.php?eid='+e.eid;var html='<a href=\''+href+'\'>'+e.name.htmlEncode()+'</a>';this.domElement.innerHTML=html;}
this.set_isReady(true);},_data$1:null,_eid$1:null}
FB.XFBML.ShareButton=function FB_XFBML_ShareButton(domElement){FB.XFBML.ShareButton.constructBase(this,[domElement]);}
FB.XFBML.ShareButton.prototype={onProcess:function(){this._href$1=this._getAttribute('href',null);if(!this._href$1){throw new Error('No href parameter');}},onDataReady:function(){var html=String.format('<a href=\'{0}\' class=\'fb_share_button\' onclick=\'FB.Connect.showShareDialog(\"{0}\", function() {}); return false;\' target=\'_blank\' style=\'text-decoration:none;\'>Share</a>',this._href$1);this.domElement.innerHTML=html;this.set_isReady(true);},_href$1:null}
FB.XFBML.AddSectionButton=function FB_XFBML_AddSectionButton(domElement){FB.XFBML.AddSectionButton.constructBase(this,[domElement]);}
FB.XFBML.AddSectionButton.prototype={onProcess:function(){this._section$1=this._getAttribute('section',null);if(!this._section$1){this._section$1='profile';}},onDataReady:function(){FB.Connect.showAddSectionButton(this._section$1,this.domElement);this.set_isReady(true);},_section$1:null}
FB.XFBML.Element=function FB_XFBML_Element(domElement){this._dependents=new FB.DependentWaitable();this.domElement=domElement;this.domElement._fbElement=this;}
FB.XFBML.Element._fromDomElement=function FB_XFBML_Element$_fromDomElement(domElement){return domElement._fbElement;}
FB.XFBML.Element.prototype={process:function(){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.invoke();}}
var result=true;var resultReady=true;var pendingResult=this._conditionResult;if(!isNullOrUndefined(this._conditionResult)){if(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(Delegate.create(this,this._onConditionChanged));}
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);}},refresh:function(){if((this._state&FB.XFBML._elementState.waitForCondition)&&this._conditionResult){(this._conditionResult).remove_changed(Delegate.create(this,this._onConditionChanged));}
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(condition){if(condition.get_isReady()){condition.remove_changed(Delegate.create(this,this._onConditionChanged));this._state&=~FB.XFBML._elementState.waitForCondition;if(condition.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(value){if(value!==this.get_isReady()){if(value){this._state|=FB.XFBML._elementState.ready;}
else{this._state&=~FB.XFBML._elementState.ready;}
if(value){FB.UI.UIElement.addCssClass(this.domElement,'FB_ElementReady');}
else{FB.UI.UIElement.removeCssClass(this.domElement,'FB_ElementReady');}
if(this.__isReadyChanged){this.__isReadyChanged.invoke(this,null);}}
return value;},onProcess:function(){},onDataReady:function(){},clearVisual:function(){this.domElement.innerHTML='';},_getAttributeFromList:function(name,defaultValue,acceptableValues){var attrValue=this._getAttribute(name,defaultValue);var $enum1=acceptableValues.getEnumerator();while($enum1.moveNext()){var value=$enum1.get_current();if(attrValue===value){return value;}}
return defaultValue;},_getAttribute:function(name,defaultValue){var value=this.domElement.getAttribute(name);if(!value){value=defaultValue;}
return value;},_getBoolAttribute:function(name,defaultValue){var value=defaultValue;var s=this.domElement.getAttribute(name);if(s){value=Boolean.parse(s);}
return value;},addDataToWait:function(pendingResult){this._dependents.addDependent(pendingResult);},_checkDataReady:function(){if(this._dependents.get_isReady()){if(!(this._state&FB.XFBML._elementState.waitForCondition)){this.onDataReady();}}
else{this._dependents.waitUntilReady(Delegate.create(this,function(r){this._checkDataReady();}));}},add_isReadyChanged:function(value){this.__isReadyChanged=Delegate.combine(this.__isReadyChanged,value);},remove_isReadyChanged:function(value){this.__isReadyChanged=Delegate.remove(this.__isReadyChanged,value);},__isReadyChanged:null,domElement:null,_conditionResult:null,_state:0}
FB.XFBML.Name=function FB_XFBML_Name(domElement){FB.XFBML.Name.constructBase(this,[domElement]);}
FB.XFBML.Name.prototype={onProcess:function(){this._uid$1=FB.XFBML.ConnectUtility.normalizeInt64ForId(this._getAttribute('uid',null));if(this._uid$1==='loggedinuser'){if(FB.Facebook.apiClient.get_session()){this._uid$1=FB.Connect.get_loggedInUser();}
else{FB.FBDebug.logLine(2,'Cannot use loggedinuser, there is no session');this._uid$1=null;return;}}
if(!this._uid$1){FB.FBDebug.logLine(2,'fb:name has no user id');return;}
var fields=[];fields.addRange(['first_name','last_name','sex','pic']);this._possessive$1=this._getBoolAttribute('possessive',false);if(FB.Facebook.apiClient.get_session()){this._shownetwork$1=this._getBoolAttribute('shownetwork',false);}
this._linked$1=this._getBoolAttribute('linked',true);this._firstnameonly$1=this._getBoolAttribute('firstnameonly',false);this._lastnameonly$1=this._getBoolAttribute('lastnameonly',false);if(this._shownetwork$1){fields.add('affiliations');}
this._data$1=FB.XFBML.Context.singleton.getFqlTable('user','uid').selectByKey(fields,this._uid$1);this.addDataToWait(this._data$1);this._subjectId$1=FB.XFBML.ConnectUtility.normalizeInt64ForId(this._getAttribute('subjectid',null));if(this._subjectId$1){if(FBIntern.Utility.id64BitEquals(this._subjectId$1,FB.Connect.get_loggedInUser())){this._reflexive$1=true;}
this._pendingSubjectData$1=FB.XFBML.Context.singleton.getFqlTable('user','uid').selectByKey(['first_name','last_name','sex','network'],this._subjectId$1);this.addDataToWait(this._pendingSubjectData$1);}},onDataReady:function(){if(this._uid$1){if(FBIntern.Utility.id64BitEquals(this._subjectId$1,this._uid$1)){this.renderPronoun();}
else{this._renderOther$1();}}
this.set_isReady(true);},renderPronoun:function(){var userInfo=this._data$1.result;var word='';var objective=false;if(this._subjectId$1){objective=true;if(this._subjectId$1===this._uid$1){this._reflexive$1=true;}}
if((FBIntern.Utility.id64BitEquals(this._uid$1,FB.Connect.get_loggedInUser()))&&this._getBoolAttribute('useyou',true)){if(this._possessive$1){if(this._reflexive$1){word='your own';}
else{word='your';}}
else{if(this._reflexive$1){word='yourself';}
else{word='you';}}}
else{switch(userInfo.sex){case FB.XFBML.Common.Constants.gendeR_MALE_SINGULAR:if(this._possessive$1){word=(this._reflexive$1)?'his own':'his';}
else{if(this._reflexive$1){word='himself';}
else if(objective){word='him';}
else{word='he';}}
break;case FB.XFBML.Common.Constants.gendeR_FEMALE_SINGULAR:if(this._possessive$1){word=(this._reflexive$1)?'her own':'her';}
else{if(this._reflexive$1){word='herself';}
else if(objective){word='her';}
else{word='she';}}
break;default:if(this._getBoolAttribute('usethey',true)){if(this._possessive$1){if(this._reflexive$1){word='their own';}
else{word='their';}}
else{if(this._reflexive$1){word='themself';}
else if(objective){word='them';}
else{word='they';}}}
else{if(this._possessive$1){if(this._reflexive$1){word='his/her own';}
else{word='his/her';}}
else{if(this._reflexive$1){word='himself/herself';}
else if(objective){word='him/her';}
else{word='he/she';}}}
break;}}
this.domElement.innerHTML=word;},_renderOther$1:function(){var userInfo=this._data$1.result;if(!userInfo){FB.FBDebug.assert(false,'no data available');return;}
var name='';var html='';var network='';if(FBIntern.Utility.id64BitEquals(this._uid$1,FB.Connect.get_loggedInUser())&&this._getBoolAttribute('useyou',true)){if(this._reflexive$1){if(this._possessive$1){name='your own';}
else{name='yourself';}}
else{if(this._possessive$1){name='your';}
else{name='you';}}
if(this._getBoolAttribute('capitalize',false)){name=FB.XFBML.ConnectUtility.upperCaseFirstChar(name);}}
else{if(null===userInfo.first_name){userInfo.first_name='';}
if(null===userInfo.last_name){userInfo.last_name='';}
if(this._firstnameonly$1){name=userInfo.first_name;}
else if(this._lastnameonly$1){name=userInfo.last_name;}
else if(userInfo.first_name!==''){name=userInfo.first_name;if(userInfo.last_name!==''){name+=' '+userInfo.last_name;}}
if(name!==''&&this._possessive$1){name+='\'s';}
if(this._shownetwork$1){network=FB.XFBML.ConnectUtility.getNetworkInParentheses(userInfo);}}
if(name===''){name=this._getAttribute('ifcantsee','Facebook User');}
if(name!==''){if(this._linked$1){var href=FBIntern.Utility.getNonConnectFacebookUrl('www')+'profile.php?id='+this._uid$1;html=String.format(FB.XFBML.Context.singleton.resources.getResourceString('link'),href,name);}
else{html=name;}}
if(!FB.Facebook.apiClient.get_session()){html='<b>'+html+'</b>';}
if(this._shownetwork$1){html+=' '+network;}
this.domElement.innerHTML=html;},_data$1:null,_pendingSubjectData$1:null,_subjectId$1:null,_uid$1:null,_possessive$1:false,_firstnameonly$1:false,_linked$1:false,_lastnameonly$1:false,_reflexive$1:false,_shownetwork$1:false}
FB.XFBML.Pronoun=function FB_XFBML_Pronoun(domElement){FB.XFBML.Pronoun.constructBase(this,[domElement]);}
FB.XFBML.Pronoun.prototype={onDataReady:function(){this.renderPronoun();this.set_isReady(true);}}
FB.XFBML.ProfilePic=function FB_XFBML_ProfilePic(domElement){FB.XFBML.ProfilePic.constructBase(this,[domElement]);}
FB.XFBML.ProfilePic.prototype={onProcess:function(){var size=this._getAttribute('size','thumb');var sizeToPicFieldMap={thumb:'pic_small',small:'pic',normal:'pic_big',square:'pic_square'};this._picFieldName$1=sizeToPicFieldMap[size];if(!this._picFieldName$1){this._picFieldName$1='pic';}
if(this._getBoolAttribute('facebook-logo',false)){this._picFieldName$1+='_with_logo';}
this._linked$1=this._getBoolAttribute('linked',true);var widthAttribute=this._getAttribute('width',null);var heightAttribute=this._getAttribute('height',null);if(widthAttribute){this.domElement.style.width=widthAttribute;}
if(heightAttribute){this.domElement.style.height=heightAttribute;}
this._uid$1=FB.XFBML.ConnectUtility.normalizeInt64ForId(this._getAttribute('uid',null));if(this._uid$1==='loggedinuser'){if(FB.Facebook.apiClient.get_session()){this._uid$1=FB.Connect.get_loggedInUser();}
else{FB.FBDebug.logLine(2,'cannot use loggedinuser, there is no session');this._uid$1=null;return;}}
this._data$1=FB.XFBML.Context.singleton.getFqlTable('user','uid').selectByKey(['name',this._picFieldName$1],this._uid$1);this.addDataToWait(this._data$1);if(!this._dependents.get_isReady()){this._renderImage$1(null);}},onDataReady:function(){var userInfo=(this._data$1)?this._data$1.result:null;this._renderImage$1(userInfo);this.set_isReady(true);},_renderImage$1:function(userInfo){var imageSrc=(userInfo)?userInfo[this._picFieldName$1]:null;if(!imageSrc){imageSrc=FBIntern.Utility.getFacebookUrl('static.ak')+'pics/'+FB.XFBML.ProfilePic._defaultPicMap$1[this._picFieldName$1];}
var cssWidth=this.domElement.style.width;var cssHeight=this.domElement.style.height;var style=((cssWidth)?'width:'+cssWidth+';':'')+((cssHeight)?'height:'+cssHeight+';':'');var html=String.format('<img src=\'{0}\' alt=\'{1}\' title=\'{1}\' style=\'{2}\' class=\'{3}\' />',imageSrc,(userInfo)?userInfo.name:'',style,this.domElement.className);if(this._linked$1){var href=FBIntern.Utility.getNonConnectFacebookUrl('www')+'profile.php?id='+this._uid$1;html='<a class=\'FB_Link\' href=\''+href+'\'>'+html+'</a>';}
this.domElement.innerHTML=html;FB.UI.UIElement.addCssClass(this.domElement,'fb_profile_pic_rendered');},_uid$1:null,_picFieldName$1:null,_linked$1:false,_data$1:null}
FB.XFBML.ServerFbml=function FB_XFBML_ServerFbml(domElement){FB.XFBML.ServerFbml.constructBase(this,[domElement]);}
FB.XFBML.ServerFbml.prototype={onDataReady:function(){FB.IFrameUtil.CanvasUtilServer.run(true);this._createIframeDoc$1();},clearVisual:function(){if(this._iframeContainer$1){this._iframeContainer$1.parentNode.removeChild(this._iframeContainer$1);this._iframeContainer$1=null;}},_createIframeDoc$1:function(){var iframeName='fbmlIFrame_'+FB.XFBML.ServerFbml._iframeIdCount$1.toString();FB.XFBML.ServerFbml._iframeIdCount$1++;if(this._iframeContainer$1){this.clearVisual();}
this._iframeContainer$1=this.domElement.appendChild(FB.XdComm.Server.singleton.createNamedHiddenIFrame(iframeName,FB.XdComm.Server.singleton.get_receiverUrl(),'fbmlIframe','frameborder=\"0\"'));var iframeWidth=this._getAttribute('iframeWidth',null);var iframeHeight=this._getAttribute('iframeHeight',null);if(iframeWidth){this._iframeContainer$1.style.width=iframeWidth;}
if(iframeHeight){this._iframeContainer$1.style.height=iframeHeight;}
var frameWindow=(window.self.frames)[iframeName];FB.FBDebug.assert(!isUndefined(frameWindow),'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(iframeName,this._iframeContainer$1,Delegate.create(this,function(iframeDoc){iframeDoc.open();this._writeDoc$1(iframeDoc);}));},_getFBML$1:function(){var fbml=this._getAttribute('fbml',null);if(!fbml){var c=this.domElement.children.length;for(var i=0;i<c;i++){var child=this.domElement.children[i];if(child.tagName==='SCRIPT'&&(child).type==='text/fbml'){fbml=child.innerHTML;break;}}}
return fbml;},_writeDoc$1:function(iframeDoc){var fbml=this._getFBML$1();var postParams={app_key:FB.Facebook.apiClient.get_apiKey(),channel_url:FB.XdComm.Server.singleton.get_receiverUrl(),fbml:fbml};var builder=new StringBuilder();builder.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')+'render_fbml.php\" id=\"form1\" name=\"form1\" >');var $dict1=postParams;for(var $key2 in $dict1){var entry={key:$key2,value:$dict1[$key2]};builder.append(String.format('<input type=\"hidden\" name=\"{0}\" id=\"{1}\" value=\"{2}\"  />',entry.key,entry.key,(entry.value).htmlEncode()));}
builder.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 html=builder.toString();iframeDoc.write(html);iframeDoc.close();this.set_isReady(true);},_iframeContainer$1:null}
FB.XFBML.PromptPermission=function FB_XFBML_PromptPermission(domElement){FB.XFBML.PromptPermission.constructBase(this,[domElement]);}
FB.XFBML.PromptPermission.prototype={onProcess:function(){var user=FB.Connect.get_loggedInUser();if(user){this._permission$1=this._getAttribute('perms',null);if(!this._permission$1){FB.FBDebug.logLine(1,'No perms attribute was provided.');return;}
var table=FB.XFBML.Context.singleton.getFqlTable('permissions','uid');this._data$1=table.selectByKey([this._permission$1],user);this.addDataToWait(this._data$1);}},onDataReady:function(){var permissions=null;if(this._data$1){permissions=this._data$1.result;}
var nextFbjs=this._getAttribute('next_fbjs',null);var callbackArg='null';if(nextFbjs){callbackArg='function(result) { '+'  if (result) { '+nextFbjs+' } '+'}';}
if((permissions)&&!(permissions[this._permission$1])){this.domElement.innerHTML='<a href=\"#\" onclick=\"FB.Connect.showPermissionDialog(\''+this._permission$1+'\', '+callbackArg+'); return false;\">'+this.domElement.innerHTML+'</a>';}
else{this.domElement.innerHTML='';}
this.set_isReady(true);},_data$1:null,_permission$1:null}
FB.XFBML.Host=function FB_XFBML_Host(){}
FB.XFBML.Host.registerCustomTag=function FB_XFBML_Host$registerCustomTag(nameSpace,name,implementationType){FB.XFBML.Host._registeredElements.add(FB.XFBML.$create_ElementsRegistration(nameSpace,name,implementationType));}
FB.XFBML.Host.parseDomTree=function FB_XFBML_Host$parseDomTree(){FB.XFBML.Data.CacheManager.get__initialized().waitUntilReady(Delegate.create(null,function(isCacheReady){var domElement=document.body;var $enum1=FB.XFBML.Host._registeredElements.getEnumerator();while($enum1.moveNext()){var entry=$enum1.get_current();var names=FB.XFBML.ConnectUtility.getElementsByTagNameNS(domElement,entry.nameSpace,entry.name);for(var i=0;i<names.length;i++){var element=FB.XFBML.Element._fromDomElement(names[i]);if(!element){element=new entry.implementationType(names[i]);FB.XFBML.Host._addElementToList(element);}}}
FB.XFBML.Host._readyElementsCount=0;FB.XFBML.Host._areElementsReady.setResult(false,true);FB.Connect.get_status().waitUntilReady(Delegate.create(null,function(r){var count=FB.XFBML.Host._fbmlElements.length;for(var i=0;i<count;i++){var element=FB.XFBML.Host._fbmlElements[i];element.process();}}));}));}
FB.XFBML.Host.refresh=function FB_XFBML_Host$refresh(){var count=FB.XFBML.Host._fbmlElements.length;if(count>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 i=0;i<count;i++){var element=FB.XFBML.Host._fbmlElements[i];element.refresh();}}}
FB.XFBML.Host.get_areElementsReady=function FB_XFBML_Host$get_areElementsReady(){return FB.XFBML.Host._areElementsReady;}
FB.XFBML.Host.addElement=function FB_XFBML_Host$addElement(element){FB.Connect.get_status().waitUntilReady(Delegate.create(null,function(r){FB.XFBML.Data.CacheManager.get__initialized().waitUntilReady(Delegate.create(null,function(isCacheReady){FB.XFBML.Host._addElementToList(element);element.process();}));}));}
FB.XFBML.Host.addElements=function FB_XFBML_Host$addElements(elements){var $enum1=elements.getEnumerator();while($enum1.moveNext()){var element=$enum1.get_current();FB.XFBML.Host.addElement(element);}}
FB.XFBML.Host._addElementToList=function FB_XFBML_Host$_addElementToList(element){FB.XFBML.Host._fbmlElements.add(element);if(element.get_isReady()){FB.XFBML.Host._readyElementsCount++;FB.XFBML.Host._checkReadyState();}
else{element.add_isReadyChanged(Delegate.create(null,FB.XFBML.Host._elementIsReadyChanged));}}
FB.XFBML.Host._elementIsReadyChanged=function FB_XFBML_Host$_elementIsReadyChanged(sender,e){(sender).remove_isReadyChanged(Delegate.create(null,FB.XFBML.Host._elementIsReadyChanged));FB.XFBML.Host._readyElementsCount++;FB.XFBML.Host._checkReadyState();}
FB.XFBML.Host._checkReadyState=function FB_XFBML_Host$_checkReadyState(){var isReady=FB.XFBML.Host._readyElementsCount===FB.XFBML.Host._fbmlElements.length;if(isReady&&!FB.XFBML.Host._areElementsReady.get_isReady()){FB.XFBML.Host._areElementsReady.setResult(true);}}
FB.XFBML.ConnectUtility=function FB_XFBML_ConnectUtility(){}
FB.XFBML.ConnectUtility.upperCaseFirstChar=function FB_XFBML_ConnectUtility$upperCaseFirstChar(s){if(s.length>0){return s.substr(0,1).toUpperCase()+s.substr(1);}
else{return s;}}
FB.XFBML.ConnectUtility.getElementsByTagNameNS=function FB_XFBML_ConnectUtility$getElementsByTagNameNS(element,xmlns,localName){var result=null;switch(FBIntern.AppInfo.get_singleton().get_hostInfo().get_hostName()){case FBIntern.HostName.MOZILLA:localName=xmlns+':'+localName;result=element.getElementsByTagNameNS(null,localName);break;case FBIntern.HostName.SAFARI:localName=xmlns+':'+localName;result=element.getElementsByTagName(localName);break;case FBIntern.HostName.IE:var docNamespaces=document.namespaces;if(docNamespaces&&Object.keyExists(docNamespaces,xmlns)){result=element.getElementsByTagName(localName);}
else{localName=xmlns+':'+localName;result=element.getElementsByTagName(localName);if(result&&result.length>0){var message='You appear to be using the XFBML tag '+localName+' 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,message);throw new Error(message);}}
break;default:result=element.getElementsByTagName(localName);break;}
return result;}
FB.XFBML.ConnectUtility.normalizeInt64ForId=function FB_XFBML_ConnectUtility$normalizeInt64ForId(id){if(id){var scriptType=typeof(id);if(scriptType==='string'&&(id).length<10){id=Number.parse(id);}}
return id;}
FB.XFBML.ConnectUtility.getNetworkInParentheses=function FB_XFBML_ConnectUtility$getNetworkInParentheses(userInfo){var networkName=FBIntern.DataHelper.getPrimaryNetwork(userInfo);if(!networkName){networkName=FB.XFBML.Context.singleton.resources.getResourceString('no_network');}
return'('+networkName+')';}
Type.createNamespace('FB.XFBML.Resources');FB.XFBML.Resources.ResourceDict=function FB_XFBML_Resources_ResourceDict(){this._stringResources={link:'<a class=\'FB_Link\' href=\'{0}\'>{1}</a>',no_network:'no network'};}
FB.XFBML.Resources.ResourceDict.prototype={getResourceString:function(key){return this._stringResources[key];},_stringResources:null}
FBIntern.DataHelper.createClass('FBIntern.DataHelper');FB.XFBML.Data.CacheManager.createClass('FB.XFBML.Data.CacheManager');FB.XFBML.Data.FqlTable.createClass('FB.XFBML.Data.FqlTable');FB.XFBML.Common.Constants.createClass('FB.XFBML.Common.Constants');FB.XFBML.Element.createClass('FB.XFBML.Element');FB.XFBML.UnconnectedFriendsCount.createClass('FB.XFBML.UnconnectedFriendsCount',FB.XFBML.Element);FB.XFBML.Operator.createClass('FB.XFBML.Operator',FB.DependentWaitable);FB.XFBML.Conditions.createClass('FB.XFBML.Conditions');FB.XFBML._permisionTable.createClass('FB.XFBML._permisionTable');FB.XFBML.Context.createClass('FB.XFBML.Context');FB.XFBML.ContainerElement.createClass('FB.XFBML.ContainerElement',FB.XFBML.Element);FB.XFBML.LoginButton.createClass('FB.XFBML.LoginButton',FB.XFBML.Element);FB.XFBML.UserStatus.createClass('FB.XFBML.UserStatus',FB.XFBML.Element);FB.XFBML.UserLink.createClass('FB.XFBML.UserLink',FB.XFBML.Element);FB.XFBML.Photo.createClass('FB.XFBML.Photo',FB.XFBML.Element);FB.XFBML.Video.createClass('FB.XFBML.Video',FB.XFBML.Element);FB.XFBML.GroupLink.createClass('FB.XFBML.GroupLink',FB.XFBML.Element);FB.XFBML.EventLink.createClass('FB.XFBML.EventLink',FB.XFBML.Element);FB.XFBML.ShareButton.createClass('FB.XFBML.ShareButton',FB.XFBML.Element);FB.XFBML.AddSectionButton.createClass('FB.XFBML.AddSectionButton',FB.XFBML.Element);FB.XFBML.Name.createClass('FB.XFBML.Name',FB.XFBML.Element);FB.XFBML.Pronoun.createClass('FB.XFBML.Pronoun',FB.XFBML.Name);FB.XFBML.ProfilePic.createClass('FB.XFBML.ProfilePic',FB.XFBML.Element);FB.XFBML.ServerFbml.createClass('FB.XFBML.ServerFbml',FB.XFBML.Element);FB.XFBML.PromptPermission.createClass('FB.XFBML.PromptPermission',FB.XFBML.Element);FB.XFBML.Host.createClass('FB.XFBML.Host');FB.XFBML.ConnectUtility.createClass('FB.XFBML.ConnectUtility');FB.XFBML.Resources.ResourceDict.createClass('FB.XFBML.Resources.ResourceDict');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();FB.XFBML.Common.Constants.gendeR_MALE_SINGULAR='male';FB.XFBML.Common.Constants.gendeR_FEMALE_SINGULAR='female';FB.XFBML.Conditions._table=new FB.XFBML._permisionTable();FB.XFBML.Context.singleton=null;FB.XFBML.Context.singleton=new FB.XFBML.Context();FB.XFBML.ProfilePic._defaultPicMap$1=null;FB.XFBML.ProfilePic._defaultPicMap$1={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'};FB.XFBML.ServerFbml._iframeIdCount$1=0;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\"><img id=\"fb_login_image\"  /></a>'));var list=[FB.XFBML.$create_ElementsRegistration('fb','login-button',FB.XFBML.LoginButton),FB.XFBML.$create_ElementsRegistration('fb','name',FB.XFBML.Name),FB.XFBML.$create_ElementsRegistration('fb','pronoun',FB.XFBML.Pronoun),FB.XFBML.$create_ElementsRegistration('fb','serverFbml',FB.XFBML.ServerFbml),FB.XFBML.$create_ElementsRegistration('fb','eventLink',FB.XFBML.EventLink),FB.XFBML.$create_ElementsRegistration('fb','groupLink',FB.XFBML.GroupLink),FB.XFBML.$create_ElementsRegistration('fb','photo',FB.XFBML.Photo),FB.XFBML.$create_ElementsRegistration('fb','video',FB.XFBML.Video),FB.XFBML.$create_ElementsRegistration('fb','userLink',FB.XFBML.UserLink),FB.XFBML.$create_ElementsRegistration('fb','unconnected-friends-count',FB.XFBML.UnconnectedFriendsCount),FB.XFBML.$create_ElementsRegistration('fb','container',FB.XFBML.ContainerElement),FB.XFBML.$create_ElementsRegistration('fb','user-status',FB.XFBML.UserStatus),FB.XFBML.$create_ElementsRegistration('fb','profile-pic',FB.XFBML.ProfilePic),FB.XFBML.$create_ElementsRegistration('fb','prompt-permission',FB.XFBML.PromptPermission),FB.XFBML.$create_ElementsRegistration('fb','share-button',FB.XFBML.ShareButton),FB.XFBML.$create_ElementsRegistration('fb','add-section-button',FB.XFBML.AddSectionButton)];FB.XFBML.Host._registeredElements=(list);FB.FeatureLoader.singleton.onScriptLoaded(['XFBML']);

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