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_PopupPanel(n,t,i,r,u,f,e,o,s,h){this._variableName=n,this.CssClass=t,this.Position=i,this.OnPanelShowFunction=u,this.OnPanelHideFunction=f,this.OnMouseOverFunction=s,this.OnMouseOutFunction=h,this.ZIndex=r,this._isShown=!1,this._initialized=!1,this._lastPosition=null,this._initialContentContainer=document.getElementById(o),this._panel=null,this._panelMask=null,this._animationHandle=null,this._originalDocumentOnClick=null,this._isOpening=!1,this._checkForScrollResizeHandle=null,this._lastWindowInfo=null,this._hideOnDocumentClick=e,this._panelMask=document.createElement("div"),this._panelMask.style.position="absolute",this._panelMask.style.display="none",this._panel=document.createElement("div"),this._panel.style.position="absolute",this._panel.style.display="none",this._panel.style.left="0px",this._panel.style.top="0px",this._panel.className=this.CssClass,this._panelMask.appendChild(this._panel),Telligent_Common.RegisterDisposableControl(this._variableName)}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 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()}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 Telligent_InlineEditorPanel(n,t,i,r,u,f,e,o){this._variableName=n,this._container=document.getElementById(t),this._state=document.getElementById(i),this._editor=null,this._editorVariableName=r,this.OnEditFunction=f,this.OnSaveFunction=e,this.OnCloseFunction=o,this._isEditing=!1,this.FitEditorToWindow=u,this._abandonedContent=null,this._container&&(this._container.dispose=new Function(this._variableName+".Dispose();")),this._state.value.substr(0,6)=="value:"?this._container.innerHTML=decodeURIComponent(this._state.value.substr(6)):this._state.value="value:"+encodeURIComponent(this._container.innerHTML),Telligent_Common.RegisterDisposableControl(this._variableName)}function Telligent_DblClickInlineEditorPanel(n,t,i,r,u,f,e,o,s,h,c,l,a){this._variableName=n,this._container=document.getElementById(t),this._inlineEditorPanel=new Telligent_InlineEditorPanel(this._variableName+"._inlineEditorPanel",t,i,o,s,new Function("window."+this._variableName+"._onEdit();"),new Function("window."+this._variableName+"._onSave();"),new Function("window."+this._variableName+"._onClose();")),this.OnEditFunction=h,this.OnSaveFunction=c,this.OnCloseFunction=l,this.ToolTip=e,this.CssClass=r,this.HoverCssClass=u,this.EditingCssClass=f,this.FitEditorToWindow=s,this.Parameter=a,this._container&&(this._container.dispose=new Function(this._variableName+".Dispose();")),this._container.title=this.ToolTip,this._container.ondblclick=new Function("window."+this._variableName+".Edit(); return false;"),this._container.onmouseover=new Function("window."+this._variableName+"._mouseOver();"),this._container.onmouseout=new Function("window."+this._variableName+"._mouseOut();"),this._container.className=this.CssClass,Telligent_Common.RegisterDisposableControl(this._variableName)}function Telligent_InlineEditor(n,t,i,r,u,f,e,o,s,h){this._variableName=n,this._container=document.getElementById(t),this._inlineEditorPanel=null,this._getContentFunction=r,this._setContentFunction=u,this._getStyleContextElementFunction=f,this._setFocusFunction=e,this._resizeFunction=o,this.MinimumWidth=s,this.MinimumHeight=h,this._initialized=this.FitToWindow=!1,this._popupPanel=null,this._ignoreClose=!1,this._setInlineEditorPanelFunction=i,Telligent_Common.RegisterDisposableControl(this._variableName)}function TagEditor(n,t,i){this.VariableName=n,this.AllTags=t,this.SelectedTagsHandle=document.getElementById(i),this.PreviousTags=[],this.PreviousValue="",this.CurrentTag="",this.CurrentTagPosition=0,this._suggestionTimeoutHandle=null,this.GetAllTags=function(){for(var i=[],n=0;n<this.AllTags.length;n++)t[n][0]!=""&&(i[i.length]=t[n][0]);return i},this.GetAllTagsWithEncoding=function(){return this.AllTags},this.SetSelectedTags=function(n){for(var i=[],u=this.GetSelectedTags(),e=this.GetAllTags(),f,r,t=0;t<u.length;t++){for(f=!1,r=0;r<e.length;r++)if(u[t].toUpperCase()==e[r].toUpperCase()){f=!0;break}f||(i[i.length]=u[t])}for(t=0;t<n.length;t++)i[i.length]=n[t];this.SelectedTagsHandle.value=i.join(", ")},this.GetSelectedTags=function(){for(var t=this.SelectedTagsHandle.value.split(/;|,/),i=[],n=0;n<t.length;n++)t[n]=this.Trim(t[n]),t[n]!=""&&(i[i.length]=t[n]);return i},this.Trim=function(n){return n.replace(/^\s+|\s+$/g,"")},this.EditorKeyDown=function(n){var t,i,r;window.clearTimeout(this._suggestionTimeoutHandle),n||(n=window.event);if(!n)return;if(n.keyCode==13)return this.SelectedTagsHandle.focus(),document.selection?(t=window.document.selection.createRange(),t.text&&t.text.length>0&&(t.moveStart("character",t.text.length),t.select())):(this.SelectedTagsHandle.selectionStart||this.SelectedTagsHandle.selectionStart=="0")&&(this.SelectedTagsHandle.selectionStart=this.SelectedTagsHandle.selectionEnd),n.cancelBubble=!0,n.returnValue=!1,!1;if(n.keyCode==8){this.SelectedTagsHandle.focus();if(document.selection){t=window.document.selection.createRange();if(t)return t.moveStart("character",-1),t.text="",n.cancelBubble=!0,n.returnValue=!1,!1}else if(this.SelectedTagsHandle.selectionStart||this.SelectedTagsHandle.selectionStart=="0")return i=this.SelectedTagsHandle.selectionStart,r=this.SelectedTagsHandle.selectionEnd,i==r?!0:(i>0&&i--,this.SelectedTagsHandle.value=this.SelectedTagsHandle.value.substring(0,i)+this.SelectedTagsHandle.value.substring(r),this.SelectedTagsHandle.selectionStart=i,this.SelectedTagsHandle.selectionEnd=i,n.cancelBubble=!0,n.returnValue=!1,!1)}return!0},this.EditorKeyUp=function(){return window.clearTimeout(this._suggestionTimeoutHandle),this._suggestionTimeoutHandle=window.setTimeout(new Function(this.VariableName+".Suggest();"),249),!0},this.EditorBlur=function(){return window.clearTimeout(this._suggestionTimeoutHandle),!0},this.Suggest=function(){var n,t;if(!document.selection&&!this.SelectedTagsHandle.selectionStart&&this.SelectedTagsHandle.selectionStart!="0")return!0;if(this.SelectedTagsHandle.value==this.PreviousValue)return!0;this.PreviousValue=this.SelectedTagsHandle.value,this.GetCurrentTag();if(this.CurrentTag=="")return!0;n=this.GetTagSuggestion(this.CurrentTag);if(!n||n.length==this.CurrentTag.length)return!0;n=n.substr(this.CurrentTag.length),this.SelectedTagsHandle.value=this.SelectedTagsHandle.value.substr(0,this.CurrentTagPosition+this.CurrentTag.length)+n+this.SelectedTagsHandle.value.substr(this.CurrentTagPosition+this.CurrentTag.length),this.SelectedTagsHandle.focus(),document.selection?(t=this.SelectedTagsHandle.createTextRange(),t.select(),t.moveStart("character",this.CurrentTagPosition+this.CurrentTag.length),t.moveEnd("character",-(this.SelectedTagsHandle.value.length-(this.CurrentTagPosition+this.CurrentTag.length+n.length))),t.select()):(this.SelectedTagsHandle.selectionStart||this.SelectedTagsHandle.selectionStart=="0")&&(this.SelectedTagsHandle.selectionStart=this.CurrentTagPosition+this.CurrentTag.length,this.SelectedTagsHandle.selectionEnd=this.CurrentTagPosition+this.CurrentTag.length+n.length)},this.GetCurrentTag=function(){var t=this.SelectedTagsHandle.value.toLowerCase().split(/;|,/),n,i,u,r,e,f;for(this.CurrentTag="",r=0,f=!0,n=0;n<t.length;n++){for(e=t[n].replace(/^\s+/g,""),r+=t[n].length-e.length,t[n]=e,u=!1,i=0;i<this.PreviousTags.length&&!u;i++)t[n]==this.PreviousTags[i]&&(this.PreviousTags.splice(i,1),u=!0);u||(this.CurrentTag!=""?f=!1:(this.CurrentTag=t[n],this.CurrentTagPosition=r)),r+=t[n].length+1}f||(this.CurrentTag=""),this.PreviousTags=t},this.GetTagSuggestion=function(n){for(var u,r,i=this.GetAllTags(),t=0;t<i.length;t++)if(i[t].toLowerCase().indexOf(n)==0){for(r=!1,u=0;u<this.PreviousTags.length&&!r;u++)this.PreviousTags[u]==i[t].toLowerCase()&&(r=!0);if(!r)return i[t]}return null},this.SelectedTagsHandle&&(this.GetCurrentTag(),this.SelectedTagsHandle.onkeyup=new Function("event","return "+this.VariableName+".EditorKeyUp(event);"),this.SelectedTagsHandle.onkeydown=new Function("event","return "+this.VariableName+".EditorKeyDown(event);"),this.SelectedTagsHandle.onblur=new Function("event","return "+this.VariableName+".EditorBlur(event);"))}function InlineTagEditor(n,t,i,r){this._variableName=n,this._clientID=t,this._container=document.getElementById(i),this._content=document.getElementById(r),this._callback=null,this._panelName=null,this.SetContent=function(n){var u=/\<a[^\>]*?\>(.*?)\<\/a\>/ig,r,t="",i;while((r=u.exec(n))!=null)i=this._trim(this._stripHtml(r[1])),i&&(t!=""&&(t+=", "),t+=i);this._content.value=t},this.SetInlineEditorPanelAndParameter=function(n,t){this._callback=t,this._panelName=n._variableName},this.GetContent=function(){return this._callback&&this._callback(this._content.value,new Function("result","eval('result = ' + result); "+this._panelName+".SetContent(result.tags);"),new Function("alert('An error occurred while saving or formatting tags');")),"..."},this.Focus=function(){try{this._content.focus()}catch(n){}},this.Resize=function(n,t,i){this._container.style.height="auto",this._content.style.height=t+"px";var r=this._calculateStyleOffset(this._container),u=this._calculateStyleOffset(this._content);try{this._content.style.height=t-(this._container.offsetHeight-this._content.offsetHeight)-u.Height+"px"}catch(f){}try{this._container.style.width=n-r.Width+"px"}catch(f){}try{this._container.style.height=t-r.Height+"px"}catch(f){}i||this.Resize(n,t,!0)},this._trim=function(n){return n.replace(/^\s+|\s+$/g,"")},this._stripHtml=function(n){return n.replace(/<[^>]*?>/g,"")},this._getCurrentStyleValue=function(n,t,i){var r=0;return document.defaultView&&document.defaultView.getComputedStyle?r=parseInt(document.defaultView.getComputedStyle(n,"").getPropertyValue(t),0):n.currentStyle&&(r=parseInt(n.currentStyle[i],0)),isNaN(r)?0:r},this._calculateStyleOffset=function(n){var t={};return t.Height=this._getCurrentStyleValue(n,"border-top-width","borderTopWidth")+this._getCurrentStyleValue(n,"border-bottom-width","borderBottomWidth")+this._getCurrentStyleValue(n,"padding-top","paddingTop")+this._getCurrentStyleValue(n,"padding-bottom","paddingBottom"),t.Width=this._getCurrentStyleValue(n,"border-left-width","borderLeftWidth")+this._getCurrentStyleValue(n,"border-right-width","borderRightWidth")+this._getCurrentStyleValue(n,"padding-left","paddingLeft")+this._getCurrentStyleValue(n,"padding-right","paddingRight"),t}}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 subtext_invisible_captcha_hideFromJavascriptEnabledBrowsers(n){var t=document.getElementById(n);t&&(t.style.display="none")}function subtext_invisible_captcha_setAnswer(n,t,i){var r=document.getElementById(i);r&&(r.value=n+t)}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_PopupPanel.prototype._onMouseOver=function(){this.OnMouseOverFunction&&this.OnMouseOverFunction()},Telligent_PopupPanel.prototype._onMouseOut=function(){this.OnMouseOutFunction&&this.OnMouseOutFunction()},Telligent_PopupPanel.prototype.IsShown=function(){return this._isShown},Telligent_PopupPanel.prototype._registerDocumentOnClick=function(){this._originalDocumentOnClick=document.onclick,document.onclick=new Function(this._variableName+"._documentOnClick();")},Telligent_PopupPanel.prototype.ShowAtElement=function(n,t){var i=Telligent_Common.GetElementInfo(n);this.Show(i.Left,i.Top,i.Width,i.Height,t)},Telligent_PopupPanel.prototype.Show=function(n,t,i,r,u){var y,p;this._initialized||this._initialize(),!this._isShown&&this._hideOnDocumentClick&&window.setTimeout(new Function(this._variableName+"._registerDocumentOnClick();"),49),!u&&this._isShown?this.Hide():this._hiddenSelects&&Telligent_Common.ShowSelectBoxes(this._panelMask),y=n,p=t,this._panelMask.style.position="absolute",this._panelMask.style.zIndex=this.ZIndex,this._panelMask.style.display="block",this._panelMask.style.visibility="hidden",this._panelMask.style.overflow="visible",this._panel.style.position="absolute",this._panel.style.display="block",this._panel.style.visibility="hidden",this._panel.className=this.CssClass,this._panel.style.left="0px",this._panel.style.top="0px",this._panelMask.style.width=this._panel.offsetWidth+"px",this._panelMask.style.height=this._panel.offsetHeight+"px",this._lastWindowInfo=Telligent_Common.GetWindowInfo();var h=this._panel.offsetWidth,s=this._panel.offsetHeight,o,f,e,c=this.Position.indexOf("left"),l=this.Position.indexOf("right"),a=this.Position.indexOf("up"),v=this.Position.indexOf("down");c==0||l==0?(!(c>-1&&l==-1)&&(l>-1&&c==-1||this._lastWindowInfo.Width+this._lastWindowInfo.ScrollX-(n+i)>n-this._lastWindowInfo.ScrollX||n-this._lastWindowInfo.ScrollX<h)?(this._panelMask.style.left=n+i+"px",o="style.left",f=0,e=-h):(this._panelMask.style.left=n-h+"px",o="style.left",f=0,e=h),this._panelMask.style.top=!(a>-1&&v==-1)&&(v>-1&&a==-1||this._lastWindowInfo.Height+this._lastWindowInfo.ScrollY-t>t+r-this._lastWindowInfo.ScrollY||t+r-this._lastWindowInfo.ScrollY<s)?t+"px":t+r-s+"px"):(this._panelMask.style.left=!(c>-1&&l==-1)&&(l>-1&&c==-1||this._lastWindowInfo.Width+this._lastWindowInfo.ScrollX-n>n+i-this._lastWindowInfo.ScrollX||n+i-this._lastWindowInfo.ScrollX<h)?n+"px":n+i-h+"px",!(a>-1&&v==-1)&&(v>-1&&a==-1||this._lastWindowInfo.Height+this._lastWindowInfo.ScrollY-(t+r)>t-this._lastWindowInfo.ScrollY||t-this._lastWindowInfo.ScrollY<s)?(this._panelMask.style.top=t+r+"px",o="style.top",f=0,e=-s):(this._panelMask.style.top=t-s+"px",o="style.top",f=0,e=s)),this._panel.style.visibility="visible",this._panelMask.style.visibility="visible",this._panelMask.style.overflow="hidden",Telligent_Common.HideSelectBoxes(this._panelMask),this._isOpening=!0,u?this._animationHandle=window.setTimeout(new Function(this._variableName+"._animate('"+o+"',"+f+","+f+",0,0);"),9):this._animate(o,f,e,e>f?-((e-f)/3):(f-e)/3,.67),this._isShown||(this._isShown=!0,this._lastPosition={X:y,Y:p,Width:i,Height:r},this.OnPanelShowFunction&&this.OnPanelShowFunction())},Telligent_PopupPanel.prototype._checkForScrollResize=function(){this._checkForScrollResizeHandle&&window.clearTimeout(this._checkForScrollResizeHandle);if(this._isShown&&!this._isOpening&&this._lastWindowInfo){var n=Telligent_Common.GetWindowInfo();n.Width!=this._lastWindowInfo.Width||n.Height!=this._lastWindowInfo.Height?this.Hide():this._checkForScrollResizeHandle=window.setTimeout(new Function("window."+this._variableName+"._checkForScrollResize();"),999)}},Telligent_PopupPanel.prototype.Hide=function(){this._isShown&&(this._initialized||this._initialize(),this._panel.style.position="absolute",this._panel.style.display="none",this._panelMask.style.position="absolute",this._panelMask.style.display="none",this._isShown=!1,this._lastPosition=null,Telligent_Common.ShowSelectBoxes(this._panelMask),this._hideOnDocumentClick&&(document.onclick=this._originalDocumentOnClick,this._originalDocumentOnClick=null),this.OnPanelHideFunction&&this.OnPanelHideFunction())},Telligent_PopupPanel.prototype.ClearPanelContent=function(){while(this._panel.childNodes.length>0)this._panel.removeChild(this._panel.childNodes[0])},Telligent_PopupPanel.prototype.SetPanelContent=function(n){this.ClearPanelContent(),this._panel.innerHTML=n,this.Refresh()},Telligent_PopupPanel.prototype.AddNodeToPanel=function(n){this._panel.appendChild(n),this.Refresh()},Telligent_PopupPanel.prototype.RemoveNodeFromPanel=function(n){this._panel.removeChild(n),this.Refresh()},Telligent_PopupPanel.prototype.GetPanelNodes=function(){return this._panel.childNodes},Telligent_PopupPanel.prototype.Refresh=function(){this._animationHandle&&window.clearTimeout(this._animationHandle),this._isShown&&this._lastPosition&&this.Show(this._lastPosition.X,this._lastPosition.Y,this._lastPosition.Width,this._lastPosition.Height,!0)},Telligent_PopupPanel.prototype._initialize=function(){document.forms.length==1?document.forms[0].appendChild(this._panelMask):document.body.appendChild(this._panelMask),this._panel.onmouseover=new Function(this._variableName+"._onMouseOver();"),this._panel.onmouseout=new Function(this._variableName+"._onMouseOut();");if(!this._panel.innerHTML&&this._initialContentContainer)while(this._initialContentContainer.childNodes.length>0)this.AddNodeToPanel(this._initialContentContainer.childNodes[0]);this._initialized=!0},Telligent_PopupPanel.prototype.Dispose=function(){this._initialized&&(this._panel.onmouseover=null,this._panel.onmouseout=null,document&&document.body&&document.body.removeChild(this._panelMask),this._panelMask=null,this._initialized=!1)},Telligent_PopupPanel.prototype._animate=function(propertyName,targetValue,nextValue,step,acceleration){this._animationHandle&&window.clearTimeout(this._animationHandle);var currValue=parseInt(eval("this._panel."+propertyName),10);step<0&&currValue<targetValue||step>0&&currValue>targetValue||Math.abs(step)<1?(eval("this._panel."+propertyName+" = targetValue + 'px'"),this._panel.style.position="static",this._panelMask.style.overflow="visible",this._animationHandle=null,this._isOpening=!1,this._lastWindowInfo=Telligent_Common.GetWindowInfo(),this._checkForScrollResizeHandle=window.setTimeout(new Function("window."+this._variableName+"._checkForScrollResize();"),999)):(eval("this._panel."+propertyName+" = nextValue + 'px'"),nextValue=nextValue+step,step>0&&nextValue>targetValue?nextValue=targetValue:step<0&&nextValue<targetValue&&(nextValue=targetValue),step=step*acceleration,this._animationHandle=window.setTimeout(new Function(this._variableName+"._animate('"+propertyName+"',"+targetValue+","+nextValue+","+step+","+acceleration+");"),19))},Telligent_PopupPanel.prototype._documentOnClick=function(){this._isShown&&!this._isOpening&&this.Hide(),this._originalDocumentOnClick&&this._originalDocumentOnClick()},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))},Telligent_InlineEditorPanel.prototype.IsEditing=function(){return this._isEditing},Telligent_InlineEditorPanel.prototype.Edit=function(a){if(!this.IsEditing()){this._editor||(this._editor=eval(this._editorVariableName));var b=this._getCurrentStyles();this._editor.FitToWindow=this.FitEditorToWindow,this._editor._show(this._container),this._editor._setInlineEditorPanel(this,a),this._abandonedContent?(this._editor._setContent(this._abandonedContent),this._abandonedContent=null):this._editor._setContent(this._container.innerHTML),this._editor._setStyleContext(b),this._editor.Focus(),this._isEditing=!0,this.OnEditFunction&&this.OnEditFunction(this)}},Telligent_InlineEditorPanel.prototype.Save=function(){this.IsEditing()&&(this._container.innerHTML=this._editor._getContent(),this._state.value="value:"+encodeURIComponent(this._container.innerHTML),this._editor._hide(),this._isEditing=!1,this.OnSaveFunction&&this.OnSaveFunction(this))},Telligent_InlineEditorPanel.prototype.Close=function(){this.IsEditing()&&(this._editor._hide(),this._isEditing=!1,this.OnCloseFunction&&this.OnCloseFunction(this))},Telligent_InlineEditorPanel.prototype.Refresh=function(){this.IsEditing()&&(this._editor.FitToWindow=this.FitEditorToWindow,this._editor._show(this._container))},Telligent_InlineEditorPanel.prototype.Dispose=function(){this._container=null},Telligent_InlineEditorPanel.prototype.GetContent=function(){return this.IsEditing()?this._editor._getContent():this._container.innerHTML},Telligent_InlineEditorPanel.prototype.SetContent=function(n){this.IsEditing()?this._editor._setContent(n):(this._abandonedContent=null,this._container.innerHTML=n,this._state.value="value:"+encodeURIComponent(n))},Telligent_InlineEditorPanel.prototype._getCurrentStyles=function(){var n=[];return n[n.length]=["fontSize",Telligent_Common.GetCurrentStyleValue(this._container,"font-size","fontSize","inherit")],n[n.length]=["fontFamily",Telligent_Common.GetCurrentStyleValue(this._container,"font-family","fontFamily","inherit")],n[n.length]=["fontWeight",Telligent_Common.GetCurrentStyleValue(this._container,"font-weight","fontWeight","inherit")],n[n.length]=["fontStyle",Telligent_Common.GetCurrentStyleValue(this._container,"font-style","fontStyle","inherit")],n[n.length]=["color",Telligent_Common.GetCurrentStyleValue(this._container,"color","color","inherit")],n[n.length]=["backgroundColor",Telligent_Common.GetCurrentStyleValue(this._container,"background-color","backgroundColor","inherit")],n[n.length]=["textDecoration",Telligent_Common.GetCurrentStyleValue(this._container,"text-decoration","textDecoration","inherit")],n},Telligent_DblClickInlineEditorPanel.prototype.Edit=function(){this._container.className=this.CssClass,this._inlineEditorPanel.Edit(this.Parameter)},Telligent_DblClickInlineEditorPanel.prototype.Dispose=function(){this._container=null,this._inlineEditorPanel.Dispose()},Telligent_DblClickInlineEditorPanel.prototype.Refresh=function(){this._inlineEditorPanel.FitEditorToWindow=this.FitEditorToWindow,this._inlineEditorPanel.Refresh(),this._inlineEditorPanel.IsEditing()||(this._container.className=this.CssClass),this._container.title=this.ToolTip},Telligent_DblClickInlineEditorPanel.prototype.GetInlineEditorPanel=function(){return this._inlineEditorPanel},Telligent_DblClickInlineEditorPanel.prototype._mouseOver=function(){this._inlineEditorPanel.IsEditing()||this._container.className!=this.CssClass||(this._container.className=this.HoverCssClass)},Telligent_DblClickInlineEditorPanel.prototype._mouseOut=function(){this._inlineEditorPanel.IsEditing()||this._container.className!=this.HoverCssClass||(this._container.className=this.CssClass)},Telligent_DblClickInlineEditorPanel.prototype._onEdit=function(){this._container.className=this.EditingCssClass,this.OnEditFunction&&this.OnEditFunction(this)},Telligent_DblClickInlineEditorPanel.prototype._onSave=function(){this._container.className=this.CssClass,this.OnSaveFunction&&this.OnSaveFunction(this)},Telligent_DblClickInlineEditorPanel.prototype._onClose=function(){this._container.className=this.CssClass,this.OnCloseFunction&&this.OnCloseFunction(this)},Telligent_InlineEditor.prototype.Dispose=function(){this._container=null},Telligent_InlineEditor.prototype._setContent=function(n){this._initialized||this._initialize(),n=this._trim(n),this._setContentFunction&&this._setContentFunction(n)},Telligent_InlineEditor.prototype._trim=function(n){return n.replace(/^\s+|\s+$/g,"")},Telligent_InlineEditor.prototype._getContent=function(){return this._initialized||this._initialize(),this._getContentFunction?this._getContentFunction():""},Telligent_InlineEditor.prototype._setInlineEditorPanel=function(n,t){this._inlineEditorPanel=n,this._ignoreClose=!1,this._setInlineEditorPanelFunction&&this._setInlineEditorPanelFunction(this._inlineEditorPanel,t)},Telligent_InlineEditor.prototype.Focus=function(){this._initialized||this._initialize(),this._setFocusFunction&&this._setFocusFunction()},Telligent_InlineEditor.prototype._setStyleContext=function(a){this._initialized||this._initialize();if(this._getStyleContextElementFunction&&this._getStyleContextElementFunction())for(var b=0;b<a.length;b++)try{eval("element.style."+a[b][0]+" = '"+a[b][1]+"';")}catch(c){}},Telligent_InlineEditor.prototype._resize=function(n,t){this._initialized||this._initialize(),this._resizeFunction&&this._resizeFunction(n,t)},Telligent_InlineEditor.prototype.Save=function(){this._initialized||this._initialize(),this._ignoreClose=!0,this._inlineEditorPanel&&(this._inlineEditorPanel.Save(),this._inlineEditorPanel._abandonedContent=null)},Telligent_InlineEditor.prototype.Close=function(){this._initialized||this._initialize(),this._ignoreClose=!0,this._inlineEditorPanel&&(this._inlineEditorPanel._abandonedContent=null,this._inlineEditorPanel.Close())},Telligent_InlineEditor.prototype.IsShown=function(){return this._initialized||this._initialize(),this._popupPanel.IsShown()},Telligent_InlineEditor.prototype._hide=function(){this._ignoreClose=!0,this._popupPanel&&this._popupPanel.Hide()},Telligent_InlineEditor.prototype._show=function(n){var t,i,r;this._initialized||this._initialize(),this.IsShown()&&this._popupPanel.Hide(),t=Telligent_Common.GetElementInfo(n),i=Telligent_Common.GetWindowInfo(),this.FitToWindow&&(r=!1,(t.Top<i.ScrollY||t.Top+t.Height>i.ScrollY+i.Height)&&(window.document.documentElement.scrollTop=t.Height<i.Height?t.Top-(i.Height-t.Height)/2:t.Top,r=!0),(t.Left<i.ScrollX||t.Left+t.Width>i.ScrollX+i.Width)&&(window.document.documentElement.scrollLeft=t.Width<i.Width?t.Left-(i.Width-t.Width)/2:t.Left,r=!0),r&&(t=Telligent_Common.GetElementInfo(n)));var n=t.Width,r=t.Left,u=t.Height,t=t.Top;this.FitToWindow&&(n>i.Width&&(n=i.Width-i.Width*.1,r+=i.Width*.05),u>i.Height&&(u=i.Height-i.Height*.1,t+=i.Height*.05)),this._popupPanel.Show(r,t,0,0,!0),this._resize(n<this.MinimumWidth&&this.MinimumWidth>0?this.MinimumWidth:n,u<this.MinimumHeight&&this.MinimumHeight>0?this.MinimumHeight:u),this._popupPanel.Refresh()},Telligent_InlineEditor.prototype._initialize=function(){this._inititalized||(this._popupPanel=new Telligent_PopupPanel(this._variableName+"._popupPanel",this.CssClass,"rightdown",100,null,new Function("window."+this._variableName+"._popupPanelClosed();"),!1,""),this._popupPanel._initialize(),this._popupPanel.ClearPanelContent(),this._popupPanel.AddNodeToPanel(this._container),this._container.style.display="block",this._initialized=!0)},Telligent_InlineEditor.prototype._popupPanelClosed=function(){this._ignoreClose?this._ignoreClose=!1:this._inlineEditorPanel&&(this._inlineEditorPanel._abandonedContent=this._getContent(),this._inlineEditorPanel.Close())},function(n){n.fn.autoResize=function(t){var i=n.extend({onResize:function(){},animate:!0,animateDuration:150,animateCallback:function(){},extraSpace:20,limit:1e3},t);return this.filter("textarea").each(function(){var t=n(this).css({resize:"none","overflow-y":"hidden"}),f=t.height(),r=function(){var r=["height","width","lineHeight","textDecoration","letterSpacing"],i={};return n.each(r,function(n,r){i[r]=t.css(r)}),t.clone().removeAttr("id").removeAttr("name").css({position:"absolute",top:0,left:-9999}).css(i).attr("tabIndex","-1").insertBefore(t)}(),e=null,u=function(){f==0&&(f=t.height()),r.height(0).val(n(this).val()).scrollTop(1e4),r.width(t.width());var u=Math.max(r.scrollTop()+i.extraSpace,f),o=n(this).add(r);if(e===u)return;e=u;if(u>=i.limit){n(this).css("overflow-y","");return}i.onResize.call(this),i.animate&&t.css("display")==="block"?o.stop().animate({height:u},i.animateDuration,i.animateCallback):o.height(u)};t.unbind(".dynSiz").bind("keyup.dynSiz",u).bind("keydown.dynSiz",u).bind("change.dynSiz",u)}),this}}(jQuery)
