Sd.UI.Post=Class.create();Sd.UI.Post.validate=function(n){var f=n.id.replace(/_Button/,""),r=$id("_Editor",null,"textarea"),i;if(!r||(i=tinyMCE.editors[r.id],!i))return!1;var u=i.getContent(),e=$id("_TreeValue",null,"input"),o=$id(f+"_Title"),t=!0;return Sd.UI.Post.clearError(),u&&u.trim()!=""||(t=!1,Sd.UI.Post.addError("Please enter some content into the editor before submitting.")),Sd.Validate.requireValue(o)==!1&&(t=!1,Sd.UI.Post.addError("Please enter a Title before submitting.")),Sd.Validate.requireValue(e)==!1&&(t=!1,Sd.UI.Post.addError("Please select a Category before submitting.")),t==!0?Sd.UI.disableButton(n):$id("_PostError").scrollIntoView(),t};Sd.UI.Post.clearError=function(){var n=$id("_PostError");n&&(n.innerHTML="",n.style.display="none")};Sd.UI.Post.addError=function(n){var t=$id("_PostError");t&&(t.style.display=="none"&&(t.style.display=""),t.innerHTML.trim()!=""&&(t.innerHTML+="\n<br/>"),t.innerHTML+="&bull;&nbsp;&nbsp;"+n)};Sd.UI.Post.preview=function(n){var f=$id(n+"__Editor"),i,t,r,u;if(!f||(i=tinyMCE.editors[f.id],!i))return!1;t=i.getContent();r=$id("_Preview");r.style.display="block";r.innerHTML='<center><div class="ajaxwait"><\/div><\/center>';t&&t.trim()!=""?PostsService.Base.ProcessPreview(t,Sd.UI.Post.previewCallback,Sd.UI.Post.previewError):(u={},u.Code=Stardock.Web.UI.Services.ServiceResultCode.Failure,Sd.UI.Post.previewCallback(u))};Sd.UI.Post.previewCallback=function(n){if(n.Code!=Stardock.Web.UI.Services.ServiceResultCode.Success){n.Code==Stardock.Web.UI.Services.ServiceResultCode.BadAuth?alert("The preview could not be processed.\n\n  Bad Auth\n\nPlease try again."):alert("The preview could not be processed. Please try again.");return}var t=$id("_Preview");t.innerHTML=n.Obj};Sd.UI.Post.previewError=function(n){alert("Sd.UI.Post.previewError\n\n"+n._exceptionType+"\n\n"+n._message)};Sd.UI.Post.quote=function(n){var r=!1,t="",i="",u=Sd.UI.getTinyEditor("_Editor"),f;u&&(t=Sd.UI.getSelection(),t!=""&&t.trim()!=""&&(r=!0),r==!1?(i='[quote quoting="post"]\r\n',t=$(n).html().trim(),t=t.replaceBreaks(t)):i="\r\n[quote]",f=(i+t+"\r\n[/quote]").replaceNewLines().trim(),u.execCommand("mceInsertContent",!1,f))};Sd.UI.Post.quoteReply=function(n,t,i,r){var e=!1,u="",f="",o=Sd.UI.getTinyEditor("_Editor"),s;if(o){if(u=Sd.UI.getSelection(),u!=""&&u.trim()!=""&&(e=!0),e==!1){if(!n)return;f='[quote who="'+t+'" reply="'+i+'" id="'+r+'"]\r\n';u=$(n).html().trim();u=u.replaceBreaks();u=u.replaceBBCodes()}else f='[quote who="'+t+'" reply="'+i+'" id="'+r+'"]\r\n';s=(f+u+"\r\n[/quote]").replaceNewLines().trim();o.execCommand("mceInsertContent",!1,s)}};Sd.Effects=Class.create();Sd.Effects=function(n,t,i,r){this.options=t;this.elem=n;this.prop=i;this.extOpts=r;t.orig||(t.orig={})};Sd.Effects.prototype={update:function(){this.options.step&&this.options.step.apply(this.elem,[this.now,this]);(Sd.Effects.step[this.prop]||Sd.Effects.step._default)(this);(this.prop=="height"||this.prop=="width")&&(this.elem.style.display="block")},cur:function(){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var n=parseFloat(Sd.Effects.Style(this.elem,this.prop));return n&&n>-1e4?n:parseFloat(Sd.Effects.getCSS(this.elem,this.prop))||0},custom:function(n,t,i){function r(n){return u.step(n)}this.startTime=(new Date).getTime();this.start=n;this.end=t;this.unit=i||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var u=this;r.elem=this.elem;Sd.Effects.timers.push(r);Sd.Effects.timerId==null&&(Sd.Effects.timerId=setInterval(function(){for(var n=Sd.Effects.timers,t=0;t<n.length;t++)n[t]()||n.splice(t--,1);n.length||(clearInterval(Sd.Effects.timerId),Sd.Effects.timerId=null)},13))},show:function(){this.options.orig[this.prop]=Sd.Effects.getCSS(this.elem,this.prop);this.options.show=this.elem.show&&(this.elem.show==!0||this.elem.show==!1)?this.elem.show:!0;this.extOpts.showElement==!1&&this.prop=="opacity"&&(this.options.orig[this.prop]="1");this.custom(0,this.extOpts.showElement==!1&&this.prop=="opacity"?1:this.cur());(this.prop=="width"||this.prop=="height")&&(this.elem.style[this.prop]="1px");this.elem.style.display=="none"&&this.extOpts.showElement==!0?this.elem.style.display=this.elem.prevDisplay?this.elem.prevDisplay:"":this.elem.style.visibility=""},hide:function(){this.options.orig[this.prop]=Sd.Effects.getCSS(this.elem,this.prop);this.options.hide=this.elem.hide&&(this.elem.hide==!0||this.elem.hide==!1)?this.elem.hide:!0;Sd.Common.Browser.ie&&(this.elem.style.filter="alpha(opacity=100)",this.elem.style.zoom=1);this.custom(this.cur(),0)},step:function(n){var u=(new Date).getTime(),t,f,i,r;if(n||u>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=!0;t=!0;for(f in this.options.curAnim)this.options.curAnim[f]!==!0&&(t=!1);if(t&&(this.options.display!=null&&(this.elem.style.overflow=this.options.overflow,this.elem.style.display=this.options.display,Sd.Effects.getCSS(this.elem,"display")=="none"&&(this.elem.style.display="block")),this.options.hide&&this.extOpts.hideElement==!0?(this.elem.prevDisplay=this.elem.style.display,this.elem.style.display="none"):this.options.hide&&(this.elem.style.visibility="hidden"),this.options.hide||this.options.show))for(i in this.options.curAnim)Sd.Effects.Style(this.elem,i,this.options.orig[i]);return t&&Sd.Effects.isFunction(this.options.complete)&&this.options.complete.apply(this.elem),!1}return r=u-this.startTime,this.state=r/this.options.duration,this.pos=Sd.Effects.easing[this.options.easing||(Sd.Effects.easing.swing?"swing":"linear")](this.state,r,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update(),!0}};Sd.Effects.step={scrollLeft:function(n){n.elem.scrollLeft=n.now},scrollTop:function(n){n.elem.scrollTop=n.now},opacity:function(n){Sd.Effects.Style(n.elem,"opacity",n.now)},_default:function(n){n.elem.style[n.prop]=n.now+n.unit}};Sd.Effects.timers=[];Sd.Effects.perform=function(n,t,i,r,u,f){var e,h,o,s;f||(f={empty:""});n&&n.constructor==String&&(n=$id(n));e=i&&i.constructor==Object?i:{complete:u,duration:i,easing:r||r&&r.constructor!=Function&&r||"swing"};e.duration=(e.duration&&e.duration.constructor==Number?e.duration:{slow:600,fast:200}[e.duration])||400;e.curAnim=Object.extend({},t);h=Sd.Effects.Style(n,"display")=="none"||Sd.Effects.Style(n,"visibility")=="hidden"||"hidden"==n.type;for(o in t){if(t[o]=="hide"&&h||t[o]=="show"&&!h&&f.showElement&&f.showElement==!0)return Sd.Effects.isFunction(e.complete)&&e.complete.apply(this);(o=="height"||o=="width")&&(e.display=Sd.Effects.getCSS(n,"display"),e.overflow=n.style.overflow);s=new Sd.Effects(n,e,o,f);t[o].constructor==Number?s.custom(s.cur()||0,t[o]):t[o]&&t[o]!=""&&s[t[o]]&&s[t[o]](t)}};Sd.Effects.isFunction=function(n){return!!n&&typeof n!="string"&&!n.nodeName&&n.constructor!=Array&&/function/i.test(n+"")};Sd.Effects.easing={linear:function(n,t,i,r){return i+r*n},swing:function(n,t,i,r){return(-Math.cos(n*Math.PI)/2+.5)*r+i},easein:function(n,t,i,r,u){return r*(t/=u)*t+i},easeinout:function(n,t,i,r,u){if(t<u/2)return 2*r*t*t/(u*u)+i;var f=t-u/2;return-2*r*f*f/(u*u)+2*r*f/u+r/2+i},easeout:function(n,t,i,r,u){return-r*t*t/(u*u)+2*r*t/u+i},expoin:function(n,t,i,r,u){var f=1;return r<0&&(f*=-1,r*=-1),f*Math.exp(Math.log(r)/u*t)+i},expoout:function(n,t,i,r,u){var f=1;return r<0&&(f*=-1,r*=-1),f*(-Math.exp(-Math.log(r)/u*(t-u))+r+1)+i},expoinout:function(n,t,i,r,u){var f=1;return(r<0&&(f*=-1,r*=-1),t<u/2)?f*Math.exp(Math.log(r/2)/(u/2)*t)+i:f*(-Math.exp(-2*Math.log(r/2)/u*(t-u))+r+1)+i},bouncein:function(n,t,i,r,u){return r-ref.easing.bounceout(n,u-t,0,r,u)+i},bounceout:function(n,t,i,r,u){return(t/=u)<1/2.75?r*7.5625*t*t+i:t<2/2.75?r*(7.5625*(t-=1.5/2.75)*t+.75)+i:t<2.5/2.75?r*(7.5625*(t-=2.25/2.75)*t+.9375)+i:r*(7.5625*(t-=2.625/2.75)*t+.984375)+i},bounceinout:function(n,t,i,r,u){return t<u/2?ref.easing.bouncein(n,t*2,0,r,u)*.5+i:ref.easing.bounceout(n,t*2-u,0,r,u)*.5+r*.5+i},elasin:function(n,t,i,r,u){var o=1.70158,f=0,e=r;return t==0?i:(t/=u)==1?i+r:(f||(f=u*.3),e<Math.abs(r)?(e=r,o=f/4):o=f/(2*Math.PI)*Math.asin(r/e),-(e*Math.pow(2,10*(t-=1))*Math.sin((t*u-o)*2*Math.PI/f))+i)},elasout:function(n,t,i,r,u){var o=1.70158,f=0,e=r;return t==0?i:(t/=u)==1?i+r:(f||(f=u*.3),e<Math.abs(r)?(e=r,o=f/4):o=f/(2*Math.PI)*Math.asin(r/e),e*Math.pow(2,-10*t)*Math.sin((t*u-o)*2*Math.PI/f)+r+i)},elasinout:function(n,t,i,r,u){var o=1.70158,f=0,e=r;return t==0?i:(t/=u/2)==2?i+r:(f||(f=u*.3*1.5),e<Math.abs(r)?(e=r,o=f/4):o=f/(2*Math.PI)*Math.asin(r/e),t<1)?-.5*e*Math.pow(2,10*(t-=1))*Math.sin((t*u-o)*2*Math.PI/f)+i:e*Math.pow(2,-10*(t-=1))*Math.sin((t*u-o)*2*Math.PI/f)*.5+r+i},backin:function(n,t,i,r,u){var f=1.70158;return r*(t/=u)*t*((f+1)*t-f)+i},backout:function(n,t,i,r,u){var f=1.70158;return r*((t=t/u-1)*t*((f+1)*t+f)+1)+i},backinout:function(n,t,i,r,u){var f=1.70158;return(t/=u/2)<1?r/2*t*t*(((f*=1.525)+1)*t-f)+i:r/2*((t-=2)*t*(((f*=1.525)+1)*t+f)+2)+i}};Sd.Effects.Style=function(n,t,i){if(i=="selected"&&Sd.Common.Browser.safari&&n.parentNode.selectedIndex,n&&n.constructor==String&&(n=$id(n)),(Sd.Common.Browser.ie||n!=n.style)&&(n=n.style),t=="opacity"&&Sd.Common.Browser.ie){i!=undefined&&(n.zoom=1,n.filter=(n.filter||"").replace(/alpha\([^)]*\)/,"")+(parseFloat(i).toString()=="NaN"?"":"alpha(opacity="+i*100+")"));var r=n.filter&&n.filter.indexOf("opacity=")>=0?(parseFloat(n.filter.match(/opacity=([^)]*)/)[1])/100).toString():"";return r==""?"1":r}return t=t.replace(/-([a-z])/ig,function(n,t){return t.toUpperCase()}),i!=undefined&&(n[t]=i),n[t]};Sd.Effects.getCSS=function(n,t){var i,r,u,f,o,s;return t=="opacity"&&Sd.Common.Browser.ie?n.style.filter?(parseFloat(n.style.filter.match(/opacity=([^)]*)/)[1])/100).toString():"":(t.match(/float/i)&&(t=Sd.Common.Browser.ie?"styleFloat":"cssFloat"),n.style[t]?i=n.style[t]:document.defaultView&&document.defaultView.getComputedStyle?(t.match(/float/i)&&(t="float"),t=t.replace(/([A-Z])/g,"-$1").toLowerCase(),r=document.defaultView.getComputedStyle(n,null),r?i=r.getPropertyValue(t):t=="display"?i="none":(n.style.olddisplay=n.style.display,n.style.display="block",u=document.defaultView.getComputedStyle(n,""),i=u&&u.getPropertyValue(t)||"",n.style.display=e.style.olddisplay)):n.currentStyle&&(f=t.replace(/\-(\w)/g,function(n,t){return t.toUpperCase()}),i=n.currentStyle[t]||n.currentStyle[f],!/^\d+(px)?$/i.test(i)&&/^\d/.test(i)&&(o=n.style.left,s=n.runtimeStyle.left,n.runtimeStyle.left=n.currentStyle.left,n.style.left=i||0,i=n.style.pixelLeft+"px",n.style.left=o,n.runtimeStyle.left=s)),i)};Sd.Effects.Hover=Class.create();Sd.Effects.Hover.prototype={activityDelay:1e5,delay:250,initialize:function(n,t,i,r){if(n.constructor==String&&(n=$id(n)),n!=null){this.ele=n;this.funcOver=t;this.funcOut=i;r&&(this.delay=r);var u=Function.createDelegate(this,this.hoverOver),f=Function.createDelegate(this,this.hoverOut);Sd.Common.addEvent(this.ele,"mouseover",u,this.ele.id+"Hover_MouseOver");Sd.Common.addEvent(this.ele,"mouseout",f,this.ele.id+"Hover_MouseOut")}},hoverOver:function(){this.clearTimeout();this.over=!0;var n=Function.createDelegate(this,this.fireOver);this.overHandler=window.setTimeout(n,this.delay)},fireOver:function(){if(this.over){this.funcOver.apply(this.ele);var n=Function.createDelegate(this,this.fireOut);this.timeoutFunc=window.setTimeout(n,this.activityDelay)}},hoverOut:function(){this.open=!1;this.overHandler&&window.clearTimeout(this.overHandler);var n=Function.createDelegate(this,this.fireOut);this.overHandler=window.setTimeout(n,this.delay)},fireOut:function(){this.overHandler&&window.clearTimeout(this.overHandler);this.overHandler=0;this.funcOut.apply(this.ele)},clearTimeout:function(){this.overHandler&&(this.overHandler=window.clearTimeout(this.overHandler));this.timeoutFunc&&window.clearTimeout(this.timeoutFunc)},destroy:function(){this.clearTimeout();Sd.Common.removeEvent(this.ele,"mouseover",this.ele.id+"Hover_MouseOver");Sd.Common.removeEvent(this.ele,"mouseout",this.ele.id+"Hover_MouseOut")}};Sd.Effects.fadeOut=function(n,t,i,r){return Sd.Effects.perform(n,{opacity:"hide"},t,"linear",i,{hideElement:r})};Sd.Effects.fadeIn=function(n,t,i,r){return Sd.Effects.perform(n,{opacity:"show"},t,"linear",i,{showElement:r})};Sd.Effects.slideDown=function(n,t,i){return Sd.Effects.perform(n,{height:"show"},t,"linear",i)};Sd.Effects.slideUp=function(n,t,i){return Sd.Effects.perform(n,{height:"hide"},t,"linear",i)};Sd.Effects.slideShow=function(n,t){var u,r,e,f,o;n&&n.constructor==String&&(n=$id(n));u=[];r=t;for(e in Sd.Effects.slideShow.defaults)r[e]==null&&(r[e]=Sd.Effects.slideShow.defaults[e]);for(f=n.firstChild;f;f=f.nextSibling)f.nodeType!=1||n&&f==n||u.push(f);for(r.pause&&new Sd.Effects.Hover(n,function(){r.paused=1;clearTimeout(n.cycleTimeout);n.cycleTimeout=0},function(){r.paused=0;clearTimeout(n.cycleTimeout);n.cycleTimeout=0;r.timeout&&(n.cycleTimeout=setTimeout(function(){Sd.Effects.slideShow.perform(u,r,0)},r.timeout))}),n.style.position="relative",r.width&&(n.style.width=r.width),r.height&&r.height!="auto"&&(n.style.height=r.height),i=0;i<u.length;i++)Sd.Effects.Style(u[i],"z-index",u.length-i),Sd.Effects.Style(u[i],"position","absolute"),Sd.Effects.Style(u[i],"display","none");Sd.Effects.Style(u[0],"display","block");r.fxNext!=null&&r.fxPrev!=null?(r.fxDiff=!0,o=Sd.Effects.slideShow.transitions[r.fxNext]):o=Sd.Effects.slideShow.transitions[r.fx];Sd.Effects.isFunction(o)&&o(n,u,r);r.cssBefore=r.cssBefore||{};r.animIn=r.animIn||{};r.animOut=r.animOut||{};for(prop in r.cssBefore)prop!=null&&Sd.Effects.Style(u[0],prop,r.cssBefore[prop]);for(prop in r.cssFirst)prop!=null&&Sd.Effects.Style(u[0],prop,r.cssFirst[prop]);if(r.timeout)for(r.speed.constructor==String&&(r.speed={slow:600,fast:200}[r.speed]||400),r.sync||(r.speed=r.speed/2);r.timeout-r.speed<250;)r.timeout+=r.speed;r.easing&&(r.easeIn=r.easeOut=r.easing);r.speedIn||(r.speedIn=r.speed);r.speedOut||(r.speedOut=r.speed);r.nextSlide=r.random?Math.floor(Math.random()*(u.length-1))+1:1;r.currSlide=0;r.click&&!r.next&&(r.next=r.click);r.next&&Sd.Common.addEvent($id(r.next),"mousedown",function(){return Sd.Effects.slideShow.advance(u,r,1)},n.id+"slideShowNext");r.prev&&Sd.Common.addEvent($id(r.prev),"mousedown",function(){return Sd.Effects.slideShow.advance(u,r,-1)},n.id+"slideShowPrev");r.timeout&&(this.cycleTimeout=setTimeout(function(){Sd.Effects.slideShow.perform(u,r,0)},r.timeout+(r.delay||0)))};Sd.Effects.slideShow.advance=function(n,t,i){if(!t.isAnim&&!t.paused){t.isAnim=!0;var r=n[0].parentNode,u=r.cycleTimeout;return u&&(clearTimeout(u),r.cycleTimeout=0),t.nextSlide=t.currSlide+i,t.nextSlide<0?t.nextSlide=n.length-1:t.nextSlide>=n.length&&(t.nextSlide=0),t.fxDiff&&(init=i==1?Sd.Effects.slideShow.transitions[t.fxNext]:Sd.Effects.slideShow.transitions[t.fxPrev],Sd.Effects.isFunction(init)&&init(r,$slides,t)),Sd.Effects.slideShow.perform(n,t,1,function(){t.isAnim=!1}),!1}};Sd.Effects.slideShow.perform=function(n,t,i,r){var o=n[0].parentNode,s=n[t.currSlide],u=n[t.nextSlide],f,e;if(Sd.Effects.isFunction(t.before)&&t.before(s,u,t),i||!t.paused){if(t.autostop&&--t.countdown==0)return;if(t.nextSlide!=t.currSlide){for(prop in t.cssBefore)prop!=null&&Sd.Effects.Style(u,prop,t.cssBefore[prop]);f=function(){Sd.Effects.perform(u,t.animIn,t.speedIn,t.easeIn,r)};Sd.Effects.perform(s,t.animOut,t.speedOut,t.easeOut,function(){t.sync||f()});t.sync&&f()}if(t.random)for(t.currSlide=t.nextSlide;t.nextSlide==t.currSlide;)t.nextSlide=Math.floor(Math.random()*n.length);else e=t.nextSlide+1==n.length,t.nextSlide=e?0:t.nextSlide+1,t.currSlide=e?n.length-1:t.nextSlide-1}t.timeout&&(clearTimeout(o.cycleTimeout),o.cycleTimeout=setTimeout(function(){Sd.Effects.slideShow.perform(n,t,0)},t.timeout))};Sd.Effects.slideShow.transitions={scrollRight:function(n,t,i){Sd.Effects.Style(n,"overflow","hidden");i.before=function(n,t,i){i.cssBefore.left=0-n.offsetWidth+"px";i.cssBefore.display="block";i.animOut.left=n.offsetWidth};i.cssFirst={left:"0px"};i.animIn={left:0}},scrollLeft:function(n,t,i){Sd.Effects.Style(n,"overflow","hidden");i.before=function(n,t,i){i.cssBefore.left=n.offsetWidth+"px";i.cssBefore.display="block";i.animOut.left=0-n.offsetWidth};i.cssFirst={left:"0px"};i.animIn={left:0}},fade:function(n,t,i){Sd.Effects.Style(n,"overflow","hidden");i.before=function(n,t,i){Sd.Common.Browser.ie&&(n.style.filter="alpha(opacity=100)",n.style.zoom=1);i.cssBefore.display="block";Sd.Effects.perform(n,{opacity:1},i.speed)};i.animIn={opacity:1};i.animOut={opacity:0};i.cssAfter={display:"none"}}};Sd.Effects.slideShow.defaults={fx:"fade",timeout:4e3,speed:1e3,speedIn:null,speedOut:null,next:null,prev:null,pager:null,before:null,after:null,easing:"linear",easeIn:null,easeOut:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,height:"auto",sync:1,fit:0,pause:0,autostop:0,delay:0,isAnim:0,fxNext:null,fxPrev:null,fxDiff:0};Sd.SlidingMenu=Class.create();Sd.SlidingMenu.show=function(n,t,i,r,u,f,e,o){var s,h;$(".slidingmenu").not(n).slideUp(50);n.is(":visible")?n.slideUp(50):(s=u,f&&(s-=$(n).width(),s+=o),n.css({top:r+e+"px",left:s+"px"}).slideDown(100,function(){t&&t()}));n.click(function(n){n.stopPropagation()});h=function(){n.slideUp(100,function(){i&&i();$(document).unbind("click",h)})};$(document).bind("click",h)};$(document).ready(function(){function h(){var n=$('input[id$="_CreationDate"]').datepicker("getDate");$('input[id$="_AutoHideCheckbox"]').is(":checked")&&n!==null?$('input[id$="_SchedulePostCheckbox"]').removeAttr("disabled"):($('input[id$="_SchedulePostCheckbox"]').attr("disabled","disabled"),$('input[id$="_SchedulePostCheckbox"]').removeAttr("checked"))}var n=$("div[id$=_PostContainer]:eq(0)"),i=$(n).data("postId"),o,t,c,l,u,r,b,s;if($(".secondary").click(function(){$(".secondary").toggle();$(".primary").fadeIn(1e3);$("[id$=_PostContainer]").find(".tray").fadeToggle(1e3)}),h(),$('input[id$="_CreationDate"]').datepicker({onSelect:function(){h()}}),$('input[id$="_CreationDate"]').change(function(){h()}),$('input[id$="_AutoHideCheckbox"]').click(function(){h()}),$(".button.search").click(function(n){n.stopPropagation();n.preventDefault();var t=$(n.target),i=$(t).position();Sd.SlidingMenu.show($("#postsearchbox"),function(){$("#postsearchbox .searchtext").focus()},null,i.top,i.left,!1,$(t).height(),$(t).width())}),$("#postsearchbox a.search").click(function(n){n.preventDefault();var t=$("#postsearchbox .searchtext").val();t!=""&&i>0&&(window.location=BASEPATH+"search;"+t+"/post;"+i)}),$("#postsearchbox .searchtext").keypress(function(n){n.which==13&&(n.preventDefault(),$("#postsearchbox a.search").triggerHandler("click"))}),$(".button.subscribe").click(function(n){n.stopPropagation();n.preventDefault();var t=$(n.target),i=$(t).position();return Sd.SlidingMenu.show($("#postsubscribebox"),null,null,i.top,i.left,!1,$(t).height(),$(t).width()),!1}),$("#postsubscribebox .subscribenow").is(":checked")&&($("#postsubscribebox #subscribenoemail").removeClass("disabled"),$("#postsubscribebox #subscribenoemail input").removeAttr("disabled"),$("#postsubscribebox #subscribeemail").removeClass("disabled"),$("#postsubscribebox #subscribeemail input").removeAttr("disabled"),$(".button.subscribe").addClass("subscribeselected")),$("#postsubscribebox .subscribenow").click(function(n){var u=$(n.target),t=$(u).is(":checked"),r=!1;t&&$("#subscribeemail input").is(":checked")&&(r=!0);t?($("input[id$=_PostSubscribe]").is(":checked")||$("input[id$=_PostSubscribe]").click(),$("input[id$=subscribenoemail]").attr("checked","checked"),$(".button.subscribe").addClass("subscribeselected")):($("input[id$=_PostSubscribe]").removeAttr("checked"),$("input[id$=_EmailSubscribe]").removeAttr("checked"),$(".button.subscribe").removeClass("subscribeselected"));StardockForums.Subscriptions.Save(i,t,r,Base.Post.saveSubscriptionCallback,Base.Post.error)}),$("#subscribenoemail").change(function(){var n=$("#postsubscribebox .subscribenow").is(":checked"),t=!1;n&&$("#subscribeemail input").is(":checked")&&(t=!0);$("input[id$=_EmailSubscribe]").removeAttr("checked");StardockForums.Subscriptions.Save(i,n,t,Base.Post.saveSubscriptionCallback,Base.Post.error)}),$("#subscribeemail").change(function(){var n=$("#postsubscribebox .subscribenow").is(":checked"),t=!1;n&&$("#subscribeemail input").is(":checked")&&(t=!0);$("input[id$=_EmailSubscribe]").is(":checked")||$("input[id$=_EmailSubscribe]").click();StardockForums.Subscriptions.Save(i,n,t,Base.Post.saveSubscriptionCallback,Base.Post.error)}),$(".scrollable").bind("mousewheel DOMMouseScroll",function(n){var t=null;n.type=="mousewheel"?t=n.originalEvent.wheelDelta*-1:n.type=="DOMMouseScroll"&&(t=40*n.originalEvent.detail);t&&(n.preventDefault(),$(this).scrollTop(t+$(this).scrollTop()))}),o=$("body:eq(0)").data("accessLevel"),typeof o=="undefined"&&(o=0),t=[],$("a[id$=_LinkUser]").each(function(n,i){var f=$(this).closest(".postcontainer"),r=$(f).data("authorId"),u=$(f).data("authorName");t[n]=new Sd.Menus.Menu($(i).attr("id"),"userMenu"+n,"down",!0);t[n].addHeader(u);t[n].addItem(BASEPATH+"user/"+r,"View "+u+"'s Profile",null);o>=1&&(t[n].addItem(BASEPATH+"email/"+r,"Email "+u,null),t[n].addItem(BASEPATH+"pm/new/"+r,"Private Message "+u,null));t[n].addItem(BASEPATH+"posts/"+r,"Find Posts By "+u,null);o>=7&&(t[n].addHeader("Admin Functions",!1),t[n].addItem(BASEPATH+"admin.aspx?user&acid="+r,"Edit User",null),t[n].addItem(BASEPATH+"admin.aspx?perms&acid="+r,"Edit User Permissions",null),t[n].addItem("https://sam.stardock.com/Customers/customer#/?command=accountid&search="+r,"Customer Lookup",null),t[n].addItem(BASEPATH+"replies/"+r,"View User Replies",null));document["userMenu"+n]=t[n];$(i).click(function(t){t.preventDefault();Sd.Menus.showMenu("userMenu"+n)});$(f).find("img[id$=_ImageAvatar]").click(function(n){n.preventDefault();$(i).triggerHandler("click")})}),c=$(".button.tools"),c.length>0&&(u=c[0],r=$(n).data("permissions"),r.length>0)){var i=$(n).data("postId"),a=$(n).data("deleted")=="True",v=$(n).data("locked")=="True",y=$(n).data("visible")=="True",p=$(n).data("sticky")=="True",f=new Sd.Menus.Menu($(u).attr("id"),"toolsMenu","down",!0);f.addHeader("Post Tools",!1);r.indexOf("canEdit")>-1&&f.addItem(BASEPATH+"editpost/"+i,"Edit Post",null);r.indexOf("canDelete")>-1&&f.addItem(BASEPATH+"mod/"+i+"/"+(a?"undelete":"delete"),(a?"Undelete":"Delete")+" Post",null);r.indexOf("canLock")>-1&&f.addItem(BASEPATH+"mod/"+i+"/"+(v?"unlock":"lock"),(v?"Unlock":"Lock")+" Post",null);r.indexOf("canHide")>-1&&f.addItem(BASEPATH+"mod/"+i+"/"+(y?"hide":"show"),(y?"Hide":"Show")+" Post",null);r.indexOf("canSticky")>-1&&f.addItem(BASEPATH+"mod/"+i+"/"+(p?"unsticky":"sticky"),(p?"Unsticky":"Sticky")+" Post",null);$(u).bind("click",function(n){n.preventDefault();Sd.Menus.showMenu("toolsMenu")})}if(l=$(".button.links"),l.length>0&&(u=l[0],r=$(n).data("permissions"),r.length>0)){var i=$(n).data("postId"),a=$(n).data("deleted")=="True",v=$(n).data("locked")=="True",y=$(n).data("visible")=="True",p=$(n).data("sticky")=="True",w=$(n).data("unhide"),e=new Sd.Menus.Menu($(u).attr("id"),"linksMenu","down",!0);e.addHeader("Post links",!1);r.indexOf("canEdit")>-1&&(b=$("link[rel=canonical]").attr("href"),s=$('input[id$="_BaseArticleLink"]').val(),w&&(e.addItem("https://www.stardock.com/news/"+s," Unhidden Link - Software",null),e.addItem("https://www.stardock.net/article/"+s+"?u="+w," Unhidden Link - Entertainment",null),e.addSeparator()),e.addItem("https://www.stardock.com/news/"+s," Article View - Software",null),e.addItem("https://www.stardock.net/article/"+s," Article View - Entertainment",null));$(u).bind("click",function(n){n.preventDefault();Sd.Menus.showMenu("linksMenu")})}Sd.Post.Images.init(".postbody");$("img[id$=_ImageAvatar]").bind("error",function(){Base.Post.fixAvatar(this)});$(".button.viewedits").on("click",function(n){n.preventDefault();var t=$(n.target).closest(".postcontainer"),i=$(t).data("postDataId"),r=$(t).find("> .edits");Base.Post.showEdits(i,r.attr("id"))});$(".button.report").bind("click",function(n){n.preventDefault();var t=$(n.target).closest(".postcontainer"),r=$(t).data("postDataId");Base.Report.pop(this,i,r)});$(".postcontainer.op a[id$=_KarmaEarned]").hover(function(n){var t=$(n.target),i=$(t).position();Sd.SlidingMenu.show($("#postkarmagiversbox"),null,null,i.top,i.left,!1,$(t).height(),$(t).width())},function(){});$(".button.karma").click(function(n){n.stopPropagation();n.preventDefault();var t=$(n.target),r=$(t).closest(".postcontainer"),u=$(r).data("authorId"),f=$(r).hasClass("op")?0:$(r).data("postDataId");$(t).hasClass("given")||StardockForums.ForumService.GiveKarma(1,u,"",i,f,Base.Post.karmaCallback,Base.Post.karmaError,$(t))});$(".button.delete").bind("click",function(){return confirm("Are you sure you wish to delete this post?")});$(".button.quote").bind("click",function(n){n.preventDefault();var t=$(n.target).closest(".postcontainer"),r=$(t).data("postDataId"),u=$(t).data("authorName"),f=$(t).data("replyNumber"),i=$(t).find(".postbody");$(t).hasClass("op")?Sd.UI.Post.quote(i):Sd.UI.Post.quoteReply(i,u,f,r);$id("_QuickReply").scrollIntoView()});$("select[id$=_ListCategory]").change(function(){$("select[id$=_ListCategory] option:selected").text().indexOf("Events")>=0||$("select[id$=_ListCategory] option:selected").text().indexOf("Press")>=0||$("select[id$=_ListCategory] option:selected").text().indexOf("News")>=0||$("select[id$=_ListCategory] option:selected").text().indexOf("Blog")>=0||$.trim($("select[id$=_ListCategory] option:selected").text())=="Corporate"});$("select[id$=_ListCategory]").triggerHandler("change");$(".awards").tooltip({track:!0,show:!1,hide:!1});$("input[id$=_PostSubmit]").click(function(n){$(this).attr("disabled",!0);Base.Post.validate()||(n.preventDefault(),$(this).removeAttr("disabled"))})});Base.Post=Class.create();Base.Post.fixAvatar=function(n){n.className+=" none";n.src=BASEPATH+"images/base/space.gif"};Base.Post.validate=function(n){var t="",i;if($("select[id$=_ListCategory] option:selected").text().toLowerCase().indexOf("press")>=0&&$id("_FileUpload",null,"input").value==""&&window.location.pathname.toLowerCase().indexOf("newpost")>=0&&(t+="\nYou must select an image file to upload for the press release."),$("select[id$=_ListCategory] option:selected").text().toLowerCase().indexOf("press")>=0&&$id("_FileUpload",null,"input").value!=""&&$id("_FileUpload",null,"input").value.toLowerCase().indexOf("jpg")==-1&&(t+="\nYour press release image must be JPG format and extension."),Sd.Validate.requireValue($id("_ListCategory",null,"select"))==!1&&(t+="\nPlease select a Category."),Sd.Validate.requireValue($id("_TextTitle",null,"input"))==!1&&(t+="\nPlease enter a Title."),Sd.UI.tinyValid("_Editor")==!1){var r=navigator.userAgent.match(/iPad/i)!=null,u=navigator.userAgent.match(/iPhone/i)!=null,f=navigator.userAgent.match(/iPod/i)!=null;r||u||f?($id("_Editor",null,"textarea").value==null||$id("_Editor",null,"textarea").value=="")&&(t+="\nPlease enter a Message before submitting the post."):t+="\nPlease enter a Message before submitting the post."}return t.length>0?(alert("Post Error!\n"+t),!1):(uploadTinyMce(this),!n)?!0:(n.style.display="none",i=$id("_SubmittingStatus"),i&&(i.disabled=!0,i.value="Submitting Reply...",i.style.display=""),!0)};Base.Post.showEdits=function(n,t){var i=$id(t);i.isHidden()?(StardockForums.ForumService.GetEdits(n,Base.Post.showEditsCallback,Base.Post.error,t),i.show()):i.hide()};Base.Post.showEditsCallback=function(n,t){var i=$id(t);i.innerHTML=n.Code==Stardock.Web.UI.Services.ServiceResultCode.Success?n.Obj:'<b class="error">There was a problem getting this post\'s edits. Please refresh the page in a few moments and try again.<\/b>'};Base.Post.error=function(n){alert("An error occurred:\n\n"+n.get_message()+"\n\n"+n.get_stackTrace()+"\n\n"+n.get_statusCode()+"\n\n"+n.get_stackTrace())};Base.Post.saveSubscriptionCallback=function(){$("#postsubscribebox .subscribenow").is(":checked")?($("#postsubscribebox #subscribenoemail").removeClass("disabled"),$("#postsubscribebox #subscribenoemail input").removeAttr("disabled"),$("#postsubscribebox #subscribeemail").removeClass("disabled"),$("#postsubscribebox #subscribeemail input").removeAttr("disabled"),$(".subscribepost").parent().addClass("subscribeselected")):($("#postsubscribebox #subscribenoemail").addClass("disabled"),$("#postsubscribebox #subscribenoemail input").attr("disabled","disabled"),$("#postsubscribebox #subscribenoemail input").attr("checked","true"),$("#postsubscribebox #subscribeemail").addClass("disabled"),$("#postsubscribebox #subscribeemail input").attr("disabled","disabled"),$("#postsubscribebox #subscribeemail input").removeAttr("checked"),$(".subscribepost").parent().removeClass("subscribeselected"))};Base.Post.karmaCallback=function(n,t){if(n.Code==Stardock.Web.UI.Services.ServiceResultCode.Success){var i=t.position();t.addClass("given")}else n.Code==Stardock.Web.UI.Services.ServiceResultCode.Exists||alert("You were unable to give "+n.Obj.TargetName+" karma. An error occurred. Please try again later.")};Base.Post.karmaReasonCallback=function(n,t){n.Code==Stardock.Web.UI.Services.ServiceResultCode.Success?$(".reasonsuccess",t.closest(".content")).show():alert("Unable to update karma reason. Please try again later.")};Base.Post.karmaError=function(n){alert("An error occurred:\n\n"+n.get_message()+"\n\n"+n.get_stackTrace()+"\n\n"+n.get_statusCode()+"\n\n"+n.get_stackTrace())};Base.Post.karmaReasonFocus=function(n){n.focus()};Base.Post.karmaReasonSuccessClear=function(){$("#postkarmareasonbox .reasonsuccess").hide()};$(document).ready(function(){$("input[id$=_ReplySubmit]").click(function(n){$(this).attr("disabled",!0);Base.Reply.validate(this)||(n.preventDefault(),$(this).removeAttr("disabled"))})});Base.Reply=Class.create();Base.Reply.validate=function(n){var t;if(Sd.UI.tinyValid("_Editor")==!1){var i=navigator.userAgent.match(/iPad/i)!=null,r=navigator.userAgent.match(/iPhone/i)!=null,u=navigator.userAgent.match(/iPod/i)!=null;if(i||r||u){if($id("_Editor",null,"textarea").value==null||$id("_Editor",null,"textarea").value=="")return alert("Reply Error!\nYou cannot submit an empty reply!"),!1}else return alert("Reply Error!\nYou cannot submit an empty reply!"),!1}return(uploadTinyMce(this),!n)?!0:(n.style.display="none",t=$id("_SubmittingStatus"),t&&(t.disabled=!0,t.value="Submitting Reply...",t.style.display=""),!0)};Base.UI=Class.create();Base.UI.waitMask=function(n,t){var u=Sd.UI.Mask.create(n),f=$id(u),i=document.createElement("div"),e=document.createElement("img"),r=document.createElement("div"),o,s;return i.className="waitmask",e.src=BASEPATH+"images/Base/ajax.loading.gif",r.innerHTML="<br/>Please wait...",t&&(r.innerHTML+="<br/>"+messsage),i.appendChild(e),i.appendChild(r),f.appendChild(i),o=Sd.Common.getElementPos(f),s=Sd.Common.getElementPos(i),i.style.marginTop=(o.height-s.height)/2+"px",u};Base.UI.sendLost=function(){var n=$id("_TextNickEmail"),t;return n.value.trim()==""?(alert("Please enter your Username or Email Address before clicking the button"),!1):($id("_Wait").show(),t=$id("_ButtonSendLost"),t.hide(),StardockForums.Account.SendPasswordReset(n.value,Base.UI.sendLostCallback,Base.UI.error),!1)};Base.UI.sendLostCallback=function(n){if($id("_Wait").hide(),n.Code==0)$id("_Success").show();else{$id("_Fail").show();var t=$id("_ButtonSendLost");t.show()}};Base.UI.sendLostKeypress=function(n){var t=n.keyCode||n.which;return t==13?(Base.UI.sendLost(),!1):!0};Base.UI.sendActivate=function(){var n=$id("_TextNickEmail"),t;return n.value.trim()==""?(alert("Please enter your Username or Email Address before clicking the button."),!1):($id("_Wait").show(),t=$id("_ButtonSendAct"),t.hide(),StardockForums.Account.SendValidationEmail(n.value,Base.UI.sendActivateCallback,Base.UI.error),!1)};Base.UI.sendActivateCallback=function(n){if($id("_Wait").hide(),n.Code==0)$id("_Success").show();else{$id("_Fail").show();var t=$id("_ButtonSendAct");t.show()}};Base.UI.sendActivateKeypress=function(n){var t=n.keyCode||n.which;return t==13?(Base.UI.sendActivate(),!1):!0};Base.UI.error=function(n){alert("An error occurred:\n\n"+n.get_message()+"\n\n"+n.get_stackTrace()+"\n\n"+n.get_statusCode()+"\n\n"+n.get_stackTrace())};Base.UI.hiliteTable=function(n){var t=$id("hiliteTable"),u=n?0:1,r;if(t!=null&&t.rows!=null)for(i=u;i<t.rows.length;i++)r=t.rows[i],r.onmouseover=Base.UI.hiliteRow,r.onmouseout=Base.UI.loliteRow};Base.UI.hiliteHolder="";Base.UI.hiliteColor="#cccccc";Base.UI.hiliteRow=function(){for(Base.UI.hiliteHolder=this.cells[0].style.backgroundColor,i=0;i<this.cells.length;i++)this.cells[i].style.backgroundColor=Base.UI.hiliteColor};Base.UI.loliteRow=function(){for(i=0;i<this.cells.length;i++)this.cells[i].style.backgroundColor=Base.UI.hiliteHolder};Base.UI.fixAvatar=function(n){n.src=BASEPATH+"images/space.gif";n.className+=" noavatar"};Base.UI.fixPersonal=function(n){n.className=n.src.indexOf("none")>0?"noimage":"imageerror";n.src=BASEPATH+"images/space.gif"};Base.UI.fixDesktop=function(n){n.className=n.src.indexOf("none")>0?"noimage":"imageerror";n.src=BASEPATH+"images/space.gif"};Base.UI.checkUsername=function(){var r=$id("_ButtonChangeUser",null,"input"),u=$id("_TextCurrentPassword1",null,"input"),t=$id("_TextUsername",null,"input"),i=$id("_TextUsernameRetype",null,"input"),n=$id("_ChangeUserError");return(n.innerHTML="",Sd.Validate.requireValue(t)==!1||Sd.Validate.requireValue(i)==!1)?(n.innerHTML="Please fill in all fields. They are required to proceed.",n.className="error",!1):Sd.Validate.requireValue(u)==!1?(n.innerHTML="Please fill in your current password. This is required to proceed and is used for security purposes.",n.className="error",!1):Sd.Validate.isMatch(t,i)==!1?(n.innerHTML="Please re-type your new Username before continuing. They must match.",n.className="error",!1):t.value.length<3||t.value.length>30?(n.innerHTML="Username length cannot be shorter than 3 characters or longer than 30 characters.",n.className="error",!1):(Sd.UI.disableButton(r),!0)};Base.UI.checkPassword=function(){var r=$id("_ButtonChangePass",null,"input"),u=$id("_TextCurrentPassword2",null,"input"),t=$id("_TextPassword",null,"input"),i=$id("_TextPasswordRetype",null,"input"),n=$id("_ChangePassError");return(n.innerHTML="",Sd.Validate.requireValue(t)==!1||Sd.Validate.requireValue(i)==!1)?(n.innerHTML="Please fill in all fields. They are required to proceed.",n.className="error",!1):Sd.Validate.requireValue(u)==!1?(n.innerHTML="Please fill in your current password. This is required to proceed and is used for security purposes.",n.className="error",!1):Sd.Validate.isMatch(t,i)==!1?(n.innerHTML="Please re-type your new Password before continuing. They must match.",n.className="error",!1):t.value.length<8?(n.innerHTML="Passwords must be 8 characters or more.",n.className="error",!1):/.*[1-9].*/.test(t.value)?(Sd.UI.disableButton(r),!0):(n.innerHTML="Passwords must contain at least 1 numerical character.",n.className="error",!1)};Base.Karma=Class.create();Base.Karma.pop=function(n,t,i,r,u,f){var e,o;if(Base.Karma.current)if(confirm("You already have a Karma dialog open.\n\nWould you like to close the current dialog and give someone else Karma?"))Base.Karma.current.close();else return;n.hide||Sd.Proto.extend(n);var w=$id(n.id.replace("_LinkKarma","_Reply"))._bounds(),b=n._bounds().x+10,k=w.y+10,d="Give "+t+" Karma",s=$new("div",null,"karma"),v=$new("div",null,"msg"),h=$new("div",null,"row"),c=$new("div",null,"row"),y=$new("label"),p=$new("label",null,"number"),l=$new("textarea"),a=$new("select");for(v.innerHTML="Karma is a way of letting other users know who is helpful, nice, or just a fun person. Only give someone Karma if you feel they deserve it.",e=i;e>0;e--)a.options[i-e]=new Option("+"+e+" Karma",e);p.innerHTML="How Much:";c.appendChild(p);c.appendChild(a);y.innerHTML="The Reason:";l.maxLength=255;h.appendChild(y);h.appendChild(l);s.appendChild(v);s.appendChild(c);s.appendChild(h);o={};o.target=r;o.postId=u;o.postDataId=f==null?0:f;var g=Function.createDelegate(o,Base.Karma.give),nt=function(){this.dialog.close()},tt={givekarma:g,forgetit:nt};Base.Karma.current=new Sd.UI.Dialog("_KarmaDialog",Sd.UI.Dialog.type.small,tt,b,k,d,s,Base.Karma.onClose);Base.Karma.current.data=o;a.id=Base.Karma.current.id+"_DropDownKarma";l.id=Base.Karma.current.id+"_TextKarma"};Base.Karma.popNoPost=function(n,t,i,r){var u,e;try{if(Base.Karma.current)if(confirm("You already have a Karma dialog open.\n\nWould you like to close the current dialog and give someone else Karma?"))Base.Karma.current.close();else return;n.hide||Sd.Proto.extend(n);var y=n._bounds().x-129,p=n._bounds().y-215,w="Give "+t+" Karma",f=$new("div",null,"karma"),l=$new("div",null,"msg"),o=$new("div",null,"row"),s=$new("div",null,"row"),a=$new("label"),v=$new("label",null,"number"),h=$new("textarea"),c=$new("select");for(l.innerHTML="Karma is a way of letting other users know who is helpful, nice, or just a fun person. Only give someone Karma if you feel they deserve it.",u=i;u>0;u--)c.options[i-u]=new Option("+"+u+" Karma",u);v.innerHTML="How Much:";s.appendChild(v);s.appendChild(c);a.innerHTML="The Reason:";h.maxLength=255;o.appendChild(a);o.appendChild(h);f.appendChild(l);f.appendChild(s);f.appendChild(o);e={};e.target=r;var b=Function.createDelegate(e,Base.Karma.giveNoPost),k=function(){this.dialog.close()},d={givekarma:b,forgetit:k};Base.Karma.current=new Sd.UI.Dialog("_KarmaDialog",Sd.UI.Dialog.type.small,d,y,p,w,f,Base.Karma.onClose);Base.Karma.current.data=e;c.id=Base.Karma.current.id+"_DropDownKarma";h.id=Base.Karma.current.id+"_TextKarma"}catch(g){alert(g)}};Base.Karma.onClose=function(){Base.Karma.current=null};Base.Karma.give=function(){var t=$id(Base.Karma.current.id+"_DropDownKarma"),i=t.options[t.selectedIndex].value,r=$id(Base.Karma.current.id+"_TextKarma").value,n="";if(i<0&&(n="Please select how much Karma to give."),n&&n.length>0){alert(n);return}Base.Karma.current.disable();StardockForums.ForumService.GiveKarma(i,Base.Karma.current.data.target,r,Base.Karma.current.data.postId,Base.Karma.current.data.postDataId,Base.Karma.callback,Base.Karma.error)};Base.Karma.giveNoPost=function(){var t=$id(Base.Karma.current.id+"_DropDownKarma"),i=t.options[t.selectedIndex].value,r=$id(Base.Karma.current.id+"_TextKarma").value,n="";if(i<0&&(n="Please select how much Karma to give."),n&&n.length>0){alert(n);return}Base.Karma.current.disable();StardockForums.ForumService.GiveKarmaNoPost(i,Base.Karma.current.data.target,r,Base.Karma.callback,Base.Karma.error)};Base.Karma.remove=function(n,t,i){i<=0&&alert("Invalid Karma");StardockForums.ForumService.DeleteKarma(t,i,Base.Karma.removeCallback,Base.Karma.error,n)};Base.Karma.error=function(n){alert("An error occurred:\n\n"+n.get_message()+"\n\n"+n.get_stackTrace()+"\n\n"+n.get_statusCode()+"\n\n"+n.get_stackTrace())};Base.Karma.callback=function(n){var t,i=n.Code==Stardock.Web.UI.Services.ServiceResultCode.Success;t=i==!0?"You gave karma to "+n.Obj.TargetName+".":n.Obj.Code==Stardock.Posts.Forums.KarmaResult_ResultCode.LimitError?"You can only give someone karma on their profile once every 5 minutes. Please try again later.":"You were unable to give "+n.Obj.TargetName+" karma. An error occurred. Please try again later.";Base.Karma.current.clearContent();Base.Karma.current.clearMask();Base.Karma.current.clearButtons();Base.Karma.current.addResult(i,t);Base.Karma.current.addButtons({close:function(){this.dialog.close()}})};Base.Karma.removeCallback=function(n,t){var r,f=n.Code==Stardock.Web.UI.Services.ServiceResultCode.Success,i,u;r=f==!0?"Successfully deleted karma.":"Unable to delete karma. An error occurred. Please try again later.";i=t.parentNode.parentNode;u=i.parentNode;u.removeChild(i);alert(r)};Base.Report=Class.create();Base.Report.pop=function(n,t,i){var f;if(Base.Report.current)if(confirm("You already have a Report dialog open.\n\nWould you like to close the current dialog and report a different item?"))Base.Report.current.close();else return;n.hide||Sd.Proto.extend(n);var a=$id(n.id)._bounds(),v=n._bounds().x+10,y=a.y+10,p=n.title,u=$new("div",null,"report"),h=$new("div",null,"msg"),e=$new("div",null,"row"),o=$new("div",null,"row"),c=$new("label"),l=$new("label"),s=$new("textarea"),r=$new("select");h.innerHTML="This form is to be used <b>ONLY<\/b> for reporting objectional content, etc and <b>is not to be used<\/b> as a method of communicating with moderators, replying to posts, or  for other reasons. Abuse of this form will result in disciplinary action!";r.options[0]=new Option("Please select a Reason","");r.options[1]=new Option("Posted SPAM","Posted SPAM");r.options[2]=new Option("Warez or Pirated Software","Warez or Pirated Software");r.options[3]=new Option("TOS Violation","TOS Violation");r.options[4]=new Option("Flame or Trolling","Flame or Trolling");r.options[5]=new Option("Excessive Language","Excessive Language");r.options[6]=new Option("Other (Please specify)","Other");l.innerHTML="Common Reasons:";o.appendChild(l);o.appendChild(r);c.innerHTML="Enter other Information:";s.maxLength=255;e.appendChild(c);e.appendChild(s);u.appendChild(h);u.appendChild(o);u.appendChild(e);f={};f.postId=t;f.postDataId=i==null?0:i;var w=Base.Report.send,b=function(){this.dialog.close()},k={sendreport:w,forgetit:b};Base.Report.current=new Sd.UI.Dialog("_ReportDialog",Sd.UI.Dialog.type.small,k,v,y,p,u,Base.Report.onClose);Base.Report.current.data=f;r.id=Base.Report.current.id+"_DropDownReport";s.id=Base.Report.current.id+"_TextReport"};Base.Report.onClose=function(){Base.Report.current=null};Base.Report.send=function(){var r=$id(Base.Report.current.id+"_DropDownReport"),t=r.options[r.selectedIndex].value,i=$id(Base.Report.current.id+"_TextReport").value,n="";if(t==""&&(n="Please select a reason for your report."),(!i||i.length<4)&&t=="Other"&&(n+="Please enter more information about your report (minimum 6 characters)."),n&&n.length>0){alert(n);return}Base.Report.current.disable();StardockForums.ForumService.Report(Base.Report.current.data.postId,Base.Report.current.data.postDataId,t,i,Base.Report.callback,Base.Report.error)};Base.Report.error=function(n){alert("An error occurred:\n\n"+n.get_message()+"\n\n"+n.get_stackTrace()+"\n\n"+n.get_statusCode()+"\n\n"+n.get_stackTrace())};Base.Report.callback=function(n){var t,i=n.Code==Stardock.Web.UI.Services.ServiceResultCode.Success;t=i==!0?"Your report was sent and has been entered into the queue. Please allow some time for our moderators to review it.":"An error prevented your report from being submitted. It has been logged and will be reviewed.";Base.Report.current.clearContent();Base.Report.current.clearMask();Base.Report.current.clearButtons();Base.Report.current.addResult(i,t);Base.Report.current.addButtons({close:function(){this.dialog.close()}})}