Function.__typeName="Function";Function.__class=true;Function.createCallback=function(a,b){return function(){var c=arguments.length;if(c>0){var d=[];for(var e=0;e<c;e++){d[e]=arguments[e]}d[c]=b;return a.apply(this,d)}return a.call(this,b)}};Function.createDelegate=function(b,a){return function(){return a.apply(b,arguments)}};(function(){window.Type=Function;window.Sys={__rootNamespaces:["Sys"],__namespace:true,__typeName:"Sys",getName:function(){return this.__typeName}};Type.prototype.callBaseMethod=function(B,C,A){this.__baseType.prototype[C].apply(B,A||[])};function Type$prototype$implementsInterface(E){Type$prototype$resolveInheritance.call(this);var F=E.__typeName,B=this.__interfaceCache;if(B){var D=B[F];if(typeof D!=="undefined"){return D}}else{B=this.__interfaceCache={}}var A=this;while(A){var C=A.__interfaces;if(C){if(Array.indexOf(C,E)!==-1){return B[F]=true}}A=A.__baseType}return B[F]=false}function Type$prototype$inheritsFrom(A){Type$prototype$resolveInheritance.call(this);var B=this.__baseType;while(B){if(B===A){return true}B=B.__baseType}return false}Type.prototype.initializeBase=function(B,A){Type$prototype$resolveInheritance.call(this);if(this.__baseType){if(!A){this.__baseType.apply(B)}else{this.__baseType.apply(B,A)}}return B};function Type$prototype$isInstanceOfType(A){if(typeof A==="undefined"||A===null){return false}if(A instanceof this){return true}var B=Object$getType(A);return !!(B===this)||Type$prototype$inheritsFrom.call(B,this)||Type$prototype$implementsInterface.call(B,this)}Type.prototype.registerClass=function(E,A,D){this.prototype.constructor=this;this.__typeName=E;this.__class=true;if(A){this.__baseType=A;this.__basePrototypePending=true}if(!Sys.__classes){Sys.__classes={}}Sys.__classes[E.toUpperCase()]=this;if(D){this.__interfaces=[];for(var B=2;B<arguments.length;B++){var C=arguments[B];this.__interfaces.push(C)}}return this};function Type$prototype$registerInterface(A){this.prototype.constructor=this;this.__typeName=A;this.__interface=true;return this}function Type$prototype$resolveInheritance(){if(this.__basePrototypePending){var A=this.__baseType;Type$prototype$resolveInheritance.call(A);for(var B in A.prototype){var C=A.prototype[B];if(!this.prototype[B]){this.prototype[B]=C}}delete this.__basePrototypePending}}Type.parse=function(typeName,ns){var fn;if(ns){if(!Sys.__classes){return null}fn=Sys.__classes[ns.__typeName.toUpperCase()+"."+typeName.toUpperCase()];return fn||null}if(!typeName){return null}if(!Type.__htClasses){Type.__htClasses={}}fn=Type.__htClasses[typeName];if(!fn){fn=eval(typeName);Type.__htClasses[typeName]=fn}return fn};function Object$getType(A){var B=A.constructor;if(!B||typeof B!=="function"||!B.__typeName||B.__typeName==="Object"){return Object}return B}Date._appendPreOrPostMatch=function(E,A){var F=0,B=false;for(var G=0,C=E.length;G<C;G++){var D=E.charAt(G);switch(D){case"'":if(B){A.append("'")}else{F++}B=false;break;case"\\":if(B){A.append("\\")}B=!B;break;default:A.append(D);B=false;break}}return F};Date._expandFormat=function(B,A){if(!A){A="F"}if(A.length===1){switch(A){case"d":return B.ShortDatePattern;case"D":return B.LongDatePattern;case"t":return B.ShortTimePattern;case"T":return B.LongTimePattern;case"F":return B.FullDateTimePattern;case"M":case"m":return B.MonthDayPattern;case"s":return B.SortableDateTimePattern;case"Y":case"y":return B.YearMonthPattern;default:throw Error.create("Input string was not in a correct format.","FormatException")}}return A};Date._getTokenRegExp=function(){return/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};Date.prototype.format=function(A){return this._toFormattedString(A,Sys.CultureInfo.InvariantCulture)};Date.prototype._toFormattedString=function(H,E){if(!H||H.length===0||H==="i"){if(E&&E.name.length>0){return this.toLocaleString()}else{return this.toString()}}var I=E.dateTimeFormat;H=Date._expandFormat(I,H);var L=new Sys.StringBuilder,K;function J(M){if(M<10){return"0"+M}return M.toString()}function F(M){if(M<10){return"00"+M}if(M<100){return"0"+M}return M.toString()}var C=0,D=Date._getTokenRegExp();for(;true;){var A=D.lastIndex,G=D.exec(H),B=H.slice(A,G?G.index:H.length);C+=Date._appendPreOrPostMatch(B,L);if(!G){break}if(C%2===1){L.append(G[0]);continue}switch(G[0]){case"dddd":L.append(I.DayNames[this.getDay()]);break;case"ddd":L.append(I.AbbreviatedDayNames[this.getDay()]);break;case"dd":L.append(J(this.getDate()));break;case"d":L.append(this.getDate());break;case"MMMM":L.append(I.MonthNames[this.getMonth()]);break;case"MMM":L.append(I.AbbreviatedMonthNames[this.getMonth()]);break;case"MM":L.append(J(this.getMonth()+1));break;case"M":L.append(this.getMonth()+1);break;case"yyyy":L.append(this.getFullYear());break;case"yy":L.append(J(this.getFullYear()%100));break;case"y":L.append(this.getFullYear()%100);break;case"hh":K=this.getHours()%12;if(K===0){K=12}L.append(J(K));break;case"h":K=this.getHours()%12;if(K===0){K=12}L.append(K);break;case"HH":L.append(J(this.getHours()));break;case"H":L.append(this.getHours());break;case"mm":L.append(J(this.getMinutes()));break;case"m":L.append(this.getMinutes());break;case"ss":L.append(J(this.getSeconds()));break;case"s":L.append(this.getSeconds());break;case"tt":L.append(this.getHours()<12?I.AMDesignator:I.PMDesignator);break;case"t":L.append((this.getHours()<12?I.AMDesignator:I.PMDesignator).charAt(0));break;case"f":L.append(F(this.getMilliseconds()).charAt(0));break;case"ff":L.append(F(this.getMilliseconds()).substr(0,2));break;case"fff":L.append(F(this.getMilliseconds()));break;case"z":K=this.getTimezoneOffset()/60;L.append((K>=0?"+":"-")+Math.floor(Math.abs(K)));break;case"zz":K=this.getTimezoneOffset()/60;L.append((K>=0?"+":"-")+J(Math.floor(Math.abs(K))));break;case"zzz":K=this.getTimezoneOffset()/60;L.append((K>=0?"+":"-")+J(Math.floor(Math.abs(K)))+I.TimeSeparator+J(Math.abs(this.getTimezoneOffset()%60)));break}}return L.toString()};Number.__typeName="Number";Number.__class=true;Number.parseLocale=function(A){return Number._parse(A,Sys.CultureInfo.CurrentCulture)};Number.parseInvariant=function(A){return Number._parse(A,Sys.CultureInfo.InvariantCulture)};Number._parse=function(C,D){var B=C.trim();if(B.match(/infinity/i)!==null){return parseFloat(B)}if(B.match(/^0x[a-f0-9]+$/i)!==null){return parseInt(B)}var F=D.numberFormat,A=F.NumberDecimalSeparator,G=F.NumberGroupSeparator,E=new RegExp("^[+-]?[\\d\\"+G+"]*\\"+A+"?\\d*([eE][+-]?\\d+)?$");if(!B.match(E)){return Number.NaN}B=B.split(G).join("");B=B.replace(A,".");return parseFloat(B)};Number.prototype.format=function(A){return this._toFormattedString(A,Sys.CultureInfo.InvariantCulture)};Number.prototype.localeFormat=function(A){return this._toFormattedString(A,Sys.CultureInfo.CurrentCulture)};Number.prototype._toFormattedString=function(P,J){if(!P||P.length===0||P==="i"){if(J&&J.name.length>0){return this.toLocaleString()}else{return this.toString()}}var C=["n %","n%","%n"],D=["-n %","-n%","-%n"],B=["(n)","-n","- n","n-","n -"],E=["$n","n$","$ n","n $"],F=["($n)","-$n","$-n","$n-","(n$)","-n$","n-$","n$-","-n $","-$ n","n $-","$ n-","$ -n","n- $","($ n)","(n $)"];function K(T,Y,Z,X,U){var u=Z[0],s=1,w=T.toString(),y="",W="",q=w.split(".");if(q.length>1){w=q[0];y=q[1];var r=y.split(/e/i);if(r.length>1){y=r[0];W="e"+r[1]}}if(Y>0){var t=y.length-Y;if(t>0){y=y.slice(0,Y)}else{if(t<0){for(var V=0;V<Math.abs(t);V++){y+="0"}}}y=U+y}else{y=""}y+=W;var x=w.length-1,v="";while(x>=0){if(u===0||u>x){if(v.length>0){return w.slice(0,x+1)+X+v+y}else{return w.slice(0,x+1)+y}}if(v.length>0){v=w.slice(x-u+1,x+1)+X+v}else{v=w.slice(x-u+1,x+1)}x-=u;if(s<Z.length){u=Z[s];s++}}return w.slice(0,x+1)+X+v+y}var S=J.numberFormat,O=Math.abs(this);if(!P){P="D"}var R=-1;if(P.length>1){R=parseInt(P.slice(1))}var Q;switch(P.charAt(0)){case"d":case"D":Q="n";if(R!==-1){var M=""+O,I=R-M.length;if(I>0){for(var G=0;G<I;G++){M="0"+M}}O=M}if(this<0){O=-O}break;case"c":case"C":if(this<0){Q=F[S.CurrencyNegativePattern]}else{Q=E[S.CurrencyPositivePattern]}if(R===-1){R=S.CurrencyDecimalDigits}O=K(Math.abs(this),R,S.CurrencyGroupSizes,S.CurrencyGroupSeparator,S.CurrencyDecimalSeparator);break;case"n":case"N":if(this<0){Q=B[S.NumberNegativePattern]}else{Q="n"}if(R===-1){R=S.NumberDecimalDigits}O=K(Math.abs(this),R,S.NumberGroupSizes,S.NumberGroupSeparator,S.NumberDecimalSeparator);break;case"p":case"P":if(this<0){Q=D[S.PercentNegativePattern]}else{Q=C[S.PercentPositivePattern]}if(R===-1){R=S.PercentDecimalDigits}O=K(Math.abs(this),R,S.PercentGroupSizes,S.PercentGroupSeparator,S.PercentDecimalSeparator);break;default:throw Error.create("Format specifier was invalid.","FormatException")}var H=/n|\$|-|%/g,N="";for(;true;){var A=H.lastIndex,L=H.exec(Q);N+=Q.slice(A,L?L.index:Q.length);if(!L){break}switch(L[0]){case"n":N+=O;break;case"$":N+=S.CurrencySymbol;break;case"-":N+=S.NegativeSign;break;case"%":N+=S.PercentSymbol;break}}return N};RegExp.__typeName="RegExp";RegExp.__class=true;Array.__typeName="Array";Array.__class=true;Array.add=Array.enqueue=function(B,A){B[B.length]=A};Array.addRange=function(B,A){B.push.apply(B,A)};Array.clear=function(A){A.length=0};Array.clone=function(A){if(A.length===1){return[A[0]]}else{return Array.apply(null,A)}};Array.contains=function(B,A){return Array.indexOf(B,A)>=0};Array.dequeue=function(A){return A.shift()};Array.indexOf=function(D,C,B){if(typeof C==="undefined"){return -1}var E=D.length;if(E!==0){B=B-0;if(isNaN(B)){B=0}else{if(isFinite(B)){B=B-B%1}if(B<0){B=Math.max(0,E+B)}}for(var A=B;A<E;A++){if(typeof D[A]!=="undefined"&&D[A]===C){return A}}}return -1};Array.insert=function(B,A,C){B.splice(A,0,C)};Array.parse=function(value){if(!value){return[]}return eval(value)};Array.remove=function(A,C){var B=Array.indexOf(A,C);if(B>=0){A.splice(B,1)}return B>=0};Array.removeAt=function(B,A){B.splice(A,1)};String.__typeName="String";String.__class=true;Sys.IDisposable=function(){};Sys.IDisposable.prototype={};Type$prototype$registerInterface.call(Sys.IDisposable,"Sys.IDisposable");Sys.StringBuilder=function(A){this._parts=typeof A!=="undefined"&&A!==null&&A!==""?[A.toString()]:[];this._value={};this._len=0};Sys.StringBuilder.prototype={append:function(A){this._parts[this._parts.length]=A},appendLine:function(A){this._parts[this._parts.length]=typeof A==="undefined"||A===null||A===""?"\r\n":A+"\r\n"},clear:function(){this._parts=[];this._value={};this._len=0},isEmpty:function(){if(this._parts.length===0){return true}return this.toString()===""},toString:function(B){B=B||"";var A=this._parts;if(this._len!==A.length){this._value={};this._len=A.length}var C=this._value;if(typeof C[B]==="undefined"){if(B!==""){for(var D=0;D<A.length;){if(typeof A[D]==="undefined"||A[D]===""||A[D]===null){A.splice(D,1)}else{D++}}}C[B]=this._parts.join(B)}return C[B]}};Sys.StringBuilder.registerClass("Sys.StringBuilder");if(!window.XMLHttpRequest){window.XMLHttpRequest=function(){var A=["Msxml2.XMLHTTP","Microsoft.XMLHTTP"];for(var B=0;B<A.length;B++){try{var D=new ActiveXObject(A[B]);return D}catch(C){}}return null}}namespace("Sys.UI");function Sys$Enum$parse(I,G){var K,J,C;if(G){K=this.__lowerCaseValues;if(!K){this.__lowerCaseValues=K={};var E=this.prototype;for(var F in E){K[F.toLowerCase()]=E[F]}}}else{K=this.prototype}if(!this.__flags){C=G?I.toLowerCase():I;J=K[C.trim()];if(typeof J!=="number"){var msg=["'",I,"' is not a valid value for enum ",this.__typeName,"."].join("");throw Error.create(msg,"InvalidArgument")}return J}else{var D=(G?I.toLowerCase():I).split(","),B=0;for(var H=D.length-1;H>=0;H--){var A=D[H].trim();J=K[A];if(typeof J!=="number"){var msg=["'",I.split(",")[H].trim(),"' is not a valid value for enum ",this.__typeName,"."].join("");throw Error.create(msg,"InvalidArgument")}B|=J}return B}}function Sys$Enum$toString(H){if(typeof H==="undefined"||H===null){return this.__string}var G=this.prototype,B;if(!this.__flags||H===0){for(B in G){if(G[B]===H){return B}}}else{var A=this.__sortedValues;if(!A){A=[];for(B in G){A[A.length]={key:B,value:G[B]}}A.sort(function(J,I){return J.value-I.value});this.__sortedValues=A}var F=[],D=H;for(B=A.length-1;B>=0;B--){var C=A[B],E=C.value;if(E===0){continue}if((E&H)===E){F[F.length]=C.key;D-=E;if(D===0){break}}}if(F.length&&D===0){return F.reverse().join(", ")}}return""}Type.prototype.registerEnum=function(C,A){for(var B in this.prototype){this[B]=this.prototype[B]}this.__typeName=C;this.parse=Sys$Enum$parse;this.__string=this.toString();this.toString=Sys$Enum$toString;this.__flags=A;this.__enum=true};Type.isEnum=function(A){if(typeof A==="undefined"||A===null){return false}return !!A.__enum};Type.isFlags=function(A){if(typeof A==="undefined"||A===null){return false}return !!A.__flags};Sys.EventHandlerList=function(){this._list={}};Sys.EventHandlerList.prototype={addHandler:function(A,B){Array.add(this._getEvent(A,true),B)},removeHandler:function(C,A){var B=this._getEvent(C);if(!B){return}Array.remove(B,A)},getHandler:function(A){var B=this._getEvent(A);if(!B||B.length===0){return null}B=Array.clone(B);if(!B._handler){B._handler=function(F,E){for(var C=0,D=B.length;C<D;C++){B[C](F,E)}}}return B._handler},_getEvent:function(B,A){if(!this._list[B]){if(!A){return null}this._list[B]=[]}return this._list[B]}};Sys.EventHandlerList.registerClass("Sys.EventHandlerList");Sys.EventArgs=function(){};Sys.EventArgs.registerClass("Sys.EventArgs");Sys.EventArgs.Empty=new Sys.EventArgs;Sys.CancelEventArgs=function(){Sys.CancelEventArgs.initializeBase(this);this._cancel=false};Sys.CancelEventArgs.prototype={get_cancel:function(){return this._cancel},set_cancel:function(A){this._cancel=A}};Sys.CancelEventArgs.registerClass("Sys.CancelEventArgs",Sys.EventArgs);Sys.INotifyPropertyChange=function(){};Sys.INotifyPropertyChange.prototype={};Type$prototype$registerInterface.call(Sys.INotifyPropertyChange,"Sys.INotifyPropertyChange");Sys.PropertyChangedEventArgs=function(A){Sys.PropertyChangedEventArgs.initializeBase(this);this._propertyName=A};Sys.PropertyChangedEventArgs.prototype={get_propertyName:function(){return this._propertyName}};Sys.PropertyChangedEventArgs.registerClass("Sys.PropertyChangedEventArgs",Sys.EventArgs);Sys.INotifyDisposing=function(){};Sys.INotifyDisposing.prototype={};Type$prototype$registerInterface.call(Sys.INotifyDisposing,"Sys.INotifyDisposing");Sys.Component=function(){if(Sys.Application){Sys.Application.registerDisposableObject(this)}};Sys.Component.prototype={_id:null,_initialized:false,_updating:false,get_events:function(){if(!this._events){this._events=new Sys.EventHandlerList}return this._events},get_id:function(){return this._id},set_id:function(A){this._id=A},get_isInitialized:function(){return this._initialized},get_isUpdating:function(){return this._updating},add_disposing:function(A){this.get_events().addHandler("disposing",A)},remove_disposing:function(A){this.get_events().removeHandler("disposing",A)},add_propertyChanged:function(A){this.get_events().addHandler("propertyChanged",A)},remove_propertyChanged:function(A){this.get_events().removeHandler("propertyChanged",A)},beginUpdate:function(){this._updating=true},dispose:function(){if(this._events){var A=this._events.getHandler("disposing");if(A){A(this,Sys.EventArgs.Empty)}}delete this._events;Sys.Application.unregisterDisposableObject(this);Sys.Application.removeComponent(this)},endUpdate:function(){this._updating=false;if(!this._initialized){this.initialize()}this.updated()},initialize:function(){this._initialized=true},raisePropertyChanged:function(A){if(!this._events){return}var B=this._events.getHandler("propertyChanged");if(B){B(this,new Sys.PropertyChangedEventArgs(A))}},updated:function(){}};Sys.Component.registerClass("Sys.Component",null,Sys.IDisposable,Sys.INotifyPropertyChange,Sys.INotifyDisposing);function Sys$Component$_setProperties(N,F){var K,E=Object$getType(N),J=E===Object||E===Sys.UI.DomElement,G=Type$prototype$isInstanceOfType.call(Sys.Component,N)&&!N.get_isUpdating();if(G){N.beginUpdate()}for(var L in F){var M=F[L],I=J?null:N["get_"+L];if(J||typeof I!=="function"){var D=N[L];if(!M||typeof M!=="object"||J&&!D){N[L]=M}else{Sys$Component$_setProperties(D,M)}}else{var C=N["set_"+L];if(typeof C==="function"){C.apply(N,[M])}else{if(M instanceof Array){K=I.apply(N);for(var H=0,B=K.length,A=M.length;H<A;H++,B++){K[B]=M[H]}}else{if(typeof M==="object"&&Object$getType(M)===Object){K=I.apply(N);Sys$Component$_setProperties(K,M)}}}}}if(G){N.endUpdate()}}function Sys$Component$_setReferences(E,A){for(var B in A){var C=E["set_"+B],D=$find(A[B]);C.apply(E,[D])}}window.$create=Sys.Component.create=function(B,D,F,G,C){var I=C?new B(C):new B,H=Sys.Application,A=H.get_isCreatingComponents();I.beginUpdate();if(D){Sys$Component$_setProperties(I,D)}if(F){for(var E in F){I["add_"+E](F[E])}}H._createdComponents[H._createdComponents.length]=I;if(I.get_id()){H.addComponent(I)}if(A){if(G){H._addComponentToSecondPass(I,G)}else{I.endUpdate()}}else{if(G){Sys$Component$_setReferences(I,G)}I.endUpdate()}return I};Sys.UI.MouseButton=function(){throw Error.notImplemented()};Sys.UI.MouseButton.prototype={leftButton:0,middleButton:1,rightButton:2};Sys.UI.MouseButton.registerEnum("Sys.UI.MouseButton");Sys.UI.Key=function(){throw Error.notImplemented()};Sys.UI.Key.prototype={backspace:8,tab:9,enter:13,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,del:127};Sys.UI.Key.registerEnum("Sys.UI.Key");Sys.UI.DomEvent=function(C){var B=C;this.rawEvent=B;this.altKey=B.altKey;if(typeof B.button!=="undefined"){this.button=typeof B.which!=="undefined"?B.button:B.button===4?Sys.UI.MouseButton.middleButton:B.button===2?Sys.UI.MouseButton.rightButton:Sys.UI.MouseButton.leftButton}if(B.type==="keypress"){this.charCode=B.charCode||B.keyCode}else{if(B.keyCode&&B.keyCode===46){this.keyCode=127}else{this.keyCode=B.keyCode}}this.clientX=B.clientX;this.clientY=B.clientY;this.ctrlKey=B.ctrlKey;this.target=B.target?B.target:B.srcElement;if(this.target){var A=Sys.UI.DomElement.getLocation(this.target);this.offsetX=typeof B.offsetX!=="undefined"?B.offsetX:window.pageXOffset+(B.clientX||0)-A.x;this.offsetY=typeof B.offsetY!=="undefined"?B.offsetY:window.pageYOffset+(B.clientY||0)-A.y}this.screenX=B.screenX;this.screenY=B.screenY;this.shiftKey=B.shiftKey;this.type=B.type};Sys.UI.DomEvent.prototype={preventDefault:function(){if(this.rawEvent.preventDefault){this.rawEvent.preventDefault()}else{if(window.event){window.event.returnValue=false}}},stopPropagation:function(){if(this.rawEvent.stopPropagation){this.rawEvent.stopPropagation()}else{if(window.event){window.event.cancelBubble=true}}}};Sys.UI.DomEvent.registerClass("Sys.UI.DomEvent");window.$addHandler=Sys.UI.DomEvent.addHandler=function(B,D,C){if(!B._events){B._events={}}var E=B._events[D];if(!E){B._events[D]=E=[]}var A;if(B.addEventListener){A=function(F){return C.call(B,new Sys.UI.DomEvent(F))};B.addEventListener(D,A,false)}else{if(B.attachEvent){A=function(){return C.call(B,new Sys.UI.DomEvent(window.event))};B.attachEvent("on"+D,A)}}E[E.length]={handler:C,browserHandler:A}};window.$addHandlers=Sys.UI.DomEvent.addHandlers=function(C,D,E){for(var A in D){var B=D[A];if(E){B=Function.createDelegate(E,B)}$addHandler(C,A,B)}};window.$clearHandlers=Sys.UI.DomEvent.clearHandlers=function(B){if(B._events){var C=B._events;for(var A in C){var D=C[A];for(var E=D.length-1;E>=0;E--){$removeHandler(B,A,D[E].handler)}}B._events=null}};window.$removeHandler=Sys.UI.DomEvent.removeHandler=function(B,E,D){var F=null,G=B._events[E],F=null;for(var A=0,C=G.length;A<C;A++){if(G[A].handler===D){F=G[A].browserHandler;break}}if(B.removeEventListener){B.removeEventListener(E,F,false)}else{if(B.detachEvent){B.detachEvent("on"+E,F)}}G.splice(A,1)};Sys.IContainer=function(){};Sys.IContainer.prototype={};Type$prototype$registerInterface.call(Sys.IContainer,"Sys.IContainer");Sys.ApplicationLoadEventArgs=function(A,B){Sys.ApplicationLoadEventArgs.initializeBase(this);this._components=A;this._isPartialLoad=B};Sys.ApplicationLoadEventArgs.prototype={get_components:function(){return this._components},get_isPartialLoad:function(){return this._isPartialLoad}};Sys.ApplicationLoadEventArgs.registerClass("Sys.ApplicationLoadEventArgs",Sys.EventArgs);Sys._Application=function(){Sys._Application.initializeBase(this);this._disposableObjects=[];this._components={};this._createdComponents=[];this._secondPassComponents=[];this._unloadHandlerDelegate=Function.createDelegate(this,this._unloadHandler);this._loadHandlerDelegate=Function.createDelegate(this,this._loadHandler);Sys.UI.DomEvent.addHandler(window,"unload",this._unloadHandlerDelegate);Sys.UI.DomEvent.addHandler(window,"load",this._loadHandlerDelegate)};Sys._Application.prototype={_creatingComponents:false,_disposing:false,get_isCreatingComponents:function(){return this._creatingComponents},add_load:function(A){this.get_events().addHandler("load",A)},remove_load:function(A){this.get_events().removeHandler("load",A)},add_init:function(A){if(this._initialized){A(this,Sys.EventArgs.Empty)}else{this.get_events().addHandler("init",A)}},remove_init:function(A){this.get_events().removeHandler("init",A)},add_unload:function(A){this.get_events().addHandler("unload",A)},remove_unload:function(A){this.get_events().removeHandler("unload",A)},addComponent:function(A){this._components[A.get_id()]=A},beginCreateComponents:function(){this._creatingComponents=true},dispose:function(){if(!this._disposing){this._disposing=true;if(window.pageUnload){window.pageUnload(this,Sys.EventArgs.Empty)}var E=this.get_events().getHandler("unload");if(E){E(this,Sys.EventArgs.Empty)}var A=Array.clone(this._disposableObjects);for(var B=0,C=A.length;B<C;B++){A[B].dispose()}Array.clear(this._disposableObjects);Sys.UI.DomEvent.removeHandler(window,"unload",this._unloadHandlerDelegate);if(this._loadHandlerDelegate){Sys.UI.DomEvent.removeHandler(window,"load",this._loadHandlerDelegate);this._loadHandlerDelegate=null}Sys._Application.callBaseMethod(this,"dispose")}},endCreateComponents:function(){var A=this._secondPassComponents;for(var B=0,C=A.length;B<C;B++){var D=A[B].component;Sys$Component$_setReferences(D,A[B].references);D.endUpdate()}this._secondPassComponents=[];this._creatingComponents=false},findComponent:function(A,B){return B?Type$prototype$isInstanceOfType.call(Sys.IContainer,B)?B.findComponent(A):B[A]||null:Sys.Application._components[A]||null},getComponents:function(){var B=[],A=this._components;for(var C in A){B[B.length]=A[C]}return B},initialize:function(){if(!this._initialized&&!this._initializing){this._initializing=true;window.setTimeout(Function.createDelegate(this,this._doInitialize),0)}},notifyScriptLoaded:function(){},registerDisposableObject:function(A){if(!this._disposing){this._disposableObjects[this._disposableObjects.length]=A}},raiseLoad:function(){var A=this.get_events().getHandler("load"),B=new Sys.ApplicationLoadEventArgs(Array.clone(this._createdComponents),!this._initializing);if(A){A(this,B)}if(window.pageLoad){window.pageLoad(this,B)}this._createdComponents=[]},removeComponent:function(A){var B=A.get_id();if(B){delete this._components[B]}},unregisterDisposableObject:function(A){if(!this._disposing){Array.remove(this._disposableObjects,A)}},_addComponentToSecondPass:function(A,B){this._secondPassComponents[this._secondPassComponents.length]={component:A,references:B}},_doInitialize:function(){Sys._Application.callBaseMethod(this,"initialize");var A=this.get_events().getHandler("init");if(A){this.beginCreateComponents();A(this,Sys.EventArgs.Empty);this.endCreateComponents()}this.raiseLoad();this._initializing=false},_loadHandler:function(){if(this._loadHandlerDelegate){Sys.UI.DomEvent.removeHandler(window,"load",this._loadHandlerDelegate);this._loadHandlerDelegate=null}this.initialize()},_unloadHandler:function(){this.dispose()}};Sys._Application.registerClass("Sys._Application",Sys.Component,Sys.IContainer);Sys.Application=new Sys._Application;window.$find=Sys.Application.findComponent;namespace("Sys.Net");Sys.Net.WebRequestExecutor=function(){this._webRequest=null;this._resultObject=null};Sys.Net.WebRequestExecutor.prototype={get_webRequest:function(){return this._webRequest},_set_webRequest:function(A){this._webRequest=A},get_started:function(){throw Error.notImplemented()},get_responseAvailable:function(){throw Error.notImplemented()},get_timedOut:function(){throw Error.notImplemented()},get_aborted:function(){throw Error.notImplemented()},get_responseData:function(){throw Error.notImplemented()},get_statusCode:function(){throw Error.notImplemented()},get_statusText:function(){throw Error.notImplemented()},get_xml:function(){throw Error.notImplemented()},get_object:function(){if(!this._resultObject){this._resultObject=Sys.Serialization.JavaScriptSerializer.deserialize(this.get_responseData())}return this._resultObject},executeRequest:function(){throw Error.notImplemented()},abort:function(){throw Error.notImplemented()},getResponseHeader:function(){throw Error.notImplemented()},getAllResponseHeaders:function(){throw Error.notImplemented()}};Sys.Net.WebRequestExecutor.registerClass("Sys.Net.WebRequestExecutor");var XMLDOM=function(E){if(!window.DOMParser){var F=["Msxml2.DOMDocument.3.0","Msxml2.DOMDocument"];for(var A=0;A<F.length;A++){try{var B=new ActiveXObject(F[A]);B.async=false;B.loadXML(E);B.setProperty("SelectionLanguage","XPath");return B}catch(C){}}return null}else{try{var D=new window.DOMParser;return D.parseFromString(E,"text/xml")}catch(C){return null}}return null};Sys.Net.XMLHttpExecutor=function(){Sys.Net.XMLHttpExecutor.initializeBase(this);var A=this;this._xmlHttpRequest=null;this._webRequest=null;this._responseAvailable=false;this._timedOut=false;this._timer=null;this._aborted=false;this._started=false;this._onReadyStateChange=function(){if(A._xmlHttpRequest.readyState===4){A._clearTimer();A._responseAvailable=true;A._webRequest.completed(Sys.EventArgs.Empty);if(A._xmlHttpRequest!=null){A._xmlHttpRequest.onreadystatechange=jQuery.noop;A._xmlHttpRequest=null}}};this._clearTimer=function(){if(A._timer!=null){window.clearTimeout(A._timer);A._timer=null}};this._onTimeout=function(){if(!A._responseAvailable){A._clearTimer();A._timedOut=true;A._xmlHttpRequest.onreadystatechange=jQuery.noop;A._xmlHttpRequest.abort();A._webRequest.completed(Sys.EventArgs.Empty);A._xmlHttpRequest=null}}};Sys.Net.XMLHttpExecutor.prototype={get_timedOut:function(){return this._timedOut},get_started:function(){return this._started},get_responseAvailable:function(){return this._responseAvailable},get_aborted:function(){return this._aborted},executeRequest:function(){this._webRequest=this.get_webRequest();var F=this._webRequest.get_body(),B=this._webRequest.get_headers();this._xmlHttpRequest=new XMLHttpRequest;this._xmlHttpRequest.onreadystatechange=this._onReadyStateChange;var D=this._webRequest.get_httpVerb();this._xmlHttpRequest.open(D,this._webRequest.getResolvedUrl(),true);if(B){for(var A in B){var C=B[A];if(typeof C!=="function"){this._xmlHttpRequest.setRequestHeader(A,C)}}}if(D.toLowerCase()==="post"){if(B===null||!B["Content-Type"]){this._xmlHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}if(!F){F=""}}var E=this._webRequest.get_timeout();if(E>0){this._timer=window.setTimeout(Function.createDelegate(this,this._onTimeout),E)}this._xmlHttpRequest.send(F);this._started=true},getResponseHeader:function(A){var B;try{B=this._xmlHttpRequest.getResponseHeader(A)}catch(C){}if(!B){B=""}return B},getAllResponseHeaders:function(){return this._xmlHttpRequest.getAllResponseHeaders()},get_responseData:function(){return this._xmlHttpRequest.responseText},get_statusCode:function(){return this._xmlHttpRequest.status},get_statusText:function(){return this._xmlHttpRequest.statusText},get_xml:function(){var A=this._xmlHttpRequest.responseXML;if(!A||!A.documentElement){A=new XMLDOM(this._xmlHttpRequest.responseText);if(!A||!A.documentElement){return null}}else{if(navigator.userAgent.indexOf("MSIE")!==-1){A.setProperty("SelectionLanguage","XPath")}}if(A.documentElement.namespaceURI==="http://www.mozilla.org/newlayout/xml/parsererror.xml"&&A.documentElement.tagName==="parsererror"){return null}if(A.documentElement.firstChild&&A.documentElement.firstChild.tagName==="parsererror"){return null}return A},abort:function(){if(this._aborted||this._responseAvailable||this._timedOut){return}this._aborted=true;this._clearTimer();if(this._xmlHttpRequest&&!this._responseAvailable){this._xmlHttpRequest.onreadystatechange=jQuery.noop;this._xmlHttpRequest.abort();this._xmlHttpRequest=null;var A=this._webRequest._get_eventHandlerList().getHandler("completed");if(A){A(this,Sys.EventArgs.Empty)}}}};Sys.Net.XMLHttpExecutor.registerClass("Sys.Net.XMLHttpExecutor",Sys.Net.WebRequestExecutor);Sys.Net._WebRequestManager=function(){this._this=this;this._defaultTimeout=0;this._defaultExecutorType="Sys.Net.XMLHttpExecutor"};Sys.Net._WebRequestManager.prototype={add_invokingRequest:function(A){this._get_eventHandlerList().addHandler("invokingRequest",A)},remove_invokingRequest:function(A){this._get_eventHandlerList().removeHandler("invokingRequest",A)},add_completedRequest:function(A){this._get_eventHandlerList().addHandler("completedRequest",A)},remove_completedRequest:function(A){this._get_eventHandlerList().removeHandler("completedRequest",A)},_get_eventHandlerList:function(){if(!this._events){this._events=new Sys.EventHandlerList}return this._events},get_defaultTimeout:function(){return this._defaultTimeout},set_defaultTimeout:function(A){this._defaultTimeout=A},get_defaultExecutorType:function(){return this._defaultExecutorType},set_defaultExecutorType:function(A){this._defaultExecutorType=A},executeRequest:function(webRequest){var executor=webRequest.get_executor();if(!executor){var failed=false;try{var executorType=eval(this._defaultExecutorType);executor=new executorType}catch(a){failed=true}webRequest.set_executor(executor)}if(executor.get_aborted()){return}var evArgs=new Sys.Net.NetworkRequestEventArgs(webRequest),handler=this._get_eventHandlerList().getHandler("invokingRequest");if(handler){handler(this,evArgs)}if(!evArgs.get_cancel()){executor.executeRequest()}}};Sys.Net._WebRequestManager.registerClass("Sys.Net._WebRequestManager");Sys.Net.WebRequestManager=new Sys.Net._WebRequestManager;Sys.Net.NetworkRequestEventArgs=function(A){Sys.Net.NetworkRequestEventArgs.initializeBase(this);this._webRequest=A};Sys.Net.NetworkRequestEventArgs.prototype={get_webRequest:function(){return this._webRequest}};Sys.Net.NetworkRequestEventArgs.registerClass("Sys.Net.NetworkRequestEventArgs",Sys.CancelEventArgs);Sys.Net.WebRequest=function(){this._url="";this._headers={};this._body=null;this._userContext=null;this._httpVerb=null;this._executor=null;this._invokeCalled=false;this._timeout=0};Sys.Net.WebRequest.prototype={add_completed:function(A){this._get_eventHandlerList().addHandler("completed",A)},remove_completed:function(A){this._get_eventHandlerList().removeHandler("completed",A)},completed:function(A){var B=Sys.Net.WebRequestManager._get_eventHandlerList().getHandler("completedRequest");if(B){B(this._executor,A)}B=this._get_eventHandlerList().getHandler("completed");if(B){B(this._executor,A)}},_get_eventHandlerList:function(){if(!this._events){this._events=new Sys.EventHandlerList}return this._events},get_url:function(){return this._url},set_url:function(A){this._url=A},get_headers:function(){return this._headers},get_httpVerb:function(){if(this._httpVerb===null){if(this._body===null){return"GET"}return"POST"}return this._httpVerb},set_httpVerb:function(A){this._httpVerb=A},get_body:function(){return this._body},set_body:function(A){this._body=A},get_userContext:function(){return this._userContext},set_userContext:function(A){this._userContext=A},get_executor:function(){return this._executor},set_executor:function(A){this._executor=A;this._executor._set_webRequest(this)},get_timeout:function(){if(this._timeout===0){return Sys.Net.WebRequestManager.get_defaultTimeout()}return this._timeout},set_timeout:function(A){this._timeout=A},getResolvedUrl:function(){return Sys.Net.WebRequest._resolveUrl(this._url)},invoke:function(){Sys.Net.WebRequestManager.executeRequest(this);this._invokeCalled=true}};Sys.Net.WebRequest._resolveUrl=function(A,B){if(A&&A.indexOf("://")!==-1){return A}if(!B||B.length===0){var G=document.getElementsByTagName("base")[0];if(G&&G.href&&G.href.length>0){B=G.href}else{B=document.URL}}var F=B.indexOf("?");if(F!==-1){B=B.substr(0,F)}B=B.substr(0,B.lastIndexOf("/")+1);if(!A||A.length===0){return B}if(A.charAt(0)==="/"){var E=B.indexOf("://"),C=B.indexOf("/",E+3);return B.substr(0,C)+A}else{var D=B.lastIndexOf("/");return B.substr(0,D+1)+A}};Sys.Net.WebRequest._createQueryString=function(F,A){if(!A){A=encodeURIComponent}var B=new Sys.StringBuilder,D=0;for(var G in F){var E=F[G];if(typeof E==="function"){continue}var C=Sys.Serialization.JavaScriptSerializer.serialize(E);if(D!==0){B.append("&")}B.append(G);B.append("=");B.append(A(C));D++}return B.toString()};Sys.Net.WebRequest._createUrl=function(B,A){if(!A){return B}var C=Sys.Net.WebRequest._createQueryString(A);if(C.length>0){var D="?";if(B&&B.indexOf("?")!==-1){D="&"}return B+D+C}else{return B}};Sys.Net.WebRequest.registerClass("Sys.Net.WebRequest");Sys.Net.WebServiceProxy=function(){};Sys.Net.WebServiceProxy.prototype={set_timeout:function(A){this._timeout=A},get_timeout:function(){return this._timeout},set_defaultUserContext:function(A){this._userContext=A},get_defaultUserContext:function(){return this._userContext},set_defaultSucceededCallback:function(A){this._succeeded=A},get_defaultSucceededCallback:function(){return this._succeeded},set_defaultFailedCallback:function(A){this._failed=A},get_defaultFailedCallback:function(){return this._failed},set_path:function(A){this._path=A},get_path:function(){return this._path},_invoke:function(F,E,C,D,G,A,B){if(G===null||typeof G==="undefined"){G=this.get_defaultSucceededCallback()}if(A===null||typeof A==="undefined"){A=this.get_defaultFailedCallback()}if(B===null||typeof B==="undefined"){B=this.get_defaultUserContext()}return Sys.Net.WebServiceProxy.invoke(F,E,C,D,G,A,B,this.get_timeout())}};Sys.Net.WebServiceProxy.registerClass("Sys.Net.WebServiceProxy");Sys.Net.WebServiceProxy.invoke=function(B,L,C,I,D,J,G,E){var K=new Sys.Net.WebRequest;K.get_headers()["Content-Type"]="application/json; charset=utf-8";if(!I){I={}}var F=I;if(!C||!F){F={}}K.set_url(Sys.Net.WebRequest._createUrl(B+"/"+L,F));var H=null;if(!C){H=Sys.Serialization.JavaScriptSerializer.serialize(I);if(H==="{}"){H=""}}K.set_body(H);K.add_completed(A);if(E&&E>0){K.set_timeout(E)}K.invoke();function A(T){if(T.get_responseAvailable()){var S=T.get_statusCode(),N=null;try{var P=T.getResponseHeader("Content-Type");if(P.startsWith("application/json")){N=T.get_object()}else{if(P.startsWith("text/xml")){N=T.get_xml()}else{N=T.get_responseData()}}}catch(M){}var O=T.getResponseHeader("jsonerror"),R=O==="true";if(R){N=new Sys.Net.WebServiceError(false,N.Message,N.StackTrace,N.ExceptionType)}if(S<200||S>=300||R){if(J){if(!N||!R){N=new Sys.Net.WebServiceError(false,"The server method '"+L+"' failed.","","")}N._statusCode=S;J(N,G,L)}}else{if(D){D(N,G,L)}}}else{var Q;if(T.get_timedOut()){Q="The server method '"+L+"' timed out."}else{Q="The server method '"+L+"' failed."}if(J){J(new Sys.Net.WebServiceError(T.get_timedOut(),Q,"",""),G,L)}}}return K};Sys.Net.WebServiceProxy._generateTypedConstructor=function(A){return function(B){if(B){for(var C in B){this[C]=B[C]}}this.__type=A}};Sys.Net.WebServiceError=function(D,C,A,B){this._timedOut=D;this._message=C;this._stackTrace=A;this._exceptionType=B;this._statusCode=-1};Sys.Net.WebServiceError.prototype={get_timedOut:function(){return this._timedOut},get_statusCode:function(){return this._statusCode},get_message:function(){return this._message},get_stackTrace:function(){return this._stackTrace},get_exceptionType:function(){return this._exceptionType}};Sys.Net.WebServiceError.registerClass("Sys.Net.WebServiceError");namespace("Sys.Services");namespace("Sys.Serialization");Sys.Serialization.JavaScriptSerializer=function(){};Sys.Serialization.JavaScriptSerializer.registerClass("Sys.Serialization.JavaScriptSerializer");Sys.Serialization.JavaScriptSerializer._stringRegEx=new RegExp('["\b\f\n\r\t\\\\\x00-\x1F]',"i");Sys.Serialization.JavaScriptSerializer._serializeWithBuilder=function(J,K,D){var I;switch(typeof J){case"object":if(J){if(jQuery.type(J)==="array"){K.append("[");for(I=0;I<J.length;++I){if(I>0){K.append(",")}Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(J[I],K)}K.append("]")}else{if(jQuery.type(J)==="date"){K.append('"\\/Date(');K.append(J.getTime());K.append(')\\/"');break}var G=[],C=0;for(var E in J){if(E.startsWith("$")){continue}G[C++]=E}if(D){G.sort()}K.append("{");var B=false;for(I=0;I<C;I++){var F=J[G[I]];if(typeof F!=="undefined"&&typeof F!=="function"){if(B){K.append(",")}else{B=true}Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(G[I],K,D);K.append(":");Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(F,K,D)}}K.append("}")}}else{K.append("null")}break;case"number":if(isFinite(J)){K.append(String(J))}else{throw Error.invalidOperation("Cannot serialize non finite numbers.")}break;case"string":K.append('"');if(jQuery.browser.safari||Sys.Serialization.JavaScriptSerializer._stringRegEx.test(J)){var A=J.length;for(I=0;I<A;++I){var H=J.charAt(I);if(H>=" "){if(H==="\\"||H==='"'){K.append("\\")}K.append(H)}else{switch(H){case"\b":K.append("\\b");break;case"\f":K.append("\\f");break;case"\n":K.append("\\n");break;case"\r":K.append("\\r");break;case"\t":K.append("\\t");break;default:K.append("\\u00");if(H.charCodeAt()<16){K.append("0")}K.append(H.charCodeAt().toString(16))}}}}else{K.append(J)}K.append('"');break;case"boolean":K.append(J.toString());break;default:K.append("null");break}};Sys.Serialization.JavaScriptSerializer.serialize=function(A){var B=new Sys.StringBuilder;Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(A,B,false);return B.toString()};Sys.Serialization.JavaScriptSerializer.deserialize=function(data){if(data.length===0){throw Error.create("Cannot deserialize empty string.","InvalidArgument")}try{var exp=data.replace(new RegExp('(^|[^\\\\])\\"\\\\/Date\\((-?[0-9]+)\\)\\\\/\\"',"g"),"$1new Date($2)");return eval("("+exp+")")}catch(a){throw Error.create("Cannot deserialize. The data does not correspond to valid JSON.","InvalidArgument")}};Sys.CultureInfo=function(C,A,B){this.name=C;this.numberFormat=A;this.dateTimeFormat=B};Sys.CultureInfo.prototype={_getDateTimeFormats:function(){if(!this._dateTimeFormats){var A=this.dateTimeFormat;this._dateTimeFormats=[A.MonthDayPattern,A.YearMonthPattern,A.ShortDatePattern,A.ShortTimePattern,A.LongDatePattern,A.LongTimePattern,A.FullDateTimePattern,A.RFC1123Pattern,A.SortableDateTimePattern,A.UniversalSortableDateTimePattern]}return this._dateTimeFormats},_getMonthIndex:function(A){if(!this._upperMonths){this._upperMonths=this._toUpperArray(this.dateTimeFormat.MonthNames)}return Array.indexOf(this._upperMonths,this._toUpper(A))},_getAbbrMonthIndex:function(A){if(!this._upperAbbrMonths){this._upperAbbrMonths=this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames)}return Array.indexOf(this._upperMonths,this._toUpper(A))},_getDayIndex:function(A){if(!this._upperDays){this._upperDays=this._toUpperArray(this.dateTimeFormat.DayNames)}return Array.indexOf(this._upperDays,this._toUpper(A))},_getAbbrDayIndex:function(A){if(!this._upperAbbrDays){this._upperAbbrDays=this._toUpperArray(this.dateTimeFormat.AbbreviatedDayNames)}return Array.indexOf(this._upperAbbrDays,this._toUpper(A))},_toUpperArray:function(D){var A=[];for(var B=0,C=D.length;B<C;B++){A[B]=this._toUpper(D[B])}return A},_toUpper:function(A){return A.split("\u00A0").join(" ").toUpperCase()}};Sys.CultureInfo._parse=function(A){var B=Sys.Serialization.JavaScriptSerializer.deserialize(A);return new Sys.CultureInfo(B.name,B.numberFormat,B.dateTimeFormat)};Sys.CultureInfo.registerClass("Sys.CultureInfo");Sys.CultureInfo.InvariantCulture=Sys.CultureInfo._parse('{"name":"","numberFormat":{"CurrencyDecimalDigits":2,"CurrencyDecimalSeparator":".","IsReadOnly":true,"CurrencyGroupSizes":[3],"NumberGroupSizes":[3],"PercentGroupSizes":[3],"CurrencyGroupSeparator":",","CurrencySymbol":"\u00A4","NaNSymbol":"NaN","CurrencyNegativePattern":0,"NumberNegativePattern":1,"PercentPositivePattern":0,"PercentNegativePattern":0,"NegativeInfinitySymbol":"-Infinity","NegativeSign":"-","NumberDecimalDigits":2,"NumberDecimalSeparator":".","NumberGroupSeparator":",","CurrencyPositivePattern":0,"PositiveInfinitySymbol":"Infinity","PositiveSign":"+","PercentDecimalDigits":2,"PercentDecimalSeparator":".","PercentGroupSeparator":",","PercentSymbol":"%","PerMilleSymbol":"\u2030","NativeDigits":["0","1","2","3","4","5","6","7","8","9"],"DigitSubstitution":1},"dateTimeFormat":{"AMDesignator":"AM","Calendar":{"MinSupportedDateTime":"@-62135568000000@","MaxSupportedDateTime":"@253402300799999@","AlgorithmType":1,"CalendarType":1,"Eras":[1],"TwoDigitYearMax":2029,"IsReadOnly":true},"DateSeparator":"/","FirstDayOfWeek":0,"CalendarWeekRule":0,"FullDateTimePattern":"dddd, dd MMMM yyyy HH:mm:ss","LongDatePattern":"dddd, dd MMMM yyyy","LongTimePattern":"HH:mm:ss","MonthDayPattern":"MMMM dd","PMDesignator":"PM","RFC1123Pattern":"ddd, dd MMM yyyy HH\':\'mm\':\'ss \'GMT\'","ShortDatePattern":"MM/dd/yyyy","ShortTimePattern":"HH:mm","SortableDateTimePattern":"yyyy\'-\'MM\'-\'dd\'T\'HH\':\'mm\':\'ss","TimeSeparator":":","UniversalSortableDateTimePattern":"yyyy\'-\'MM\'-\'dd HH\':\'mm\':\'ss\'Z\'","YearMonthPattern":"yyyy MMMM","AbbreviatedDayNames":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"ShortestDayNames":["Su","Mo","Tu","We","Th","Fr","Sa"],"DayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"AbbreviatedMonthNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"IsReadOnly":true,"NativeCalendarName":"Gregorian Calendar","AbbreviatedMonthGenitiveNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthGenitiveNames":["January","February","March","April","May","June","July","August","September","October","November","December",""]}}');if(typeof __cultureInfo==="undefined"){__cultureInfo='{"name":"en-US","numberFormat":{"CurrencyDecimalDigits":2,"CurrencyDecimalSeparator":".","IsReadOnly":false,"CurrencyGroupSizes":[3],"NumberGroupSizes":[3],"PercentGroupSizes":[3],"CurrencyGroupSeparator":",","CurrencySymbol":"$","NaNSymbol":"NaN","CurrencyNegativePattern":0,"NumberNegativePattern":1,"PercentPositivePattern":0,"PercentNegativePattern":0,"NegativeInfinitySymbol":"-Infinity","NegativeSign":"-","NumberDecimalDigits":2,"NumberDecimalSeparator":".","NumberGroupSeparator":",","CurrencyPositivePattern":0,"PositiveInfinitySymbol":"Infinity","PositiveSign":"+","PercentDecimalDigits":2,"PercentDecimalSeparator":".","PercentGroupSeparator":",","PercentSymbol":"%","PerMilleSymbol":"\u2030","NativeDigits":["0","1","2","3","4","5","6","7","8","9"],"DigitSubstitution":1},"dateTimeFormat":{"AMDesignator":"AM","Calendar":{"MinSupportedDateTime":"@-62135568000000@","MaxSupportedDateTime":"@253402300799999@","AlgorithmType":1,"CalendarType":1,"Eras":[1],"TwoDigitYearMax":2029,"IsReadOnly":false},"DateSeparator":"/","FirstDayOfWeek":0,"CalendarWeekRule":0,"FullDateTimePattern":"dddd, MMMM dd, yyyy h:mm:ss tt","LongDatePattern":"dddd, MMMM dd, yyyy","LongTimePattern":"h:mm:ss tt","MonthDayPattern":"MMMM dd","PMDesignator":"PM","RFC1123Pattern":"ddd, dd MMM yyyy HH\':\'mm\':\'ss \'GMT\'","ShortDatePattern":"M/d/yyyy","ShortTimePattern":"h:mm tt","SortableDateTimePattern":"yyyy\'-\'MM\'-\'dd\'T\'HH\':\'mm\':\'ss","TimeSeparator":":","UniversalSortableDateTimePattern":"yyyy\'-\'MM\'-\'dd HH\':\'mm\':\'ss\'Z\'","YearMonthPattern":"MMMM, yyyy","AbbreviatedDayNames":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"ShortestDayNames":["Su","Mo","Tu","We","Th","Fr","Sa"],"DayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"AbbreviatedMonthNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"IsReadOnly":false,"NativeCalendarName":"Gregorian Calendar","AbbreviatedMonthGenitiveNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthGenitiveNames":["January","February","March","April","May","June","July","August","September","October","November","December",""]}}'}Sys.CultureInfo.CurrentCulture=Sys.CultureInfo._parse(window.__cultureInfo);delete __cultureInfo;Sys.UI.Point=function(B,A){this.x=B;this.y=A};Sys.UI.Point.registerClass("Sys.UI.Point");Sys.UI.Bounds=function(D,C,A,B){this.x=D;this.y=C;this.height=B;this.width=A};Sys.UI.Bounds.registerClass("Sys.UI.Bounds");Sys.UI.DomElement=function(){};Sys.UI.DomElement.registerClass("Sys.UI.DomElement");Sys.UI.DomElement.addCssClass=function(B,A){if(!Sys.UI.DomElement.containsCssClass(B,A)){if(B.className===""){B.className=A}else{B.className+=" "+A}}};Sys.UI.DomElement.containsCssClass=function(A,B){return Array.contains(A.className.split(" "),B)};Sys.UI.DomElement.getBounds=function(B){var A=Sys.UI.DomElement.getLocation(B);return new Sys.UI.Bounds(A.x,A.y,B.offsetWidth||0,B.offsetHeight||0)};window.$get=Sys.UI.DomElement.getElementById=function(C,D){if(!D){return document.getElementById(C)}if(D.getElementById){return D.getElementById(C)}var F=[],E=D.childNodes;for(var A=0;A<E.length;A++){var B=E[A];if(B.nodeType==1){F[F.length]=B}}while(F.length){B=F.shift();if(B.id==C){return B}E=B.childNodes;for(A=0;A<E.length;A++){B=E[A];if(B.nodeType==1){F[F.length]=B}}}return null};if(jQuery.browser.msie){Sys.UI.DomElement.getLocation=function Sys$UI$DomElement$getLocation(B){if(B.self||B.nodeType===9){return new Sys.UI.Point(0,0)}var G=B.getClientRects();if(!G||!G.length){return new Sys.UI.Point(0,0)}var F=B.ownerDocument.parentWindow,D=F.screenLeft-top.screenLeft-top.document.documentElement.scrollLeft+2,C=F.screenTop-top.screenTop-top.document.documentElement.scrollTop+2,H=F.frameElement||null;if(H){var A=H.currentStyle;D+=(H.frameBorder||1)*2+(parseInt(A.paddingLeft)||0)+(parseInt(A.borderLeftWidth)||0)-B.ownerDocument.documentElement.scrollLeft;C+=(H.frameBorder||1)*2+(parseInt(A.paddingTop)||0)+(parseInt(A.borderTopWidth)||0)-B.ownerDocument.documentElement.scrollTop}var E=G[0];return new Sys.UI.Point(E.left-D,E.top-C)}}else{if(jQuery.browser.safari){Sys.UI.DomElement.getLocation=function(I){if(I.window&&I.window===I||I.nodeType===9){return new Sys.UI.Point(0,0)}var E=0,D=0,B=null,F=null,J;for(var K=I;K;B=K,(F=J,K=K.offsetParent)){J=Sys.UI.DomElement._getCurrentStyle(K);var G=K.tagName;if((K.offsetLeft||K.offsetTop)&&(G!=="BODY"||(!F||F.position!=="absolute"))){E+=K.offsetLeft;D+=K.offsetTop}}J=Sys.UI.DomElement._getCurrentStyle(I);var H=J?J.position:null,A=H&&H!=="static";if(!H||H!=="absolute"){for(var K=I.parentNode;K;K=K.parentNode){G=K.tagName;if(G!=="BODY"&&G!=="HTML"&&(K.scrollLeft||K.scrollTop)){E-=K.scrollLeft||0;D-=K.scrollTop||0}J=Sys.UI.DomElement._getCurrentStyle(K);var C=J?J.position:null;if(C&&C==="absolute"){break}}}return new Sys.UI.Point(E,D)}}else{if(jQuery.browser.opera){Sys.UI.DomElement.getLocation=function(H){if(H.window&&H.window===H||H.nodeType===9){return new Sys.UI.Point(0,0)}var F=0,E=0,A=null;for(var I=H;I;A=I,I=I.offsetParent){var D=I.tagName;F+=I.offsetLeft||0;E+=I.offsetTop||0}var C=H.style.position,G=C&&C!=="static";for(var I=H.parentNode;I;I=I.parentNode){D=I.tagName;if(D!=="BODY"&&D!=="HTML"&&(I.scrollLeft||I.scrollTop)&&(G&&(I.style.overflow==="scroll"||I.style.overflow==="auto"))){F-=I.scrollLeft||0;E-=I.scrollTop||0}var B=I&&I.style?I.style.position:null;G=G||B&&B!=="static"}return new Sys.UI.Point(F,E)}}else{Sys.UI.DomElement.getLocation=function(G){if(G.window&&G.window===G||G.nodeType===9){return new Sys.UI.Point(0,0)}var F=0,E=0,B=null,C=null,I=null;for(var J=G;J;B=J,(C=I,J=J.offsetParent)){var H=J.tagName;I=Sys.UI.DomElement._getCurrentStyle(J);if((J.offsetLeft||J.offsetTop)&&!(H==="BODY"&&(!C||C.position!=="absolute"))){F+=J.offsetLeft;E+=J.offsetTop}if(B!==null&&I){if(H!=="TABLE"&&H!=="TD"&&H!=="HTML"){F+=parseInt(I.borderLeftWidth)||0;E+=parseInt(I.borderTopWidth)||0}if(H==="TABLE"&&(I.position==="relative"||I.position==="absolute")){F+=parseInt(I.marginLeft)||0;E+=parseInt(I.marginTop)||0}}}I=Sys.UI.DomElement._getCurrentStyle(G);var D=I?I.position:null,A=D&&D!=="static";if(!D||D!=="absolute"){for(var J=G.parentNode;J;J=J.parentNode){H=J.tagName;if(H!=="BODY"&&H!=="HTML"&&(J.scrollLeft||J.scrollTop)){F-=J.scrollLeft||0;E-=J.scrollTop||0;I=Sys.UI.DomElement._getCurrentStyle(J);F+=parseInt(I.borderLeftWidth)||0;E+=parseInt(I.borderTopWidth)||0}}}return new Sys.UI.Point(F,E)}}}}Sys.UI.DomElement.removeCssClass=function(C,D){var B=" "+C.className+" ",A=B.indexOf(" "+D+" ");if(A>=0){C.className=(B.substr(0,A)+" "+B.substring(A+D.length+1,B.length)).trim()}};Sys.UI.DomElement.setLocation=function(A,D,C){var B=A.style;B.position="absolute";B.left=D+"px";B.top=C+"px"};Sys.UI.DomElement.toggleCssClass=function(A,B){if(Sys.UI.DomElement.containsCssClass(A,B)){Sys.UI.DomElement.removeCssClass(A,B)}else{Sys.UI.DomElement.addCssClass(A,B)}};Sys.UI.DomElement._getCurrentStyle=function(B){var A=(B.ownerDocument?B.ownerDocument:B.documentElement).defaultView;return A&&B!==A&&A.getComputedStyle?A.getComputedStyle(B,null):B.style};Sys.UI.Behavior=function(A){Sys.UI.Behavior.initializeBase(this);this._element=A;var B=A._behaviors;if(!B){A._behaviors=[this]}else{B[B.length]=this}};Sys.UI.Behavior.prototype={_name:null,get_element:function(){return this._element},get_id:function(){var A=Sys.UI.Behavior.callBaseMethod(this,"get_id");if(A){return A}if(!this._element||!this._element.id){return""}return this._element.id+"$"+this.get_name()},get_name:function(){if(this._name){return this._name}var B=Object$getType(this).__typeName,A=B.lastIndexOf(".");if(A!=-1){B=B.substr(A+1)}if(!this.get_isInitialized()){this._name=B}return B},set_name:function(A){this._name=A},initialize:function(){Sys.UI.Behavior.callBaseMethod(this,"initialize");var A=this.get_name();if(A){this._element[A]=this}},dispose:function(){Sys.UI.Behavior.callBaseMethod(this,"dispose");if(this._element){var A=this.get_name();if(A){this._element[A]=null}Array.remove(this._element._behaviors,this);delete this._element}}};Sys.UI.Behavior.registerClass("Sys.UI.Behavior",Sys.Component);Sys.UI.Behavior.getBehaviorByName=function(A,C){var B=A[C];return B&&Type$prototype$isInstanceOfType.call(Sys.UI.Behavior,B)?B:null};Sys.UI.Behavior.getBehaviors=function(A){if(!A._behaviors){return[]}return Array.clone(A._behaviors)};Sys.UI.Behavior.getBehaviorsByType=function(E,D){var B=E._behaviors,F=[];if(B){for(var A=0,C=B.length;A<C;A++){if(Type$prototype$isInstanceOfType.call(D,B[A])){F[F.length]=B[A]}}}return F};Sys.UI.VisibilityMode=function(){throw Error.notImplemented()};Sys.UI.VisibilityMode.prototype={hide:0,collapse:1};Sys.UI.VisibilityMode.registerEnum("Sys.UI.VisibilityMode");Sys.UI.Control=function(A){Sys.UI.Control.initializeBase(this);this._element=A;A.control=this;this._oldDisplayMode=this._element.style.display;if(!this._oldDisplayMode||this._oldDisplayMode=="none"){this._oldDisplayMode=""}};Sys.UI.Control.prototype={_parent:null,_visibilityMode:Sys.UI.VisibilityMode.hide,get_element:function(){return this._element},get_id:function(){if(!this._element){return""}return this._element.id},set_id:function(){throw Error.invalidOperation()},get_parent:function(){if(this._parent){return this._parent}else{var A=this._element.parentNode;while(A){if(A.control){return A.control}A=A.parentNode}return null}},set_parent:function(A){this._parent=A},get_visibilityMode:function(){return this._visibilityMode},set_visibilityMode:function(A){if(this._visibilityMode!==A){this._visibilityMode=A;if(this.get_visible()===false){if(this._visibilityMode===Sys.UI.VisibilityMode.hide){this._element.style.display=this._oldDisplayMode}else{this._element.style.display="none"}}}this._visibilityMode=A},get_visible:function(){return this._element.style.visibility!="hidden"},set_visible:function(A){if(A!=this.get_visible()){this._element.style.visibility=A?"visible":"hidden";if(A||this._visibilityMode===Sys.UI.VisibilityMode.hide){this._element.style.display=this._oldDisplayMode}else{this._element.style.display="none"}}},addCssClass:function(A){Sys.UI.DomElement.addCssClass(this._element,A)},dispose:function(){Sys.UI.Control.callBaseMethod(this,"dispose");if(this._element){this._element.control=undefined;delete this._element}},initialize:function(){Sys.UI.Control.callBaseMethod(this,"initialize");var A=this._element},onBubbleEvent:function(){return false},raiseBubbleEvent:function(A,C){var B=this.get_parent();while(B){if(B.onBubbleEvent(A,C)){return}B=B.get_parent()}},removeCssClass:function(A){Sys.UI.DomElement.removeCssClass(this._element,A)},toggleCssClass:function(A){Sys.UI.DomElement.toggleCssClass(this._element,A)}};Sys.UI.Control.registerClass("Sys.UI.Control",Sys.Component)})();namespace("MySpace.UI.Pages");MySpace.UI.Pages.UIElement=function(){MySpace.UI.Pages.UIElement.initializeBase(this)};MySpace.UI.Pages.UIElement.prototype={_uid:null,_name:null,_parent:null,_owner:null,_isSelected:false,_title:null,_visible:false,_body:null,_element:null,get_body:function(){return this._body||document.getElementsByTagName("body")[0]},get_element:function(){return this._element},set_element:function(a){this._element=a},get_uid:function(){return this._uid},set_uid:function(a){this._uid=a},get_name:function(){return this._name},set_name:function(a){this._name=a},get_parent:function(){return this._parent},set_parent:function(a){this._parent=a},get_owner:function(){return this._owner},set_owner:function(a){this._owner=a},get_isSelected:function(){return this._isSelected},set_isSelected:function(a){this._isSelected=a;if(this._isSelected){Sys.UI.DomElement.addCssClass(this._element,"selected")}else{Sys.UI.DomElement.removeCssClass(this._element,"selected")}},get_title:function(){return this._title||this._name},set_title:function(a){this._title=a},get_visible:function(){return this._visible},set_visible:function(a){this._visible=a;if(this._element){this._element.style.display=a?"block":"none"}},getText:function(a){if(typeof(MySpaceRes.PageEditor[a])==="undefined"){if(typeof(MySpace.UI.Pages.ResourceName)!="undefined"&&typeof(MySpaceRes[MySpace.UI.Pages.ResourceName][a])!="undefined"){return MySpaceRes[MySpace.UI.Pages.ResourceName][a]}else{return""}}else{return MySpaceRes.PageEditor[a]}},replaceElement:function(b,a){b.parentNode.replaceChild(a,b);return a},removeElement:function(a){var b=a.parentNode;if(b){b.removeChild(a)}},removeChildren:function(a){if(a.hasChildNodes()){while(a.childNodes.length>=1){a.removeChild(a.firstChild)}}},raiseEvent:function(b,a){var c=this.get_events().getHandler(b);if(c){if(!a){a=Sys.EventArgs.Empty}c(this,a)}},createElement:function(d,a,c){var b=document.createElement(d);if(a){b.className=a}if(c){c.appendChild(b)}return b},insertAfter:function(a,c){var b=c.parentNode;var d=c.nextSibling;if(d){b.insertBefore(a,d)}else{b.appendChild(a)}},createElement:function(d,a,c){var b=document.createElement(d);if(a){b.className=a}if(c){c.appendChild(b)}return b},addCssClass:function(b,a){if(!b){return}Sys.UI.DomElement.addCssClass(b,a)},removeCssClass:function(b,a){if(!b){return}Sys.UI.DomElement.removeCssClass(b,a)},dispose:function(){this._uid=null;this._name=null;this._parent=null;this._owner=null;this._isSelected=false;this._title=null;this._visible=false;this._body=null;MySpace.UI.Pages.UIElement.callBaseMethod(this,"dispose")}};MySpace.UI.Pages.UIElement.registerClass("MySpace.UI.Pages.UIElement",Sys.Component);namespace("MySpace.UI.Pages");MySpace.UI.Pages.Control=function(){MySpace.UI.Pages.Control.initializeBase(this)};MySpace.UI.Pages.Control.prototype={_dataSource:null,_runScripts:true,_area:null,get_dataSource:function(){return this._dataSource},set_dataSource:function(a){this._dataSource=a},get_runScripts:function(){return this._runScripts},set_runScripts:function(a){this._runScripts=a},add_loaded:function(a){this.get_events().addHandler("loaded",a)},remove_loaded:function(a){this.get_events().removeHandler("loaded",a)},get_area:function(){return this._area},set_area:function(a){this._area=a},initialize:function(){},dispose:function(){this._element=null;MySpace.UI.Pages.Control.callBaseMethod(this,"dispose")},loadContent:function(){MySpace.UI.Pages.Data.request(this._dataSource,this,Function.createDelegate(this,this._onContentLoad),null,null,null,null,this._area)},setContent:function(a){if(this._element){this._element.innerHTML=a}this._contentLoaded()},_contentLoaded:function(){if(this._runScripts){MySpace.Util.executeScripts(this._element)}if(this._element&&MySpace.UI.Pages.resizeObjects){MySpace.UI.Pages.resizeObjects(this._element)}this.raiseEvent("loaded");jQuery.comm.send("page.changed",jQuery(this._element))},_onContentLoad:function(b,a){if(b.get_responseAvailable()){this.setContent(b.get_responseData())}}};MySpace.UI.Pages.Control.registerClass("MySpace.UI.Pages.Control",MySpace.UI.Pages.UIElement);namespace("MySpace.UI.Pages");MySpace.UI.Pages.Module=function(){MySpace.UI.Pages.Module.initializeBase(this)};MySpace.UI.Pages.Module.prototype={_typeid:-1,_targetId:null,_handler:null,_parameters:null,_showContainer:null,_isGrouped:false,get_typeid:function(){return this._typeid},set_typeid:function(a){this._typeid=a},get_targetId:function(){return this._targetId},set_targetId:function(a){this._targetId=a},get_handler:function(){return this._handler},set_handler:function(a){this._handler=a},get_parameters:function(){return this._parameters},set_parameters:function(a){this._parameters=a},get_showContainer:function(){return this._showContainer},set_showContainer:function(a){this._showContainer},get_isGrouped:function(){return this._isGrouped},set_isGrouped:function(a){this._isGrouped},initialize:function(){this._handler=this._handler||"Module.ashx";if(this._element){this._bodyElement=$q(".moduleBody",this._element,true)||this._element}},dispose:function(){MySpace.UI.Pages.Module.callBaseMethod(this,"dispose")},loadContent:function(){if(!this._dataSource){var b=String.format("?typeid={0}",this._typeid)+(this._targetId?String.format("&targetid={0}",this._targetId):"")+(this._uid?String.format("&moduleid={0}",this._uid):"");b+=this._addParameters(this._showContainer!==null?"container="+this._showContainer:null);b+=this._addParameters(window.location.search.substring(1));b+=this._addParameters(this._isGrouped?"isGrouped=true":null);b+=this._addParameters(this._parameters);this._dataSource=String.format(this._handler+b)}var a=new Object();a.moduleContent=this;a.moduleBody=this._element;a.dataSource=this._dataSource;jQuery.comm.send("module.beforeLoadAsync",a);MySpace.UI.Pages.Module.callBaseMethod(this,"loadContent")},_addParameters:function(a){return a!==null&&a.length>0?"&"+a:""},_onContentLoad:function(e,d){var b=e.get_webRequest().get_userContext();if(e.get_responseAvailable()){var f=e.get_responseData();var c={moduleContent:this,moduleBody:this._element,dataSource:this._dataSource,executer:e,markup:f};jQuery.comm.send("module.beforeLoadAsyncInject",c);if(b._bodyElement){var a=$q(".moduleBodyEnd",b._bodyElement,true);if(a){a.parentNode.removeChild(a)}b._bodyElement.innerHTML=c.markup;if(a){b._bodyElement.appendChild(a)}}else{b._element.innerHTML=c.markup}b._contentLoaded();jQuery.comm.send("module.afterPageDataLoaded",b._element);if(b._element){Sys.UI.DomElement.removeCssClass(b._element,"noContent")}}}};MySpace.UI.Pages.Module.registerClass("MySpace.UI.Pages.Module",MySpace.UI.Pages.Control);MySpace.WebRequest=function(){throw"Cannot instantiate static class."};MySpace.WebRequest.invoke=function(f,j,e,d,c,k,h){if(!e){e={}}var g=new Sys.Net.WebRequest();if(!j){if(typeof e==="string"){var a=(typeof e!=="string")?Sys.Serialization.JavaScriptSerializer.serialize(e):e}if(a==="{}"){a=""}g.set_body(a)}g.set_url(Sys.Net.WebRequest._createUrl(f,(j)?e:{}));g.add_completed(b);if(h&&h>0){g.set_timeout(h)}g.invoke();function b(r,n){if(r.get_responseAvailable()){var t=r.get_statusCode();var s=null;try{var l=r.getResponseHeader("Content-Type");if(l.startsWith("application/json")){s=r.get_object()}else{if(l.startsWith("text/xml")){s=r.get_xml()}else{s=r.get_responseData()}}}catch(o){}if((t<200)||(t>=300)){if(c){if(!s){s=new Sys.Net.WebServiceError(false,"WebRequest failed for an unknown reason.","","")}s._statusCode=t;c(s,k)}else{var m;if(s){m=s.get_exceptionType()+"-- "+s.get_message()}else{m=r.get_responseData()}window.alert("WebRequest Failed: "+m)}}else{if(d){d(s,k)}}}else{var q;if(r.get_timedOut()){q="WebRequest timed out."}else{q="WebRequest failed for an unknown reason."}if(c){c(new Sys.Net.WebServiceError(r.get_timedOut(),q,"",""),k)}else{alert(q)}}}return g};MySpace.WebRequest.registerClass("MySpace.WebRequest");var gadgets=gadgets||{};gadgets.log=function(a){gadgets.log.logAtLevel(gadgets.log.INFO,a)};gadgets.warn=function(a){gadgets.log.logAtLevel(gadgets.log.WARNING,a)};gadgets.error=function(a){gadgets.log.logAtLevel(gadgets.log.ERROR,a)};gadgets.setLogLevel=function(a){gadgets.log.logLevelThreshold_=a};gadgets.log.logAtLevel=function(a,c){if(a<gadgets.log.logLevelThreshold_||!window.console){return}var b=window.console.log;if(a==gadgets.log.WARNING&&window.console.warn){b=window.console.warn}else{if(a==gadgets.log.ERROR&&window.console.error){b=window.console.error}}b(c)};gadgets.log.INFO=1;gadgets.log.WARNING=2;gadgets.log.ERROR=3;gadgets.log.NONE=4;gadgets.log.logLevelThreshold_=gadgets.log.INFO;var gadgets=gadgets||{};gadgets.json_=function(){function f(n){return n<10?"0"+n:n}Date.prototype.toJSON=function(){return[this.getUTCFullYear(),"-",f(this.getUTCMonth()+1),"-",f(this.getUTCDate()),"T",f(this.getUTCHours()),":",f(this.getUTCMinutes()),":",f(this.getUTCSeconds()),"Z"].join("")};var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function stringify(value){var a,i,k,l,r=/["\\\x00-\x1f\x7f-\x9f]/g,v;switch(typeof value){case"string":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+'"';case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}a=[];if(typeof value.length==="number"&&!value.propertyIsEnumerable("length")){l=value.length;for(i=0;i<l;i+=1){a.push(stringify(value[i])||"null")}return"["+a.join(",")+"]"}for(k in value){if(value.hasOwnProperty(k)){if(typeof k==="string"){v=stringify(value[k]);if(v){a.push(stringify(k)+":"+v)}}}}return"{"+a.join(",")+"}"}}return{stringify:stringify,parse:function(text){if(/^[\],:{}\s]*$/.test(text.replace(/\\["\\\/b-u]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){return eval("("+text+")")}return false}}}();var gadgets=gadgets||{};gadgets.rpctx=gadgets.rpctx||{};gadgets.rpctx.Ifpc=function(){var d=[];var a=0;var e;function c(f){var g=[];for(var h=0,k=f.length;h<k;++h){g.push(encodeURIComponent(gadgets.json_.stringify(f[h])))}return g.join("&")}function b(k){var j;for(var g=d.length-1;g>=0;--g){var h=d[g];try{if(h&&(h.recyclable||h.readyState==="complete")){h.parentNode.removeChild(h);if(window.ActiveXObject){d[g]=h=null;d.splice(g,1)}else{h.recyclable=false;j=h;break}}}catch(f){}}if(!j){j=document.createElement("iframe");j.style.border=j.style.width=j.style.height="0px";j.style.visibility="hidden";j.style.position="absolute";j.onload=function(){this.recyclable=true};d.push(j)}j.src=k;setTimeout(function(){document.body.appendChild(j)},0)}return{getCode:function(){return"ifpc"},isParentVerifiable:function(){return true},init:function(f,g){e=g;e("..",true);return true},setup:function(f,g){if(typeof(e)=="function"){e(f,true);return true}return false},call:function(l,g,j){var h=gadgets.rpc.getRelayUrl(l);++a;if(!h){gadgets.warn("No relay file assigned for IFPC");return}var k=null;if(j.l){var f=j.a;k=[h,"#",c([g,a,1,0,c([g,j.s,"","",g].concat(f))])].join("")}else{k=[h,"#",l,"&",g,"@",a,"&1&0&",encodeURIComponent(gadgets.json_.stringify(j))].join("")}b(k);return true}}}();var gadgets=gadgets||{};gadgets.rpctx=gadgets.rpctx||{};gadgets.rpctx.nix=function(){var h="GRPC____NIXVBS_wrapper";var e="GRPC____NIXVBS_get_wrapper";var f="GRPC____NIXVBS_handle_message";var d="GRPC____NIXVBS_create_channel";var b=10;var g=500;var c={};var k;var j=0;function a(){var l=c[".."];if(l){return}if(++j>b){gadgets.warn("Nix transport setup failed, falling back...");k("..",false);return}if(!l&&window.opener&&"GetAuthToken" in window.opener){l=window.opener;if(l.GetAuthToken()==gadgets.rpc.getAuthToken("..")){var m=gadgets.rpc.getAuthToken("..");l.CreateChannel(window[e]("..",m),m);c[".."]=l;window.opener=null;k("..",true);return}}window.setTimeout(function(){a()},g)}return{getCode:function(){return"nix"},isParentVerifiable:function(){return false},init:function(m,n){k=n;if(typeof window[e]!=="unknown"){window[f]=function(q){window.setTimeout(function(){m(gadgets.json_.parse(q))},0)};window[d]=function(r,q,s){if(gadgets.rpc.getAuthToken(r)===s){c[r]=q;k(r,true)}};var o="Class "+h+"\n Private m_Intended\nPrivate m_Auth\nPublic Sub SetIntendedName(name)\n If isEmpty(m_Intended) Then\nm_Intended = name\nEnd If\nEnd Sub\nPublic Sub SetAuth(auth)\n If isEmpty(m_Auth) Then\nm_Auth = auth\nEnd If\nEnd Sub\nPublic Sub SendMessage(data)\n "+f+"(data)\nEnd Sub\nPublic Function GetAuthToken()\n GetAuthToken = m_Auth\nEnd Function\nPublic Sub CreateChannel(channel, auth)\n Call "+d+"(m_Intended, channel, auth)\nEnd Sub\nEnd Class\nFunction "+e+"(name, auth)\nDim wrap\nSet wrap = New "+h+"\nwrap.SetIntendedName name\nwrap.SetAuth auth\nSet "+e+" = wrap\nEnd Function";try{window.execScript(o,"vbscript")}catch(l){return false}}return true},setup:function(n,o){if(n===".."){a();return true}try{var m=document.getElementById(n);var q=window[e](n,o);m.contentWindow.opener=q}catch(l){return false}return true},call:function(o,m,n){try{if(c[o]){c[o].SendMessage(gadgets.json_.stringify(n))}else{return false}}catch(l){return false}return true}}}();var gadgets=gadgets||{};gadgets.rpctx=gadgets.rpctx||{};gadgets.rpctx.wpm=function(){var a;return{getCode:function(){return"wpm"},isParentVerifiable:function(){return true},init:function(c,d){a=d;var b=function(e){c(gadgets.json_.parse(e.data))};if(!window.addEventListener){window.attachEvent("onmessage",b)}else{window.addEventListener("message",b,false)}a("..",true);return true},setup:function(b,c){if(b===".."){gadgets.rpc.call(b,gadgets.rpc.ACK)}return true},call:function(e,b,d){var f=e===".."?parent:window.frames[e];var c=gadgets.rpc.getRelayUrl(e);if(c){f.postMessage(gadgets.json_.stringify(d),"*")}else{gadgets.error("No relay set, cannot send cross-domain message")}return true}}}();var gadgets=gadgets||{};gadgets.rpc=function(){var c="__cb";var f="";var a="__ack";var v=500;var u=10;var s={};var q={};var A={};var b={};var e=0;var d={};var t={};var r={};var m={};var o={};var g={};var l=(window.top!==window.self);var h=gadgets.rpctx.Ifpc;if(gadgets.util){m=gadgets.util.getUrlParameters()}b[".."]=m.rpctoken||m.ifpctok||0;var z=(m.rpc_earlyq==="1");function k(){return typeof window.postMessage==="function"?gadgets.rpctx.wpm:window.ActiveXObject?(typeof window.postMessage==="object"?gadgets.rpctx.wpm:gadgets.rpctx.nix):gadgets.rpctx.Ifpc}function y(E,D){var G=x;if(!D){G=h}o[E]=G;var B=g[E]||[];for(var C=0;C<B.length;++C){var F=B[C];F.t=gadgets.rpc.getAuthToken(E);G.call(E,F.f,F)}g[E]=[]}function n(C){if(C&&typeof C.s==="string"&&typeof C.f==="string"&&C.a instanceof Array){if(typeof C.r==="string"){gadgets.rpc.setRelayUrl(C.f,C.r);if(window.ActiveXObject){x=gadgets.rpctx.nix}}if(typeof b[C.f]!=="undefined"){if(b[C.f]!=C.t){throw new Error("Invalid auth token. "+b[C.f]+" vs "+C.t)}}else{gadgets.rpc.setAuthToken(C.f,"0")}if(C.s===a){window.setTimeout(function(){y(C.f,true)},0);return}if(C.c){C.callback=function(D){D=[C.c,D];gadgets.rpc.call(C.f,c,null,D)};C.a.push(C.callback)}var B=(s[C.s]||s[f]).apply(C,C.a);if(C.c&&typeof B!=="undefined"){gadgets.rpc.call(C.f,c,null,[C.c,B])}}}function j(H){if(!H){return""}H=H.toLowerCase();if(H.indexOf("//")==0){H=window.location.protocol+":"+H}if(H.indexOf("http://")!=0&&H.indexOf("https://")!=0){H=window.location.protocol+"://"+H}var B=H.substring(H.indexOf("://")+3);var G=B.indexOf("/");if(G!=-1){B=B.substring(0,G)}var F=H.substring(0,H.indexOf("://"));var E="";var D=B.indexOf(":");if(D!=-1){var C=B.substring(D+1);B=B.substring(0,D);if((F==="http"&&C!=="80")||(F==="https"&&C!=="443")){E=":"+C}}return F+"://"+B+E}var x=k();s[f]=function(){gadgets.warn("Unknown RPC service: "+this.s)};s[c]=function(C,D){var B=d[C];if(B){delete d[C];B(D)}};function w(B,D){if(t[B]===true){return}if(typeof t[B]==="undefined"){t[B]=0}var C=document.getElementById(B);if(B===".."||C!=null){if(x.setup(B,D)===true){t[B]=true;return}}if(t[B]!==true&&t[B]++<u){window.setTimeout(function(){w(B,D)},v)}else{x=h;t[B]=true}}if(l){if(x.setup("..")===false){x=h}}return{register:function(C,B){if(C===c||C===a){throw new Error("Cannot overwrite callback/ack service")}if(C===f){throw new Error("Cannot overwrite default service: use registerDefault")}s[C]=B},unregister:function(B){if(B===c||B===a){throw new Error("Cannot delete callback/ack service")}if(B===f){throw new Error("Cannot delete default service: use unregisterDefault")}delete s[B]},registerDefault:function(B){s[f]=B},unregisterDefault:function(){delete s[f]},forceParentVerifiable:function(){if(!x.isParentVerifiable()){x=gadgets.rpctx.Ifpc}},forceIfpc:function(){x=gadgets.rpctx.Ifpc},call:function(G,F,B,H){G=G||"..";var D="..";if(G===".."){D=window.name}++e;if(B){d[e]=B}var E={s:F,f:D,c:B?e:0,a:H,t:b[G],l:A[G]};var C=z?o[G]:x;if(!C){if(!g[G]){g[G]=[E]}else{g[G].push(E)}return}if(A[G]){C=gadgets.rpctx.Ifpc}if(C.call(G,D,E)===false){h.call(G,D,E)}},getRelayUrl:function(B){var C=q[B];if(C&&C.indexOf("//")==0){C=document.location.protocol+C}if(!C){C="http://api.msappspace.com/OpenSocial/rpc_relay.aspx"}return C},setRelayUrl:function(C,D,B){q[C]=D;A[C]=!!B},setAuthToken:function(B,C){C=C||"";b[B]=String(C);w(B,C)},getAuthToken:function(B){return b[B]},getRelayChannel:function(){return x.getCode()},receive:function(B){if(B.length>4){n(gadgets.json_.parse(decodeURIComponent(B[B.length-1])))}},getOrigin:j,init:function(){if(x.init(n,y)===false){x=h}},ACK:a}}();gadgets.rpc.init();gadgets.IFPCSHIM={call:function(d,f,a,e,b,c,g){gadgets.rpc.call("..",f,b,a)},registerService:function(b,a){gadgets.rpc.register(b,a)},handleRequest:function(a){gadgets.rpc.receive(a)}};var _IFPC=gadgets.IFPCSHIM;gadgets.IFPC_=_IFPC;function ifpc_widget_resize(h,j){if(typeof ifpc_current_surface==="undefined"){ifpc_current_surface=null}if(j<=1&&j>0&&"canvas"===ifpc_current_surface){var d=document.body.scrollHeight;var e=document.documentElement.clientHeight;var f=document.documentElement.scrollHeight;d=((d>f)?d:f);j=Math.floor((((d>e)?d:e)-295)*j)}else{if(j<1){j=0}else{switch(ifpc_current_surface){case"canvas":max_widget_height=1000000;break;default:max_widget_height=1000;break}if(j>max_widget_height){j=max_widget_height}}}var g=document.getElementById(h);g.style.height=j;g.height=j}_IFPC.registerService("resizeWidget",ifpc_widget_resize);function ifpc_widget_requestLocale(){return[ifpc_locale.country,ifpc_locale.lang]}_IFPC.registerService("requestLocale",ifpc_widget_requestLocale);var AppBeaconEnum={ec_gallery:3,ec_canvas:4,ec_userhome:5,ec_profile:6,ec_appsetting:8,ec_addpopup:10,ec_blockpopup:11,ec_unblockpopup:12,ec_uninstallpopup:13,ec_reportabuse:22,ec_updateapppermissionspopup:24,ec_signup:28,ec_gameshub:29,ec_appshub:36,ec_appssearch:43,em_appprofile:200,em_devprofile:201,em_gallery:202,em_canvas:203,em_report:204,em_appsettings:205,em_close:206,em_addapp:207,em_blockapp:208,em_unblockapp:209,em_removeapp:210,em_ignoreapp:211,em_sortfilter:212,em_culturefilter:213,em_categoryfilter:214,em_paging:215,em_search:216,em_settingspopupclick:217,em_sendmessage:227,em_updateclick:233,em_viewallclick:237,em_notificationlinkinmessageclick:241,em_notificationactionitemclick:242,em_findfriendsclick:243,em_viewmyappsclick:244};var currentAppId="";namespace("MySpace.Web.Services.Apps");MySpace.Web.Services.Apps.Apps=function(){MySpace.Web.Services.Apps.Apps.initializeBase(this);this._timeout=0;this._userContext=null;this._succeeded=null;this._failed=null};MySpace.Web.Services.Apps.Apps.prototype={MoveAppUp:function(d,c,b,a,e){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"MoveAppUp",false,{token:d,surfaceId:c},b,a,e)},MoveAppDown:function(d,c,b,a,e){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"MoveAppDown",false,{token:d,surfaceId:c},b,a,e)},SetBookmarksDisplayOrder:function(a,e,c,b,d){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"SetBookmarksDisplayOrder",false,{bookmarkOrder:a,userId:e},c,b,d)},UninstallApplication:function(c,b,a,d){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"UninstallApplication",false,{token:c},b,a,d)},UninstallApplicationEx:function(d,a,c,b,e){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"UninstallApplicationEx",false,{token:d,callbackParams:a},c,b,e)},IsAppInstallable:function(a,e,c,b,d){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"IsAppInstallable",false,{appId:a,viewerId:e},c,b,d)},GetAddAppFooterText:function(a,c,b,d){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"GetAddAppFooterText",false,{appid:a},c,b,d)},InstallApplication:function(d,b,c,a,e){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"InstallApplication",false,{token:d,permissions:b},c,a,e)},InstallApplicationEx:function(e,c,a,d,b,f){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"InstallApplicationEx",false,{token:e,permissions:c,callbackParams:a},d,b,f)},InstallApplicationExWithAppParams:function(f,d,b,a,e,c,g){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"InstallApplicationExWithAppParams",false,{token:f,permissions:d,callbackParams:b,appParams:a},e,c,g)},InstallApplicationExWithAppParamsAndClickTracking:function(h,f,c,b,d,a,j,g,e,k){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"InstallApplicationExWithAppParamsAndClickTracking",false,{token:h,permissions:f,callbackParams:c,appParams:b,clickTrackingParams:d,appCookie:a,useAppCookie:j},g,e,k)},RevokeApplicationToken:function(c,b,a,d){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"RevokeApplicationToken",false,{token:c},b,a,d)},RevokeApplicationTokenEx:function(d,a,c,b,e){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"RevokeApplicationTokenEx",false,{token:d,callbackParams:a},c,b,e)},UpdateApplicationSettings:function(a,c,e,d,b,f){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"UpdateApplicationSettings",false,{appid:a,setpermissions:c,unsetpermissions:e},d,b,f)},UpdateGlobalAppEmailSettings:function(a,b,d,c,e){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"UpdateGlobalAppEmailSettings",false,{appid:a,enable:b},d,c,e)},GetApplicationPermissionsString:function(a,d,c,b,e){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"GetApplicationPermissionsString",false,{appid:a,unsetpermissions:d},c,b,e)},BlockApplication:function(c,b,a,d){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"BlockApplication",false,{token:c},b,a,d)},UnblockApplication:function(c,b,a,d){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"UnblockApplication",false,{token:c},b,a,d)},BlockApplicationFromNotifications:function(c,b,a,d){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"BlockApplicationFromNotifications",false,{token:c},b,a,d)},BlockApplicationFromActivities:function(c,b,a,d){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"BlockApplicationFromActivities",false,{token:c},b,a,d)},BlockApplicationFromInvites:function(c,b,a,d){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"BlockApplicationFromInvites",false,{token:c},b,a,d)},BlockApplicationFromRequests:function(b,d,c,a,e){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"BlockApplicationFromRequests",false,{token:d,messageID:b},c,a,e)},BlockNotifications:function(c,b,a,d){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"BlockNotifications",false,{token:c},b,a,d)},BlockActivities:function(c,b,a,d){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"BlockActivities",false,{token:c},b,a,d)},SetUserPreferences:function(a,e,f,c,b,d){return this._invoke(MySpace.Web.Services.Apps.Apps.get_path(),"SetUserPreferences",false,{appId:a,userPreferenceKeys:e,userPreferenceValues:f},c,b,d)}};MySpace.Web.Services.Apps.Apps.registerClass("MySpace.Web.Services.Apps.Apps",Sys.Net.WebServiceProxy);MySpace.Web.Services.Apps.Apps._staticInstance=new MySpace.Web.Services.Apps.Apps();MySpace.Web.Services.Apps.Apps.set_path=function(a){MySpace.Web.Services.Apps.Apps._staticInstance._path=a};MySpace.Web.Services.Apps.Apps.get_path=function(){return MySpace.Web.Services.Apps.Apps._staticInstance._path};MySpace.Web.Services.Apps.Apps.set_timeout=function(a){if(a<0){throw new Error("ArgumentException: value. Invalid Timeout.")}MySpace.Web.Services.Apps.Apps._staticInstance._timeout=a};MySpace.Web.Services.Apps.Apps.get_timeout=function(){return MySpace.Web.Services.Apps.Apps._staticInstance._timeout};MySpace.Web.Services.Apps.Apps.set_defaultUserContext=function(a){MySpace.Web.Services.Apps.Apps._staticInstance._userContext=a};MySpace.Web.Services.Apps.Apps.get_defaultUserContext=function(){return MySpace.Web.Services.Apps.Apps._staticInstance._userContext};MySpace.Web.Services.Apps.Apps.set_defaultSucceededCallback=function(a){MySpace.Web.Services.Apps.Apps._staticInstance._succeeded=a};MySpace.Web.Services.Apps.Apps.get_defaultSucceededCallback=function(){return MySpace.Web.Services.Apps.Apps._staticInstance._succeeded};MySpace.Web.Services.Apps.Apps.set_defaultFailedCallback=function(a){MySpace.Web.Services.Apps.Apps._staticInstance._failed=a};MySpace.Web.Services.Apps.Apps.get_defaultFailedCallback=function(){return MySpace.Web.Services.Apps.Apps._staticInstance._failed};MySpace.Web.Services.Apps.Apps.set_path("/Services/Apps/Apps.asmx");MySpace.Web.Services.Apps.Apps.MoveAppUp=function(d,c,b,a,e){MySpace.Web.Services.Apps.Apps._staticInstance.MoveAppUp(d,c,b,a,e)};MySpace.Web.Services.Apps.Apps.MoveAppDown=function(d,c,b,a,e){MySpace.Web.Services.Apps.Apps._staticInstance.MoveAppDown(d,c,b,a,e)};MySpace.Web.Services.Apps.Apps.SetBookmarksDisplayOrder=function(a,e,c,b,d){MySpace.Web.Services.Apps.Apps._staticInstance.SetBookmarksDisplayOrder(a,e,c,b,d)};MySpace.Web.Services.Apps.Apps.UninstallApplication=function(c,b,a,d){MySpace.Web.Services.Apps.Apps._staticInstance.UninstallApplication(c,b,a,d)};MySpace.Web.Services.Apps.Apps.UninstallApplicationEx=function(d,a,c,b,e){MySpace.Web.Services.Apps.Apps._staticInstance.UninstallApplicationEx(d,a,c,b,e)};MySpace.Web.Services.Apps.Apps.IsAppInstallable=function(a,e,c,b,d){MySpace.Web.Services.Apps.Apps._staticInstance.IsAppInstallable(a,e,c,b,d)};MySpace.Web.Services.Apps.Apps.GetAddAppFooterText=function(a,c,b,d){MySpace.Web.Services.Apps.Apps._staticInstance.GetAddAppFooterText(a,c,b,d)};MySpace.Web.Services.Apps.Apps.InstallApplication=function(d,c,b,a,e){MySpace.Web.Services.Apps.Apps._staticInstance.InstallApplication(d,c,b,a,e)};MySpace.Web.Services.Apps.Apps.InstallApplicationEx=function(e,d,a,c,b,f){MySpace.Web.Services.Apps.Apps._staticInstance.InstallApplicationEx(e,d,a,c,b,f)};MySpace.Web.Services.Apps.Apps.InstallApplicationExWithAppParams=function(f,e,b,a,d,c,g){MySpace.Web.Services.Apps.Apps._staticInstance.InstallApplicationExWithAppParams(f,e,b,a,d,c,g)};MySpace.Web.Services.Apps.Apps.InstallApplicationExWithAppParamsAndClickTracking=function(h,g,c,b,d,a,j,f,e,k){MySpace.Web.Services.Apps.Apps._staticInstance.InstallApplicationExWithAppParamsAndClickTracking(h,g,c,b,d,a,j,f,e,k)};MySpace.Web.Services.Apps.Apps.RevokeApplicationToken=function(c,b,a,d){MySpace.Web.Services.Apps.Apps._staticInstance.RevokeApplicationToken(c,b,a,d)};MySpace.Web.Services.Apps.Apps.RevokeApplicationTokenEx=function(d,a,c,b,e){MySpace.Web.Services.Apps.Apps._staticInstance.RevokeApplicationTokenEx(d,a,c,b,e)};MySpace.Web.Services.Apps.Apps.UpdateApplicationSettings=function(a,d,e,c,b,f){MySpace.Web.Services.Apps.Apps._staticInstance.UpdateApplicationSettings(a,d,e,c,b,f)};MySpace.Web.Services.Apps.Apps.UpdateGlobalAppEmailSettings=function(a,b,d,c,e){MySpace.Web.Services.Apps.Apps._staticInstance.UpdateGlobalAppEmailSettings(a,b,d,c,e)};MySpace.Web.Services.Apps.Apps.GetApplicationPermissionsString=function(a,d,c,b,e){MySpace.Web.Services.Apps.Apps._staticInstance.GetApplicationPermissionsString(a,d,c,b,e)};MySpace.Web.Services.Apps.Apps.BlockApplication=function(c,b,a,d){MySpace.Web.Services.Apps.Apps._staticInstance.BlockApplication(c,b,a,d)};MySpace.Web.Services.Apps.Apps.UnblockApplication=function(c,b,a,d){MySpace.Web.Services.Apps.Apps._staticInstance.UnblockApplication(c,b,a,d)};MySpace.Web.Services.Apps.Apps.BlockApplicationFromNotifications=function(c,b,a,d){MySpace.Web.Services.Apps.Apps._staticInstance.BlockApplicationFromNotifications(c,b,a,d)};MySpace.Web.Services.Apps.Apps.BlockApplicationFromActivities=function(c,b,a,d){MySpace.Web.Services.Apps.Apps._staticInstance.BlockApplicationFromActivities(c,b,a,d)};MySpace.Web.Services.Apps.Apps.BlockApplicationFromInvites=function(c,b,a,d){MySpace.Web.Services.Apps.Apps._staticInstance.BlockApplicationFromInvites(c,b,a,d)};MySpace.Web.Services.Apps.Apps.BlockApplicationFromRequests=function(a,d,c,b,e){MySpace.Web.Services.Apps.Apps._staticInstance.BlockApplicationFromRequests(a,d,c,b,e)};MySpace.Web.Services.Apps.Apps.BlockNotifications=function(c,b,a,d){MySpace.Web.Services.Apps.Apps._staticInstance.BlockNotifications(c,b,a,d)};MySpace.Web.Services.Apps.Apps.BlockActivities=function(c,b,a,d){MySpace.Web.Services.Apps.Apps._staticInstance.BlockActivities(c,b,a,d)};MySpace.Web.Services.Apps.Apps.SetUserPreferences=function(a,e,f,c,b,d){MySpace.Web.Services.Apps.Apps._staticInstance.SetUserPreferences(a,e,f,c,b,d)};var gtc=Sys.Net.WebServiceProxy._generateTypedConstructor;if(typeof(MySpace.Web.Services.Apps.AppsReturn)==="undefined"){MySpace.Web.Services.Apps.AppsReturn=gtc("MySpace.Web.Services.Apps.AppsReturn");MySpace.Web.Services.Apps.AppsReturn.registerClass("MySpace.Web.Services.Apps.AppsReturn")}namespace("MySpace.Apps");MySpace.Apps.executeUrl=function(b){if(b==null||b.length==0){return}var a=new Image();a.src=b};MySpace.Apps.executeInstallCallback=function(a){MySpace.Apps.executeUrl(a)};MySpace.Apps.executeUninstallCallback=function(a){MySpace.Apps.executeUrl(a)};MySpace.Apps.tryInstallCallback=function(){if(window.Applications_InstallCallbackUrl){MySpace.Apps.executeInstallCallback(Applications_InstallCallbackUrl)}};MySpace.Apps.uninstallApplication=function(a,c,b){MySpace.Web.Services.Apps.Apps.UninstallApplicationEx(a,"sourceURL="+escape(window.location),function(d){if(typeof(d)=="object"){if(d.status==0){if(d.callbackUrl!=null&&d.callbackUrl!=""){MySpace.Apps.executeUninstallCallback(d.callbackUrl);setTimeout(c,2*1000)}else{c()}}else{b()}}else{c()}},function(d){b()})};MySpace.Apps.FindContext=function(){if(MySpace.ClientContext.FunctionalContext=="AppCanvas"){return AppBeaconEnum.ec_canvas}if(MySpace.ClientContext.FunctionalContext=="UserViewProfile"||MySpace.ClientContext.FunctionalContext=="SitesProfile"){return AppBeaconEnum.ec_profile}if(MySpace.ClientContext.FunctionalContext=="AppsSplash"){return AppBeaconEnum.ec_gallery}if(MySpace.ClientContext.FunctionalContext=="User"){return AppBeaconEnum.ec_userhome}if(MySpace.ClientContext.FunctionalContext=="ApplicationSettings"){return AppBeaconEnum.ec_appsetting}if(MySpace.ClientContext.FunctionalContext=="AppsSearch"){return AppBeaconEnum.ec_appssearch}if(MySpace.ClientContext.FunctionalContext=="AppsGame"){return AppBeaconEnum.ec_gameshub}if(MySpace.ClientContext.FunctionalContext=="Apps"){return AppBeaconEnum.ec_appshub}return -1};MySpace.Apps.bindTrackClick=function(selector,context,message,detail,appid){var links=$q(selector);for(var i=0;i<links.length;i++){$addHandler(links[i],"click",function(evt){MySpace.Apps.trackClick(evt.target,context,message,eval(detail),eval(appid))})}};MySpace.Apps.bindTrackClickEval=function(selector,context,message,detail,appid){var links=$q(selector);for(var i=0;i<links.length;i++){$addHandler(links[i],"click",function(evt){var ec=eval(context);if(typeof(ec)=="undefined"){ec=MySpace.Apps.FindContext()}MySpace.Apps.trackClick(evt.target,ec,eval(message),eval(detail),eval(appid))})}};MySpace.Apps.trackClick=function(h,b,f,e,a){if(typeof(a)=="undefined"){a=-1}else{currentAppId=a}if(typeof(e)=="undefined"){e=""}if(!MySpace.Application.keyDisabled("DWBeaconAppClicks")){var c=new Date();var j=c.getTime();var g=MySpace.ClientContext.UserId;if(typeof(MySpace.BeaconData)!="undefined"){g=MySpace.BeaconData.pid}var k=String.format("http://apps.myspace.com/Services/Apps/TrackAnalytics.asmx/TrackApp?pid={0}&userId={1}&appId={2}&eventType={3}&eventContext={4}&eventDetail={5}&time={6}&count={7}",g,parseInt(MySpace.ClientContext.UserId),parseInt(a),f,b,e,j,1);MySpace.Apps.executeUrl(k)}};MySpace.Apps.trackSettingClick=function(a){MySpace.Apps.trackClick(a,MySpace.Apps.FindContext(),AppBeaconEnum.em_appsettings)};MySpace.Apps.trackCultureClick=function(a){MySpace.Apps.trackClick(a,MySpace.Apps.FindContext(),AppBeaconEnum.em_culturefilter,a.options[a.selectedIndex].value)};MySpace.Apps.trackPagerClick=function(a){MySpace.Apps.trackClick(a,MySpace.Apps.FindContext(),AppBeaconEnum.em_paging,a.innerText)};namespace("MySpace.Apps.JSONP");MySpace.Apps.JSONP.timeoutIds={};MySpace.Apps.JSONP.request=function(c,h,b,g){var f=c;var e=setTimeout(b,g);MySpace.Apps.JSONP.timeoutIds[f]=e;var d=document.createElement("script");d.setAttribute("type","text/javascript");var a="?";if(h.indexOf("?")>0){a="&"}a+='jsonp=clearTimeout(MySpace.Apps.JSONP.timeoutIds["'+f+'"]);'+c;d.setAttribute("src",h+a);document.getElementsByTagName("head")[0].appendChild(d)};MySpace.Apps.JSONP.context={};MySpace.Apps.JSONP.setContext=function(a,b){MySpace.Apps.JSONP.context[a]=b};MySpace.Apps.JSONP.getContext=function(a){if(MySpace.Apps.JSONP.context.hasOwnProperty(a)){return MySpace.Apps.JSONP.context[a]}return null};MySpace.UI.AppsPopup=function(){throw"Cannot instantiate static class."};MySpace.UI.AppsPopup._contentHolders={};MySpace.UI.AppsPopup.create=function(b,d,a){var c=MySpace.UI.Popup.create(b,d);c.set_top(60);return c};MySpace.UI.AppsPopup.createPopupV2=function(c,g,b,d,a){var f=document.createElement("div");f.innerHTML="<div class='addapp_popup_wrapper' style='z-index:1000201;left:0px;width:100%;display:none;visibility:hidden;'><div class='addapp_popup_box'><a class='addapp_popup_x'><div id='addappv2_close_x' style='float: left; margin-right: 4px; height: 17px;'>"+b+"</div><img id='addappv2_close_x' src='http://x.myspace.com/modules/applications/static/img/addappv2_close_icon.gif' /></a><div class='addapp_popup_title'></div><div class='addapp_popup_content'></div><div class='addapp_popup_buttons'><span style='margin-right: 10px;'>"+d+"</span></div></div></div>";var e=$create(MySpace.UI._Popup,{title:g,content:c,callback:a},null,null,f.firstChild);return e};MySpace.UI.AppsPopup.createWidePopupV2=function(c,g,b,d,a){var f=document.createElement("div");f.innerHTML="<div class='addapp_popup_wrapper' style='z-index:1000201;left:0px;width:100%;display:none;visibility:hidden;'><div class='wideaddapp_popup_box'><a class='addapp_popup_x'><div id='addappv2_close_x' style='float: left; margin-right: 4px; height: 17px;'>"+b+"</div><img id='addappv2_close_x' src='http://x.myspace.com/modules/applications/static/img/addappv2_close_icon.gif' /></a><div class='addapp_popup_title'></div><div class='addapp_popup_content'></div><div class='apppref_popup_buttons'><span style='margin-right: 25px;'>"+d+"</span></div></div></div>";var e=$create(MySpace.UI._Popup,{title:g,content:c,callback:a},null,null,f.firstChild);return e};MySpace.UI.AppsPopup.ajaxPermissions=function(a,d,c,e,b){return MySpace.UI.AppsPopup.ajaxPermissionsEx(a,d,c,e,b,null,null)};MySpace.UI.AppsPopup.ajaxPermissionsEx=function(c,j,h,l,f,e,g){if(typeof(e)==undefined){e=null}if(typeof(g)==undefined){g=null}var d=c.toString();var k="appid="+d+"&checkuser=true";if(e!=null){k+="&cat="+escape(e)}if(g!=null){k+="&perm="+escape(g)}MySpace.WebRequest.invoke("/Modules/Applications/Pages/AppPermissions.aspx",false,k,a,b,null,0);function a(o,m){var n=MySpace.UI.AppsPopup.create(o,l);f(true,n);MySpace.Apps.bindTrackClick(".appSettings",AppBeaconEnum.ec_updateapppermissionspopup,AppBeaconEnum.em_appsettings,"",'evt.target.parentNode.getAttribute("appid")')}function b(){f(false,null)}return};MySpace.UI.AppsPopup.ajaxPermissionsExternalApp=function(c,j,h,l,f,e,g){if(typeof(e)==undefined){e=null}if(typeof(g)==undefined){g=null}var d=c.toString();var k="appid="+d+"&checkuser=true";if(e!=null){k+="&cat="+escape(e)}if(g!=null){k+="&perm="+escape(g)}MySpace.WebRequest.invoke("/Modules/Applications/Pages/ExternalAppPermissions.aspx",false,k,a,b,null,0);function a(o,m){var n=MySpace.UI.AppsPopup.create(o,l);f(true,n)}function b(){f(false,null)}return};MySpace.UI.AppsPopup.getPermissions=function(c,b){var a=new Array();var d=c._box.getElementsByTagName("input");for(i=0;i<d.length;i++){if(Sys.UI.DomElement.containsCssClass(d[i],"userAppPermission")&&d[i].checked==b){a.push(d[i].value)}}return a};MySpace.UI.AppsPopup.getSelectedPermissions=function(a){return MySpace.UI.AppsPopup.getPermissions(a,true)};MySpace.UI.AppsPopup.getUnselectedPermissions=function(a){return MySpace.UI.AppsPopup.getPermissions(a,false)};MySpace.UI.AppsPopup.ajaxBlockConfirmation=function(h,m,k){var j=h.toString();var l="appid="+j;currentAppId=h;MySpace.WebRequest.invoke("/Modules/Applications/Pages/BlockApplication.aspx",false,l,a,b,null,0);function a(r,o){var n=r;var q=MySpace.UI.AppsPopup.create(n,m);k(true,q);$addHandler($q(".popup_wrapper:last-child .popup_x")[0],"click",e);$addHandler($q(".popup_wrapper:last-child .popup_buttons input")[0],"click",c);$addHandler($q(".popup_wrapper:last-child .popup_buttons input")[1],"click",e);$addHandler($q(".popup_wrapper:last-child .blockappsetting")[0],"click",g);$addHandler($q(".popup_wrapper:last-child .blockappprofile")[0],"click",f);$addHandler($q(".popup_wrapper:last-child .blockappcanvas")[0],"click",d)}function d(n){MySpace.Apps.trackClick(n,AppBeaconEnum.ec_blockpopup,AppBeaconEnum.em_canvas,MySpace.ClientContext.FunctionalContext,currentAppId)}function f(n){MySpace.Apps.trackClick(n,AppBeaconEnum.ec_blockpopup,AppBeaconEnum.em_appprofile,MySpace.ClientContext.FunctionalContext,currentAppId)}function g(n){MySpace.Apps.trackClick(n,AppBeaconEnum.ec_blockpopup,AppBeaconEnum.em_appsettings,MySpace.ClientContext.FunctionalContext,currentAppId)}function e(n){MySpace.Apps.trackClick(n,AppBeaconEnum.ec_blockpopup,AppBeaconEnum.em_close,MySpace.ClientContext.FunctionalContext,currentAppId)}function c(n){MySpace.Apps.trackClick(n,AppBeaconEnum.ec_blockpopup,AppBeaconEnum.em_blockapp,MySpace.ClientContext.FunctionalContext,currentAppId);$removeHandler($q(".popup_wrapper:last-child .popup_x")[0],"click",e)}function b(){k(false,null)}return};MySpace.UI.AppsPopup.ajaxRequestPermission=function(a,c,d,b){var e=function(l){var k="appid="+a+"&perm="+escape(c)+"&reason="+escape(d);var h=l;var j="<center style='margin-top: 25px; margin-bottom: 25px;'>"+MySpaceRes.AppManagement.AppsPopup_Loading+"<br /><img style='margin-top: 15px;' src='/modules/common/static/img/fhloadercircles.gif' /></center>";p=MySpace.UI.AppsPopup.createPopupV2(j,MySpaceRes.AppManagement.RequestPermissionV2PopupTitle,MySpaceRes.AppManagement.AppsPopupV2Close,h);p.add_button(MySpaceRes.AppManagement.RequestPermissionV2AllowPermission);p.add_button(MySpaceRes.AppManagement.RequestPermissionV2Deny);p.show(b);MySpace.WebRequest.invoke("/Modules/Applications/Pages/RequestPermissionV2.aspx",false,k,f,g,null,0);function f(o,n){var m=o;p.set_content(m);MySpace.UI.AppsPopup.checkForHidePermissionButtons();$create(MySpace.UI._Popup,null,null,null,p._element)}function g(){}};MySpace.Web.Services.Apps.Apps.GetAddAppFooterText(a,e);return};MySpace.UI.AppsPopup.checkForHidePermissionButtons=function(){var b=document.getElementById("hideRequestPermButton");if(b!=null){var a=document.getElementsByTagName("input");for(var c=0;c<a.length;c++){if((a[c].value==MySpaceRes.AppManagement.RequestPermissionV2Deny)||(a[c].value==MySpaceRes.AppManagement.RequestPermissionV2AllowPermission)){a[c].style.visibility="hidden"}}}else{var a=document.getElementsByTagName("input");for(var c=0;c<a.length;c++){if((a[c].value==MySpaceRes.AppManagement.RequestPermissionV2Deny)||(a[c].value==MySpaceRes.AppManagement.RequestPermissionV2AllowPermission)){a[c].style.visibility="visible"}}}};MySpace.UI.AppsPopup.ajaxAddApp=function(b,k,d){var l=MySpace.Application.keyDisabled("Applications_EnableV2AddAppPopup");var c=b.toString();var f=window.location.href;var j="appid="+c+"&cat=2&nexturl="+escape(f);var g;var e="<center style='margin-top: 25px; margin-bottom: 25px;'>"+MySpaceRes.AppManagement.AppsPopup_Loading+"<br /><img style='margin-top: 15px;' src='/modules/common/static/img/fhloadercircles.gif' /></center>";var h=new Array();var a=function(u){var t=u;currentAppId=c;if(l){g=MySpace.UI.AppsPopup.create(e,k);g.add_button(MySpaceRes.ProfileDisplay.AppInstallPopupButtonInstall);g.add_button(MySpaceRes.ProfileDisplay.AppInstallPopupButtonCancel,true).isCancel=true;g.show(d);MySpace.WebRequest.invoke("/Modules/Applications/Pages/AddApp.aspx",false,j,m,n,null,0)}else{g=MySpace.UI.AppsPopup.createPopupV2(e,MySpaceRes.AppManagement.AppsPopupV2AddApp,MySpaceRes.AppManagement.AppsPopupV2Close,t);g.add_button(MySpaceRes.ProfileDisplay.AppInstallPopupButtonInstall);g.show(d);MySpace.WebRequest.invoke("/Modules/Applications/Pages/AddAppV2.aspx",false,j,m,n,null,0)}function m(y,w){var v=y;g.set_content(v);MySpace.UI.AppsPopup.checkForHideAddButton();var x=$q("a.addapp_popup_x").length-1;$addHandler($q("a.addapp_popup_x")[x],"click",r);$addHandler($q(".addapp_popup_buttons input")[x],"click",o);$addHandler($q(".addappv2_addcanvas")[x],"click",q);$addHandler($q(".addappv2_addprofile")[x],"click",s)}function r(v){MySpace.Apps.trackClick(v,AppBeaconEnum.ec_addpopup,AppBeaconEnum.em_close,MySpace.ClientContext.FunctionalContext,currentAppId)}function s(v){MySpace.Apps.trackClick(v,AppBeaconEnum.ec_addpopup,AppBeaconEnum.em_appprofile,MySpace.ClientContext.FunctionalContext,currentAppId)}function q(v){MySpace.Apps.trackClick(v,AppBeaconEnum.ec_addpopup,AppBeaconEnum.em_canvas,MySpace.ClientContext.FunctionalContext,currentAppId)}function o(v){MySpace.Apps.trackClick(v,AppBeaconEnum.ec_addpopup,AppBeaconEnum.em_addapp,MySpace.ClientContext.FunctionalContext,currentAppId)}function n(){}MySpace.UI.AppsPopup.checkForHideAddButton()};MySpace.Web.Services.Apps.Apps.GetAddAppFooterText(b,a);return};MySpace.UI.AppsPopup.checkForHideAddButton=function(){var b=document.getElementById("hideAddAppButton");if(b!=null){var a=document.getElementsByTagName("input");for(var c=0;c<a.length;c++){if(a[c].value==MySpaceRes.ProfileDisplay.AppInstallPopupButtonInstall){a[c].style.visibility="hidden"}}}else{var a=document.getElementsByTagName("input");for(var c=0;c<a.length;c++){if(a[c].value==MySpaceRes.ProfileDisplay.AppInstallPopupButtonInstall){a[c].style.visibility="visible"}}}};function getElementsByClassName(c,g){if(!g){g=document.getElementsByTagName("body")[0]}var b=[];var h=new RegExp("\\b"+c+"\\b");var d=g.getElementsByTagName("*");for(var e=0,f=d.length;e<f;e++){if(h.test(d[e].className)){b.push(d[e])}}return b}MySpace.UI.AppsPopup.ajaxPreferences=function(b,g,d){var c=b.toString();var f="appid="+c;var e="<center style='margin-top: 25px; margin-bottom: 25px;'>"+MySpaceRes.AppManagement.AppsPopup_Loading+"<br /><img style='margin-top: 15px;' src='/modules/common/static/img/fhloadercircles.gif' /></center>";var a=function(m){var k=m;var l=MySpace.UI.AppsPopup.createWidePopupV2(e,g,MySpaceRes.AppManagement.AppsPopupV2Close,k);l.add_button(MySpaceRes.ProfileDisplay.AppInstallPopupButtonInstall);l.show(function(u,n){if(n.target.isCancel){u.set_content("");if(typeof opt_callback==="function"){opt_callback(null)}return}var q=[];var r=[];var t=getElementsByClassName("preferenceDefinition");for(var v=0;v<t.length;v++){q.push(t[v].name);if(t[v].type=="checkbox"){r.push(t[v].checked)}else{r.push(t[v].value)}}prefList=getElementsByClassName("preferenceListText")[0];if(prefList){q.push(prefList.name);var s=getElementsByClassName("preferenceListItem");var o="";for(var v=0;v<s.length;v++){o=o+s[v].innerHTML.substr(0,s[v].innerHTML.indexOf("<"))+"|"}o=o.substr(0,o.length-1);r.push(o)}u.set_content("");MySpace.Web.Services.Apps.Apps.SetUserPreferences(b,q,r,function(w){switch(w.status){case 0:if(typeof opt_callback==="function"){opt_callback(null)}return;default:if(typeof opt_callback==="function"){opt_callback(null)}return}},function(w){if(typeof opt_callback==="function"){opt_callback(null)}})});MySpace.WebRequest.invoke("/Modules/Applications/Pages/UserAppPreferences.aspx",false,f,h,j,null,0);function h(q,o){var n=q;l.set_content(n);$create(MySpace.UI.AppPreferenceContainer,{rootElement:l._element},null,null,l._element);d(true,l)}function j(){d(false,null)}};MySpace.Web.Services.Apps.Apps.GetAddAppFooterText(b,a);return};MySpace.UI.AppsPopup.registerClass("MySpace.UI.AppsPopup");MySpace.UI.AppPreferenceContainer=function(a){MySpace.UI.AppPreferenceContainer.initializeBase(this,[a])};MySpace.UI.AppPreferenceContainer.prototype={_rootElement:null,get_rootElement:function(){return this._rootElement},set_rootElement:function(a){this._rootElement=a},initialize:function(){var a=this._rootElement.getElementsByTagName("form");for(var b=0;b<a.length;b++){if(Sys.UI.DomElement.containsCssClass(a[b],"preferenceList")){var c="apppreflist_"+b;a[b].id=c;$create(MySpace.UI.AppPreferenceList,{rootElement:a[b]},null,null,$get(c))}}}};MySpace.UI.AppPreferenceContainer.registerClass("MySpace.UI.AppPreferenceContainer",Sys.UI.Control);MySpace.UI.AppPreferenceList=function(a){MySpace.UI.AppPreferenceList.initializeBase(this,[a])};MySpace.UI.AppPreferenceList.prototype={_rootElement:null,_textInputElement:null,get_rootElement:function(){return this._rootElement},set_rootElement:function(a){this._rootElement=a},initialize:function(){var e=this._rootElement.getElementsByTagName("input");for(var a=0;a<e.length;a++){if(Sys.UI.DomElement.containsCssClass(e[a],"preferenceListText")){this._textInputElement=e[a]}else{if(Sys.UI.DomElement.containsCssClass(e[a],"preferenceListButton")){$addHandler(e[a],"click",Function.createDelegate(this,function(l){if(this._textInputElement.value!=""){var h=l.target.parentNode.getElementsByTagName("span");var k=null;for(var j=0;j<h.length;j++){if(Sys.UI.DomElement.containsCssClass(h[j],"preferenceListValues")){k=h[j];break}}var m=document.createElement("span");m.className="preferenceListItem";m.appendChild(document.createTextNode(this._textInputElement.value));this._textInputElement.value="";var g=document.createElement("a");g.className="preferenceListItemRemove";g.innerHTML="X";$addHandler(g,"click",function(n){n.target.parentNode.parentNode.removeChild(n.target.parentNode)});m.appendChild(g);k.appendChild(m);k.appendChild(document.createElement("wbr"))}}));break}}}var f=this._rootElement.getElementsByTagName("span");for(var b=0;b<f.length;b++){if(Sys.UI.DomElement.containsCssClass(f[b],"preferenceListItem")){var d=f[b].getElementsByTagName("a");for(var c=0;c<d.length;c++){if(Sys.UI.DomElement.containsCssClass(d[c],"preferenceListItemRemove")){$addHandler(d[c],"click",function(g){g.target.parentNode.parentNode.removeChild(g.target.parentNode)});break}}}}}};MySpace.UI.AppPreferenceList.registerClass("MySpace.UI.AppPreferenceList",Sys.UI.Control);if(typeof(Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()}MySpace.UI.AppsPopup.ajaxBlockConfirmation=function(h,m,k){var j=h.toString();currentAppId=j;var l="appid="+j;MySpace.WebRequest.invoke("/Modules/Applications/Pages/BlockApplication.aspx",false,l,a,b,null,0);function a(r,o){var n=r;var q=MySpace.UI.AppsPopup.create(n,m);k(true,q);$addHandler($q(".popup_wrapper:last-child .popup_x")[0],"click",e);$addHandler($q(".popup_wrapper:last-child .popup_buttons input")[0],"click",c);$addHandler($q(".popup_wrapper:last-child .popup_buttons input")[1],"click",e);$addHandler($q(".popup_wrapper:last-child .blockappsetting")[0],"click",g);$addHandler($q(".popup_wrapper:last-child .blockappprofile")[0],"click",f);$addHandler($q(".popup_wrapper:last-child .blockappcanvas")[0],"click",d)}function c(n){MySpace.Apps.trackClick(n,AppBeaconEnum.ec_blockpopup,AppBeaconEnum.em_blockapp,MySpace.ClientContext.FunctionalContext,currentAppId);$removeHandler($q(".popup_wrapper:last-child .popup_x")[0],"click",e)}function f(n){MySpace.Apps.trackClick(n,AppBeaconEnum.ec_blockpopup,AppBeaconEnum.em_appprofile,MySpace.ClientContext.FunctionalContext,currentAppId)}function g(n){MySpace.Apps.trackClick(n,AppBeaconEnum.ec_blockpopup,AppBeaconEnum.em_appsettings,MySpace.ClientContext.FunctionalContext,currentAppId)}function e(n){MySpace.Apps.trackClick(n,AppBeaconEnum.ec_blockpopup,AppBeaconEnum.em_close,MySpace.ClientContext.FunctionalContext,currentAppId)}function d(n){MySpace.Apps.trackClick(n,AppBeaconEnum.ec_blockpopup,AppBeaconEnum.em_canvas,MySpace.ClientContext.FunctionalContext,currentAppId)}function b(){k(false,null)}return};MySpace.UI.AppsPopup.ajaxBlockAppWithOptions=function(h,k,n,l){var j=h.toString();currentAppId=j;var m="appid="+j+"&block_source="+k;MySpace.WebRequest.invoke("/Modules/Applications/Pages/BlockAppWithOptions.aspx",false,m,a,b,null,0);function a(s,q){var o=s;var r=MySpace.UI.AppsPopup.create(o,n);l(true,r);$addHandler($q(".popup_wrapper:last-child .popup_x")[0],"click",e);$addHandler($q(".popup_wrapper:last-child .popup_buttons input")[0],"click",c);$addHandler($q(".popup_wrapper:last-child .blockappsetting")[0],"click",g);$addHandler($q(".popup_wrapper:last-child .blockappprofile")[0],"click",f);$addHandler($q(".popup_wrapper:last-child .blockappcanvas")[0],"click",d)}function e(o){MySpace.Apps.trackClick(o,AppBeaconEnum.ec_blockpopup,AppBeaconEnum.em_close,MySpace.ClientContext.FunctionalContext,currentAppId)}function c(o){MySpace.Apps.trackClick(o,AppBeaconEnum.ec_blockpopup,AppBeaconEnum.em_blockapp,MySpace.ClientContext.FunctionalContext,currentAppId)}function d(o){MySpace.Apps.trackClick(o,AppBeaconEnum.ec_blockpopup,AppBeaconEnum.em_canvas,MySpace.ClientContext.FunctionalContext,currentAppId)}function f(o){MySpace.Apps.trackClick(o,AppBeaconEnum.ec_blockpopup,AppBeaconEnum.em_appprofile,MySpace.ClientContext.FunctionalContext,currentAppId)}function g(o){MySpace.Apps.trackClick(o,AppBeaconEnum.ec_blockpopup,AppBeaconEnum.em_appsettings,MySpace.ClientContext.FunctionalContext,currentAppId)}function b(){l(false,null)}return};MySpace.UI.AppsPopup.BlockActivities=function(b,j,h){var e=function(k){if(k!=undefined){switch(k.status){case 0:if(MySpace.HomeDisplay&&MySpace.HomeDisplay.activitiesModule){MySpace.HomeDisplay.activitiesModule.getData(0)}else{location.reload(true)}break;case 1:break}}};var c=function(k){};var g=function(){var k=function(l){MySpace.Web.Services.Apps.Apps.BlockApplicationFromActivities(j,e,c)};if(!MySpace.Application.keyDisabled("Applications_KeepInstalledWhenBlocked")){k()}else{MySpace.Apps.uninstallApplication(j,k)}};var a=function(k){if(k){k.parentNode.removeChild(k)}};var f="Block App";var d="none";if(h){d="activities"}MySpace.UI.AppsPopup.ajaxBlockAppWithOptions(b,d,f,function(m,l){var k=function(r,q){if(q.target.isCancel||!m){a(r.get_element());return}var o=document.getElementById("block_options_all_"+b);if(o&&o.checked){a(r.get_element());g();return}var n=document.getElementById("block_options_activities_"+b);if(n&&n.checked){a(r.get_element());MySpace.Web.Services.Apps.Apps.BlockActivities(j,e,c);return}a(r.get_element())};l.add_button("Confirm");l.set_width(500);l.show(k)})};namespace("MySpace.MDP.Apps");namespace("MySpace.MDP.Util");MySpace.MDP.Util.isArray=function(b){if(b==null){return false}return b.constructor==(new Array).constructor};MySpace.MDP.Apps.API_RESOURCE_TIMEOUT=3*1000;MySpace.MDP.Apps.VIEWER_APPS_RESOURCE=-1;MySpace.MDP.Apps.OWNER_APPS_RESOURCE=-1;MySpace.MDP.Apps.setViewerAppsResource=function(a){MySpace.MDP.Apps.VIEWER_APPS_RESOURCE=a};MySpace.MDP.Apps.setListAppsResource=function(a){MySpace.MDP.Apps.setViewerAppsResource(a)};MySpace.MDP.Apps.setOwnerAppsResource=function(a){MySpace.MDP.Apps.OWNER_APPS_RESOURCE=a};MySpace.MDP.Apps.AppCache=function(){MySpace.MDP.Apps.AppCache.initializeBase(this);this._initialized=false;this._cache={};this._apps=null;this._viewerInfo=null;this._viewerGlobalPermissions=null;this._bookmarkedApps=null};MySpace.MDP.Apps.AppCache.prototype={clear:function(){this._cache={};this._initialized=false},populate:function(a){this.clear();if(!MySpace.MDP.Util.isArray(a)&&MySpace.MDP.Util.isArray(a.userInstalledApplications)){if(a.hasOwnProperty("viewer")){this._viewerInfo=a.viewer}if(a.hasOwnProperty("bookmarkedApplications")){this._bookmarkedApps=a.bookmarkedApplications}if(a.hasOwnProperty("globalPermissions")){this._viewerGlobalPermissions=a.globalPermissions}a=a.userInstalledApplications}if(a==null){a=[]}this._apps=a;for(var b in a){this._cache[a[b].id]=a[b]}this._initialized=true;return a},getApp:function(a){return this._cache[a]},getApps:function(){return this._apps},getBookmarkedApps:function(){return this._bookmarkedApps},getViewerInfo:function(){return this._viewerInfo},checkViewerGlobalPermission:function(b){if(this._viewerGlobalPermissions!=null&&(typeof b=="string")){b=b.toUpperCase();for(var a=0;a<this._viewerGlobalPermissions.length;a++){if(b==this._viewerGlobalPermissions[a]){return true}}}return false},checkApplicationPermission:function(b,d){var a=this._cache[b];if(!a||(typeof d!="string")){return false}d=d.toUpperCase();if(d=="BI"){return true}if(a.hasOwnProperty("applicationPermissions")){var e=a.applicationPermissions;for(var c=0;c<e.length;c++){if(d==e[c]){return true}}}return false},isInitialized:function(){return this._initialized}};MySpace.MDP.Apps.AppCache.registerClass("MySpace.MDP.Apps.AppCache");var mdpAppCache=new MySpace.MDP.Apps.AppCache();var mdpOwnerAppCache=new MySpace.MDP.Apps.AppCache();MySpace.MDP.Apps.CallbackProxy=function(b,a,d,c){MySpace.MDP.Apps.AppCache.initializeBase(this);this.cache=a;this.callbackProxyId=b;this.successCallback=d;this.errorCallback=c};MySpace.MDP.Apps.CallbackProxy.prototype={invokeCallback:function(b){var a=this.cache.populate(b);this.successCallback(a);delete MySpace.MDP.Apps.callbackProxies[this.callbackProxyId]}};MySpace.MDP.Apps.callbackProxies={};MySpace.MDP.Apps._listApps=function(o,n,l,k,d,j,a,b){if(typeof j!="string"){d()}if(a.isInitialized()){k(a.getApps());return}var h=j;var f="?";if(h.indexOf("?")>0){f="&"}if(o!=null&&o!=""){h+=f+"token="+o;f="&"}if(n!=null&&n!=""){h+=f+"timestamp="+n}var g=d;if(typeof(d)=="function"){g=d.name+"();"}var m=MySpace.MDP.Apps.API_RESOURCE_TIMEOUT;var c=b;if(!c||c===""){c=l}MySpace.MDP.Apps.callbackProxies[c]=new MySpace.MDP.Apps.CallbackProxy(c,a,k,d,47);var e="MySpace.MDP.Apps.callbackProxies['"+c+"'].invokeCallback";MySpace.Apps.JSONP.request(e,h,g,m)};MySpace.MDP.Apps.listOwnerApps=function(e,d,c,b,a){MySpace.MDP.Apps._listApps(e,d,c,b,a,MySpace.MDP.Apps.OWNER_APPS_RESOURCE,mdpOwnerAppCache,"owner")};MySpace.MDP.Apps.listViewerApps=function(e,d,c,b,a){MySpace.MDP.Apps._listApps(e,d,c,b,a,MySpace.MDP.Apps.VIEWER_APPS_RESOURCE,mdpAppCache,"viewer")};MySpace.MDP.Apps.listApps=function(e,d,c,b,a){MySpace.MDP.Apps.listViewerApps(e,d,c,b,a)};MySpace.MDP.Apps.getOwnerAppFromCache=function(a,b){MySpace.MDP.Apps._getAppFromCache(a,b,mdpOwnerAppCache)};MySpace.MDP.Apps.getViewerAppFromCache=function(a,b){MySpace.MDP.Apps._getAppFromCache(a,b,mdpAppCache)};MySpace.MDP.Apps.getAppFromCache=function(a,b){MySpace.MDP.Apps.getViewerAppFromCache(a,b)};MySpace.MDP.Apps._getAppFromCache=function(b,d,c){if(c.getApp(b)!=null){var a=c.getApp(b);d(a);return true}return false};MySpace.MDP.Apps.getViewerInfoFromCache=function(a,b){if(mdpAppCache.getViewerInfo()!=null){var c=mdpAppCache.getViewerInfo();if(mdpAppCache.checkApplicationPermission(a,"BI")){b(c)}else{if(ifpc_current_surface=="canvas"&&mdpAppCache.checkViewerGlobalPermission("BI")){b(c)}else{b({errorCode:"unauthorized",errorMessage:"Gadget does not have access to the requested data."})}}return true}return false};MySpace.MDP.Apps.getViewerApp=function(b,g,f,e,d,c){if(MySpace.MDP.Apps.getViewerAppFromCache(b,d)){return}function a(h){if(!MySpace.MDP.Apps.getViewerAppFromCache(b,d)){c()}}MySpace.MDP.Apps.listViewerApps(g,f,e,a,c)};MySpace.MDP.Apps.getOwnerApp=function(b,g,f,e,d,c){if(MySpace.MDP.Apps.getOwnerAppFromCache(b,d)){return}function a(h){if(!MySpace.MDP.Apps.getOwnerAppFromCache(b,d)){c()}}MySpace.MDP.Apps.listOwnerApps(g,f,e,a,c)};MySpace.MDP.Apps.getApp=function(a,f,e,d,c,b){MySpace.MDP.Apps.getViewerApp(a,f,e,d,c,b)};MySpace.MDP.Apps.getViewerInfo=function(b,f,e,d,c){if(MySpace.MDP.Apps.VIEWER_APPS_RESOURCE==-1){d({errorCode:"badRequest",errorMessage:"The current viewer is not logged in."});return}if(MySpace.MDP.Apps.getViewerInfoFromCache(b,d)){return}function a(g){if(!MySpace.MDP.Apps.getViewerInfoFromCache(b,d)){c()}}MySpace.MDP.Apps.listApps(f,e,ifpc_current_surface,a,c)};MySpace.MDP.Apps.generateAppMarkup=function(a,b){return MySpace.MDP.Apps.generateAppMarkupInternal(a,b)};MySpace.MDP.Apps.generateAppMarkupInternal=function(a,k){if(k.indexOf("profile")>-1){k="profile"}var d="apppanel_"+a.id+"_"+k;var b=null;if(a.hasOwnProperty("innerHTML")){b=a.innerHTML}else{var d="apppanel_"+a.id+"_"+k;var e;if(a.panelType.toLowerCase()=="opensocial"){e=document.createElement("iframe");e.id=d;e.name=d;e.allowtransparency="true";e.frameborder=0;e.style.border=0;e.height=a.height;e.width=a.width;e.src=a.iframeUrl;e.scrolling="no"}else{if(a.panelType.toLowerCase()=="flash"){var e=document.createElement("object");e.id=d;e.allowscriptaccess="never";e.allownetworking="all";e.type="application/x-shockwave-flash";e.data=a.flashUrl;e.height=a.height;e.width=a.width;var g=document.createElement("param");g.name="movie";g.value=a.flashUrl;e.appendChild(g);var f=document.createElement("param");f.name="FlashVars";f.value="";e.appendChild(f);var h=document.createElement("param");h.name="quality";h.value="high";e.appendChild(h);var j=document.createElement("param");j.name="wmode";j.value="transparent";e.appendChild(j)}}var c=document.createElement("div");c.appendChild(e);b=c.innerHTML}return b};MySpace.MDP.Apps.loadApp=function(a,c,b){if(b&&b.className=="mdp_app_placeholder"){b.innerHTML='<div style="background: transparent url(/Modules/Common/Static/img/loadercircles.gif) no-repeat; margin: 10px; padding: 3px 0 0 28px; height: 30px;">App loading...</div>';MySpace.MDP.Apps.getApp(a,"","",c,function(d){var f=document.createElement("div");f.innerHTML=MySpace.MDP.Apps.generateAppMarkupInternal(d,c);var e=f.firstChild;e.style.display="none";b.appendChild(e);MySpace.MDP.Apps.loadAppPlaceholders[a+c]=b},function(){b.innerHTML='<div style="margin: 10px; padding: 3px 0 0 3px; height: 30px;">Error loading app.</div>'})}};MySpace.MDP.Apps.loadAppPlaceholders={};MySpace.MDP.Apps.appLoadedCallback=function(a,d){var b=a+d;if(MySpace.MDP.Apps.loadAppPlaceholders.hasOwnProperty(b)){var c=MySpace.MDP.Apps.loadAppPlaceholders[b];c.removeChild(c.firstChild);c.firstChild.style.display="block";if(c.className=="mdp_app_placeholder"){c.style.height="auto";c.style.width="auto"}}};if(!window._IFPC){window._IFPC={registerService:function(){}}}function ifpc_widget_requestNavigateTo(a,b,e,c,d){ifpc_widget_requestNavigateToEx(a,b,e,c,d,false,false)}function ifpc_widget_requestNavigateToEx(a,e,h,f,g,d,c){var b=encodeURIComponent(gadgets.json_.stringify(f));var j=null;switch(h){case"canvas":j=ifpc_canvas_urltemplate;break;case"profile":j=ifpc_profile_urltemplate;break;case"home":j=ifpc_home_urltemplate;break}if(j!=null){if(-1===ifpc_ownerid){if(MySpace&&MySpace.ClientContext&&MySpace.ClientContext.DisplayFriendId){ifpc_ownerid=MySpace.ClientContext.DisplayFriendId}}j=j.replace(/\{0\}/g,a);j=j.replace(/\{1\}/g,ifpc_ownerid);j=j.replace(/\{2\}/g,b);j=j.replace(/\{3\}/g,ifpc_pm_cmp);if(d){j+="&newinstall=1"}if(c){j+="&"+c}top.location=j}}function ifpc_requestInstallAndPermission(a,c,d,b){headerContent=MySpaceRes.ProfileDisplay.AppInstallHeader+MySpaceAppProfileContext.appDisplayName;MySpace.UI.AppsPopup.ajaxAddApp(MySpaceAppProfileContext.appId,headerContent,function(h,f){if(f.target.parentNode.isCancel||f.target.isCancel){var g={installed:false};b(g);return}var e=MySpace.UI.AppsPopup.getSelectedPermissions(h);MySpace.Web.Services.Apps.Apps.InstallApplication(MySpaceAppProfileContext.token,e,function(j){if(j!=undefined){switch(j.status){case 0:if(j.callbackUrl!=null){MySpace.Apps.executeInstallCallback(j.callbackUrl)}if(mdpAppCache!=null){mdpAppCache[a]={}}var l=function(o){for(i=0;i<e.length;i++){o[e[i]]=true}b(o)};var m=false;for(i=0;i<e.length;i++){if(c instanceof Array&&c.length>0){if(c[0].toLowerCase()==e[i].toLowerCase()){m=true}}}var k=function(){ifpc_widget_requestPermission(a,c,d,l)};$clearHandlers(appinstall_link);appinstall_link.id="apptopnav_appuninstall_link";appinstall_link.innerHTML="Remove App";appinstall_link.style.visibility="hidden";$addHandler(appinstall_link,"click",canvas_appuninstall);appinstall_link=false;if(m){n={};n.installed=true;l(n)}else{setTimeout(k,2*1000)}return;case 1:default:canvas_appinstall_failed(j.content);var n={installed:false};b(n);return}}},function(j){canvas_appinstall_failed(null)})})}var ifpc_widget_postTo_data={};var ifpc_widget_iframe_popup=null;var ifpc_widget_AddToFriends_data={};jQuery.comm.listen("Friend.RequestSent",function(a){if(typeof(ifpc_widget_AddToFriends_data.callback)=="function"){ifpc_widget_AddToFriends_data.callback(a)}});function ifpc_addFriend(a,b){ifpc_widget_AddToFriends_data=a;ifpc_widget_AddToFriends_data.callback=b;MySpace.UI.AddFriendPopup(parseInt(a.friendId))}function ifpc_widget_requestUserBasicInfo(d,a,c){if(d=="VIEWER"){var b=function(){c({errorCode:"internalError",errorMessage:"Unexpected error."})};MySpace.MDP.Apps.getViewerInfo(a,"","",c,b);return}c(null)}function ifpc_widget_requestUserAppData(a){a(userAppData);return}Sys.Application.add_init(function(){if($get("profilerightApps")||$get("profileleftApps")){MySpace.MDP.Apps.listOwnerApps("",null,"profile",MySpace.UI.AppChrome.profileLoad,jQuery.noop)}});function PostToPopupV2(b,a,e){var d="appid="+a+"&cat=2";var c=parent.getElementsByClassName("addapp_popup_wrapper");var f=0;while(f<c.length){c[f].parentNode.removeChild(c[f]);f++}MySpace.WebRequest.invoke(e,false,d,_onPostToComplete,_onPostToFail,null,0)}function _getPostToResponse(){if(ifpc_widget_postTo_data&&ifpc_widget_postTo_data.returnValue){return ifpc_widget_postTo_data.returnValue}else{return 0}}function _onPostToComplete(e,c){var d="loading";var a=function(){if(ifpc_widget_postTo_data&&ifpc_widget_postTo_data.callback){ifpc_widget_postTo_data.callback(_getPostToResponse())}};p=MySpace.UI.AppsPopup.createPopupV2(d,"Publish Friend Update","close","",a);p.show();var b=e;p.set_content(b)}function _onPostToFail(){}namespace("MySpace.Games.MDPPostTo");MySpace.Games.MDPPostTo.modal=null;function ifpc_widget_postToV2(d,e){ifpc_widget_postTo_data=d;ifpc_widget_postTo_data.callback=e;var g=false;for(var c=0;c<ifpc_supported_postto_targets.length;c++){if(ifpc_supported_postto_targets[c]===ifpc_widget_postTo_data.post_type){g=true;break}}if(!g){if(ifpc_widget_postTo_data&&ifpc_widget_postTo_data.callback){ifpc_widget_postTo_data.callback(_getPostToResponse())}return}var k=460;var b="auto";var h="";var j="/games/mdppostto?opensocial_token="+ifpc_widget_postTo_data.os_token+"&p=MDPPostTo",f="appspopup_pt_";switch(ifpc_widget_postTo_data.post_type){case"PROFILE":j+="Profile";f+="pro";h="Add this to your profile";break;case"SEND_MESSAGE":j+="SendMessage";f+="send";h="Send message";break;case"COMMENTS":j+="Comment";f+="comm";h="Add comment";break;case"BULLETINS":j+="Bulletin";f+="bull";h="Post Bulletin";break;case"BLOG":j+="Blog";f+="blog";h="New blog post";break;case"SHARE_APP":j+="AppInvite";f+="appinvite";h="Game invite";break;case"ACTIVITY":j+="Activity";f+="act appspopup_pt_act_width";h="Publish to Stream";break;case"PHOTOS":j+="Photos&albumId="+content;f+="photos";break;case"APP_MESSAGE":j+="AppMessage&recipientlist="+encodeURI(ifpc_widget_postTo_data.appMessageParams.recipients);f+="appmessage";h="Game Request";break}if(typeof ifpc_widget_postTo_data.opt_recipientId!="undefined"){j+="&ids="+ifpc_widget_postTo_data.opt_recipientId}else{if(typeof ifpc_widget_postTo_data.appMessageParams!="undefined"&&typeof ifpc_widget_postTo_data.appMessageParams.recipients!="undefined"){j+="&ids="+ifpc_widget_postTo_data.appMessageParams.recipients}}if(MySpace.Games.MDPPostTo.modal!=null){jQuery("#lightbox-loader").remove()}MySpace.Games.MDPPostTo.modal=jQuery('<div id="lightbox-loader"><div id="lightbox-loader-icon" style="top:70px"><span class="MSIcon loadingIconWhiteLight">Loading...</span></div><iframe id="framePTarget" class="appspopup_box_pt'+f+'" scrolling="no" frameborder="0" style="border:none;overflow:hidden;width:459px"></iframe></div>').dialog({width:k,height:b,dialogClass:"app-modal"});jQuery("#framePTarget").attr("src",j);var a=MySpace.Games.MDPPostTo.modal.dialog("widget");jQuery("#gamesCanvasMarkup").css("visibility","hidden");jQuery("#lightbox-loader-icon").css({left:parseInt(a.width()/2)-10});MySpace.Games.MDPPostTo.modal.dialog({beforeClose:function(){ifpc_display_flash_content()}})}function ifpc_display_flash_content(){jQuery("#gamesCanvasMarkup").css("visibility","visible")}function ifpc_widget_postTo(n,o,r,a,h,j,k,l,m,g,e,f){ifpc_widget_postTo_data.os_token=n;ifpc_widget_postTo_data.post_type=o;ifpc_widget_postTo_data.subject=r;ifpc_widget_postTo_data.content=a;ifpc_widget_postTo_data.opt_recipientId=h;ifpc_widget_postTo_data.opt_recipientImage=j;ifpc_widget_postTo_data.opt_recipientName=k;ifpc_widget_postTo_data.opt_recipientProfile=l;ifpc_widget_postTo_data.app_id=e;ifpc_widget_postTo_data.callback=f;if(o==="ACTIVITY"){ifpc_widget_postTo_data.activity={};ifpc_widget_postTo_data.activity.priority=g;ifpc_widget_postTo_data.activity.template_id=m;ifpc_widget_postTo_data.activity.template_parameters=r;ifpc_widget_postTo_data.activity.media_items=a}var s=false;for(var d=0;d<ifpc_supported_postto_targets.length;d++){if(ifpc_supported_postto_targets[d]===o){s=true;break}}if(!s){if(ifpc_widget_postTo_data&&ifpc_widget_postTo_data.callback){ifpc_widget_postTo_data.callback(_getPostToResponse())}return}var v=460;var c="auto";var t="";var u="/games/mdppostto?opensocial_token="+ifpc_widget_postTo_data.os_token+"&p=MDPPostTo",q="appspopup_pt_";switch(ifpc_widget_postTo_data.post_type){case"PROFILE":u+="Profile";q+="pro";t="Add this to your profile";break;case"SEND_MESSAGE":u+="SendMessage";q+="send";t="Send message";break;case"COMMENTS":u+="Comment";q+="comm";t="Add comment";break;case"BULLETINS":u+="Bulletin";q+="bull";t="Post Bulletin";break;case"BLOG":u+="Blog";q+="blog";t="New blog post";break;case"SHARE_APP":u+="AppInvite";q+="appinvite";t="Game invite";break;case"ACTIVITY":u+="Activity";q+="act appspopup_pt_act_width";t="Publish to Stream";break;case"PHOTOS":u+="Photos&albumId="+a;q+="photos";break;case"APP_MESSAGE":u+="AppMessage&recipientlist="+encodeURI(ifpc_widget_postTo_data.appMessageParams.recipients);q+="appmessage";t="Game Request";break}if(typeof ifpc_widget_postTo_data.opt_recipientId!="undefined"){u+="&ids="+ifpc_widget_postTo_data.opt_recipientId}else{if(typeof ifpc_widget_postTo_data.appMessageParams!="undefined"&&typeof ifpc_widget_postTo_data.appMessageParams.recipients!="undefined"){u+="&ids="+ifpc_widget_postTo_data.appMessageParams.recipients}}if(MySpace.Games.MDPPostTo.modal!=null){jQuery("#lightbox-loader").remove()}MySpace.Games.MDPPostTo.modal=jQuery('<div id="lightbox-loader"><div id="lightbox-loader-icon" style="top:70px"><span class="MSIcon loadingIconWhiteLight">Loading...</span></div><iframe id="framePTarget" class="appspopup_box_pt'+q+'" frameborder="0" scrolling="no" style="border:none;overflow:hidden;width:459px"></iframe></div>').dialog({width:v,height:c,dialogClass:"app-modal"});jQuery("#framePTarget").attr("src",u);var b=MySpace.Games.MDPPostTo.modal.dialog("widget");jQuery("#gamesCanvasMarkup").css("visibility","hidden");jQuery("#lightbox-loader-icon").css({left:parseInt(b.width()/2)-10});MySpace.Games.MDPPostTo.modal.dialog({beforeClose:function(){ifpc_display_flash_content()}})}function ifpc_widget_requestPermission(a,c,d,b){if(document.getElementById("apptopnav_appinstall_link")!=null){ifpc_requestInstall()}else{MySpace.Games.Modal.grantAppPerm_action="close";MySpace.Games.Modal.grantAppPerm_callbackObj={appId:a,permissions:c,reason:d,opt_callback:b};MySpace.Games.Modal.invoke({title:"Game permission request",url:"/modules/apps/DataHandlers/Content.ashx?k=RequestPerm&appid="+a+"&perm="+c[0]+"&reason="+d,btns:[{Deny:"denyAppPerm"},{Allow:"grantAppPerm"}],width:500,nocache:false});MySpace.Games.Modal.instance.dialog({close:function(){if(MySpace.Games.Modal.grantAppPerm_action=="close"){MySpace.Games.Modal.denyAppPerm()}jQuery("#lightbox-loader").remove()}})}}_IFPC.registerService("requestPermission",ifpc_widget_requestPermission);_IFPC.registerService("requestNavigateTo",ifpc_widget_requestNavigateTo);_IFPC.registerService("postTo",ifpc_widget_postTo);_IFPC.registerService("postToV2",ifpc_widget_postToV2);_IFPC.registerService("addFriend",ifpc_addFriend);_IFPC.registerService("requestShowApp",MySpace.MDP.Apps.appLoadedCallback);_IFPC.registerService("parentPageBasicInfoRequest",ifpc_widget_requestUserBasicInfo);_IFPC.registerService("userAppDataRequest",ifpc_widget_requestUserAppData);
