var LANGUAGE_CODE="en";var LANGUAGE_BIDI=false;var catalog=new Array();function pluralidx(a){return(a==1)?0:1}function gettext(a){var b=catalog[a];if(typeof(b)=="undefined"){return a}else{return(typeof(b)=="string")?b:b[0]}}function ngettext(b,a,c){value=catalog[b];if(typeof(value)=="undefined"){return(c==1)?b:a}else{return value[pluralidx(c)]}}function gettext_noop(a){return a}function interpolate(b,c,a){if(a){return b.replace(/%\(\w+\)s/g,function(d){return String(c[d.slice(2,-2)])})}else{return b.replace(/%s/g,function(d){return String(c.shift())})}}window.hgettext=function(a){return gettext(a)};window.hngettext=function(b,a,c){return ngettext(b,a,c)};var LANGUAGE_CODE="en";var LANGUAGE_BIDI=false;var catalog=new Array();function pluralidx(a){return(a==1)?0:1}function gettext(a){var b=catalog[a];if(typeof(b)=="undefined"){return a}else{return(typeof(b)=="string")?b:b[0]}}function ngettext(b,a,c){value=catalog[b];if(typeof(value)=="undefined"){return(c==1)?b:a}else{return value[pluralidx(c)]}}function gettext_noop(a){return a}function interpolate(b,c,a){if(a){return b.replace(/%\(\w+\)s/g,function(d){return String(c[d.slice(2,-2)])})}else{return b.replace(/%s/g,function(d){return String(c.shift())})}}window.hgettext=function(a){return gettext(a)};window.hngettext=function(b,a,c){return ngettext(b,a,c)};(function(a){a("#clickme").live("click",function(){a(this).append(" Click!")})})(jQuery);
/*
 * jQuery Form Plugin
 * version: 2.49 (18-OCT-2010)
 * @requires jQuery v1.3.2 or later
 *
 * Examples and documentation at: http://malsup.com/jquery/form/
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
(function(b){b.fn.ajaxSubmit=function(s){if(!this.length){a("ajaxSubmit: skipping submit process - no element selected");return this}if(typeof s=="function"){s={success:s}}var d=b.trim(this.attr("action"));if(d){d=(d.match(/^([^#]+)/)||[])[1]}d=d||window.location.href||"";s=b.extend(true,{url:d,type:this.attr("method")||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},s);var t={};this.trigger("form-pre-serialize",[this,s,t]);if(t.veto){a("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(s.beforeSerialize&&s.beforeSerialize(this,s)===false){a("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var f,o,l=this.formToArray(s.semantic);if(s.data){s.extraData=s.data;for(f in s.data){if(s.data[f] instanceof Array){for(var h in s.data[f]){l.push({name:f,value:s.data[f][h]})}}else{o=s.data[f];o=b.isFunction(o)?o():o;l.push({name:f,value:o})}}}if(s.beforeSubmit&&s.beforeSubmit(l,this,s)===false){a("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[l,this,s,t]);if(t.veto){a("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var c=b.param(l);if(s.type.toUpperCase()=="GET"){s.url+=(s.url.indexOf("?")>=0?"&":"?")+c;s.data=null}else{s.data=c}var r=this,j=[];if(s.resetForm){j.push(function(){r.resetForm()})}if(s.clearForm){j.push(function(){r.clearForm()})}if(!s.dataType&&s.target){var p=s.success||function(){};j.push(function(n){var k=s.replaceTarget?"replaceWith":"html";b(s.target)[k](n).each(p,arguments)})}else{if(s.success){j.push(s.success)}}s.success=function(v,n,w){var u=s.context||s;for(var q=0,k=j.length;q<k;q++){j[q].apply(u,[v,n,w||r,r])}};var g=b("input:file",this).length>0;var e="multipart/form-data";var i=(r.attr("enctype")==e||r.attr("encoding")==e);if(s.iframe!==false&&(g||s.iframe||i)){if(s.closeKeepAlive){b.get(s.closeKeepAlive,m)}else{m()}}else{b.ajax(s)}this.trigger("form-submit-notify",[this,s]);return this;function m(){var k=r[0];if(b(":input[name=submit],:input[id=submit]",k).length){alert('Error: Form elements must not have name or id of "submit".');return}var y=b.extend(true,{},b.ajaxSettings,s);y.context=y.context||y;var B="jqFormIO"+(new Date().getTime()),w="_"+B;window[w]=function(){var n=q.data("form-plugin-onload");if(n){n();window[w]=undefined;try{delete window[w]}catch(K){}}};var q=b('<iframe id="'+B+'" name="'+B+'" src="'+y.iframeSrc+'" onload="window[\'_\'+this.id]()" />');var x=q[0];q.css({position:"absolute",top:"-1000px",left:"-1000px"});var u={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;q.attr("src",y.iframeSrc)}};var G=y.global;if(G&&!b.active++){b.event.trigger("ajaxStart")}if(G){b.event.trigger("ajaxSend",[u,y])}if(y.beforeSend&&y.beforeSend.call(y.context,u,y)===false){if(y.global){b.active--}return}if(u.aborted){return}var C=false;var F=0;var v=k.clk;if(v){var D=v.name;if(D&&!v.disabled){y.extraData=y.extraData||{};y.extraData[D]=v.value;if(v.type=="image"){y.extraData[D+".x"]=k.clk_x;y.extraData[D+".y"]=k.clk_y}}}function E(){var M=r.attr("target"),K=r.attr("action");k.setAttribute("target",B);if(k.getAttribute("method")!="POST"){k.setAttribute("method","POST")}if(k.getAttribute("action")!=y.url){k.setAttribute("action",y.url)}if(!y.skipEncodingOverride){r.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(y.timeout){setTimeout(function(){F=true;A()},y.timeout)}var L=[];try{if(y.extraData){for(var N in y.extraData){L.push(b('<input type="hidden" name="'+N+'" value="'+y.extraData[N]+'" />').appendTo(k)[0])}}q.appendTo("body");q.data("form-plugin-onload",A);k.submit()}finally{k.setAttribute("action",K);if(M){k.setAttribute("target",M)}else{r.removeAttr("target")}b(L).remove()}}if(y.forceSync){E()}else{setTimeout(E,10)}var I,J,H=50;function A(){if(C){return}q.removeData("form-plugin-onload");var L=true;try{if(F){throw"timeout"}J=x.contentWindow?x.contentWindow.document:x.contentDocument?x.contentDocument:x.document;var P=y.dataType=="xml"||J.XMLDocument||b.isXMLDoc(J);a("isXml="+P);if(!P&&window.opera&&(J.body==null||J.body.innerHTML=="")){if(--H){a("requeing onLoad callback, DOM not available");setTimeout(A,250);return}}C=true;u.responseText=J.documentElement?J.documentElement.innerHTML:null;u.responseXML=J.XMLDocument?J.XMLDocument:J;u.getResponseHeader=function(R){var Q={"content-type":y.dataType};return Q[R]};var O=/(json|script)/.test(y.dataType);if(O||y.textarea){var K=J.getElementsByTagName("textarea")[0];if(K){u.responseText=K.value}else{if(O){var N=J.getElementsByTagName("pre")[0];var n=J.getElementsByTagName("body")[0];if(N){u.responseText=N.innerHTML}else{if(n){u.responseText=n.innerHTML}}}}}else{if(y.dataType=="xml"&&!u.responseXML&&u.responseText!=null){u.responseXML=z(u.responseText)}}I=b.httpData(u,y.dataType)}catch(M){a("error caught:",M);L=false;u.error=M;b.handleError(y,u,"error",M)}if(L){y.success.call(y.context,I,"success",u);if(G){b.event.trigger("ajaxSuccess",[u,y])}}if(G){b.event.trigger("ajaxComplete",[u,y])}if(G&&!--b.active){b.event.trigger("ajaxStop")}if(y.complete){y.complete.call(y.context,u,L?"success":"error")}setTimeout(function(){q.removeData("form-plugin-onload");q.remove();u.responseXML=null},100)}function z(n,K){if(window.ActiveXObject){K=new ActiveXObject("Microsoft.XMLDOM");K.async="false";K.loadXML(n)}else{K=(new DOMParser()).parseFromString(n,"text/xml")}return(K&&K.documentElement&&K.documentElement.tagName!="parsererror")?K:null}}};b.fn.ajaxForm=function(c){if(this.length===0){var d={s:this.selector,c:this.context};if(!b.isReady&&d.s){a("DOM not ready, queuing ajaxForm");b(function(){b(d.s,d.c).ajaxForm(c)});return this}a("terminating; zero elements found by selector"+(b.isReady?"":" (DOM not ready)"));return this}return this.ajaxFormUnbind().bind("submit.form-plugin",function(f){if(!f.isDefaultPrevented()){f.preventDefault();b(this).ajaxSubmit(c)}}).bind("click.form-plugin",function(j){var i=j.target;var g=b(i);if(!(g.is(":submit,input:image"))){var f=g.closest(":submit");if(f.length==0){return}i=f[0]}var h=this;h.clk=i;if(i.type=="image"){if(j.offsetX!=undefined){h.clk_x=j.offsetX;h.clk_y=j.offsetY}else{if(typeof b.fn.offset=="function"){var k=g.offset();h.clk_x=j.pageX-k.left;h.clk_y=j.pageY-k.top}else{h.clk_x=j.pageX-i.offsetLeft;h.clk_y=j.pageY-i.offsetTop}}}setTimeout(function(){h.clk=h.clk_x=h.clk_y=null},100)})};b.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};b.fn.formToArray=function(q){var p=[];if(this.length===0){return p}var d=this[0];var g=q?d.getElementsByTagName("*"):d.elements;if(!g){return p}var k,h,f,r,e,m,c;for(k=0,m=g.length;k<m;k++){e=g[k];f=e.name;if(!f){continue}if(q&&d.clk&&e.type=="image"){if(!e.disabled&&d.clk==e){p.push({name:f,value:b(e).val()});p.push({name:f+".x",value:d.clk_x},{name:f+".y",value:d.clk_y})}continue}r=b.fieldValue(e,true);if(r&&r.constructor==Array){for(h=0,c=r.length;h<c;h++){p.push({name:f,value:r[h]})}}else{if(r!==null&&typeof r!="undefined"){p.push({name:f,value:r})}}}if(!q&&d.clk){var l=b(d.clk),o=l[0];f=o.name;if(f&&!o.disabled&&o.type=="image"){p.push({name:f,value:l.val()});p.push({name:f+".x",value:d.clk_x},{name:f+".y",value:d.clk_y})}}return p};b.fn.formSerialize=function(c){return b.param(this.formToArray(c))};b.fn.fieldSerialize=function(d){var c=[];this.each(function(){var h=this.name;if(!h){return}var f=b.fieldValue(this,d);if(f&&f.constructor==Array){for(var g=0,e=f.length;g<e;g++){c.push({name:h,value:f[g]})}}else{if(f!==null&&typeof f!="undefined"){c.push({name:this.name,value:f})}}});return b.param(c)};b.fn.fieldValue=function(h){for(var g=[],e=0,c=this.length;e<c;e++){var f=this[e];var d=b.fieldValue(f,h);if(d===null||typeof d=="undefined"||(d.constructor==Array&&!d.length)){continue}d.constructor==Array?b.merge(g,d):g.push(d)}return g};b.fieldValue=function(c,j){var e=c.name,p=c.type,q=c.tagName.toLowerCase();if(j===undefined){j=true}if(j&&(!e||c.disabled||p=="reset"||p=="button"||(p=="checkbox"||p=="radio")&&!c.checked||(p=="submit"||p=="image")&&c.form&&c.form.clk!=c||q=="select"&&c.selectedIndex==-1)){return null}if(q=="select"){var k=c.selectedIndex;if(k<0){return null}var m=[],d=c.options;var g=(p=="select-one");var l=(g?k+1:d.length);for(var f=(g?k:0);f<l;f++){var h=d[f];if(h.selected){var o=h.value;if(!o){o=(h.attributes&&h.attributes.value&&!(h.attributes.value.specified))?h.text:h.value}if(g){return o}m.push(o)}}return m}return b(c).val()};b.fn.clearForm=function(){return this.each(function(){b("input,select,textarea",this).clearFields()})};b.fn.clearFields=b.fn.clearInputs=function(){return this.each(function(){var d=this.type,c=this.tagName.toLowerCase();if(d=="text"||d=="password"||c=="textarea"){this.value=""}else{if(d=="checkbox"||d=="radio"){this.checked=false}else{if(c=="select"){this.selectedIndex=-1}}}})};b.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};b.fn.enable=function(c){if(c===undefined){c=true}return this.each(function(){this.disabled=!c})};b.fn.selected=function(c){if(c===undefined){c=true}return this.each(function(){var d=this.type;if(d=="checkbox"||d=="radio"){this.checked=c}else{if(this.tagName.toLowerCase()=="option"){var e=b(this).parent("select");if(c&&e[0]&&e[0].type=="select-one"){e.find("option").selected(false)}this.selected=c}}})};function a(){if(b.fn.ajaxSubmit.debug){var c="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(c)}else{if(window.opera&&window.opera.postError){window.opera.postError(c)}}}}})(jQuery);(function($){var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},s={array:function(x){var a=["["],b,f,i,l=x.length,v;for(i=0;i<l;i+=1){v=x[i];f=s[typeof v];if(f){v=f(v);if(typeof v=="string"){if(b){a[a.length]=","}a[a.length]=v;b=true}}}a[a.length]="]";return a.join("")},"boolean":function(x){return String(x)},"null":function(x){return"null"},number:function(x){return isFinite(x)?String(x):"null"},object:function(x){if(x){if(x instanceof Array){return s.array(x)}var a=["{"],b,f,i,v;for(i in x){v=x[i];f=s[typeof v];if(f){v=f(v);if(typeof v=="string"){if(b){a[a.length]=","}a.push(s.string(i),":",v);b=true}}}a[a.length]="}";return a.join("")}return"null"},string:function(x){if(/["\\\x00-\x1f]/.test(x)){x=x.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})}return'"'+x+'"'}};$.toJSON=function(v){var f=isNaN(v)?s[typeof v]:s.number;if(f){return f(v)}};$.parseJSON=function(v,safe){if(safe===undefined){safe=$.parseJSON.safe}if(safe&&!/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(v)){return undefined}return eval("("+v+")")};$.parseJSON.safe=false})(jQuery);function initCodeChannel(b,a,c,e,f,d){channel=new goog.appengine.Channel(c);socket=channel.open();this.token=c;this.clientid=e;this.projectkey=d;this.codekey=f;this.color=a;this.name=b;window.onload=function(){window.token=c;window.clientid=e;window.projectkey=d;window.codekey=f;window.color=a;window.name=b};onOpen=function(){sendMessage({type:"welcome",msg:"I have arrived!",color:a,name:b,clientid:e});editor=ace.edit("editor");editor.renderer.setShowPrintMargin(false);editor.renderer.setHScrollBarAlwaysVisible(false);var g=require("ace/mode/php").Mode;editor.getSession().setMode(new g());editor.getSession().selection.on("changeCursor",function(){aceCursorchange(""+e+"",editor.getCursorPositionScreen(),editor.getSession())});editor.getSession().on("change",function(){codeChange(b,""+e+"",""+f+"",editor.getCursorPositionScreen(),editor)});editor.getSession().selection.on("changeSelection",function(){testselection()});$("#editor").css("height",editor.getSession().doc.$lines.length*18+"px");window.editor=editor;$("#editor").fadeIn()};onMessage=function(j){var n=$.parseJSON(j.data);switch(n.type){case"welcome":if(n.clientid!=e){startColabSession(n.name,n.color,n.clientid)}$("#chatline").val(n.name+" have arrived!");refreshSessionCollaborators(f);break;case"chat":var k=new Date();var h=k.getHours();var i=k.getMinutes();var m="AM";if(h>=12){m="PM";h=h-12}if(h==0){h=12}if(i<10){i="0"+i}var l=h+":"+i+" "+m;$("#chatline").val("["+l+"] "+n.name+": "+n.text);break;case"move":$("#cursorbox_"+n.clientid).css("top",n.top+"px");$("#cursorbox_"+n.clientid).css("left",n.left+"px");$("#cursorbox_"+n.clientid).fadeIn();break;case"save":refreshfile(n.codekey);break;case"edit":var g={row:n.row,column:n.column};if(n.clientid!=e){}}};onError=function(){alert("error")};onClose=function(){alert("closed")};sendMessage=function(h){var g={msgobj:h,clientid:e,projectkey:d,codekey:f};var i=escape($.toJSON(g));$.ajax({url:"/api/channel/sendmessage",type:"POST",cache:false,data:"jsonObj="+i,contentType:"application/json; charset=utf-8",dataType:"json",success:function(j){},error:function(){}})};sendButtonClicked=function(){if(($("#message").val()=="")||($("#message").val()=="message")){alert("Please enter a message")}else{if(($("#name").val()=="")||($("#name").val()=="name")){alert("Please enter a name")}else{sendMessage("<strong>"+$("#name").val()+"</strong>: "+$("#message").val());$("#message").val("")}}};keyPressed=function(){try{if(event.keyCode=="13"){sendButtonClicked()}}catch(g){}};nameOnFocus=function(){$("#name").val("")};messageOnFocus=function(){$("#message").val("")};socket.onopen=onOpen;socket.onmessage=onMessage;socket.onerror=onError;socket.onclose=onClose}function testselection(){}function copyToTextarea(){$("#editorinandout").val()=_editorComponent.getContent()}function copyToEditor(){_editorComponent.setContent($("#editorinandout").val())}function refreshSessionCollaborators(a){$("#filestatus").html("Someone joined!");$.ajax({type:"GET",url:"/api/file/users/"+a+"",success:function(b){if(b!=null){var g=$.parseJSON(b);$("#usercount").val(g.length);$("#markersdiv").empty();var h="";var d="";for($i=0;$i<g.length;$i++){var f=g[$i].user;var e=g[$i].color;var j=g[$i].clientid;var c=g[$i].channeltoken;var i=g[$i].project;h+='<div style="width:100px;z-index:999999;height:20px;margin-left:58px;border-left:2px solid #'+e+';position:absolute;top:71px;" id="cursorbox_'+j+'"><div style="padding:3px;border:2px solid #'+e+';background:#CDCDCD;left:-2px;bottom:20px;color:white;position:absolute;font-size:11px;" id="namebox_'+j+'">'+f+"</div></div>";d+='<div id="userline_'+j+'"style="float:left;height:16px;padding:3px;color:white;border-left:5px solid #'+e+'">'+f+"</div>"}$("#markersdiv").html(h);$("#usersonline").html(d);setTimeout('$("#filestatus").html("");',5000)}else{$("#filestatus").html("Something went wrong!")}}})}function submitChat(a,c,d){if(d==undefined){var d=$("#chattext").val()}var e={type:"chat",codekey:""+c+"",text:""+d+"",name:""+a+""};var b=escape($.toJSON(e));sendMessage(e);$("#chattext").val("")}function cursorMove(a,b,d){$("#filestatus").html(a.x+"-"+b);$("#cursorbox").css("top",a.y+"px");$("#cursorbox").css("left",a.x+"px");$("#cursorbox").fadeIn();var e={type:"move",codekey:""+d+"",linenumer:b,character:a.character};var c=escape($.toJSON(e));sendMessage(e)}function startColabSession(c,b,d){if($("#userline_"+d+"")){}else{$("#markersdiv").append('<div style="width:100px;z-index:999999;height:20px;margin-left:58px;border-left:2px solid #'+b+';position:absolute;top:71px;" id="cursorbox_'+d+'"><div style="padding:3px;border:2px solid #'+b+';background:#CDCDCD;left:-2px;bottom:20px;color:white;position:absolute;font-size:11px;" id="namebox_'+d+'">'+c+"</div></div>")}if($("#userline_"+d+"")){}else{$("#usersonline").append('<div id="userline_'+d+'"style="float:left;height:16px;padding:3px;color:white;border-left:5px solid #'+b+'">'+c+"</div>")}var a=$("#usercount").val();a=Number(a+1);$("#usercount").val(a)}function aceCursorchange(e,g,b){var d=g.row*18;d=d+70;var c=g.column*7;var f={type:"move",left:c,top:d,clientid:""+e+""};var a=escape($.toJSON(f));sendMessage(f)}function codeChange(a,d,f,i,e){var g=e.getSession().$deltas[0].range.end;var c=e.getSession().$deltas[0].range.start;var h=e.getSession().$deltas[0].text;var b=e.getSession().$deltas;var k={type:"edit",clientid:d,codekey:""+filekey+"",column:i.column,row:i.row,deltas:b,delta_text:h,delta_range_end:g,delta_range_start:c};var j=escape($.toJSON(k));sendMessage(k);$("#editor").css("height",e.getSession().doc.$lines.length*18+"px");$("#editorinandout").val(e.getSession().getValue());submitChat(a,f," has started editing the file")}function savefile(a){$("#filestatus").html("Saving file");var b=editor.getSession().getValue();$("#editorinandout").fieldSerialize();$("#editorinandout").val(b);$("#formfile").ajaxForm();$("#formfile").ajaxSubmit();$("#filestatus").html("File saved!");setTimeout('$("#filestatus").html("");',5000);$.ajax({type:"POST",url:"/api/file/save",data:"filekey="+a+"&editorinandout="+b,success:function(c){if(c!=null){$("#filestatus").html("File saved");var d={type:"save",codekey:a};sendMessage(d);submitChat(name,codekey," just saved the file")}else{$("#filestatus").html("Something went wrong!")}}})}function sendUpdate(){}function refreshfile(a){$("#filestatus").val("Refreshing file");$.ajax({type:"POST",url:"/api/file/refresh",data:"filekey="+a,success:function(c){if(c!=null){var b=$.parseJSON(c);editor.getSession().setValue(b);$("#filestatus").html("File refreshed!");setTimeout('$("#filestatus").html("");',5000)}else{$("#filestatus").html("w00t! theres a problem!")}}})}function submitComment(c,d,b){var a=$("#statusbody").val();$.ajax({type:"POST",url:"/api/streamcomment",data:"pkey="+c+"&body="+a+"&status="+b,success:function(e){if(e!=null){$("#statusbody").val("");getStream(c,d)}else{$("#statusbody").val("Something went wrong!")}}})}function getStream(a,b){$("#"+b).html('<img src="assets/ajax-loader.gif"> Hold on while we fetch the project stream..');docheight=$(document).height();$.ajax({type:"POST",url:"/api/getprojectstream",data:"pkey="+a+"",success:function(c){if(c!=null){$("#"+b).html(c)}else{}}})}function googleConnect(a){google.friendconnect.container.setParentUrl("/rpc_relay.html");google.friendconnect.container.initOpenSocialApi({site:a,onload:function(b){if(!window.timesloaded){window.timesloaded=1}else{window.timesloaded++}if(window.timesloaded>1){window.top.location.href="/api/user/friendconnect"}}})}function initWaveFromDb(a){$("#status").html("Please wait while we do some magic.");$.ajax({type:"POST",url:"/api/checkwaveid",data:"codekey="+a+"",success:function(b){$("#status").html("Got response.");if(b!=null){$("#status").html(b);window.top.location.href="/session/"+a+""}else{$("#status").html("Checking again...");initWaveFromDb(""+a+"")}}})}function FBConnectFront(){FB.Bootstrap.requireFeatures(["Connect"],function(){FB.init("d8e8e7f3873dcc631dfe72df510e97f2","/fbconnect/xd_receiver.htm")})}function FBConnect(){FB.Bootstrap.requireFeatures(["Connect"],function(){FB.init("d8e8e7f3873dcc631dfe72df510e97f2","/fbconnect/xd_receiver.htm");FB.Connect.ifUserConnected(update_user_box)})}function FBConnectAppReg(){FB.Bootstrap.requireFeatures(["Connect"],function(){FB.init("d8e8e7f3873dcc631dfe72df510e97f2","/fbconnect/xd_receiver.htm");FB.Connect.ifUserConnected(updateAppRegTable)})}function updateAppRegTable(){var c=document.getElementById("user");var b=document.getElementById("firstnamerow");var g=document.getElementById("lastnamerow");var e=document.getElementById("passwordrow");var f=document.getElementById("emailrow");var a=document.getElementById("fbinvitekeyrow");FB.Bootstrap.requireFeatures(["Connect"],function(){FB.init("d8e8e7f3873dcc631dfe72df510e97f2","/fbconnect/xd_receiver.htm");var h=FB.Connect.get_loggedInUser()});var d=fbuser;b.style.display="none";g.style.display="none";f.style.display="none";e.style.display="none";a.style.display="none";$("fbflag").value="true";c.innerHTML="<span style='font-size:18px;color:#4C67A1'>Welcome, <fb:name uid=loggedinuser useyou=false></fb:name>. You are signed in with your Facebook account for workforoptions.<br><span style=\"font-size:18px;color:#4C67A1\"></span></span>";c.style.display="";FB.XFBML.Host.parseDomTree()};
