function ContentFragmentPageCustomCallback(n,t){this._variableName=n,this._callbackFunction=t}function Telligent_Modal_Window(n,t){this._variableName=n,this._id=t,this._isShown=!1,this._initialized=!1,this._modal=null,this._modalTitle=null,this._modalClose=null,this._modalAnimationMask=null,this._modalMask=null,this._modalIframe=null,this._modalResize=null,this._modalFooter=null,this._modalContent=null,this._animationHandle=null,this._isOpening=!1,this._checkForScrollResizeHandle=null,this._lastModalInfo=null,this._lastWindowInfo=null,this._isDragging=!1,this._moveModalInfo=null,this._resizeModalInfo=null,this._isResizing=!1}function Common_UserFriendship_Request(n,t,i,r){var u='{"userIdString":"'+i+'","friendIdString":"'+r+'"}';$.ajax({type:"POST",url:Common_UserFriendship_AjaxEndpoint+"/RequestFriendship",data:u,contentType:"application/json; charset=utf-8",dataType:"json",beforeSend:function(n){TelligentUtility.WriteAuthorizationHeader(n)},success:function(n){n.d&&$(t).hide("fast")}})}function Telligent_CallbackManager(n,t,i){this._variableName=n,this._postbackName=t,this._form=document.getElementById(i)}function Telligent_ScriptLoader(){this._scriptsToLoad=[],this._currentScript=0,this.AddScriptToLoad=function(n){this._scriptsToLoad[this._scriptsToLoad.length]=n},this.LoadAll=function(){this._scriptsToLoad.length>0&&this._currentScript<this._scriptsToLoad.length&&this._scriptsToLoad[this._currentScript].Load(Telligent_Common.CreateSafeFunction(this,this._loadSuccessful),Telligent_Common.CreateSafeFunction(this,this._loadFailed))},this._loadSuccessful=function(){this._currentScript++,this.LoadAll()},this._loadFailed=function(n){n?alert(n.message):window.error?alert(window.error.message):alert("An unknown error occured while loading scripts associated to the latest callback")}}function Telligent_ScriptToLoad(n,t){this._isInclude=n,this._content=t,this._element=null,this._completeCallback=null,this._errorCallback=null,this._errorTimeout=null,this.Load=function(n,t){if(this._isInclude){if(this._isScriptIncludeRegistered(this._content)){n&&n();return}this._element=document.createElement("script"),this._element.src=this._content,this._completeCallback=n,this._errorCallback=t;if(Telligent_Common.IsSafari()){try{document.getElementsByTagName("HEAD")[0].appendChild(this._element)}catch(r){t&&t(r);return}setTimeout(Telligent_Common.CreateSafeFunction(this,this._completeCallback),999)}else Telligent_Common.IsIE()?this._element.onreadystatechange=Telligent_Common.CreateSafeFunction(this,this._readyStateChanged):(this._element.readyState="loaded",this._element.onload=Telligent_Common.CreateSafeFunction(this,this._readyStateChanged)),document.getElementsByTagName("HEAD")[0].appendChild(this._element),this._errorTimeout=setTimeout(Telligent_Common.CreateSafeFunction(this,this._errorOccured),29999)}else{var i=document.createElement("script");i.type="text/javascript",i.text=this._content;try{document.getElementsByTagName("HEAD")[0].appendChild(i),Telligent_Common.IsSafari()||document.getElementsByTagName("HEAD")[0].removeChild(i)}catch(r){t&&t(r);return}n&&n()}},this._isScriptIncludeRegistered=function(n){for(var i=document.getElementsByTagName("SCRIPT"),t=0;t<i.length;t++)if(i[t].src==n||i[t].src.indexOf(n)+n.length==i[t].src.length)return!0;return!1},this._readyStateChanged=function(){this._element&&(this._element.readyState=="loaded"||this._element.readyState=="complete")&&(clearTimeout(this._errorTimeout),this._element.onreadystatechange=null,this._element.onload=null,this._element.onerror=null,this._completeCallback&&this._completeCallback())},this._errorOccured=function(){this._element&&(this._element.onreadystatechange=null,this._element.onload=null,this._element.onerror=null),this._errorCallback&&this._errorCallback({message:"A script was not able to be loaded within the allowed time.  The callback has failed"})}}function DelayedContent(n,t,i,r,u,f){this._variableName=n,this._container=document.getElementById(t),this._loadContentFunction=new Function("argument","callback",i),this._xmlHttpRequest=null,this._isLoaded=r,this._onReloadFunction=f,this.IsLoaded=function(){return this._isLoaded},this.Load=function(n){this.IsLoaded()||this.Reload(n)},this.Reload=function(n){this._container.style.cursor="progress",this._loadContentFunction(n,new Function("result",this._variableName+"._setContent(result);"))},this._setContent=function(n){n!=null&&(Telligent_Common.DisposeContent(this._container),this._container.innerHTML=n,this._isLoaded=!0,this._onReloadFunction&&this._onReloadFunction(this),window.setTimeout(function(){try{__theFormPostData="",__theFormPostCollection=[],WebForm_InitCallback()}catch(n){}},99)),this._container.style.cursor="default"},u&&window.setTimeout(new Function(this._variableName+".Load();"),249)}function CollapseQuote(n){var t=document.getElementById(n.id+"_quote");t.style.display=="none"?(t.style.display="inline",n.innerHTML=n.getAttribute("expandedText")):(t.style.display="none",n.innerHTML=n.getAttribute("collapsedText"))}function RateableContentRating(varName,containerId,valueId,numberOfItems,imagesPathUrl,useHalfStars,containerStyleClass,containerOverStyleClass,containerReadOnlyStyleClass,titles,isReadOnly,allowMultipleSelections){this.VariableName=varName,this.ValueHandle=document.getElementById(valueId),this.ContainerHandle=document.getElementById(containerId),this.ImagesPathUrl=imagesPathUrl,this.UseHalfStars=useHalfStars,this.Items=new Array(numberOfItems),this.IsInitialized=!1,this.NumberOfItems=numberOfItems,this.ContainerStyleClass=containerStyleClass,this.ContainerOverStyleClass=containerOverStyleClass,this.ContainerReadOnlyStyleClass=containerReadOnlyStyleClass,this.Titles=titles,this.IsReadOnly=isReadOnly,this.AllowMultipleSelections=allowMultipleSelections,this.SetAnimationHandle=null,this.SavingValue=!1,this.CachedImages=[],this.MouseOver=function(n){if(!this.IsInitialized||this.IsReadOnly)return;this.ContainerHandle.className=this.ContainerOverStyleClass,this.ShowValue(n)},this.MouseOut=function(){if(!this.IsInitialized||this.IsReadOnly)return;this.ContainerHandle.className=this.ContainerStyleClass,this.ShowCurrentValue()},this.SetValue=function(value){if(!this.IsInitialized||this.IsReadOnly)return;this.ShowValue(value),this.ValueHandle.value=value,this.SetAnimationHandle&&window.clearTimeout(this.SetAnimationHandle),this.AllowMultipleSelections||(this.IsReadOnly=!0),this.SavingValue=!0,eval(this.VariableName+"_ajax").SaveRating(value,new Function("result","window."+this.VariableName+".ValueSaved(result);"),new Function("alert('An error occurred while saving the rating value.');")),this.SetAnimationHandle=window.setTimeout(this.VariableName+".SetAnimation(0);",99)},this.ValueSaved=function(result){result=eval(result),this.ValueHandle.value=result[0],this.ContainerHandle.title=result[1],this.IsReadOnly=result[3]!="true",result[2]&&this.IsReadOnly&&(this.ContainerHandle.onclick=new Function(result[2]),this.ContainerHandle.style.cursor="pointer"),this.SavingValue=!1},this.SetAnimation=function(n){if(n>6||!this.IsInitialized){this.AllowMultipleSelections||(this.IsReadOnly=!0),this.Initialize();return}this.ContainerHandle.className=n%2==0?this.ContainerStyleClass:this.ContainerOverStyleClass,n=this.SavingValue?(n+1)%2:n+1,this.SetAnimationHandle=window.setTimeout(this.VariableName+".SetAnimation("+n+");",199)},this.ShowValue=function(n){if(!this.IsInitialized||this.IsReadOnly)return;var t,i=this.NumberOfItems*2;for(n=n*2,n=n-1,t=0;t<i;t++)this.ContainerHandle.childNodes[t].childNodes[0].src=t>n?this.GetItemsOffSrc(t):this.GetItemsOnSrc(t)},this.ShowCurrentValue=function(){if(!this.IsInitialized)return;this.ShowValue(this.ValueHandle.value)},this.GetValue=function(){return this.IsInitialized?this.ValueHandle.value:null},this._imageExtension=function(){return/MSIE 6/i.test(navigator.userAgent)?"gif":"png"},this.GetItemsOnSrc=function(n){return n%2==1?this.ImagesPathUrl+"star-right-on."+this._imageExtension():this.ImagesPathUrl+"star-left-on."+this._imageExtension()},this.GetItemsOffSrc=function(n){return n%2==1?this.ImagesPathUrl+"star-right-off."+this._imageExtension():this.ImagesPathUrl+"star-left-off."+this._imageExtension()},this.GetItemTitle=function(n,t){return typeof this.Titles=="object"?this.Titles[n].replace("{0}",t):this.Titles?this.Titles.replace("{0}",t):t},this.CacheImages=function(){for(var t,n,r=2,i=0;i<r;i++)n=this.GetItemsOnSrc(i),this.IsImageCached(n)||(t=new Image,t.src=n,this.CachedImages[this.CachedImages.length]=t),n=this.GetItemsOffSrc(i),this.IsImageCached(n)||(t=new Image,t.src=n,this.CachedImages[this.CachedImages.length]=t)},this.IsImageCached=function(n){for(var t=0;t<this.CachedImages.length;t++)if(this.CachedImages[t].src==n)return!0;return!1},this.Initialize=function(){this.CacheImages();while(this.ContainerHandle.childNodes.length>0)this.ContainerHandle.removeChild(this.ContainerHandle.childNodes[0]);this.ContainerHandle.className=this.IsReadOnly?this.ContainerReadOnlyStyleClass:this.ContainerStyleClass;for(var t,i,n,u=this.NumberOfItems*2,r=0;r<u;r++)i=document.createElement("img"),i.style.borderLeftWidth="0px",i.style.borderTopWidth="0px",i.style.borderRightWidth="0px",i.style.borderBottomWidth="0px",this.IsReadOnly||(t=document.createElement("a"),t.href="#",t.style.textDecoration="none",t.appendChild(i)),n=(r+1)/2,i.src=n>this.ValueHandle.value?this.GetItemsOffSrc(r):this.GetItemsOnSrc(r),this.IsReadOnly||(this.UseHalfStars?(t.title=this.GetItemTitle(r,n),i.alt=this.GetItemTitle(r,n)):(n=Math.ceil(n),t.title=this.GetItemTitle(n,n),i.alt=this.GetItemTitle(n,n)),t.onclick=new Function("window."+this.VariableName+".SetValue("+n+"); return false;"),t.onfocus=new Function("window."+this.VariableName+".MouseOver("+n+");"),t.onmouseover=new Function("window."+this.VariableName+".MouseOver("+n+");"),t.onblur=new Function("window."+this.VariableName+".MouseOut();"),t.onmouseout=new Function("window."+this.VariableName+".MouseOut();")),i.align="absmiddle",i.border=0,t?this.ContainerHandle.appendChild(t):this.ContainerHandle.appendChild(i);this.IsInitialized=!0},this.Initialize()}var Telligent_Common,TelligentUtility;ContentFragmentPageCustomCallback.prototype._customCallback=function(n,t,i,r,u,f){this._callbackFunction("custom","id="+encodeURIComponent(n)+"&renderFromCurrent=True&callback_control_id="+encodeURIComponent(t)+"&callback_argument="+encodeURIComponent(i),u,f,r)},Telligent_Common={},Telligent_Common._state=[],Telligent_Common.ConvertHsvColorToRgbColor=function(n){var a=n[0],s=n[1],t=n[2],u,r,i,e;if(s==0)return[t,t,t];e=a==360?0:a,e=e/60;var f=Math.floor(e),l=e-f,o=t*(1-s),h=t*(1-s*l),c=t*(1-s*(1-l));return f==0&&(u=t,r=c,i=o),f==1&&(u=h,r=t,i=o),f==2&&(u=o,r=t,i=c),f==3&&(u=o,r=h,i=t),f==4&&(u=c,r=o,i=t),f==5&&(u=t,r=o,i=h),u=Math.round(u),r=Math.round(r),i=Math.round(i),[u,r,i]},Telligent_Common.ConvertRgbColorToHsvColor=function(n){var r=n[0],u=n[1],f=n[2],t,o,i=Math.max(Math.max(r,u),f),s=Math.min(Math.min(r,u),f),e=i-s;return o=i==0?0:e/i,o==0?t=0:r==i?t=60*(u-f)/e:u==i?t=120+60*(f-r)/e:f==i&&(t=240+60*(r-u)/e),t<0&&(t+=360),[t,o,i]},Telligent_Common.ConvertDecimalToHexadecimal=function(n,t){var u="0123456789abcdef",i="",r;while(n>0)r=n%16,i=u.substr(r,1)+i,n-=r,n/=16;if(t)while(i.length<t)i="0"+i;return i},Telligent_Common.ConvertHtmlColorToRgbColor=function(n){return n=n.replace(/[^0-9a-f]/ig,""),n.length==3?[parseInt(n.substr(0,1)+n.substr(0,1),16),parseInt(n.substr(1,1)+n.substr(1,1),16),parseInt(n.substr(2,1)+n.substr(2,1),16)]:n.length==6?[parseInt(n.substr(0,2),16),parseInt(n.substr(2,2),16),parseInt(n.substr(4,2),16)]:[255,255,255]},Telligent_Common.ConvertRgbColorToHtmlColor=function(n){return"#"+Telligent_Common.ConvertDecimalToHexadecimal(n[0],2)+Telligent_Common.ConvertDecimalToHexadecimal(n[1],2)+Telligent_Common.ConvertDecimalToHexadecimal(n[2],2)},Telligent_Common.GetContrastingHtmlColorForRgbColor=function(n){var t=n[0]*2+n[1]*5+n[2];return t>1024?"#000000":"#ffffff"},Telligent_Common.GetElementInfo=function(n){var t={};if(n.getBoundingClientRect){var r=n.getBoundingClientRect(),u=0,f=0;typeof window.pageXOffset=="number"?(u=window.pageXOffset,f=window.pageYOffset):document.body&&(document.body.scrollLeft||document.body.scrollTop)?(u=document.body.scrollLeft,f=document.body.scrollTop):document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)&&(u=document.documentElement.scrollLeft,f=document.documentElement.scrollTop),t.Left=r.left+u,t.Top=r.top+f,t.Right=r.right+u,t.Bottom=r.bottom+f,!this.IsIE()||t.Left<2||this.IsIE8()||(t.Left-=2,t.Top-=2,t.Right-=2,t.Bottom-=2),t.Width=r.right-r.left,t.Height=r.bottom-r.top}else{var e=0,o=0,i=n,s=!1,h=!1,c=Telligent_Common.IsIE();while(i)s||(e+=i.offsetLeft),h||(o+=i.offsetTop),c&&i.offsetParent&&i.offsetParent.style.position=="relative"&&(i.offsetParent.style.width||(s=!0,(i.offsetParent.style.top||i.offsetParent.style.bottom)&&(o+=i.offsetHeight,h=!0))),i=i.offsetParent;t.Left=e,t.Top=o,t.Right=e+n.offsetWidth,t.Bottom=e+n.offsetHeight,t.Width=n.offsetWidth,t.Height=n.offsetHeight}return t},Telligent_Common.GetWindowInfo=function(){var r=0,u=0,t=0,n=0,i;return typeof window.pageXOffset=="number"?(r=window.pageXOffset,u=window.pageYOffset):document.body&&(document.body.scrollLeft||document.body.scrollTop)?(r=document.body.scrollLeft,u=document.body.scrollTop):document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)&&(r=document.documentElement.scrollLeft,u=document.documentElement.scrollTop),typeof window.innerWidth=="number"?(t=window.innerWidth,n=window.innerHeight):document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)?(t=document.documentElement.clientWidth,n=document.documentElement.clientHeight):document.body&&(document.body.clientWidth||document.body.clientHeight)&&(t=document.body.clientWidth,n=document.body.clientHeight),document.documentElement&&(document.documentElement.scrollHeight||document.documentElement.offsetHeight)?document.documentElement.scrollHeight>document.documentElement.offsetHeight?(contentWidth=document.documentElement.scrollWidth,contentHeight=document.documentElement.scrollHeight):(contentWidth=document.documentElement.offsetWidth,contentHeight=document.documentElement.offsetHeight):document.body&&(document.body.scrollHeight||document.body.offsetHeight)?document.body.scrollHeight>document.body.offsetHeight?(contentWidth=document.body.scrollWidth,contentHeight=document.body.scrollHeight):(contentWidth=document.body.offsetWidth,contentHeight=document.body.offsetHeight):(contentWidth=t,contentHeight=n),this.IsSafari()?n>contentHeight&&(contentHeight=n):n>contentHeight&&(n=contentHeight),this.IsSafari()?t>contentWidth&&(contentWidth=t):t>contentWidth&&(t=contentWidth),i={},i.ScrollX=r,i.ScrollY=u,i.Width=t,i.Height=n,i.ContentWidth=contentWidth,i.ContentHeight=contentHeight,i},Telligent_Common.GetCurrentStyleValue=function(n,t,i,r){var u="";try{document.defaultView&&document.defaultView.getComputedStyle?u=document.defaultView.getComputedStyle(n,"").getPropertyValue(t):n.currentStyle&&(u=n.currentStyle[i])}catch(f){}return(u=="inherit"||u=="transparent")&&n.parentNode!=null?Telligent_Common.GetCurrentStyleValue(n.parentNode,t,i,r):u!=""&&u!=undefined&&u!="rgba(0, 0, 0, 0)"?u:r},Telligent_Common.GetStyleOffset=function(n){var t={};return t.Height=Telligent_Common.IsNanDefault(parseInt(Telligent_Common.GetCurrentStyleValue(n,"border-top-width","borderTopWidth","0")),0)+Telligent_Common.IsNanDefault(parseInt(Telligent_Common.GetCurrentStyleValue(n,"border-bottom-width","borderBottomWidth","0")),0)+Telligent_Common.IsNanDefault(parseInt(Telligent_Common.GetCurrentStyleValue(n,"padding-top","paddingTop","0")),0)+Telligent_Common.IsNanDefault(parseInt(Telligent_Common.GetCurrentStyleValue(n,"padding-bottom","paddingBottom","0")),0),t.Width=Telligent_Common.IsNanDefault(parseInt(Telligent_Common.GetCurrentStyleValue(n,"border-left-width","borderLeftWidth","0")),0)+Telligent_Common.IsNanDefault(parseInt(Telligent_Common.GetCurrentStyleValue(n,"border-right-width","borderRightWidth","0")),0)+Telligent_Common.IsNanDefault(parseInt(Telligent_Common.GetCurrentStyleValue(n,"padding-left","paddingLeft","0")),0)+Telligent_Common.IsNanDefault(parseInt(Telligent_Common.GetCurrentStyleValue(n,"padding-right","paddingRight","0")),0),t},Telligent_Common.IsNanDefault=function(n,t){return isNaN(n)?t:n},Telligent_Common.EscapeForRegExp=function(n){return n.replace(/([\\\(\^\$\*\+\?\{\}\.\)\|\-])/g,"\\$1")},Telligent_Common.GetSelectedHtmlInElement=function(n,t,i,r){var c=!0,e=null,u,s,o,l,f,h;return window.getSelection?(u=window.getSelection(),u&&u.rangeCount>0&&u.toString().length>0&&(c=!1,s=u.getRangeAt(0),o=document.createRange(),o.selectNode(n),o.compareBoundaryPoints(Range.START_TO_START,s)>0||o.compareBoundaryPoints(Range.END_TO_END,s)<0?r&&alert(r):(l=document.createElement("div"),l.appendChild(s.cloneContents()),e=l.innerHTML))):document.selection&&(f=document.selection.createRange(),f&&f.text&&(c=!1,h=f.parentElement(),h!=null&&Telligent_Common.ElementContainsElement(n,h)?e=f.htmlText:r&&alert(r))),e==null&&(c&&t||i)&&(e=n.innerHTML),e},Telligent_Common.ElementContainsElement=function(n,t){if(!n||!t)return!1;if(n==t)return!0;if(n&&n.childNodes)for(var i=0;i<n.childNodes.length;i++)if(n.childNodes[i]==t||Telligent_Common.ElementContainsElement(n.childNodes[i],t))return!0;return!1},Telligent_Common.GetCurrentCursorIndex=function(n){var t=0;if(n.selectionStart||n.selectionStart=="0")t=n.selectionStart;else if(document.selection){var r=n.value,u=document.selection.createRange(),i=String.fromCharCode(1);u.text=i,t=n.value.indexOf(i),n.value=r}return t},Telligent_Common._delayedSetCurrentCursorSelection=function(n){var t=Telligent_Common.GetStateByStateId(n,"Telligent_Common_SetCurrentCursorSelection");t&&(Telligent_Common.SetCurrentCursorSelection(t.InputElement,t.StartIndex,t.EndIndex,!1,t.PersistedValue),Telligent_Common.ClearStateByStateId(n,"Telligent_Common_SetCurrentCursorSelection"))},Telligent_Common.IsSafari=function(){return navigator.userAgent.indexOf("Safari")!=-1},Telligent_Common.IsOpera=function(){return window.opera!=null},Telligent_Common.IsIE=function(){return navigator&&navigator.userAgent&&navigator.userAgent.indexOf("MSIE")!=-1},Telligent_Common.IsIE8=function(){return this.IsIE()?parseInt(/MSIE ([0-9]*)\./.exec(navigator.userAgent)[1],9)>=8:!1},Telligent_Common.CreateSafeFunction=function(n,t){return function(){return t.apply(n,arguments)}},Telligent_Common.DisposeContent=function(n){if(n&&n.childNodes&&n.childNodes.length>0)for(var t=0;t<n.childNodes.length;t++){if(n.childNodes[t].dispose)try{n.childNodes[t].dispose()}catch(i){}Telligent_Common.DisposeContent(n.childNodes[t])}},Telligent_Common.SetCurrentCursorSelection=function(n,t,i,r,u){var f,o,e;if(Telligent_Common.IsSafari()||Telligent_Common.IsOpera()){if(r){f=Telligent_Common.GetStateByKey(n,"Telligent_Common_SetCurrentCursorSelection"),f&&f.CursorTimeout&&window.clearTimeout(f.CursorTimeout),f={},f.InputElement=n,f.StartIndex=t,f.EndIndex=i,f.PersistedValue=u,o=Telligent_Common.SaveStateByKey(n,"Telligent_Common_SetCurrentCursorSelection",f),f.CursorTimeout=window.setTimeout(new Function("Telligent_Common._delayedSetCurrentCursorSelection("+o+");"),9),Telligent_Common.SaveStateByKey(n,"Telligent_Common_SetCurrentCursorSelection",f);return}n.focus(),u&&(n.value=u)}try{document.selection?(e=n.createTextRange(),e.move("character",t),e.moveEnd("character",i-t),e.select()):n.setSelectionRange?(n.setSelectionRange(t,i),n.focus()):(n.selectionStart||n.selectionStart=="0")&&(n.selectionStart=t,n.selectionEnd=i)}catch(s){}},Telligent_Common.GetStateByStateId=function(n,t){return Telligent_Common._state.length>n&&n>=0&&Telligent_Common._state[n]&&Telligent_Common._state[n]._stateProcessId==t?Telligent_Common._state[n]._state:null},Telligent_Common.GetStateByKey=function(n,t){for(var i=0;i<Telligent_Common._state.length;i++)if(Telligent_Common._state[i]&&Telligent_Common._state[i]._stateKey==n&&Telligent_Common._state[i]._stateProcessId==t)return Telligent_Common._state[i]._state;return null},Telligent_Common.SaveStateByStateId=function(n,t,i){Telligent_Common._state.length>n&&n>=0&&Telligent_Common._state[n]&&Telligent_Common._state[n]._stateProcessId==t&&(Telligent_Common._state[n]._state=i)},Telligent_Common.SaveStateByKey=function(n,t,i){for(var f=-1,u,r=0;r<Telligent_Common._state.length;r++)if(Telligent_Common._state[r]){if(Telligent_Common._state[r]._stateKey==n&&Telligent_Common._state[r]._stateProcessId==t)return Telligent_Common._state[r]._state=i,r}else f=r;return u={},u._stateKey=n,u._stateProcessId=t,u._state=i,f!=-1?(Telligent_Common._state[f]=u,f):(Telligent_Common._state[Telligent_Common._state.length]=u,Telligent_Common._state.length-1)},Telligent_Common.ClearStateByStateId=function(n,t){Telligent_Common._state.length>n&&n>=0&&Telligent_Common._state[n]&&Telligent_Common._state[n]._stateProcessId==t&&(Telligent_Common._state[n]=null)},Telligent_Common._hiddenSelects=[],Telligent_Common._elementsHidingSelects=[],Telligent_Common._addHiddenSelect=function(n,t){for(var i=null,f=-1,u,r=0;r<Telligent_Common._hiddenSelects.length&&i==null;r++)Telligent_Common._hiddenSelects[r]?Telligent_Common._hiddenSelects[r].SelectElement==t&&(i=Telligent_Common._hiddenSelects[r]):f=r;for(i==null&&(i={},i.SelectElement=t,i.ElementsHidingSelectsIndeces=[],i.OriginalVisibility=t.style.visibility,i.SelectElement.style.visibility="hidden",f==-1?(Telligent_Common._hiddenSelects[Telligent_Common._hiddenSelects.length]=i,i.Index=Telligent_Common._hiddenSelects.length-1):(Telligent_Common._hiddenSelects[f]=i,i.Index=f)),u=!1,r=0;r<i.ElementsHidingSelectsIndeces.length&&!u;r++)i.ElementsHidingSelectsIndeces[r]==n.Index&&(u=!0);u||(n.HiddenSelectsIndeces[n.HiddenSelectsIndeces.length]=i.Index,i.ElementsHidingSelectsIndeces[i.ElementsHidingSelectsIndeces.length]=n.Index)},Telligent_Common._addElementHidingSelect=function(n){for(var t=null,r=-1,i=0;i<Telligent_Common._elementsHidingSelects.length&&t==null;i++)Telligent_Common._elementsHidingSelects[i]?Telligent_Common._elementsHidingSelects[i].Element==n&&(t=Telligent_Common._elementsHidingSelects[i]):r=i;return t==null&&(t={},t.Element=n,t.HiddenSelectsIndeces=[],r==-1?(Telligent_Common._elementsHidingSelects[Telligent_Common._elementsHidingSelects.length]=t,t.Index=Telligent_Common._elementsHidingSelects.length-1):(Telligent_Common._elementsHidingSelects[r]=t,t.Index=r)),t},Telligent_Common.HideElementsInWindow=function(n,t,i){for(var o=null,f=this.GetElementInfo(n),s=t.document.getElementsByTagName("iframe"),c,h,e,u,r=0;r<s.length;r++)if(!Telligent_Common.ElementContainsElement(n,s[r]))try{Telligent_Common.HideElementsInWindow(n,s[r].contentWindow,i)}catch(l){u=this.GetElementInfo(s[r]),(i||u.Top<f.Bottom&&f.Top<u.Bottom&&u.Left<f.Right&&f.Left<u.Right)&&(o==null&&(o=Telligent_Common._addElementHidingSelect(n)),Telligent_Common._addHiddenSelect(o,s[r]),s[r].style.visibility="hidden")}for(c=["object","embed","applet"],this.IsIE()&&(c[c.length]="select"),r=0;r<c.length;r++)for(h=document.getElementsByTagName(c[r]),e=0;e<h.length;e++)u=this.GetElementInfo(h[e]),(i||u.Top<f.Bottom&&f.Top<u.Bottom&&u.Left<f.Right&&f.Left<u.Right)&&(o==null&&(o=Telligent_Common._addElementHidingSelect(n)),Telligent_Common._addHiddenSelect(o,h[e]),h[e].style.visibility="hidden")},Telligent_Common.HideSelectBoxes=function(n,t){Telligent_Common.HideElementsInWindow(n,window.window,t)},Telligent_Common.ShowSelectBoxes=function(n){for(var r=null,t,f,u,i=0;i<Telligent_Common._elementsHidingSelects.length&&r==null;i++)Telligent_Common._elementsHidingSelects[i]&&Telligent_Common._elementsHidingSelects[i].Element==n&&(r=Telligent_Common._elementsHidingSelects[i]);if(r==null)return;for(i=0;i<r.HiddenSelectsIndeces.length;i++){t=Telligent_Common._hiddenSelects[r.HiddenSelectsIndeces[i]];if(t)if(t.ElementsHidingSelectsIndeces.length==1){try{t.SelectElement.style.visibility=="hidden"&&(t.SelectElement.style.visibility=t.OriginalVisibility)}catch(e){}Telligent_Common._hiddenSelects[t.Index]=null}else{for(f=[],u=0;u<t.ElementsHidingSelectsIndeces.length;u++)t.ElementsHidingSelectsIndeces[u]!=r.Index&&(f[f.length]=t.ElementsHidingSelectsIndeces[i]);t.ElementsHidingSelectsIndeces=f}}Telligent_Common._elementsHidingSelects[r.Index]=null},Telligent_Common._disposableControls=[],Telligent_Common.RegisterDisposableControl=function(n){n&&(Telligent_Common._disposableControls[Telligent_Common._disposableControls.length]=n)},Telligent_Common._windowOnUnload=function(){for(var i=0;i<Telligent_Common._disposableControls.length;i++)try{eval(Telligent_Common._disposableControls[i]).Dispose()}catch(e){}Telligent_Common._disposableControls=[],this._originalWindowOnUnload&&this._originalWindowOnUnload()},this._originalWindowOnUnload=null,window.onunload&&(this._originalWindowOnUnload=window.onunload),window.onunload=new Function("Telligent_Common._windowOnUnload();"),Telligent_Modal={},Telligent_Modal._variableName="Telligent_Modal",Telligent_Modal.LoadingHtmlUrl=null,Telligent_Modal.WindowCssClasses=[],Telligent_Modal.WindowTitleCssClasses=[],Telligent_Modal.WindowCloseCssClasses=[],Telligent_Modal.WindowContentCssClasses=[],Telligent_Modal.WindowMaskCssClasses=[],Telligent_Modal.WindowFooterCssClasses=[],Telligent_Modal.WindowResizeCssClasses=[],Telligent_Modal.ZIndex=100,Telligent_Modal._modals=[],Telligent_Modal.EnableAutoResizing=!0,Telligent_Modal.OpenInParentModal=!0,Telligent_Modal.Configure=function(n,t,i,r,u,f,e,o,s,h,c,l){this.LoadingHtmlUrl=n,this.WindowCssClasses=t,this.WindowTitleCssClasses=i,this.WindowCloseCssClasses=r,this.WindowContentCssClasses=u,this.WindowMaskCssClasses=o,this.WindowFooterCssClasses=f,this.WindowResizeCssClasses=e,this.ZIndex=s,this.EnableAnimation=h,this.EnableAutoResizing=c,this.OpenInParentModal=l},Telligent_Modal._getParentWindow=function(){if(this.OpenInParentModal)try{if(window.parent&&window.parent!=window&&window.parent.Telligent_Modal)return window.parent}catch(t){}return null},Telligent_Modal.GetWindowOpener=function(n,t){var r,i;t||(t=window),r=this._getParentWindow(t);if(r)return r.Telligent_Modal.GetWindowOpener(n,t);for(i=0;i<this._modals.length;i++)try{if(this._modals[i].IsShown()&&this._modals[i]._modalIframe.contentWindow==n)return this._modals[i]._openerWindow}catch(u){}return null},Telligent_Modal._getModalWindow=function(n){for(var t=0;t<this._modals.length;t++)if(this._modals[t].IsShown()&&this._modals[t]._openerWindow==n)return this._modals[t];return null},Telligent_Modal.IsShown=function(n){var i,t;return n||(n=window),i=this._getParentWindow(n),i?i.Telligent_Modal.IsShown(n):(t=this._getModalWindow(n),t?t.IsShown():!1)},Telligent_Modal.Resize=function(n,t,i,r){var f,u;r||(r=window),f=this._getParentWindow(r);if(f){f.Telligent_Modal.Resize(n,t,i,r);return}u=this._getModalWindow(r),u&&u.Resize(n,t,i)},Telligent_Modal.MoveTo=function(n,t,i){var u,r;i||(i=window),u=this._getParentWindow(i);if(u){u.Telligent_Modal.MoveTo(n,t,i);return}r=this._getModalWindow(i),r&&r.MoveTo(n,t)},Telligent_Modal.Open=function(n,t,i,r,u,f,e,o,s){var l,c,h;s||(s=window),l=this._getParentWindow(s);if(l){l.Telligent_Modal.Open(n,t,i,r,u,f,e,o,s);return}for(c=null,h=this._modals.length-1;h>=0;h--)if(!this._modals[h].IsShown()){c=this._modals[h];break}c||(this._modals[this._modals.length]=new Telligent_Modal_Window(this._variableName+"._modals["+this._modals.length+"]","telligent_modal_"+this._modals.length),c=this._modals[this._modals.length-1]),c.Open(n,t,i,r,u,f,e,o,s)},Telligent_Modal.Close=function(n,t){var r,i;t||(t=window),r=this._getParentWindow(t);if(r){r.Telligent_Modal.Close(n,t);return}i=this._getModalWindow(t),i&&i.Close(n)},Telligent_Modal.Refresh=function(n){var i,t;n||(n=window),i=this._getParentWindow(n);if(i){i.Telligent_Modal.Refresh(n);return}for(t=0;t<this._modals.length;t++)this._modals[t].Refresh()},Telligent_Modal_Window.prototype._animate=function(n,t,i,r){this._animationHandle&&window.clearTimeout(this._animationHandle);if(!this._isOpening)return;var u=parseInt(this._modal.style.top,10);i<0&&u<n||i>0&&u>n||Math.abs(i)<1?(this._modal.style.top=n+"px",this._modalAnimationMask.style.overflow="visible",this._animationHandle=null,this._isResizing||this._isDragging||(this._modalIframe.style.visibility="visible"),this._isOpening=!1,this._lastWindowInfo=Telligent_Common.GetWindowInfo(),this._checkForScrollResizeHandle=window.setTimeout(new Function("window."+this._variableName+"._checkForScrollResize();"),249)):(this._modal.style.top=t+"px",t=t+i,i>0&&t>n?t=n:i<0&&t<n&&(t=n),i=i*r,this._animationHandle=window.setTimeout(new Function(this._variableName+"._animate("+n+","+t+","+i+","+r+");"),19))},Telligent_Modal_Window.prototype._startDrag=function(n){this._initialized||this._initialize(),n||(n=window.event),this._moveModalInfo={},this._moveModalInfo.StartMouseX=n.pageX?n.pageX:n.screenX,this._moveModalInfo.StartMouseY=n.pageY?n.pageY:n.screenY,this._moveModalInfo.StartModalX=this._lastModalInfo.X,this._moveModalInfo.StartModalY=this._lastModalInfo.Y,this._moveModalInfo.Button=n.button,document.onmouseup=new Function("event","window."+this._variableName+"._endDrag(event); return false;"),document.onmousemove=new Function("event","window."+this._variableName+"._drag(event); return false;"),this._isDragging=!0,this._modalIframe.style.visibility="hidden"},Telligent_Modal_Window.prototype._endDrag=function(){this._initialized||this._initialize(),document.onmouseup=null,document.onmousemove=null,this._modalIframe.style.visibility="visible",this._isDragging=!1,this._moveModalInfo=null},Telligent_Modal_Window.prototype._drag=function(n){this._initialized||this._initialize(),n||(n=window.event);if(n.button!=this._moveModalInfo.Button){this._endDrag(n);return}var r=typeof n.pageX!="undefined"?n.pageX:n.screenX,u=typeof n.pageY!="undefined"?n.pageY:n.screenY,t=r-this._moveModalInfo.StartMouseX,i=u-this._moveModalInfo.StartMouseY;this.MoveTo(this._moveModalInfo.StartModalX+t,this._moveModalInfo.StartModalY+i)},Telligent_Modal_Window.prototype._startResize=function(n){this._initialized||this._initialize(),n||(n=window.event),this._resizeModalInfo={},this._resizeModalInfo.StartMouseX=n.pageX?n.pageX:n.screenX,this._resizeModalInfo.StartMouseY=n.pageY?n.pageY:n.screenY,this._resizeModalInfo.StartModalWidth=this._lastModalInfo.Width,this._resizeModalInfo.StartModalHeight=this._lastModalInfo.Height,this._resizeModalInfo.Button=n.button,document.onmouseup=new Function("event","window."+this._variableName+"._endResize(event); return false;"),document.onmousemove=new Function("event","window."+this._variableName+"._resize(event); return false;"),this._modalIframe.style.visibility="hidden",this._isResizing=!0},Telligent_Modal_Window.prototype._endResize=function(){this._initialized||this._initialize(),this._isResizing=!1,this._resizeModalInfo=null,document.onmouseup=null,document.onmousemove=null,this._modalIframe.style.visibility="visible"},Telligent_Modal_Window.prototype._resize=function(n){this._initialized||this._initialize(),n||(n=window.event);if(n.button!=this._resizeModalInfo.Button){this._endResize(n);return}var r=typeof n.pageX!="undefined"?n.pageX:n.screenX,u=typeof n.pageY!="undefined"?n.pageY:n.screenY,t=r-this._resizeModalInfo.StartMouseX,i=u-this._resizeModalInfo.StartMouseY;this.Resize(this._resizeModalInfo.StartModalWidth+t,this._resizeModalInfo.StartModalHeight+i,!0)},Telligent_Modal_Window.prototype._checkForScrollResize=function(){var i,r,t,n,u,f;this._checkForScrollResizeHandle&&window.clearTimeout(this._checkForScrollResizeHandle);if(this._isShown&&!this._isOpening&&this._lastWindowInfo){try{document.all?this._modalTitle.childNodes[1].innerText=this._modalIframe.contentWindow.document.title:this._modalTitle.childNodes[1].textContent=this._modalIframe.contentWindow.document.title}catch(c){}i=Telligent_Common.GetWindowInfo();if(i.ScrollX!=this._lastWindowInfo.ScrollX||i.ScrollY!=this._lastWindowInfo.ScrollY||i.Width!=this._lastWindowInfo.Width||i.Height!=this._lastWindowInfo.Height){this.Resize(this._lastModalInfo.Width,this._lastModalInfo.Height,!1);return}if(Telligent_Modal.EnableAutoResizing&&!this._isDragging&&!this._isResizing)try{r=this._modalIframe.contentWindow.document;if(!r.readyState||r.readyState=="complete"){t=this._lastModalInfo.Height,n=this._lastModalInfo.Width,n=r.documentElement.scrollWidth,Telligent_Common.IsIE()?t=r.body.scrollHeight+32:Telligent_Common.IsSafari()?t=r.body.offsetHeight+32:(t=r.documentElement.offsetHeight,n=r.documentElement.scrollWidth),window.status=n;var o=Telligent_Common.GetStyleOffset(this._modalContent),s=this._modal.offsetHeight-this._modalContent.offsetHeight-o.Height,e=this._modal.offsetWidth-this._modalContent.offsetWidth-o.Width;t>i.Height-s&&(t=i.Height-s),n>i.Width-e&&(n=i.Width-e),u=t!=this._lastModalInfo.Height&&(t>this._lastModalInfo.Height||this._lastModalInfo.Height-t>64&&t>32)&&(!this._lastModalInfo.IsManuallyResized||t>this._lastModalInfo.Height),f=n!=this._lastModalInfo.Width&&(n>this._lastModalInfo.Width||this._lastModalInfo.Width-n>64&&n>32)&&(!this._lastModalInfo.IsManuallyResized||n>this._lastModalInfo.Width);if(u||f){this.Resize(f?n:this._lastModalInfo.Width,u?t:this._lastModalInfo.Height,!1);return}}}catch(h){}this._checkForScrollResizeHandle=window.setTimeout(new Function("window."+this._variableName+"._checkForScrollResize();"),249)}},Telligent_Modal_Window.prototype._initialize=function(){var r,t,f,i,e,u,n;this._modalMask=document.createElement("div"),this._modalMask.style.height="0",this._modalMask.style.position="absolute",this._modalMask.style.visibility="hidden",this._modalMask.style.overflow="hidden",this._modalMask.dispose=new Function("Telligent_Modal.Dispose();"),r=this._modalMask;if(Telligent_Modal.WindowMaskCssClasses.length>0)for(r.className=Telligent_Modal.WindowMaskCssClasses[0],n=1;n<Telligent_Modal.WindowMaskCssClasses.length;n++)r.appendChild(document.createElement("div")),r=r.childNodes[0],r.className=Telligent_Modal.WindowMaskCssClasses[n],r.style.width="auto",r.style.height="auto";document.body.appendChild(this._modalMask),this._modalAnimationMask=document.createElement("div"),this._modalAnimationMask.style.position="absolute",this._modalAnimationMask.style.visibility="hidden",this._modalAnimationMask.style.overflow="hidden",this._modalAnimationMask.style.height="0",this._modal=document.createElement("div"),this._modal.style.width="auto",this._modal.style.height="auto",this._modal.style.position="absolute",this._modal.style.visibility="hidden",t=this._modal;if(Telligent_Modal.WindowCssClasses.length>0)for(t.className=Telligent_Modal.WindowCssClasses[0],n=1;n<Telligent_Modal.WindowCssClasses.length;n++)t.appendChild(document.createElement("div")),t=t.childNodes[0],t.className=Telligent_Modal.WindowCssClasses[n],t.style.width="auto",t.style.height="auto";this._modalTitle=document.createElement("div"),t.appendChild(this._modalTitle);if(Telligent_Modal.WindowTitleCssClasses.length>0)for(this._modalTitle.className=Telligent_Modal.WindowTitleCssClasses[0],n=1;n<Telligent_Modal.WindowTitleCssClasses.length;n++)this._modalTitle.appendChild(document.createElement("div")),this._modalTitle=this._modalTitle.childNodes[0],this._modalTitle.className=Telligent_Modal.WindowTitleCssClasses[n];this._modalTitle.onmousedown=new Function("event","window."+this._variableName+"._startDrag(event); return false;"),this._modalClose=document.createElement("div"),this._modalTitle.appendChild(this._modalClose),f=this._modalClose;if(Telligent_Modal.WindowCloseCssClasses.length>0)for(f.className=Telligent_Modal.WindowCloseCssClasses[0],n=1;n<Telligent_Modal.WindowCloseCssClasses.length;n++)f.appendChild(document.createElement("div")),f=f.childNodes[0],f.className=Telligent_Modal.WindowCloseCssClasses[n];this._modalClose.onclick=new Function("window."+this._variableName+".Close(); return false;"),this._modalTitle.appendChild(document.createElement("span")),e=document.createElement("div"),e.style.clear="both",this._modalTitle.appendChild(e),this._modalContent=document.createElement("div"),t.appendChild(this._modalContent);if(Telligent_Modal.WindowContentCssClasses.length>0)for(this._modalContent.className=Telligent_Modal.WindowContentCssClasses[0],n=1;n<Telligent_Modal.WindowContentCssClasses.length;n++)this._modalContent.appendChild(document.createElement("div")),this._modalContent=this._modalContent.childNodes[0],this._modalContent.className=Telligent_Modal.WindowContentCssClasses[n];this._modalIframe=document.createElement("iframe"),this._modalIframe.src=Telligent_Modal.LoadingHtmlUrl,this._modalIframe.width="100%",this._modalIframe.border="0",this._modalIframe.frameBorder="0",this._modalIframe.style.borderLeftWidth="0px",this._modalIframe.style.borderRightWidth="0px",this._modalIframe.style.borderTopWidth="0px",this._modalIframe.style.borderBottomWidth="0px",this._modalIframe.id=this._id+"_iframe",this._modalContent.appendChild(this._modalIframe),this._modalFooter=document.createElement("div"),t.appendChild(this._modalFooter),i=this._modalFooter;if(Telligent_Modal.WindowFooterCssClasses.length>0)for(i.className=Telligent_Modal.WindowFooterCssClasses[0],n=1;n<Telligent_Modal.WindowFooterCssClasses.length;n++)i.appendChild(document.createElement("div")),i=i.childNodes[0],i.className=Telligent_Modal.WindowFooterCssClasses[n];this._modalResize=document.createElement("div"),i.appendChild(this._modalResize),e=document.createElement("div"),e.style.clear="both",i.appendChild(e),u=this._modalResize;if(Telligent_Modal.WindowResizeCssClasses.length>0)for(u.className=Telligent_Modal.WindowResizeCssClasses[0],n=1;n<Telligent_Modal.WindowResizeCssClasses.length;n++)u.appendChild(document.createElement("div")),u=u.childNodes[0],u.className=Telligent_Modal.WindowResizeCssClasses[n];this._modalResize.onmousedown=new Function("event","window."+this._variableName+"._startResize(event); return false;"),this._modalAnimationMask.appendChild(this._modal),document.body.appendChild(this._modalAnimationMask),this._initialized=!0},Telligent_Modal_Window.prototype.IsShown=function(){return this._isShown},Telligent_Modal_Window.prototype.Resize=function(n,t,i){this._isShown&&!this._isOpening&&this._lastModalInfo&&this.Open(null,n,t,this._lastModalInfo.OnCloseFunction,this._lastModalInfo.X,this._lastModalInfo.Y,!0,i?!0:this._lastModalInfo.IsManuallyResized)},Telligent_Modal_Window.prototype.MoveTo=function(n,t){this._isShown&&!this._isOpening&&this._lastModalInfo&&this.Open(null,this._lastModalInfo.Width,this._lastModalInfo.Height,this._lastModalInfo.OnCloseFunction,n,t,!0,this._lastModalInfo.IsManuallyResized)},Telligent_Modal_Window.prototype.Open=function(n,t,i,r,u,f,e,o,s){var c,h,b,p,y;s&&(this._openerWindow=s),!e&&this._isShown&&this.Close(),this._initialized||this._initialize();try{document.all?this._modalTitle.childNodes[1].innerText=this._modalIframe.contentWindow.document.title:this._modalTitle.childNodes[1].textContent=this._modalIframe.contentWindow.document.title}catch(w){}e||(this._modalIframe.src=n);try{this._modalIframe.contentWindow.opener=window}catch(w){}this._lastWindowInfo=Telligent_Common.GetWindowInfo(),e||(this._modalAnimationMask.style.position="absolute",this._modalAnimationMask.style.zIndex=Telligent_Modal.ZIndex,this._modalAnimationMask.style.visibility="hidden",this._modalAnimationMask.style.height="auto",this._modalAnimationMask.style.overflow="hidden",this._modal.style.position="absolute",this._modal.style.visibility="hidden",this._modal.style.left="0px",this._modal.style.top="0px",this._modalMask.style.position="absolute",this._modalMask.style.visibility="visible",this._modalMask.style.zIndex=Telligent_Modal.ZIndex,this._modalMask.style.height="auto");var a=Telligent_Common.GetStyleOffset(this._modalContent),v=this._modal.offsetWidth-this._modalContent.offsetWidth-a.Width,l=this._modal.offsetHeight-this._modalContent.offsetHeight-a.Height;t+v>this._lastWindowInfo.Width&&(t=this._lastWindowInfo.Width-v),this._modalAnimationMask.style.width=t+"px",this._modalContent.style.width=t+"px",i+l>this._lastWindowInfo.Height&&(i=this._lastWindowInfo.Height-l),t<this._modalResize.offsetWidth*2&&(t=this._modalResize.offsetWidth*2),t<this._modalClose.offsetWidth*2&&(t=this._modalClose.offsetWidth*2),i<this._modalTitle.offsetHeight+this._modalFooter.offsetHeight&&(i=this._modalTitle.offsetHeight+this._modalFooter.offsetHeight-l),this._modalIframe.style.height=i+"px",this._modalIframe.style.width=t+"px",this._modalContent.style.height=i+"px",this._modalContent.style.width=t+"px",this._modalAnimationMask.style.width=this._modal.offsetWidth+"px",this._modalAnimationMask.style.height=this._modal.offsetHeight+"px",this._modalMask.style.left="0px",this._modalMask.style.top="0px",this._modalMask.style.width=this._lastWindowInfo.ContentWidth+"px",this._modalMask.style.height=this._lastWindowInfo.ContentHeight+"px",this._lastWindowInfo=Telligent_Common.GetWindowInfo(),c=this._modal.offsetWidth,h=this._modal.offsetHeight,(typeof u=="undefined"||isNaN(parseInt(u,10)))&&(u=(this._lastWindowInfo.Width-c)/2+this._lastWindowInfo.ScrollX),u+c>this._lastWindowInfo.Width+this._lastWindowInfo.ScrollX&&(u=this._lastWindowInfo.Width+this._lastWindowInfo.ScrollX-c),u<this._lastWindowInfo.ScrollX&&(u=this._lastWindowInfo.ScrollX),(typeof f=="undefined"||isNaN(parseInt(f,10)))&&(f=(this._lastWindowInfo.Height-h)/2+this._lastWindowInfo.ScrollY),f+h>this._lastWindowInfo.Height+this._lastWindowInfo.ScrollY&&(f=this._lastWindowInfo.Height+this._lastWindowInfo.ScrollY-h),f<this._lastWindowInfo.ScrollY&&(f=this._lastWindowInfo.ScrollY),this._modalAnimationMask.style.left=u+"px",this._modalAnimationMask.style.top=f+"px",p=0,y=-h,this._modalAnimationMask.style.overflow="hidden",e||(this._modal.style.visibility="visible",this._modalAnimationMask.style.visibility="visible",Telligent_Common.HideSelectBoxes(this._modalAnimationMask,!0)),this._isOpening=!0,!this.EnableAnimation||e?this._animate(0,0,0,0):(this._modalIframe.style.visibility="hidden",this._animate(0,-h,h/3,.67)),this._lastModalInfo={Url:this._modalIframe.src,OnCloseFunction:r,X:u,Y:f,Width:parseInt(t,10),Height:parseInt(i,10),IsManuallyResized:o},this._isShown=!0},Telligent_Modal_Window.prototype.Close=function(n){if(this._isShown){this._initialized||this._initialize(),this._modal.style.position="absolute",this._modal.style.visibility="hidden",this._modal.style.height="0",this._modalAnimationMask.style.position="absolute",this._modalAnimationMask.style.visibility="hidden",this._modalAnimationMask.style.height="0",this._modalMask.style.position="absolute",this._modalMask.style.visibility="hidden",this._modalIframe.src=Telligent_Modal.LoadingHtmlUrl;var t=this._lastModalInfo.OnCloseFunction;this._isShown=!1,this._lastModalInfo=null,this._windowInfo=null,Telligent_Common.ShowSelectBoxes(this._modalAnimationMask),t&&window.setTimeout(function(){t(n)},9),this.Dispose()}},Telligent_Modal_Window.prototype.Refresh=function(){this._animationHandle&&window.clearTimeout(this._animationHandle),this.Dispose(),this._isShown&&this._lastModalInfo&&this.Resize(this._lastModalInfo.Width,this._lastModalInfo.Height,!1)},Telligent_Modal_Window.prototype.Dispose=function(){this._initialized&&(this._animationHandle&&window.clearTimeout(this._animationHandle),this._isShown=!1,this._isOpening=!1,document&&document.body&&(document.body.removeChild(this._modalAnimationMask),document.body.removeChild(this._modalMask),this._modalClose.onclick=null,this._modalTitle.onmousedown=null,this._modalResize.onmousedown=null,this._modal=null,this._modalTitle=null,this._modalClose=null,this._modalAnimationMask=null,this._modalMask=null,this._modalIframe=null,this._modalResize=null,this._modalFooter=null,this._modalContent=null),this._initialized=!1)},Telligent_CallbackManager.prototype._responseCallback=function(xmlHttpRequest,clientCallback,context,clientErrorCallback){var result,scriptLoader,i;if(xmlHttpRequest.readyState!=4)return;result=xmlHttpRequest.responseText;if(result.length>0&&result.substr(0,1)=="s"){result=eval("("+result.substr(1)+")");if(clientCallback)try{clientCallback(result.response,context)}catch(e){alert(e.message)}scriptLoader=new Telligent_ScriptLoader;if(result.includeScriptUrls&&result.includeScriptUrls.length>0)for(i=0;i<result.includeScriptUrls.length;i++)scriptLoader.AddScriptToLoad(new Telligent_ScriptToLoad(!0,result.includeScriptUrls[i]));if(result.startupScripts&&result.startupScripts.length>0)for(i=0;i<result.startupScripts.length;i++)scriptLoader.AddScriptToLoad(new Telligent_ScriptToLoad(!1,result.startupScripts[i]));scriptLoader.LoadAll();try{__theFormPostData="",__theFormPostCollection=[],WebForm_InitCallback()}catch(e){}}else result.substr(0,1)=="e"?clientErrorCallback?clientErrorCallback(result.substr(1),context):alert(result.substr(1)):clientErrorCallback&&clientErrorCallback(null,context)},Telligent_CallbackManager.prototype._doCallback=function(argument,clientCallback,context,clientErrorCallback){var x=this._getXmlHttpRequest(),url,currentObject,postData,i,element,elementValue,elementType;if(x==null)return;this._form!=null&&this._form.action?url=this._form.action:(url=window.location.href,url=url.replace(/\#.*$/,"")),x.open("POST",url,!0),x.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8"),currentObject=eval(this._variableName),x.onreadystatechange=function(){currentObject._responseCallback(x,clientCallback,context,clientErrorCallback)},postData=this._postbackName+"=",argument!=null&&(postData+=encodeURIComponent(argument));if(this._form!=null)for(i=0;i<this._form.length;i++)element=this._form.elements[i],element.name&&(elementValue=null,element.nodeName=="INPUT"?(elementType=element.type.toLowerCase(),elementType=="text"||elementType=="password"||elementType=="hidden"?elementValue=element.value:(elementType=="checkbox"||elementType=="radio")&&element.checked&&(elementValue=element.value)):(element.nodeName=="SELECT"||element.nodeName=="TEXTAREA")&&(elementValue=element.value),elementValue&&element.name!=this._postbackName&&(postData+="&"+element.name+"="+encodeURIComponent(elementValue)));x.send(postData),delete x},Telligent_CallbackManager.prototype._getXmlHttpRequest=function(){var n=null;if(typeof XMLHttpRequest!="undefined")n=new XMLHttpRequest;else try{n=new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{n=new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}return n},typeof TelligentUtility=="undefined"&&(TelligentUtility={}),TelligentUtility._authorizationCookieName="AuthorizationCookie",TelligentUtility.WriteAuthorizationHeader=function(n){var i=function(n){for(var u=n+"=",r=document.cookie.split(";"),t,i=0;i<r.length;i++){t=r[i];while(t.charAt(0)==" ")t=t.substring(1,t.length);if(t.indexOf(u)==0)return t.substring(u.length,t.length)}return null},t=i(TelligentUtility._authorizationCookieName);t!=null&&(n.setRequestHeader("Authorization-Code",t),n.setRequestHeader("Rest-Authorization-Code",t))}
