monthArray=["January","February","March","April","May","June","July","August","September","October","November","December"];Date.prototype.toNLTime=function(){hour=this.getHours();ampm="am";if(hour>12){hour=hour-12;ampm="pm"}if(hour==12){ampm="pm"}if(hour==0){hour="00"}return(hour+":"+this.getMinutes().toPaddedString(2)+ampm)};Date.prototype.toNLDateTime=function(){return(monthArray[this.getMonth()]+" "+this.getDate()+", "+this.toNLTime())};Date.prototype.toNLDate=function(){return([monthArray[this.getMonth()],this.getDate()+",",this.getFullYear()].join(" "))};Date.prototype.friendly_date=function(){today=new Date();timestamp=this.getTime();days=86400;seconds_ago=(today-timestamp)/1000;if(seconds_ago<300){return("just now")}else{if(seconds_ago<3600){return(Math.round(seconds_ago/60)+" minutes ago")}else{if((seconds_ago<(1*days))&&(this.getDay()==today.getDay())){return(pluralize(Math.round(seconds_ago/3600),"hour")+" ago")}else{if((seconds_ago<(2*days))&&(Math.abs(this.getDay()-today.getDay())<=1)){return("yesterday at "+this.toNLTime())}else{if((this.getFullYear()==today.getFullYear())||((today.getFullYear()-this.getFullYear()<=1)&&((today.getMonth()-this.getMonth())<=-11))){return(this.toNLDateTime())}else{return(this.toNLDate())}}}}}};function swapstyle(){var B,A;for(B=0;(A=document.getElementsByTagName("link")[B]);B++){if(A.getAttribute("rel").indexOf("style")!=-1&&A.getAttribute("title")){A.disabled=true;if(A.getAttribute("title")=="larger"){A.disabled=false}}}}function topic_timestamps(){today=new Date();start_array=$$("span.topic_started");i=0;start_array.each(function(A){date=new Date(started[i++]*1000);Element.update(A,"Started: "+date.friendly_date())});last_array=$$("span.topic_lastreply");i=0;last_array.each(function(A){last=lastreply[i++];if(last){date=new Date(last*1000);Element.update(A,"Last reply: "+date.friendly_date()+" "+A.innerHTML)}})}function pluralize(A,B){B=A+" "+B;if(A==1){return(B)}else{return(B+"s")}}function getcookie(A){var B=document.cookie.match(new RegExp("(^|;)\\s*"+escape(A)+"=([^;\\s]*)"));return(B?unescape(B[2]):null)};